44c3d3b511a4dcdad4c4239477d5d322c5a07d51
[tridge/bind9.git] / 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-2010  Internet Systems Consortium, Inc. ("ISC")
6  - Copyright (C) 2000-2003  Internet Software Consortium.
7  -
8  - Permission to use, copy, modify, and/or distribute this software for any
9  - purpose with or without fee is hereby granted, provided that the above
10  - copyright notice and this permission notice appear in all copies.
11  -
12  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
13  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14  - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
16  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
17  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18  - PERFORMANCE OF THIS SOFTWARE.
19 -->
20
21 <!-- File: $Id: Bv9ARM-book.xml,v 1.450.4.12 2010/08/16 22:27:17 marka Exp $ -->
22 <book xmlns:xi="http://www.w3.org/2001/XInclude">
23   <title>BIND 9 Administrator Reference Manual</title>
24
25   <bookinfo>
26     <copyright>
27       <year>2004</year>
28       <year>2005</year>
29       <year>2006</year>
30       <year>2007</year>
31       <year>2008</year>
32       <year>2009</year>
33       <year>2010</year>
34       <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
35     </copyright>
36     <copyright>
37       <year>2000</year>
38       <year>2001</year>
39       <year>2002</year>
40       <year>2003</year>
41       <holder>Internet Software Consortium.</holder>
42     </copyright>
43   </bookinfo>
44
45   <chapter id="Bv9ARM.ch01">
46     <title>Introduction</title>
47     <para>
48       The Internet Domain Name System (<acronym>DNS</acronym>)
49       consists of the syntax
50       to specify the names of entities in the Internet in a hierarchical
51       manner, the rules used for delegating authority over names, and the
52       system implementation that actually maps names to Internet
53       addresses.  <acronym>DNS</acronym> data is maintained in a
54       group of distributed
55       hierarchical databases.
56     </para>
57
58     <sect1>
59       <title>Scope of Document</title>
60
61       <para>
62         The Berkeley Internet Name Domain
63         (<acronym>BIND</acronym>) implements a
64         domain name server for a number of operating systems. This
65         document provides basic information about the installation and
66         care of the Internet Systems Consortium (<acronym>ISC</acronym>)
67         <acronym>BIND</acronym> version 9 software package for
68         system administrators.
69       </para>
70
71       <para>
72         This version of the manual corresponds to BIND version 9.7.
73       </para>
74
75     </sect1>
76     <sect1>
77       <title>Organization of This Document</title>
78       <para>
79         In this document, <emphasis>Chapter 1</emphasis> introduces
80         the basic <acronym>DNS</acronym> and <acronym>BIND</acronym> concepts. <emphasis>Chapter 2</emphasis>
81         describes resource requirements for running <acronym>BIND</acronym> in various
82         environments. Information in <emphasis>Chapter 3</emphasis> is
83         <emphasis>task-oriented</emphasis> in its presentation and is
84         organized functionally, to aid in the process of installing the
85         <acronym>BIND</acronym> 9 software. The task-oriented
86         section is followed by
87         <emphasis>Chapter 4</emphasis>, which contains more advanced
88         concepts that the system administrator may need for implementing
89         certain options. <emphasis>Chapter 5</emphasis>
90         describes the <acronym>BIND</acronym> 9 lightweight
91         resolver.  The contents of <emphasis>Chapter 6</emphasis> are
92         organized as in a reference manual to aid in the ongoing
93         maintenance of the software. <emphasis>Chapter 7</emphasis> addresses
94         security considerations, and
95         <emphasis>Chapter 8</emphasis> contains troubleshooting help. The
96         main body of the document is followed by several
97         <emphasis>appendices</emphasis> which contain useful reference
98         information, such as a <emphasis>bibliography</emphasis> and
99         historic information related to <acronym>BIND</acronym>
100         and the Domain Name
101         System.
102       </para>
103     </sect1>
104     <sect1>
105       <title>Conventions Used in This Document</title>
106
107       <para>
108         In this document, we use the following general typographic
109         conventions:
110       </para>
111
112       <informaltable>
113         <tgroup cols="2">
114           <colspec colname="1" colnum="1" colwidth="3.000in"/>
115           <colspec colname="2" colnum="2" colwidth="2.625in"/>
116           <tbody>
117             <row>
118               <entry colname="1">
119                 <para>
120                   <emphasis>To describe:</emphasis>
121                 </para>
122               </entry>
123               <entry colname="2">
124                 <para>
125                   <emphasis>We use the style:</emphasis>
126                 </para>
127               </entry>
128             </row>
129             <row>
130               <entry colname="1">
131                 <para>
132                   a pathname, filename, URL, hostname,
133                   mailing list name, or new term or concept
134                 </para>
135               </entry>
136               <entry colname="2">
137                 <para>
138                   <filename>Fixed width</filename>
139                 </para>
140               </entry>
141             </row>
142             <row>
143               <entry colname="1">
144                 <para>
145                   literal user
146                   input
147                 </para>
148               </entry>
149               <entry colname="2">
150                 <para>
151                   <userinput>Fixed Width Bold</userinput>
152                 </para>
153               </entry>
154             </row>
155             <row>
156               <entry colname="1">
157                 <para>
158                   program output
159                 </para>
160               </entry>
161               <entry colname="2">
162                 <para>
163                   <computeroutput>Fixed Width</computeroutput>
164                 </para>
165               </entry>
166             </row>
167           </tbody>
168         </tgroup>
169       </informaltable>
170
171       <para>
172         The following conventions are used in descriptions of the
173         <acronym>BIND</acronym> configuration file:<informaltable colsep="0" frame="all" rowsep="0">
174                   <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
175                       <colspec colname="1" colnum="1" colsep="0" colwidth="3.000in"/>
176             <colspec colname="2" colnum="2" colsep="0" colwidth="2.625in"/>
177             <tbody>
178               <row rowsep="0">
179                 <entry colname="1" colsep="1" rowsep="1">
180                   <para>
181                     <emphasis>To describe:</emphasis>
182                   </para>
183                 </entry>
184                 <entry colname="2" rowsep="1">
185                   <para>
186                     <emphasis>We use the style:</emphasis>
187                   </para>
188                 </entry>
189               </row>
190               <row rowsep="0">
191                 <entry colname="1" colsep="1" rowsep="1">
192                   <para>
193                     keywords
194                   </para>
195                 </entry>
196                 <entry colname="2" rowsep="1">
197                   <para>
198                     <literal>Fixed Width</literal>
199                   </para>
200                 </entry>
201               </row>
202               <row rowsep="0">
203                 <entry colname="1" colsep="1" rowsep="1">
204                   <para>
205                     variables
206                   </para>
207                 </entry>
208                 <entry colname="2" rowsep="1">
209                   <para>
210                     <varname>Fixed Width</varname>
211                   </para>
212                 </entry>
213               </row>
214               <row rowsep="0">
215                 <entry colname="1" colsep="1">
216                   <para>
217                     Optional input
218                   </para>
219                 </entry>
220                 <entry colname="2">
221                   <para>
222                     <optional>Text is enclosed in square brackets</optional>
223                   </para>
224                 </entry>
225               </row>
226             </tbody>
227           </tgroup>
228         </informaltable>
229       </para>
230     </sect1>
231     <sect1>
232       <title>The Domain Name System (<acronym>DNS</acronym>)</title>
233       <para>
234         The purpose of this document is to explain the installation
235         and upkeep of the <acronym>BIND</acronym> (Berkeley Internet
236         Name Domain) software package, and we
237         begin by reviewing the fundamentals of the Domain Name System
238         (<acronym>DNS</acronym>) as they relate to <acronym>BIND</acronym>.
239       </para>
240
241       <sect2>
242         <title>DNS Fundamentals</title>
243
244         <para>
245           The Domain Name System (DNS) is a hierarchical, distributed
246           database.  It stores information for mapping Internet host names to
247           IP
248           addresses and vice versa, mail routing information, and other data
249           used by Internet applications.
250         </para>
251
252         <para>
253           Clients look up information in the DNS by calling a
254           <emphasis>resolver</emphasis> library, which sends queries to one or
255           more <emphasis>name servers</emphasis> and interprets the responses.
256           The <acronym>BIND</acronym> 9 software distribution
257           contains a
258           name server, <command>named</command>, and a resolver
259           library, <command>liblwres</command>.  The older
260           <command>libbind</command> resolver library is also available
261           from ISC as a separate download.
262         </para>
263
264         </sect2><sect2>
265         <title>Domains and Domain Names</title>
266
267         <para>
268           The data stored in the DNS is identified by <emphasis>domain names</emphasis> that are organized as a tree according to
269           organizational or administrative boundaries. Each node of the tree,
270           called a <emphasis>domain</emphasis>, is given a label. The domain
271           name of the
272           node is the concatenation of all the labels on the path from the
273           node to the <emphasis>root</emphasis> node.  This is represented
274           in written form as a string of labels listed from right to left and
275           separated by dots. A label need only be unique within its parent
276           domain.
277         </para>
278
279         <para>
280           For example, a domain name for a host at the
281           company <emphasis>Example, Inc.</emphasis> could be
282           <literal>ourhost.example.com</literal>,
283           where <literal>com</literal> is the
284           top level domain to which
285           <literal>ourhost.example.com</literal> belongs,
286           <literal>example</literal> is
287           a subdomain of <literal>com</literal>, and
288           <literal>ourhost</literal> is the
289           name of the host.
290         </para>
291
292         <para>
293           For administrative purposes, the name space is partitioned into
294           areas called <emphasis>zones</emphasis>, each starting at a node and
295           extending down to the leaf nodes or to nodes where other zones
296           start.
297           The data for each zone is stored in a <emphasis>name server</emphasis>, which answers queries about the zone using the
298           <emphasis>DNS protocol</emphasis>.
299         </para>
300
301         <para>
302           The data associated with each domain name is stored in the
303           form of <emphasis>resource records</emphasis> (<acronym>RR</acronym>s).
304           Some of the supported resource record types are described in
305           <xref linkend="types_of_resource_records_and_when_to_use_them"/>.
306         </para>
307
308         <para>
309           For more detailed information about the design of the DNS and
310           the DNS protocol, please refer to the standards documents listed in
311           <xref linkend="rfcs"/>.
312         </para>
313       </sect2>
314
315       <sect2>
316         <title>Zones</title>
317         <para>
318           To properly operate a name server, it is important to understand
319           the difference between a <emphasis>zone</emphasis>
320           and a <emphasis>domain</emphasis>.
321         </para>
322
323         <para>
324           As stated previously, a zone is a point of delegation in
325           the <acronym>DNS</acronym> tree. A zone consists of
326           those contiguous parts of the domain
327           tree for which a name server has complete information and over which
328           it has authority. It contains all domain names from a certain point
329           downward in the domain tree except those which are delegated to
330           other zones. A delegation point is marked by one or more
331           <emphasis>NS records</emphasis> in the
332           parent zone, which should be matched by equivalent NS records at
333           the root of the delegated zone.
334         </para>
335
336         <para>
337           For instance, consider the <literal>example.com</literal>
338           domain which includes names
339           such as <literal>host.aaa.example.com</literal> and
340           <literal>host.bbb.example.com</literal> even though
341           the <literal>example.com</literal> zone includes
342           only delegations for the <literal>aaa.example.com</literal> and
343           <literal>bbb.example.com</literal> zones.  A zone can
344           map
345           exactly to a single domain, but could also include only part of a
346           domain, the rest of which could be delegated to other
347           name servers. Every name in the <acronym>DNS</acronym>
348           tree is a
349           <emphasis>domain</emphasis>, even if it is
350           <emphasis>terminal</emphasis>, that is, has no
351           <emphasis>subdomains</emphasis>.  Every subdomain is a domain and
352           every domain except the root is also a subdomain. The terminology is
353           not intuitive and we suggest that you read RFCs 1033, 1034 and 1035
354           to
355           gain a complete understanding of this difficult and subtle
356           topic.
357         </para>
358
359         <para>
360           Though <acronym>BIND</acronym> is called a "domain name
361           server",
362           it deals primarily in terms of zones. The master and slave
363           declarations in the <filename>named.conf</filename> file
364           specify
365           zones, not domains. When you ask some other site if it is willing to
366           be a slave server for your <emphasis>domain</emphasis>, you are
367           actually asking for slave service for some collection of zones.
368         </para>
369       </sect2>
370
371       <sect2>
372         <title>Authoritative Name Servers</title>
373
374         <para>
375           Each zone is served by at least
376           one <emphasis>authoritative name server</emphasis>,
377           which contains the complete data for the zone.
378           To make the DNS tolerant of server and network failures,
379           most zones have two or more authoritative servers, on
380           different networks.
381         </para>
382
383         <para>
384           Responses from authoritative servers have the "authoritative
385           answer" (AA) bit set in the response packets.  This makes them
386           easy to identify when debugging DNS configurations using tools like
387           <command>dig</command> (<xref linkend="diagnostic_tools"/>).
388         </para>
389
390         <sect3>
391           <title>The Primary Master</title>
392
393           <para>
394             The authoritative server where the master copy of the zone
395             data is maintained is called the
396             <emphasis>primary master</emphasis> server, or simply the
397             <emphasis>primary</emphasis>.  Typically it loads the zone
398             contents from some local file edited by humans or perhaps
399             generated mechanically from some other local file which is
400             edited by humans.  This file is called the
401             <emphasis>zone file</emphasis> or
402             <emphasis>master file</emphasis>.
403           </para>
404
405           <para>
406             In some cases, however, the master file may not be edited
407             by humans at all, but may instead be the result of
408             <emphasis>dynamic update</emphasis> operations.
409           </para>
410         </sect3>
411
412         <sect3>
413           <title>Slave Servers</title>
414           <para>
415             The other authoritative servers, the <emphasis>slave</emphasis>
416             servers (also known as <emphasis>secondary</emphasis> servers)
417             load
418             the zone contents from another server using a replication process
419             known as a <emphasis>zone transfer</emphasis>.  Typically the data
420             are
421             transferred directly from the primary master, but it is also
422             possible
423             to transfer it from another slave.  In other words, a slave server
424             may itself act as a master to a subordinate slave server.
425           </para>
426         </sect3>
427
428         <sect3>
429           <title>Stealth Servers</title>
430
431           <para>
432             Usually all of the zone's authoritative servers are listed in
433             NS records in the parent zone.  These NS records constitute
434             a <emphasis>delegation</emphasis> of the zone from the parent.
435             The authoritative servers are also listed in the zone file itself,
436             at the <emphasis>top level</emphasis> or <emphasis>apex</emphasis>
437             of the zone.  You can list servers in the zone's top-level NS
438             records that are not in the parent's NS delegation, but you cannot
439             list servers in the parent's delegation that are not present at
440             the zone's top level.
441           </para>
442
443           <para>
444             A <emphasis>stealth server</emphasis> is a server that is
445             authoritative for a zone but is not listed in that zone's NS
446             records.  Stealth servers can be used for keeping a local copy of
447             a
448             zone to speed up access to the zone's records or to make sure that
449             the
450             zone is available even if all the "official" servers for the zone
451             are
452             inaccessible.
453           </para>
454
455           <para>
456             A configuration where the primary master server itself is a
457             stealth server is often referred to as a "hidden primary"
458             configuration.  One use for this configuration is when the primary
459             master
460             is behind a firewall and therefore unable to communicate directly
461             with the outside world.
462           </para>
463
464         </sect3>
465
466       </sect2>
467       <sect2>
468
469         <title>Caching Name Servers</title>
470
471         <!--
472           - Terminology here is inconsistent.  Probably ought to
473           - convert to using "recursive name server" everywhere
474           - with just a note about "caching" terminology.
475           -->
476
477         <para>
478           The resolver libraries provided by most operating systems are
479           <emphasis>stub resolvers</emphasis>, meaning that they are not
480           capable of
481           performing the full DNS resolution process by themselves by talking
482           directly to the authoritative servers.  Instead, they rely on a
483           local
484           name server to perform the resolution on their behalf.  Such a
485           server
486           is called a <emphasis>recursive</emphasis> name server; it performs
487           <emphasis>recursive lookups</emphasis> for local clients.
488         </para>
489
490         <para>
491           To improve performance, recursive servers cache the results of
492           the lookups they perform.  Since the processes of recursion and
493           caching are intimately connected, the terms
494           <emphasis>recursive server</emphasis> and
495           <emphasis>caching server</emphasis> are often used synonymously.
496         </para>
497
498         <para>
499           The length of time for which a record may be retained in
500           the cache of a caching name server is controlled by the
501           Time To Live (TTL) field associated with each resource record.
502         </para>
503
504         <sect3>
505           <title>Forwarding</title>
506
507           <para>
508             Even a caching name server does not necessarily perform
509             the complete recursive lookup itself.  Instead, it can
510             <emphasis>forward</emphasis> some or all of the queries
511             that it cannot satisfy from its cache to another caching name
512             server,
513             commonly referred to as a <emphasis>forwarder</emphasis>.
514           </para>
515
516           <para>
517             There may be one or more forwarders,
518             and they are queried in turn until the list is exhausted or an
519             answer
520             is found. Forwarders are typically used when you do not
521             wish all the servers at a given site to interact directly with the
522             rest of
523             the Internet servers. A typical scenario would involve a number
524             of internal <acronym>DNS</acronym> servers and an
525             Internet firewall. Servers unable
526             to pass packets through the firewall would forward to the server
527             that can do it, and that server would query the Internet <acronym>DNS</acronym> servers
528             on the internal server's behalf.
529           </para>
530         </sect3>
531
532       </sect2>
533
534       <sect2>
535         <title>Name Servers in Multiple Roles</title>
536
537         <para>
538           The <acronym>BIND</acronym> name server can
539           simultaneously act as
540           a master for some zones, a slave for other zones, and as a caching
541           (recursive) server for a set of local clients.
542         </para>
543
544         <para>
545           However, since the functions of authoritative name service
546           and caching/recursive name service are logically separate, it is
547           often advantageous to run them on separate server machines.
548
549           A server that only provides authoritative name service
550           (an <emphasis>authoritative-only</emphasis> server) can run with
551           recursion disabled, improving reliability and security.
552
553           A server that is not authoritative for any zones and only provides
554           recursive service to local
555           clients (a <emphasis>caching-only</emphasis> server)
556           does not need to be reachable from the Internet at large and can
557           be placed inside a firewall.
558         </para>
559
560       </sect2>
561     </sect1>
562
563   </chapter>
564
565   <chapter id="Bv9ARM.ch02">
566     <title><acronym>BIND</acronym> Resource Requirements</title>
567
568     <sect1>
569       <title>Hardware requirements</title>
570
571       <para>
572         <acronym>DNS</acronym> hardware requirements have
573         traditionally been quite modest.
574         For many installations, servers that have been pensioned off from
575         active duty have performed admirably as <acronym>DNS</acronym> servers.
576       </para>
577       <para>
578         The DNSSEC features of <acronym>BIND</acronym> 9
579         may prove to be quite
580         CPU intensive however, so organizations that make heavy use of these
581         features may wish to consider larger systems for these applications.
582         <acronym>BIND</acronym> 9 is fully multithreaded, allowing
583         full utilization of
584         multiprocessor systems for installations that need it.
585       </para>
586     </sect1>
587     <sect1>
588       <title>CPU Requirements</title>
589       <para>
590         CPU requirements for <acronym>BIND</acronym> 9 range from
591         i486-class machines
592         for serving of static zones without caching, to enterprise-class
593         machines if you intend to process many dynamic updates and DNSSEC
594         signed zones, serving many thousands of queries per second.
595       </para>
596     </sect1>
597
598     <sect1>
599       <title>Memory Requirements</title>
600       <para>
601         The memory of the server has to be large enough to fit the
602         cache and zones loaded off disk.  The <command>max-cache-size</command>
603         option can be used to limit the amount of memory used by the cache,
604         at the expense of reducing cache hit rates and causing more <acronym>DNS</acronym>
605         traffic.
606         Additionally, if additional section caching
607         (<xref linkend="acache"/>) is enabled,
608         the <command>max-acache-size</command> option can be used to
609         limit the amount
610         of memory used by the mechanism.
611         It is still good practice to have enough memory to load
612         all zone and cache data into memory &mdash; unfortunately, the best
613         way
614         to determine this for a given installation is to watch the name server
615         in operation. After a few weeks the server process should reach
616         a relatively stable size where entries are expiring from the cache as
617         fast as they are being inserted.
618       </para>
619       <!--
620         - Add something here about leaving overhead for attacks?
621         - How much overhead?  Percentage?
622         -->
623     </sect1>
624
625     <sect1>
626       <title>Name Server Intensive Environment Issues</title>
627       <para>
628         For name server intensive environments, there are two alternative
629         configurations that may be used. The first is where clients and
630         any second-level internal name servers query a main name server, which
631         has enough memory to build a large cache. This approach minimizes
632         the bandwidth used by external name lookups. The second alternative
633         is to set up second-level internal name servers to make queries
634         independently.
635         In this configuration, none of the individual machines needs to
636         have as much memory or CPU power as in the first alternative, but
637         this has the disadvantage of making many more external queries,
638         as none of the name servers share their cached data.
639       </para>
640     </sect1>
641
642     <sect1>
643       <title>Supported Operating Systems</title>
644       <para>
645         ISC <acronym>BIND</acronym> 9 compiles and runs on a large
646         number
647         of Unix-like operating systems and on 
648         Microsoft Windows Server 2003 and 2008, and Windows XP and Vista.
649         For an up-to-date
650         list of supported systems, see the README file in the top level
651         directory
652         of the BIND 9 source distribution.
653       </para>
654     </sect1>
655   </chapter>
656
657   <chapter id="Bv9ARM.ch03">
658     <title>Name Server Configuration</title>
659     <para>
660       In this chapter we provide some suggested configurations along
661       with guidelines for their use.  We suggest reasonable values for
662       certain option settings.
663     </para>
664
665     <sect1 id="sample_configuration">
666       <title>Sample Configurations</title>
667       <sect2>
668         <title>A Caching-only Name Server</title>
669         <para>
670           The following sample configuration is appropriate for a caching-only
671           name server for use by clients internal to a corporation.  All
672           queries
673           from outside clients are refused using the <command>allow-query</command>
674           option.  Alternatively, the same effect could be achieved using
675           suitable
676           firewall rules.
677         </para>
678
679 <programlisting>
680 // Two corporate subnets we wish to allow queries from.
681 acl corpnets { 192.168.4.0/24; 192.168.7.0/24; };
682 options {
683      // Working directory
684      directory "/etc/namedb";
685
686      allow-query { corpnets; };
687 };
688 // Provide a reverse mapping for the loopback
689 // address 127.0.0.1
690 zone "0.0.127.in-addr.arpa" {
691      type master;
692      file "localhost.rev";
693      notify no;
694 };
695 </programlisting>
696
697       </sect2>
698
699       <sect2>
700         <title>An Authoritative-only Name Server</title>
701         <para>
702           This sample configuration is for an authoritative-only server
703           that is the master server for "<filename>example.com</filename>"
704           and a slave for the subdomain "<filename>eng.example.com</filename>".
705         </para>
706
707 <programlisting>
708 options {
709      // Working directory
710      directory "/etc/namedb";
711      // Do not allow access to cache
712      allow-query-cache { none; };
713      // This is the default
714      allow-query { any; };
715      // Do not provide recursive service
716      recursion no;
717 };
718
719 // Provide a reverse mapping for the loopback
720 // address 127.0.0.1
721 zone "0.0.127.in-addr.arpa" {
722      type master;
723      file "localhost.rev";
724      notify no;
725 };
726 // We are the master server for example.com
727 zone "example.com" {
728      type master;
729      file "example.com.db";
730      // IP addresses of slave servers allowed to
731      // transfer example.com
732      allow-transfer {
733           192.168.4.14;
734           192.168.5.53;
735      };
736 };
737 // We are a slave server for eng.example.com
738 zone "eng.example.com" {
739      type slave;
740      file "eng.example.com.bk";
741      // IP address of eng.example.com master server
742      masters { 192.168.4.12; };
743 };
744 </programlisting>
745
746       </sect2>
747     </sect1>
748
749     <sect1>
750       <title>Load Balancing</title>
751       <!--
752         - Add explanation of why load balancing is fragile at best
753         - and completely pointless in the general case.
754         -->
755
756       <para>
757         A primitive form of load balancing can be achieved in
758         the <acronym>DNS</acronym> by using multiple records
759         (such as multiple A records) for one name.
760       </para>
761
762       <para>
763         For example, if you have three WWW servers with network addresses
764         of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
765         following means that clients will connect to each machine one third
766         of the time:
767       </para>
768
769       <informaltable colsep="0" rowsep="0">
770         <tgroup cols="5" colsep="0" rowsep="0" tgroupstyle="2Level-table">
771           <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
772           <colspec colname="2" colnum="2" colsep="0" colwidth="0.500in"/>
773           <colspec colname="3" colnum="3" colsep="0" colwidth="0.750in"/>
774           <colspec colname="4" colnum="4" colsep="0" colwidth="0.750in"/>
775           <colspec colname="5" colnum="5" colsep="0" colwidth="2.028in"/>
776           <tbody>
777             <row rowsep="0">
778               <entry colname="1">
779                 <para>
780                   Name
781                 </para>
782               </entry>
783               <entry colname="2">
784                 <para>
785                   TTL
786                 </para>
787               </entry>
788               <entry colname="3">
789                 <para>
790                   CLASS
791                 </para>
792               </entry>
793               <entry colname="4">
794                 <para>
795                   TYPE
796                 </para>
797               </entry>
798               <entry colname="5">
799                 <para>
800                   Resource Record (RR) Data
801                 </para>
802               </entry>
803             </row>
804             <row rowsep="0">
805               <entry colname="1">
806                 <para>
807                   <literal>www</literal>
808                 </para>
809               </entry>
810               <entry colname="2">
811                 <para>
812                   <literal>600</literal>
813                 </para>
814               </entry>
815               <entry colname="3">
816                 <para>
817                   <literal>IN</literal>
818                 </para>
819               </entry>
820               <entry colname="4">
821                 <para>
822                   <literal>A</literal>
823                 </para>
824               </entry>
825               <entry colname="5">
826                 <para>
827                   <literal>10.0.0.1</literal>
828                 </para>
829               </entry>
830             </row>
831             <row rowsep="0">
832               <entry colname="1">
833                 <para/>
834               </entry>
835               <entry colname="2">
836                 <para>
837                   <literal>600</literal>
838                 </para>
839               </entry>
840               <entry colname="3">
841                 <para>
842                   <literal>IN</literal>
843                 </para>
844               </entry>
845               <entry colname="4">
846                 <para>
847                   <literal>A</literal>
848                 </para>
849               </entry>
850               <entry colname="5">
851                 <para>
852                   <literal>10.0.0.2</literal>
853                 </para>
854               </entry>
855             </row>
856             <row rowsep="0">
857               <entry colname="1">
858                 <para/>
859               </entry>
860               <entry colname="2">
861                 <para>
862                   <literal>600</literal>
863                 </para>
864               </entry>
865               <entry colname="3">
866                 <para>
867                   <literal>IN</literal>
868                 </para>
869               </entry>
870               <entry colname="4">
871                 <para>
872                   <literal>A</literal>
873                 </para>
874               </entry>
875               <entry colname="5">
876                 <para>
877                   <literal>10.0.0.3</literal>
878                 </para>
879               </entry>
880             </row>
881           </tbody>
882         </tgroup>
883       </informaltable>
884       <para>
885         When a resolver queries for these records, <acronym>BIND</acronym> will rotate
886         them and respond to the query with the records in a different
887         order.  In the example above, clients will randomly receive
888         records in the order 1, 2, 3; 2, 3, 1; and 3, 1, 2. Most clients
889         will use the first record returned and discard the rest.
890       </para>
891       <para>
892         For more detail on ordering responses, check the
893         <command>rrset-order</command> substatement in the
894         <command>options</command> statement, see
895         <xref endterm="rrset_ordering_title" linkend="rrset_ordering"/>.
896       </para>
897
898     </sect1>
899
900     <sect1>
901       <title>Name Server Operations</title>
902
903       <sect2>
904         <title>Tools for Use With the Name Server Daemon</title>
905         <para>
906           This section describes several indispensable diagnostic,
907           administrative and monitoring tools available to the system
908           administrator for controlling and debugging the name server
909           daemon.
910         </para>
911         <sect3 id="diagnostic_tools">
912           <title>Diagnostic Tools</title>
913           <para>
914             The <command>dig</command>, <command>host</command>, and
915             <command>nslookup</command> programs are all command
916             line tools
917             for manually querying name servers.  They differ in style and
918             output format.
919           </para>
920
921           <variablelist>
922             <varlistentry>
923               <term id="dig"><command>dig</command></term>
924               <listitem>
925                 <para>
926                   The domain information groper (<command>dig</command>)
927                   is the most versatile and complete of these lookup tools.
928                   It has two modes: simple interactive
929                   mode for a single query, and batch mode which executes a
930                   query for
931                   each in a list of several query lines. All query options are
932                   accessible
933                   from the command line.
934                 </para>
935                 <cmdsynopsis label="Usage">
936                   <command>dig</command>
937                   <arg>@<replaceable>server</replaceable></arg>
938                   <arg choice="plain"><replaceable>domain</replaceable></arg>
939                   <arg><replaceable>query-type</replaceable></arg>
940                   <arg><replaceable>query-class</replaceable></arg>
941                   <arg>+<replaceable>query-option</replaceable></arg>
942                   <arg>-<replaceable>dig-option</replaceable></arg>
943                   <arg>%<replaceable>comment</replaceable></arg>
944                 </cmdsynopsis>
945                 <para>
946                   The usual simple use of <command>dig</command> will take the form
947                 </para>
948                 <simpara>
949                   <command>dig @server domain query-type query-class</command>
950                 </simpara>
951                 <para>
952                   For more information and a list of available commands and
953                   options, see the <command>dig</command> man
954                   page.
955                 </para>
956               </listitem>
957             </varlistentry>
958
959             <varlistentry>
960               <term><command>host</command></term>
961               <listitem>
962                 <para>
963                   The <command>host</command> utility emphasizes
964                   simplicity
965                   and ease of use.  By default, it converts
966                   between host names and Internet addresses, but its
967                   functionality
968                   can be extended with the use of options.
969                 </para>
970                 <cmdsynopsis label="Usage">
971                   <command>host</command>
972                   <arg>-aCdlnrsTwv</arg>
973                   <arg>-c <replaceable>class</replaceable></arg>
974                   <arg>-N <replaceable>ndots</replaceable></arg>
975                   <arg>-t <replaceable>type</replaceable></arg>
976                   <arg>-W <replaceable>timeout</replaceable></arg>
977                   <arg>-R <replaceable>retries</replaceable></arg>
978                   <arg>-m <replaceable>flag</replaceable></arg>
979                   <arg>-4</arg>
980                   <arg>-6</arg>
981                   <arg choice="plain"><replaceable>hostname</replaceable></arg>
982                   <arg><replaceable>server</replaceable></arg>
983                 </cmdsynopsis>
984                 <para>
985                   For more information and a list of available commands and
986                   options, see the <command>host</command> man
987                   page.
988                 </para>
989               </listitem>
990             </varlistentry>
991
992             <varlistentry>
993               <term><command>nslookup</command></term>
994               <listitem>
995                 <para><command>nslookup</command>
996                   has two modes: interactive and
997                   non-interactive. Interactive mode allows the user to
998                   query name servers for information about various
999                   hosts and domains or to print a list of hosts in a
1000                   domain. Non-interactive mode is used to print just
1001                   the name and requested information for a host or
1002                   domain.
1003                 </para>
1004                 <cmdsynopsis label="Usage">
1005                   <command>nslookup</command>
1006                   <arg rep="repeat">-option</arg>
1007                   <group>
1008                     <arg><replaceable>host-to-find</replaceable></arg>
1009                     <arg>- <arg>server</arg></arg>
1010                   </group>
1011                 </cmdsynopsis>
1012                 <para>
1013                   Interactive mode is entered when no arguments are given (the
1014                   default name server will be used) or when the first argument
1015                   is a
1016                   hyphen (`-') and the second argument is the host name or
1017                   Internet address
1018                   of a name server.
1019                 </para>
1020                 <para>
1021                   Non-interactive mode is used when the name or Internet
1022                   address
1023                   of the host to be looked up is given as the first argument.
1024                   The
1025                   optional second argument specifies the host name or address
1026                   of a name server.
1027                 </para>
1028                 <para>
1029                   Due to its arcane user interface and frequently inconsistent
1030                   behavior, we do not recommend the use of <command>nslookup</command>.
1031                   Use <command>dig</command> instead.
1032                 </para>
1033               </listitem>
1034
1035             </varlistentry>
1036           </variablelist>
1037         </sect3>
1038
1039         <sect3 id="admin_tools">
1040           <title>Administrative Tools</title>
1041           <para>
1042             Administrative tools play an integral part in the management
1043             of a server.
1044           </para>
1045           <variablelist>
1046             <varlistentry id="named-checkconf" xreflabel="Named Configuration Checking application">
1047
1048               <term><command>named-checkconf</command></term>
1049               <listitem>
1050                 <para>
1051                   The <command>named-checkconf</command> program
1052                   checks the syntax of a <filename>named.conf</filename> file.
1053                 </para>
1054                 <cmdsynopsis label="Usage">
1055                   <command>named-checkconf</command>
1056                   <arg>-jvz</arg>
1057                   <arg>-t <replaceable>directory</replaceable></arg>
1058                   <arg><replaceable>filename</replaceable></arg>
1059                 </cmdsynopsis>
1060               </listitem>
1061             </varlistentry>
1062             <varlistentry id="named-checkzone" xreflabel="Zone Checking application">
1063
1064               <term><command>named-checkzone</command></term>
1065               <listitem>
1066                 <para>
1067                   The <command>named-checkzone</command> program
1068                   checks a master file for
1069                   syntax and consistency.
1070                 </para>
1071                 <cmdsynopsis label="Usage">
1072                   <command>named-checkzone</command>
1073                   <arg>-djqvD</arg>
1074                   <arg>-c <replaceable>class</replaceable></arg>
1075                   <arg>-o <replaceable>output</replaceable></arg>
1076                   <arg>-t <replaceable>directory</replaceable></arg>
1077                   <arg>-w <replaceable>directory</replaceable></arg>
1078                   <arg>-k <replaceable>(ignore|warn|fail)</replaceable></arg>
1079                   <arg>-n <replaceable>(ignore|warn|fail)</replaceable></arg>
1080                   <arg>-W <replaceable>(ignore|warn)</replaceable></arg>
1081                   <arg choice="plain"><replaceable>zone</replaceable></arg>
1082                   <arg><replaceable>filename</replaceable></arg>
1083                 </cmdsynopsis>
1084               </listitem>
1085             </varlistentry>
1086             <varlistentry id="named-compilezone" xreflabel="Zone Compilation application">
1087               <term><command>named-compilezone</command></term>
1088               <listitem>
1089                 <para>
1090                   Similar to <command>named-checkzone,</command> but
1091                   it always dumps the zone content to a specified file
1092                   (typically in a different format).
1093                 </para>
1094               </listitem>
1095             </varlistentry>
1096             <varlistentry id="rndc" xreflabel="Remote Name Daemon Control application">
1097
1098               <term><command>rndc</command></term>
1099               <listitem>
1100                 <para>
1101                   The remote name daemon control
1102                   (<command>rndc</command>) program allows the
1103                   system
1104                   administrator to control the operation of a name server.
1105                   Since <acronym>BIND</acronym> 9.2, <command>rndc</command>
1106                   supports all the commands of the BIND 8 <command>ndc</command>
1107                   utility except <command>ndc start</command> and
1108                   <command>ndc restart</command>, which were also
1109                   not supported in <command>ndc</command>'s
1110                   channel mode.
1111                   If you run <command>rndc</command> without any
1112                   options
1113                   it will display a usage message as follows:
1114                 </para>
1115                 <cmdsynopsis label="Usage">
1116                   <command>rndc</command>
1117                   <arg>-c <replaceable>config</replaceable></arg>
1118                   <arg>-s <replaceable>server</replaceable></arg>
1119                   <arg>-p <replaceable>port</replaceable></arg>
1120                   <arg>-y <replaceable>key</replaceable></arg>
1121                   <arg choice="plain"><replaceable>command</replaceable></arg>
1122                   <arg rep="repeat"><replaceable>command</replaceable></arg>
1123                 </cmdsynopsis>
1124                 <para>The <command>command</command>
1125                   is one of the following:
1126                 </para>
1127
1128                 <variablelist>
1129
1130                   <varlistentry>
1131                     <term><userinput>reload</userinput></term>
1132                     <listitem>
1133                       <para>
1134                         Reload configuration file and zones.
1135                       </para>
1136                     </listitem>
1137                   </varlistentry>
1138
1139                   <varlistentry>
1140                     <term><userinput>reload <replaceable>zone</replaceable>
1141                         <optional><replaceable>class</replaceable>
1142            <optional><replaceable>view</replaceable></optional></optional></userinput></term>
1143                     <listitem>
1144                       <para>
1145                         Reload the given zone.
1146                       </para>
1147                     </listitem>
1148                   </varlistentry>
1149
1150                   <varlistentry>
1151                     <term><userinput>refresh <replaceable>zone</replaceable>
1152                         <optional><replaceable>class</replaceable>
1153            <optional><replaceable>view</replaceable></optional></optional></userinput></term>
1154                     <listitem>
1155                       <para>
1156                         Schedule zone maintenance for the given zone.
1157                       </para>
1158                     </listitem>
1159                   </varlistentry>
1160
1161                   <varlistentry>
1162                     <term><userinput>retransfer <replaceable>zone</replaceable>
1163
1164                         <optional><replaceable>class</replaceable>
1165            <optional><replaceable>view</replaceable></optional></optional></userinput></term>
1166                     <listitem>
1167                       <para>
1168                         Retransfer the given zone from the master.
1169                       </para>
1170                     </listitem>
1171                   </varlistentry>
1172
1173                   <varlistentry>
1174                     <term><userinput>sign <replaceable>zone</replaceable>
1175                         <optional><replaceable>class</replaceable>
1176            <optional><replaceable>view</replaceable></optional></optional></userinput></term>
1177                     <listitem>
1178                       <para>
1179                         Fetch all DNSSEC keys for the given zone
1180                         from the key directory (see
1181                         <command>key-directory</command> in
1182                         <xref linkend="options"/>).  If they are within
1183                         their publication period, merge them into the
1184                         zone's DNSKEY RRset.  If the DNSKEY RRset
1185                         is changed, then the zone is automatically
1186                         re-signed with the new key set.
1187                       </para>
1188                       <para>
1189                         This command requires that the
1190                         <command>auto-dnssec</command> zone option to be set
1191                         to <literal>allow</literal>,
1192                         <literal>maintain</literal>, or
1193                         <literal>create</literal>,  and also requires
1194                         the zone to be configured to allow dynamic DNS.
1195                         See <xref linkend="dynamic_update_policies"/> for
1196                         more details.
1197                       </para>
1198                     </listitem>
1199                   </varlistentry>
1200
1201                   <varlistentry>
1202                     <term><userinput>loadkeys <replaceable>zone</replaceable>
1203                         <optional><replaceable>class</replaceable>
1204            <optional><replaceable>view</replaceable></optional></optional></userinput></term>
1205                     <listitem>
1206                       <para>
1207                         Fetch all DNSSEC keys for the given zone
1208                         from the key directory (see
1209                         <command>key-directory</command> in
1210                         <xref linkend="options"/>).  If they are within
1211                         their publication period, merge them into the
1212                         zone's DNSKEY RRset.  Unlike <command>rndc
1213                         sign</command>, however, the zone is not
1214                         immediately re-signed by the new keys, but is
1215                         allowed to incrementally re-sign over time.
1216                       </para>
1217                       <para>
1218                         This command requires that the
1219                         <command>auto-dnssec</command> zone option to
1220                         be set to <literal>maintain</literal> or
1221                         <literal>create</literal>, and also requires
1222                         the zone to be configured to allow dynamic DNS.
1223                         See <xref linkend="dynamic_update_policies"/> for
1224                         more details.
1225                       </para>
1226                     </listitem>
1227                   </varlistentry>
1228
1229                   <varlistentry>
1230                     <term><userinput>freeze
1231                         <optional><replaceable>zone</replaceable>
1232        <optional><replaceable>class</replaceable>
1233            <optional><replaceable>view</replaceable></optional></optional></optional></userinput></term>
1234                     <listitem>
1235                       <para>
1236                         Suspend updates to a dynamic zone.  If no zone is
1237                         specified,
1238                         then all zones are suspended.  This allows manual
1239                         edits to be made to a zone normally updated by dynamic
1240                         update.  It
1241                         also causes changes in the journal file to be synced
1242                         into the master
1243                         and the journal file to be removed.  All dynamic
1244                         update attempts will
1245                         be refused while the zone is frozen.
1246                       </para>
1247                     </listitem>
1248                   </varlistentry>
1249
1250                   <varlistentry>
1251                     <term><userinput>thaw
1252                         <optional><replaceable>zone</replaceable>
1253        <optional><replaceable>class</replaceable>
1254            <optional><replaceable>view</replaceable></optional></optional></optional></userinput></term>
1255                     <listitem>
1256                       <para>
1257                         Enable updates to a frozen dynamic zone.  If no zone
1258                         is
1259                         specified, then all frozen zones are enabled.  This
1260                         causes
1261                         the server to reload the zone from disk, and
1262                         re-enables dynamic updates
1263                         after the load has completed.  After a zone is thawed,
1264                         dynamic updates
1265                         will no longer be refused.
1266                       </para>
1267                     </listitem>
1268                   </varlistentry>
1269
1270                   <varlistentry>
1271                     <term><userinput>notify <replaceable>zone</replaceable>
1272                         <optional><replaceable>class</replaceable>
1273            <optional><replaceable>view</replaceable></optional></optional></userinput></term>
1274                     <listitem>
1275                       <para>
1276                         Resend NOTIFY messages for the zone.
1277                       </para>
1278                     </listitem>
1279                   </varlistentry>
1280
1281                   <varlistentry>
1282                     <term><userinput>reconfig</userinput></term>
1283                     <listitem>
1284                       <para>
1285                         Reload the configuration file and load new zones,
1286                         but do not reload existing zone files even if they
1287                         have changed.
1288                         This is faster than a full <command>reload</command> when there
1289                         is a large number of zones because it avoids the need
1290                         to examine the
1291                         modification times of the zones files.
1292                       </para>
1293                     </listitem>
1294                   </varlistentry>
1295
1296                   <varlistentry>
1297                     <term><userinput>stats</userinput></term>
1298                     <listitem>
1299                       <para>
1300                         Write server statistics to the statistics file.
1301                       </para>
1302                     </listitem>
1303                   </varlistentry>
1304
1305                   <varlistentry>
1306                     <term><userinput>querylog</userinput></term>
1307                     <listitem>
1308                       <para>
1309                         Toggle query logging. Query logging can also be enabled
1310                         by explicitly directing the <command>queries</command>
1311                         <command>category</command> to a
1312                         <command>channel</command> in the
1313                         <command>logging</command> section of
1314                         <filename>named.conf</filename> or by specifying
1315                         <command>querylog yes;</command> in the
1316                         <command>options</command> section of
1317                         <filename>named.conf</filename>.
1318                       </para>
1319                     </listitem>
1320                   </varlistentry>
1321
1322                   <varlistentry>
1323                     <term><userinput>dumpdb
1324                         <optional>-all|-cache|-zone</optional>
1325                         <optional><replaceable>view ...</replaceable></optional></userinput></term>
1326                     <listitem>
1327                       <para>
1328                         Dump the server's caches (default) and/or zones to
1329                         the
1330                         dump file for the specified views.  If no view is
1331                         specified, all
1332                         views are dumped.
1333                       </para>
1334                     </listitem>
1335                   </varlistentry>
1336
1337                   <varlistentry>
1338                     <term><userinput>secroots
1339                         <optional><replaceable>view ...</replaceable></optional></userinput></term>
1340                     <listitem>
1341                       <para>
1342                         Dump the server's security roots to the secroots
1343                         file for the specified views.  If no view is
1344                         specified, security roots for all
1345                         views are dumped.
1346                       </para>
1347                     </listitem>
1348                   </varlistentry>
1349
1350                   <varlistentry>
1351                     <term><userinput>stop <optional>-p</optional></userinput></term>
1352                     <listitem>
1353                       <para>
1354                         Stop the server, making sure any recent changes
1355                         made through dynamic update or IXFR are first saved to
1356                         the master files of the updated zones.
1357                         If <option>-p</option> is specified <command>named</command>'s process id is returned.
1358                         This allows an external process to determine when <command>named</command>
1359                         had completed stopping.
1360                       </para>
1361                     </listitem>
1362                   </varlistentry>
1363
1364                   <varlistentry>
1365                     <term><userinput>halt <optional>-p</optional></userinput></term>
1366                     <listitem>
1367                       <para>
1368                         Stop the server immediately.  Recent changes
1369                         made through dynamic update or IXFR are not saved to
1370                         the master files, but will be rolled forward from the
1371                         journal files when the server is restarted.
1372                         If <option>-p</option> is specified <command>named</command>'s process id is returned.
1373                         This allows an external process to determine when <command>named</command>
1374                         had completed halting.
1375                       </para>
1376                     </listitem>
1377                   </varlistentry>
1378
1379                   <varlistentry>
1380                     <term><userinput>trace</userinput></term>
1381                     <listitem>
1382                       <para>
1383                         Increment the servers debugging level by one.
1384                       </para>
1385                     </listitem>
1386                   </varlistentry>
1387
1388                   <varlistentry>
1389                     <term><userinput>trace <replaceable>level</replaceable></userinput></term>
1390                     <listitem>
1391                       <para>
1392                         Sets the server's debugging level to an explicit
1393                         value.
1394                       </para>
1395                     </listitem>
1396                   </varlistentry>
1397
1398                   <varlistentry>
1399                     <term><userinput>notrace</userinput></term>
1400                     <listitem>
1401                       <para>
1402                         Sets the server's debugging level to 0.
1403                       </para>
1404                     </listitem>
1405                   </varlistentry>
1406
1407                   <varlistentry>
1408                     <term><userinput>flush</userinput></term>
1409                     <listitem>
1410                       <para>
1411                         Flushes the server's cache.
1412                       </para>
1413                     </listitem>
1414                   </varlistentry>
1415
1416                   <varlistentry>
1417                     <term><userinput>flushname</userinput> <replaceable>name</replaceable></term>
1418                     <listitem>
1419                       <para>
1420                         Flushes the given name from the server's cache.
1421                       </para>
1422                     </listitem>
1423                   </varlistentry>
1424
1425                   <varlistentry>
1426                     <term><userinput>status</userinput></term>
1427                     <listitem>
1428                       <para>
1429                         Display status of the server.
1430                         Note that the number of zones includes the internal <command>bind/CH</command> zone
1431                         and the default <command>./IN</command>
1432                         hint zone if there is not an
1433                         explicit root zone configured.
1434                       </para>
1435                     </listitem>
1436                   </varlistentry>
1437
1438                   <varlistentry>
1439                     <term><userinput>recursing</userinput></term>
1440                     <listitem>
1441                       <para>
1442                         Dump the list of queries <command>named</command> is currently recursing
1443                         on.
1444                       </para>
1445                     </listitem>
1446                   </varlistentry>
1447
1448                   <varlistentry>
1449                     <term><userinput>validation
1450                         <optional>on|off</optional>
1451                         <optional><replaceable>view ...</replaceable></optional>
1452                     </userinput></term>
1453                     <listitem>
1454                       <para>
1455                         Enable or disable DNSSEC validation.
1456                         Note <command>dnssec-enable</command> also needs to be
1457                         set to <userinput>yes</userinput> to be effective.
1458                         It defaults to enabled.
1459                       </para>
1460                     </listitem>
1461                   </varlistentry>
1462
1463                   <varlistentry>
1464                     <term><userinput>addzone
1465                         <replaceable>zone</replaceable>
1466                         <optional><replaceable>class</replaceable>
1467                         <optional><replaceable>view</replaceable></optional></optional>
1468                         <replaceable>configuration</replaceable>
1469                     </userinput></term>
1470                     <listitem>
1471                       <para>
1472                         Add a zone while the server is running.  This
1473                         command requires the
1474                         <command>allow-new-zones</command> option to be set
1475                         to <userinput>yes</userinput>.  The
1476                         <replaceable>configuration</replaceable> string
1477                         specified on the command line is the zone
1478                         configuration text that would ordinarily be
1479                         placed in <filename>named.conf</filename>.
1480                       </para>
1481                       <para>
1482                         The configuration is saved in a file called
1483                        <filename><replaceable>hash</replaceable>.nzf</filename>,
1484                         where <replaceable>hash</replaceable> is a
1485                         cryptographic hash generated from the name of
1486                         the view.  When <command>named</command> is
1487                         restarted, the file will be loaded into the view
1488                         configuration, so that zones that were added
1489                         can persist after a restart.
1490                       </para>
1491                       <para>
1492                         This sample <command>addzone</command> command
1493                         would add the zone <literal>example.com</literal>
1494                         to the default view:
1495                       </para>
1496                       <para>
1497 <prompt>$ </prompt><userinput>rndc addzone example.com '{ type master; file "example.com.db"; };'</userinput>
1498                       </para>
1499                       <para>
1500                         (Note the brackets and semi-colon around the zone
1501                         configuration text.)
1502                       </para>
1503                     </listitem>
1504                   </varlistentry>
1505
1506                   <varlistentry>
1507                     <term><userinput>delzone
1508                         <replaceable>zone</replaceable>
1509                         <optional><replaceable>class</replaceable>
1510                         <optional><replaceable>view</replaceable></optional></optional>
1511                     </userinput></term>
1512                     <listitem>
1513                       <para>
1514                         Delete a zone while the server is running.
1515                         Only zones that were originally added via
1516                         <command>rndc addzone</command> can be deleted
1517                         in this matter.
1518                       </para>
1519                     </listitem>
1520                   </varlistentry>
1521
1522                 </variablelist>
1523
1524                 <para>
1525                   A configuration file is required, since all
1526                   communication with the server is authenticated with
1527                   digital signatures that rely on a shared secret, and
1528                   there is no way to provide that secret other than with a
1529                   configuration file.  The default location for the
1530                   <command>rndc</command> configuration file is
1531                   <filename>/etc/rndc.conf</filename>, but an
1532                   alternate
1533                   location can be specified with the <option>-c</option>
1534                   option.  If the configuration file is not found,
1535                   <command>rndc</command> will also look in
1536                   <filename>/etc/rndc.key</filename> (or whatever
1537                   <varname>sysconfdir</varname> was defined when
1538                   the <acronym>BIND</acronym> build was
1539                   configured).
1540                   The <filename>rndc.key</filename> file is
1541                   generated by
1542                   running <command>rndc-confgen -a</command> as
1543                   described in
1544                   <xref linkend="controls_statement_definition_and_usage"/>.
1545                 </para>
1546
1547                 <para>
1548                   The format of the configuration file is similar to
1549                   that of <filename>named.conf</filename>, but
1550                   limited to
1551                   only four statements, the <command>options</command>,
1552                   <command>key</command>, <command>server</command> and
1553                   <command>include</command>
1554                   statements.  These statements are what associate the
1555                   secret keys to the servers with which they are meant to
1556                   be shared.  The order of statements is not
1557                   significant.
1558                 </para>
1559
1560                 <para>
1561                   The <command>options</command> statement has
1562                   three clauses:
1563                   <command>default-server</command>, <command>default-key</command>,
1564                   and <command>default-port</command>.
1565                   <command>default-server</command> takes a
1566                   host name or address argument  and represents the server
1567                   that will
1568                   be contacted if no <option>-s</option>
1569                   option is provided on the command line.
1570                   <command>default-key</command> takes
1571                   the name of a key as its argument, as defined by a <command>key</command> statement.
1572                   <command>default-port</command> specifies the
1573                   port to which
1574                   <command>rndc</command> should connect if no
1575                   port is given on the command line or in a
1576                   <command>server</command> statement.
1577                 </para>
1578
1579                 <para>
1580                   The <command>key</command> statement defines a
1581                   key to be used
1582                   by <command>rndc</command> when authenticating
1583                   with
1584                   <command>named</command>.  Its syntax is
1585                   identical to the
1586                   <command>key</command> statement in <filename>named.conf</filename>.
1587                   The keyword <userinput>key</userinput> is
1588                   followed by a key name, which must be a valid
1589                   domain name, though it need not actually be hierarchical;
1590                   thus,
1591                   a string like "<userinput>rndc_key</userinput>" is a valid
1592                   name.
1593                   The <command>key</command> statement has two
1594                   clauses:
1595                   <command>algorithm</command> and <command>secret</command>.
1596                   While the configuration parser will accept any string as the
1597                   argument
1598                   to algorithm, currently only the string "<userinput>hmac-md5</userinput>"
1599                   has any meaning.  The secret is a base-64 encoded string
1600                   as specified in RFC 3548.
1601                 </para>
1602
1603                 <para>
1604                   The <command>server</command> statement
1605                   associates a key
1606                   defined using the <command>key</command>
1607                   statement with a server.
1608                   The keyword <userinput>server</userinput> is followed by a
1609                   host name or address.  The <command>server</command> statement
1610                   has two clauses: <command>key</command> and <command>port</command>.
1611                   The <command>key</command> clause specifies the
1612                   name of the key
1613                   to be used when communicating with this server, and the
1614                   <command>port</command> clause can be used to
1615                   specify the port <command>rndc</command> should
1616                   connect
1617                   to on the server.
1618                 </para>
1619
1620                 <para>
1621                   A sample minimal configuration file is as follows:
1622                 </para>
1623
1624 <programlisting>
1625 key rndc_key {
1626      algorithm "hmac-md5";
1627      secret
1628        "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
1629 };
1630 options {
1631      default-server 127.0.0.1;
1632      default-key    rndc_key;
1633 };
1634 </programlisting>
1635
1636                 <para>
1637                   This file, if installed as <filename>/etc/rndc.conf</filename>,
1638                   would allow the command:
1639                 </para>
1640
1641                 <para>
1642                   <prompt>$ </prompt><userinput>rndc reload</userinput>
1643                 </para>
1644
1645                 <para>
1646                   to connect to 127.0.0.1 port 953 and cause the name server
1647                   to reload, if a name server on the local machine were
1648                   running with
1649                   following controls statements:
1650                 </para>
1651
1652 <programlisting>
1653 controls {
1654         inet 127.0.0.1
1655             allow { localhost; } keys { rndc_key; };
1656 };
1657 </programlisting>
1658
1659                 <para>
1660                   and it had an identical key statement for
1661                   <literal>rndc_key</literal>.
1662                 </para>
1663
1664                 <para>
1665                   Running the <command>rndc-confgen</command>
1666                   program will
1667                   conveniently create a <filename>rndc.conf</filename>
1668                   file for you, and also display the
1669                   corresponding <command>controls</command>
1670                   statement that you need to
1671                   add to <filename>named.conf</filename>.
1672                   Alternatively,
1673                   you can run <command>rndc-confgen -a</command>
1674                   to set up
1675                   a <filename>rndc.key</filename> file and not
1676                   modify
1677                   <filename>named.conf</filename> at all.
1678                 </para>
1679
1680               </listitem>
1681             </varlistentry>
1682           </variablelist>
1683
1684         </sect3>
1685       </sect2>
1686       <sect2>
1687
1688         <title>Signals</title>
1689         <para>
1690           Certain UNIX signals cause the name server to take specific
1691           actions, as described in the following table.  These signals can
1692           be sent using the <command>kill</command> command.
1693         </para>
1694         <informaltable frame="all">
1695           <tgroup cols="2">
1696             <colspec colname="1" colnum="1" colsep="0" colwidth="1.125in"/>
1697             <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
1698             <tbody>
1699               <row rowsep="0">
1700                 <entry colname="1">
1701                   <para><command>SIGHUP</command></para>
1702                 </entry>
1703                 <entry colname="2">
1704                   <para>
1705                     Causes the server to read <filename>named.conf</filename> and
1706                     reload the database.
1707                   </para>
1708                 </entry>
1709               </row>
1710               <row rowsep="0">
1711                 <entry colname="1">
1712                   <para><command>SIGTERM</command></para>
1713                 </entry>
1714                 <entry colname="2">
1715                   <para>
1716                     Causes the server to clean up and exit.
1717                   </para>
1718                 </entry>
1719               </row>
1720               <row rowsep="0">
1721                 <entry colname="1">
1722                   <para><command>SIGINT</command></para>
1723                 </entry>
1724                 <entry colname="2">
1725                   <para>
1726                     Causes the server to clean up and exit.
1727                   </para>
1728                 </entry>
1729               </row>
1730             </tbody>
1731           </tgroup>
1732         </informaltable>
1733       </sect2>
1734     </sect1>
1735   </chapter>
1736
1737   <chapter id="Bv9ARM.ch04">
1738     <title>Advanced DNS Features</title>
1739
1740     <sect1 id="notify">
1741
1742       <title>Notify</title>
1743       <para>
1744         <acronym>DNS</acronym> NOTIFY is a mechanism that allows master
1745         servers to notify their slave servers of changes to a zone's data. In
1746         response to a <command>NOTIFY</command> from a master server, the
1747         slave will check to see that its version of the zone is the
1748         current version and, if not, initiate a zone transfer.
1749       </para>
1750
1751       <para>
1752         For more information about <acronym>DNS</acronym>
1753         <command>NOTIFY</command>, see the description of the
1754         <command>notify</command> option in <xref linkend="boolean_options"/> and
1755         the description of the zone option <command>also-notify</command> in
1756         <xref linkend="zone_transfers"/>.  The <command>NOTIFY</command>
1757         protocol is specified in RFC 1996.
1758       </para>
1759
1760       <note>
1761         As a slave zone can also be a master to other slaves, <command>named</command>,
1762         by default, sends <command>NOTIFY</command> messages for every zone
1763         it loads.  Specifying <command>notify master-only;</command> will
1764         cause <command>named</command> to only send <command>NOTIFY</command> for master
1765         zones that it loads.
1766       </note>
1767
1768     </sect1>
1769
1770     <sect1 id="dynamic_update">
1771       <title>Dynamic Update</title>
1772
1773       <para>
1774         Dynamic Update is a method for adding, replacing or deleting
1775         records in a master server by sending it a special form of DNS
1776         messages.  The format and meaning of these messages is specified
1777         in RFC 2136.
1778       </para>
1779
1780       <para>
1781         Dynamic update is enabled by including an
1782         <command>allow-update</command> or an <command>update-policy</command>
1783         clause in the <command>zone</command> statement.
1784       </para>
1785       
1786       <para>
1787         If the zone's <command>update-policy</command> is set to
1788         <userinput>local</userinput>, updates to the zone
1789         will be permitted for the key <varname>local-ddns</varname>,
1790         which will be generated by <command>named</command> at startup.
1791         See <xref linkend="dynamic_update_policies"/> for more details.
1792       </para>
1793
1794       <para>
1795         The <command>tkey-gssapi-credential</command> and
1796         <command>tkey-domain</command> clauses in the
1797         <command>options</command> statement enable the
1798         server to negotiate keys that can be matched against those
1799         in <command>update-policy</command> or
1800         <command>allow-update</command>.
1801       </para>
1802
1803       <para>
1804         Updating of secure zones (zones using DNSSEC) follows RFC
1805         3007: RRSIG, NSEC and NSEC3 records affected by updates are
1806         automatically regenerated by the server using an online
1807         zone key.  Update authorization is based on transaction
1808         signatures and an explicit server policy.
1809       </para>
1810
1811       <sect2 id="journal">
1812         <title>The journal file</title>
1813
1814         <para>
1815           All changes made to a zone using dynamic update are stored
1816           in the zone's journal file.  This file is automatically created
1817           by the server when the first dynamic update takes place.
1818           The name of the journal file is formed by appending the extension
1819           <filename>.jnl</filename> to the name of the
1820           corresponding zone
1821           file unless specifically overridden.  The journal file is in a
1822           binary format and should not be edited manually.
1823         </para>
1824
1825         <para>
1826           The server will also occasionally write ("dump")
1827           the complete contents of the updated zone to its zone file.
1828           This is not done immediately after
1829           each dynamic update, because that would be too slow when a large
1830           zone is updated frequently.  Instead, the dump is delayed by
1831           up to 15 minutes, allowing additional updates to take place.
1832           During the dump process, transient files will be created
1833           with the extensions <filename>.jnw</filename> and
1834           <filename>.jbk</filename>; under ordinary circumstances, these
1835           will be removed when the dump is complete, and can be safely
1836           ignored.
1837         </para>
1838
1839         <para>
1840           When a server is restarted after a shutdown or crash, it will replay
1841               the journal file to incorporate into the zone any updates that
1842           took
1843           place after the last zone dump.
1844         </para>
1845
1846         <para>
1847           Changes that result from incoming incremental zone transfers are
1848           also
1849           journalled in a similar way.
1850         </para>
1851
1852         <para>
1853           The zone files of dynamic zones cannot normally be edited by
1854           hand because they are not guaranteed to contain the most recent
1855           dynamic changes &mdash; those are only in the journal file.
1856           The only way to ensure that the zone file of a dynamic zone
1857           is up to date is to run <command>rndc stop</command>.
1858         </para>
1859
1860         <para>
1861           If you have to make changes to a dynamic zone
1862           manually, the following procedure will work: Disable dynamic updates
1863               to the zone using
1864           <command>rndc freeze <replaceable>zone</replaceable></command>.
1865           This will also remove the zone's <filename>.jnl</filename> file
1866           and update the master file.  Edit the zone file.  Run
1867           <command>rndc thaw <replaceable>zone</replaceable></command>
1868           to reload the changed zone and re-enable dynamic updates.
1869         </para>
1870
1871       </sect2>
1872
1873     </sect1>
1874
1875     <sect1 id="incremental_zone_transfers">
1876       <title>Incremental Zone Transfers (IXFR)</title>
1877
1878       <para>
1879         The incremental zone transfer (IXFR) protocol is a way for
1880         slave servers to transfer only changed data, instead of having to
1881         transfer the entire zone. The IXFR protocol is specified in RFC
1882         1995. See <xref linkend="proposed_standards"/>.
1883       </para>
1884
1885       <para>
1886         When acting as a master, <acronym>BIND</acronym> 9
1887         supports IXFR for those zones
1888         where the necessary change history information is available. These
1889         include master zones maintained by dynamic update and slave zones
1890         whose data was obtained by IXFR.  For manually maintained master
1891         zones, and for slave zones obtained by performing a full zone
1892         transfer (AXFR), IXFR is supported only if the option
1893         <command>ixfr-from-differences</command> is set
1894         to <userinput>yes</userinput>.
1895       </para>
1896
1897       <para>
1898         When acting as a slave, <acronym>BIND</acronym> 9 will
1899         attempt to use IXFR unless
1900         it is explicitly disabled. For more information about disabling
1901         IXFR, see the description of the <command>request-ixfr</command> clause
1902         of the <command>server</command> statement.
1903       </para>
1904     </sect1>
1905
1906     <sect1>
1907       <title>Split DNS</title>
1908       <para>
1909         Setting up different views, or visibility, of the DNS space to
1910         internal and external resolvers is usually referred to as a
1911         <emphasis>Split DNS</emphasis> setup. There are several
1912         reasons an organization would want to set up its DNS this way.
1913       </para>
1914       <para>
1915         One common reason for setting up a DNS system this way is
1916         to hide "internal" DNS information from "external" clients on the
1917         Internet. There is some debate as to whether or not this is actually
1918         useful.
1919         Internal DNS information leaks out in many ways (via email headers,
1920         for example) and most savvy "attackers" can find the information
1921         they need using other means.
1922         However, since listing addresses of internal servers that
1923         external clients cannot possibly reach can result in
1924         connection delays and other annoyances, an organization may
1925         choose to use a Split DNS to present a consistent view of itself
1926         to the outside world.
1927       </para>
1928       <para>
1929         Another common reason for setting up a Split DNS system is
1930         to allow internal networks that are behind filters or in RFC 1918
1931         space (reserved IP space, as documented in RFC 1918) to resolve DNS
1932         on the Internet. Split DNS can also be used to allow mail from outside
1933         back in to the internal network.
1934       </para>
1935      <sect2>
1936       <title>Example split DNS setup</title>
1937       <para>
1938         Let's say a company named <emphasis>Example, Inc.</emphasis>
1939         (<literal>example.com</literal>)
1940         has several corporate sites that have an internal network with
1941         reserved
1942         Internet Protocol (IP) space and an external demilitarized zone (DMZ),
1943         or "outside" section of a network, that is available to the public.
1944       </para>
1945       <para>
1946         <emphasis>Example, Inc.</emphasis> wants its internal clients
1947         to be able to resolve external hostnames and to exchange mail with
1948         people on the outside. The company also wants its internal resolvers
1949         to have access to certain internal-only zones that are not available
1950         at all outside of the internal network.
1951       </para>
1952       <para>
1953         In order to accomplish this, the company will set up two sets
1954         of name servers. One set will be on the inside network (in the
1955         reserved
1956         IP space) and the other set will be on bastion hosts, which are
1957         "proxy"
1958         hosts that can talk to both sides of its network, in the DMZ.
1959       </para>
1960       <para>
1961         The internal servers will be configured to forward all queries,
1962         except queries for <filename>site1.internal</filename>, <filename>site2.internal</filename>, <filename>site1.example.com</filename>,
1963         and <filename>site2.example.com</filename>, to the servers
1964         in the
1965         DMZ. These internal servers will have complete sets of information
1966         for <filename>site1.example.com</filename>, <filename>site2.example.com</filename>, <filename>site1.internal</filename>,
1967         and <filename>site2.internal</filename>.
1968       </para>
1969       <para>
1970         To protect the <filename>site1.internal</filename> and <filename>site2.internal</filename> domains,
1971         the internal name servers must be configured to disallow all queries
1972         to these domains from any external hosts, including the bastion
1973         hosts.
1974       </para>
1975       <para>
1976         The external servers, which are on the bastion hosts, will
1977         be configured to serve the "public" version of the <filename>site1</filename> and <filename>site2.example.com</filename> zones.
1978         This could include things such as the host records for public servers
1979         (<filename>www.example.com</filename> and <filename>ftp.example.com</filename>),
1980         and mail exchange (MX)  records (<filename>a.mx.example.com</filename> and <filename>b.mx.example.com</filename>).
1981       </para>
1982       <para>
1983         In addition, the public <filename>site1</filename> and <filename>site2.example.com</filename> zones
1984         should have special MX records that contain wildcard (`*') records
1985         pointing to the bastion hosts. This is needed because external mail
1986         servers do not have any other way of looking up how to deliver mail
1987         to those internal hosts. With the wildcard records, the mail will
1988         be delivered to the bastion host, which can then forward it on to
1989         internal hosts.
1990       </para>
1991       <para>
1992         Here's an example of a wildcard MX record:
1993       </para>
1994       <programlisting>*   IN MX 10 external1.example.com.</programlisting>
1995       <para>
1996         Now that they accept mail on behalf of anything in the internal
1997         network, the bastion hosts will need to know how to deliver mail
1998         to internal hosts. In order for this to work properly, the resolvers
1999         on
2000         the bastion hosts will need to be configured to point to the internal
2001         name servers for DNS resolution.
2002       </para>
2003       <para>
2004         Queries for internal hostnames will be answered by the internal
2005         servers, and queries for external hostnames will be forwarded back
2006         out to the DNS servers on the bastion hosts.
2007       </para>
2008       <para>
2009         In order for all this to work properly, internal clients will
2010         need to be configured to query <emphasis>only</emphasis> the internal
2011         name servers for DNS queries. This could also be enforced via
2012         selective
2013         filtering on the network.
2014       </para>
2015       <para>
2016         If everything has been set properly, <emphasis>Example, Inc.</emphasis>'s
2017         internal clients will now be able to:
2018       </para>
2019       <itemizedlist>
2020         <listitem>
2021           <simpara>
2022             Look up any hostnames in the <literal>site1</literal>
2023             and
2024             <literal>site2.example.com</literal> zones.
2025           </simpara>
2026         </listitem>
2027         <listitem>
2028           <simpara>
2029             Look up any hostnames in the <literal>site1.internal</literal> and
2030             <literal>site2.internal</literal> domains.
2031           </simpara>
2032         </listitem>
2033         <listitem>
2034           <simpara>Look up any hostnames on the Internet.</simpara>
2035         </listitem>
2036         <listitem>
2037           <simpara>Exchange mail with both internal and external people.</simpara>
2038         </listitem>
2039       </itemizedlist>
2040       <para>
2041         Hosts on the Internet will be able to:
2042       </para>
2043       <itemizedlist>
2044         <listitem>
2045           <simpara>
2046             Look up any hostnames in the <literal>site1</literal>
2047             and
2048             <literal>site2.example.com</literal> zones.
2049           </simpara>
2050         </listitem>
2051         <listitem>
2052           <simpara>
2053             Exchange mail with anyone in the <literal>site1</literal> and
2054             <literal>site2.example.com</literal> zones.
2055           </simpara>
2056         </listitem>
2057       </itemizedlist>
2058
2059       <para>
2060         Here is an example configuration for the setup we just
2061         described above. Note that this is only configuration information;
2062         for information on how to configure your zone files, see <xref linkend="sample_configuration"/>.
2063       </para>
2064
2065       <para>
2066         Internal DNS server config:
2067       </para>
2068
2069 <programlisting>
2070
2071 acl internals { 172.16.72.0/24; 192.168.1.0/24; };
2072
2073 acl externals { <varname>bastion-ips-go-here</varname>; };
2074
2075 options {
2076     ...
2077     ...
2078     forward only;
2079     // forward to external servers
2080     forwarders {
2081         <varname>bastion-ips-go-here</varname>;
2082     };
2083     // sample allow-transfer (no one)
2084     allow-transfer { none; };
2085     // restrict query access
2086     allow-query { internals; externals; };
2087     // restrict recursion
2088     allow-recursion { internals; };
2089     ...
2090     ...
2091 };
2092
2093 // sample master zone
2094 zone "site1.example.com" {
2095   type master;
2096   file "m/site1.example.com";
2097   // do normal iterative resolution (do not forward)
2098   forwarders { };
2099   allow-query { internals; externals; };
2100   allow-transfer { internals; };
2101 };
2102
2103 // sample slave zone
2104 zone "site2.example.com" {
2105   type slave;
2106   file "s/site2.example.com";
2107   masters { 172.16.72.3; };
2108   forwarders { };
2109   allow-query { internals; externals; };
2110   allow-transfer { internals; };
2111 };
2112
2113 zone "site1.internal" {
2114   type master;
2115   file "m/site1.internal";
2116   forwarders { };
2117   allow-query { internals; };
2118   allow-transfer { internals; }
2119 };
2120
2121 zone "site2.internal" {
2122   type slave;
2123   file "s/site2.internal";
2124   masters { 172.16.72.3; };
2125   forwarders { };
2126   allow-query { internals };
2127   allow-transfer { internals; }
2128 };
2129 </programlisting>
2130
2131       <para>
2132         External (bastion host) DNS server config:
2133       </para>
2134
2135 <programlisting>
2136 acl internals { 172.16.72.0/24; 192.168.1.0/24; };
2137
2138 acl externals { bastion-ips-go-here; };
2139
2140 options {
2141   ...
2142   ...
2143   // sample allow-transfer (no one)
2144   allow-transfer { none; };
2145   // default query access
2146   allow-query { any; };
2147   // restrict cache access
2148   allow-query-cache { internals; externals; };
2149   // restrict recursion
2150   allow-recursion { internals; externals; };
2151   ...
2152   ...
2153 };
2154
2155 // sample slave zone
2156 zone "site1.example.com" {
2157   type master;
2158   file "m/site1.foo.com";
2159   allow-transfer { internals; externals; };
2160 };
2161
2162 zone "site2.example.com" {
2163   type slave;
2164   file "s/site2.foo.com";
2165   masters { another_bastion_host_maybe; };
2166   allow-transfer { internals; externals; }
2167 };
2168 </programlisting>
2169
2170       <para>
2171         In the <filename>resolv.conf</filename> (or equivalent) on
2172         the bastion host(s):
2173       </para>
2174
2175 <programlisting>
2176 search ...
2177 nameserver 172.16.72.2
2178 nameserver 172.16.72.3
2179 nameserver 172.16.72.4
2180 </programlisting>
2181
2182      </sect2>
2183     </sect1>
2184     <sect1 id="tsig">
2185       <title>TSIG</title>
2186       <para>
2187         This is a short guide to setting up Transaction SIGnatures
2188         (TSIG) based transaction security in <acronym>BIND</acronym>. It describes changes
2189         to the configuration file as well as what changes are required for
2190         different features, including the process of creating transaction
2191         keys and using transaction signatures with <acronym>BIND</acronym>.
2192       </para>
2193       <para>
2194         <acronym>BIND</acronym> primarily supports TSIG for server
2195         to server communication.
2196         This includes zone transfer, notify, and recursive query messages.
2197         Resolvers based on newer versions of <acronym>BIND</acronym> 8 have limited support
2198         for TSIG.
2199       </para>
2200
2201       <para>
2202         TSIG can also be useful for dynamic update. A primary
2203         server for a dynamic zone should control access to the dynamic
2204         update service, but IP-based access control is insufficient.
2205         The cryptographic access control provided by TSIG
2206         is far superior. The <command>nsupdate</command>
2207         program supports TSIG via the <option>-k</option> and
2208         <option>-y</option> command line options or inline by use
2209         of the <command>key</command>.
2210       </para>
2211
2212       <sect2>
2213         <title>Generate Shared Keys for Each Pair of Hosts</title>
2214         <para>
2215           A shared secret is generated to be shared between <emphasis>host1</emphasis> and <emphasis>host2</emphasis>.
2216           An arbitrary key name is chosen: "host1-host2.". The key name must
2217           be the same on both hosts.
2218         </para>
2219         <sect3>
2220           <title>Automatic Generation</title>
2221           <para>
2222             The following command will generate a 128-bit (16 byte) HMAC-SHA256
2223             key as described above. Longer keys are better, but shorter keys
2224             are easier to read. Note that the maximum key length is the digest
2225             length, here 256 bits.
2226           </para>
2227           <para>
2228             <userinput>dnssec-keygen -a hmac-sha256 -b 128 -n HOST host1-host2.</userinput>
2229           </para>
2230           <para>
2231             The key is in the file <filename>Khost1-host2.+163+00000.private</filename>.
2232             Nothing directly uses this file, but the base-64 encoded string
2233             following "<literal>Key:</literal>"
2234             can be extracted from the file and used as a shared secret:
2235           </para>
2236           <programlisting>Key: La/E5CjG9O+os1jq0a2jdA==</programlisting>
2237           <para>
2238             The string "<literal>La/E5CjG9O+os1jq0a2jdA==</literal>" can
2239             be used as the shared secret.
2240           </para>
2241         </sect3>
2242         <sect3>
2243           <title>Manual Generation</title>
2244           <para>
2245             The shared secret is simply a random sequence of bits, encoded
2246             in base-64. Most ASCII strings are valid base-64 strings (assuming
2247             the length is a multiple of 4 and only valid characters are used),
2248             so the shared secret can be manually generated.
2249           </para>
2250           <para>
2251             Also, a known string can be run through <command>mmencode</command> or
2252             a similar program to generate base-64 encoded data.
2253           </para>
2254         </sect3>
2255       </sect2>
2256       <sect2>
2257         <title>Copying the Shared Secret to Both Machines</title>
2258         <para>
2259           This is beyond the scope of DNS. A secure transport mechanism
2260           should be used. This could be secure FTP, ssh, telephone, etc.
2261         </para>
2262       </sect2>
2263       <sect2>
2264         <title>Informing the Servers of the Key's Existence</title>
2265         <para>
2266           Imagine <emphasis>host1</emphasis> and <emphasis>host 2</emphasis>
2267           are
2268           both servers. The following is added to each server's <filename>named.conf</filename> file:
2269         </para>
2270
2271 <programlisting>
2272 key host1-host2. {
2273   algorithm hmac-sha256;
2274   secret "La/E5CjG9O+os1jq0a2jdA==";
2275 };
2276 </programlisting>
2277
2278         <para>
2279           The secret is the one generated above. Since this is a secret, it
2280           is recommended that either <filename>named.conf</filename> be
2281           non-world readable, or the key directive be added to a non-world
2282           readable file that is included by <filename>named.conf</filename>.
2283         </para>
2284         <para>
2285           At this point, the key is recognized. This means that if the
2286           server receives a message signed by this key, it can verify the
2287           signature. If the signature is successfully verified, the
2288           response is signed by the same key.
2289         </para>
2290       </sect2>
2291
2292       <sect2>
2293         <title>Instructing the Server to Use the Key</title>
2294         <para>
2295           Since keys are shared between two hosts only, the server must
2296           be told when keys are to be used. The following is added to the <filename>named.conf</filename> file
2297           for <emphasis>host1</emphasis>, if the IP address of <emphasis>host2</emphasis> is
2298           10.1.2.3:
2299         </para>
2300
2301 <programlisting>
2302 server 10.1.2.3 {
2303   keys { host1-host2. ;};
2304 };
2305 </programlisting>
2306
2307         <para>
2308           Multiple keys may be present, but only the first is used.
2309           This directive does not contain any secrets, so it may be in a
2310           world-readable
2311           file.
2312         </para>
2313         <para>
2314           If <emphasis>host1</emphasis> sends a message that is a request
2315           to that address, the message will be signed with the specified key. <emphasis>host1</emphasis> will
2316           expect any responses to signed messages to be signed with the same
2317           key.
2318         </para>
2319         <para>
2320           A similar statement must be present in <emphasis>host2</emphasis>'s
2321           configuration file (with <emphasis>host1</emphasis>'s address) for <emphasis>host2</emphasis> to
2322           sign request messages to <emphasis>host1</emphasis>.
2323         </para>
2324       </sect2>
2325       <sect2>
2326         <title>TSIG Key Based Access Control</title>
2327         <para>
2328           <acronym>BIND</acronym> allows IP addresses and ranges
2329           to be specified in ACL
2330           definitions and
2331           <command>allow-{ query | transfer | update }</command>
2332           directives.
2333           This has been extended to allow TSIG keys also. The above key would
2334           be denoted <command>key host1-host2.</command>
2335         </para>
2336         <para>
2337           An example of an <command>allow-update</command> directive would be:
2338         </para>
2339
2340 <programlisting>
2341 allow-update { key host1-host2. ;};
2342 </programlisting>
2343
2344         <para>
2345           This allows dynamic updates to succeed only if the request
2346           was signed by a key named "<command>host1-host2.</command>".
2347         </para>
2348
2349         <para>
2350           See <xref linkend="dynamic_update_policies"/> for a discussion of
2351           the more flexible <command>update-policy</command> statement.
2352         </para>
2353
2354       </sect2>
2355       <sect2>
2356         <title>Errors</title>
2357
2358         <para>
2359           The processing of TSIG signed messages can result in
2360           several errors. If a signed message is sent to a non-TSIG aware
2361           server, a FORMERR (format error) will be returned, since the server will not
2362           understand the record. This is a result of misconfiguration,
2363           since the server must be explicitly configured to send a TSIG
2364           signed message to a specific server.
2365         </para>
2366
2367         <para>
2368           If a TSIG aware server receives a message signed by an
2369           unknown key, the response will be unsigned with the TSIG
2370           extended error code set to BADKEY. If a TSIG aware server
2371           receives a message with a signature that does not validate, the
2372           response will be unsigned with the TSIG extended error code set
2373           to BADSIG. If a TSIG aware server receives a message with a time
2374           outside of the allowed range, the response will be signed with
2375           the TSIG extended error code set to BADTIME, and the time values
2376           will be adjusted so that the response can be successfully
2377           verified. In any of these cases, the message's rcode (response code) is set to
2378           NOTAUTH (not authenticated).
2379         </para>
2380
2381       </sect2>
2382     </sect1>
2383     <sect1>
2384       <title>TKEY</title>
2385
2386       <para><command>TKEY</command>
2387         is a mechanism for automatically generating a shared secret
2388         between two hosts.  There are several "modes" of
2389         <command>TKEY</command> that specify how the key is generated
2390         or assigned.  <acronym>BIND</acronym> 9 implements only one of
2391         these modes, the Diffie-Hellman key exchange.  Both hosts are
2392         required to have a Diffie-Hellman KEY record (although this
2393         record is not required to be present in a zone).  The
2394         <command>TKEY</command> process must use signed messages,
2395         signed either by TSIG or SIG(0).  The result of
2396         <command>TKEY</command> is a shared secret that can be used to
2397         sign messages with TSIG.  <command>TKEY</command> can also be
2398         used to delete shared secrets that it had previously
2399         generated.
2400       </para>
2401
2402       <para>
2403         The <command>TKEY</command> process is initiated by a
2404         client
2405         or server by sending a signed <command>TKEY</command>
2406         query
2407         (including any appropriate KEYs) to a TKEY-aware server.  The
2408         server response, if it indicates success, will contain a
2409         <command>TKEY</command> record and any appropriate keys.
2410         After
2411         this exchange, both participants have enough information to
2412         determine the shared secret; the exact process depends on the
2413         <command>TKEY</command> mode.  When using the
2414         Diffie-Hellman
2415         <command>TKEY</command> mode, Diffie-Hellman keys are
2416         exchanged,
2417         and the shared secret is derived by both participants.
2418       </para>
2419
2420     </sect1>
2421     <sect1>
2422       <title>SIG(0)</title>
2423
2424       <para>
2425         <acronym>BIND</acronym> 9 partially supports DNSSEC SIG(0)
2426             transaction signatures as specified in RFC 2535 and RFC 2931.
2427         SIG(0)
2428         uses public/private keys to authenticate messages.  Access control
2429         is performed in the same manner as TSIG keys; privileges can be
2430         granted or denied based on the key name.
2431       </para>
2432
2433       <para>
2434         When a SIG(0) signed message is received, it will only be
2435         verified if the key is known and trusted by the server; the server
2436         will not attempt to locate and/or validate the key.
2437       </para>
2438
2439       <para>
2440         SIG(0) signing of multiple-message TCP streams is not
2441         supported.
2442       </para>
2443
2444       <para>
2445         The only tool shipped with <acronym>BIND</acronym> 9 that
2446         generates SIG(0) signed messages is <command>nsupdate</command>.
2447       </para>
2448
2449     </sect1>
2450     <sect1 id="DNSSEC">
2451       <title>DNSSEC</title>
2452
2453       <para>
2454         Cryptographic authentication of DNS information is possible
2455         through the DNS Security (<emphasis>DNSSEC-bis</emphasis>) extensions,
2456         defined in RFC 4033, RFC 4034, and RFC 4035.
2457         This section describes the creation and use of DNSSEC signed zones.
2458       </para>
2459
2460       <para>
2461         In order to set up a DNSSEC secure zone, there are a series
2462         of steps which must be followed.  <acronym>BIND</acronym>
2463         9 ships
2464         with several tools
2465         that are used in this process, which are explained in more detail
2466         below.  In all cases, the <option>-h</option> option prints a
2467         full list of parameters.  Note that the DNSSEC tools require the
2468         keyset files to be in the working directory or the
2469         directory specified by the <option>-d</option> option, and
2470         that the tools shipped with BIND 9.2.x and earlier are not compatible
2471         with the current ones.
2472       </para>
2473
2474       <para>
2475         There must also be communication with the administrators of
2476         the parent and/or child zone to transmit keys.  A zone's security
2477         status must be indicated by the parent zone for a DNSSEC capable
2478         resolver to trust its data.  This is done through the presence
2479         or absence of a <literal>DS</literal> record at the
2480         delegation
2481         point.
2482       </para>
2483
2484       <para>
2485         For other servers to trust data in this zone, they must
2486         either be statically configured with this zone's zone key or the
2487         zone key of another zone above this one in the DNS tree.
2488       </para>
2489
2490       <sect2>
2491         <title>Generating Keys</title>
2492
2493         <para>
2494           The <command>dnssec-keygen</command> program is used to
2495           generate keys.
2496         </para>
2497
2498         <para>
2499           A secure zone must contain one or more zone keys.  The
2500           zone keys will sign all other records in the zone, as well as
2501           the zone keys of any secure delegated zones.  Zone keys must
2502           have the same name as the zone, a name type of
2503           <command>ZONE</command>, and must be usable for
2504           authentication.
2505           It is recommended that zone keys use a cryptographic algorithm
2506           designated as "mandatory to implement" by the IETF; currently
2507           the only one is RSASHA1.
2508         </para>
2509
2510         <para>
2511           The following command will generate a 768-bit RSASHA1 key for
2512           the <filename>child.example</filename> zone:
2513         </para>
2514
2515         <para>
2516           <userinput>dnssec-keygen -a RSASHA1 -b 768 -n ZONE child.example.</userinput>
2517         </para>
2518
2519         <para>
2520           Two output files will be produced:
2521           <filename>Kchild.example.+005+12345.key</filename> and
2522           <filename>Kchild.example.+005+12345.private</filename>
2523           (where
2524           12345 is an example of a key tag).  The key filenames contain
2525           the key name (<filename>child.example.</filename>),
2526           algorithm (3
2527           is DSA, 1 is RSAMD5, 5 is RSASHA1, etc.), and the key tag (12345 in
2528           this case).
2529           The private key (in the <filename>.private</filename>
2530           file) is
2531           used to generate signatures, and the public key (in the
2532           <filename>.key</filename> file) is used for signature
2533           verification.
2534         </para>
2535
2536         <para>
2537           To generate another key with the same properties (but with
2538           a different key tag), repeat the above command.
2539         </para>
2540
2541         <para>
2542           The <command>dnssec-keyfromlabel</command> program is used
2543           to get a key pair from a crypto hardware and build the key
2544           files. Its usage is similar to <command>dnssec-keygen</command>.
2545         </para>
2546
2547         <para>
2548           The public keys should be inserted into the zone file by
2549           including the <filename>.key</filename> files using
2550           <command>$INCLUDE</command> statements.
2551         </para>
2552
2553       </sect2>
2554       <sect2>
2555         <title>Signing the Zone</title>
2556
2557         <para>
2558           The <command>dnssec-signzone</command> program is used
2559           to sign a zone.
2560         </para>
2561
2562         <para>
2563           Any <filename>keyset</filename> files corresponding to
2564           secure subzones should be present.  The zone signer will
2565           generate <literal>NSEC</literal>, <literal>NSEC3</literal>
2566           and <literal>RRSIG</literal> records for the zone, as
2567           well as <literal>DS</literal> for the child zones if
2568           <literal>'-g'</literal> is specified.  If <literal>'-g'</literal>
2569           is not specified, then DS RRsets for the secure child
2570           zones need to be added manually.
2571         </para>
2572
2573         <para>
2574           The following command signs the zone, assuming it is in a
2575           file called <filename>zone.child.example</filename>.  By
2576                 default, all zone keys which have an available private key are
2577                 used to generate signatures.
2578         </para>
2579
2580         <para>
2581           <userinput>dnssec-signzone -o child.example zone.child.example</userinput>
2582         </para>
2583
2584         <para>
2585           One output file is produced:
2586           <filename>zone.child.example.signed</filename>.  This
2587           file
2588           should be referenced by <filename>named.conf</filename>
2589           as the
2590           input file for the zone.
2591         </para>
2592
2593         <para><command>dnssec-signzone</command>
2594           will also produce a keyset and dsset files and optionally a
2595           dlvset file.  These are used to provide the parent zone
2596           administrators with the <literal>DNSKEYs</literal> (or their
2597           corresponding <literal>DS</literal> records) that are the
2598           secure entry point to the zone.
2599         </para>
2600
2601       </sect2>
2602
2603       <sect2>
2604         <title>Configuring Servers</title>
2605
2606         <para>
2607           To enable <command>named</command> to respond appropriately
2608           to DNS requests from DNSSEC aware clients,
2609           <command>dnssec-enable</command> must be set to yes.
2610           (This is the default setting.)
2611         </para>
2612
2613         <para>
2614           To enable <command>named</command> to validate answers from
2615           other servers, the <command>dnssec-enable</command> and
2616           <command>dnssec-validation</command> options must both be
2617           set to yes (the default setting in <acronym>BIND</acronym> 9.5
2618           and later), and at least one trust anchor must be configured
2619           with a <command>trusted-keys</command> or
2620           <command>managed-keys</command> statement in
2621           <filename>named.conf</filename>.
2622         </para>
2623           
2624         <para>
2625           <command>trusted-keys</command> are copies of DNSKEY RRs
2626           for zones that are used to form the first link in the
2627           cryptographic chain of trust.  All keys listed in
2628           <command>trusted-keys</command> (and corresponding zones)
2629           are deemed to exist and only the listed keys will be used
2630           to validated the DNSKEY RRset that they are from.
2631         </para>
2632
2633         <para>
2634           <command>managed-keys</command> are trusted keys which are
2635           automatically kept up to date via RFC 5011 trust anchor
2636           maintenance.
2637         </para>
2638
2639         <para>
2640           <command>trusted-keys</command> and
2641           <command>managed-keys</command> are described in more detail
2642           later in this document.
2643         </para>
2644
2645         <para>
2646           Unlike <acronym>BIND</acronym> 8, <acronym>BIND</acronym>
2647           9 does not verify signatures on load, so zone keys for
2648           authoritative zones do not need to be specified in the
2649           configuration file.
2650         </para>
2651
2652         <para>
2653           After DNSSEC gets established, a typical DNSSEC configuration
2654           will look something like the following.  It has one or
2655           more public keys for the root.  This allows answers from
2656           outside the organization to be validated.  It will also
2657           have several keys for parts of the namespace the organization
2658           controls.  These are here to ensure that <command>named</command>
2659           is immune to compromises in the DNSSEC components of the security
2660           of parent zones.
2661         </para>
2662
2663 <programlisting>
2664 managed-keys {
2665         /* Root Key */
2666         "." initial-key 257 3 3 "BNY4wrWM1nCfJ+CXd0rVXyYmobt7sEEfK3clRbGaTwS
2667                                  JxrGkxJWoZu6I7PzJu/E9gx4UC1zGAHlXKdE4zYIpRh
2668                                  aBKnvcC2U9mZhkdUpd1Vso/HAdjNe8LmMlnzY3zy2Xy
2669                                  4klWOADTPzSv9eamj8V18PHGjBLaVtYvk/ln5ZApjYg
2670                                  hf+6fElrmLkdaz MQ2OCnACR817DF4BBa7UR/beDHyp
2671                                  5iWTXWSi6XmoJLbG9Scqc7l70KDqlvXR3M/lUUVRbke
2672                                  g1IPJSidmK3ZyCllh4XSKbje/45SKucHgnwU5jefMtq
2673                                  66gKodQj+MiA21AfUVe7u99WzTLzY3qlxDhxYQQ20FQ
2674                                  97S+LKUTpQcq27R7AT3/V5hRQxScINqwcz4jYqZD2fQ
2675                                  dgxbcDTClU0CRBdiieyLMNzXG3";
2676 };
2677
2678 trusted-keys {
2679         /* Key for our organization's forward zone */
2680         example.com. 257 3 5 "AwEAAaxPMcR2x0HbQV4WeZB6oEDX+r0QM6
2681                               5KbhTjrW1ZaARmPhEZZe3Y9ifgEuq7vZ/z
2682                               GZUdEGNWy+JZzus0lUptwgjGwhUS1558Hb
2683                               4JKUbbOTcM8pwXlj0EiX3oDFVmjHO444gL
2684                               kBOUKUf/mC7HvfwYH/Be22GnClrinKJp1O
2685                               g4ywzO9WglMk7jbfW33gUKvirTHr25GL7S
2686                               TQUzBb5Usxt8lgnyTUHs1t3JwCY5hKZ6Cq
2687                               FxmAVZP20igTixin/1LcrgX/KMEGd/biuv
2688                               F4qJCyduieHukuY3H4XMAcR+xia2nIUPvm
2689                               /oyWR8BW/hWdzOvnSCThlHf3xiYleDbt/o
2690                               1OTQ09A0=";
2691
2692         /* Key for our reverse zone. */
2693         2.0.192.IN-ADDRPA.NET. 257 3 5 "AQOnS4xn/IgOUpBPJ3bogzwc
2694                                        xOdNax071L18QqZnQQQAVVr+i
2695                                        LhGTnNGp3HoWQLUIzKrJVZ3zg
2696                                        gy3WwNT6kZo6c0tszYqbtvchm
2697                                        gQC8CzKojM/W16i6MG/eafGU3
2698                                        siaOdS0yOI6BgPsw+YZdzlYMa
2699                                        IJGf4M4dyoKIhzdZyQ2bYQrjy
2700                                        Q4LB0lC7aOnsMyYKHHYeRvPxj
2701                                        IQXmdqgOJGq+vsevG06zW+1xg
2702                                        YJh9rCIfnm1GX/KMgxLPG2vXT
2703                                        D/RnLX+D3T3UL7HJYHJhAZD5L
2704                                        59VvjSPsZJHeDCUyWYrvPZesZ
2705                                        DIRvhDD52SKvbheeTJUm6Ehkz
2706                                        ytNN2SN96QRk8j/iI8ib";
2707 };
2708
2709 options {
2710         ...
2711         dnssec-enable yes;
2712         dnssec-validation yes;
2713 };
2714 </programlisting>
2715
2716         <note>
2717           None of the keys listed in this example are valid.  In particular,
2718           the root key is not valid.
2719         </note>
2720
2721         <para>
2722           When DNSSEC validation is enabled and properly configured,
2723           the resolver will reject any answers from signed, secure zones
2724           which fail to validate, and will return SERVFAIL to the client.
2725         </para>
2726
2727         <para>
2728           Responses may fail to validate for any of several reasons,
2729           including missing, expired, or invalid signatures, a key which
2730           does not match the DS RRset in the parent zone, or an insecure
2731           response from a zone which, according to its parent, should have
2732           been secure.  
2733         </para>
2734
2735         <note>
2736           <para>
2737             When the validator receives a response from an unsigned zone
2738             that has a signed parent, it must confirm with the parent
2739             that the zone was intentionally left unsigned.  It does
2740             this by verifying, via signed and validated NSEC/NSEC3 records,
2741             that the parent zone contains no DS records for the child.
2742           </para>
2743           <para>
2744             If the validator <emphasis>can</emphasis> prove that the zone
2745             is insecure, then the response is accepted.  However, if it
2746             cannot, then it must assume an insecure response to be a
2747             forgery; it rejects the response and logs an error.
2748           </para>
2749           <para>
2750             The logged error reads "insecurity proof failed" and
2751             "got insecure response; parent indicates it should be secure".
2752             (Prior to BIND 9.7, the logged error was "not insecure".
2753             This referred to the zone, not the response.)
2754           </para>
2755         </note>
2756       </sect2>
2757
2758     </sect1>
2759
2760     <xi:include href="dnssec.xml"/>
2761
2762     <xi:include href="managed-keys.xml"/>
2763
2764     <xi:include href="pkcs11.xml"/>
2765
2766     <sect1>
2767       <title>IPv6 Support in <acronym>BIND</acronym> 9</title>
2768
2769       <para>
2770         <acronym>BIND</acronym> 9 fully supports all currently
2771         defined forms of IPv6 name to address and address to name
2772         lookups.  It will also use IPv6 addresses to make queries when
2773         running on an IPv6 capable system.
2774       </para>
2775
2776       <para>
2777         For forward lookups, <acronym>BIND</acronym> 9 supports
2778         only AAAA records.  RFC 3363 deprecated the use of A6 records,
2779         and client-side support for A6 records was accordingly removed
2780         from <acronym>BIND</acronym> 9.
2781         However, authoritative <acronym>BIND</acronym> 9 name servers still
2782         load zone files containing A6 records correctly, answer queries
2783         for A6 records, and accept zone transfer for a zone containing A6
2784         records.
2785       </para>
2786
2787       <para>
2788         For IPv6 reverse lookups, <acronym>BIND</acronym> 9 supports
2789         the traditional "nibble" format used in the
2790         <emphasis>ip6.arpa</emphasis> domain, as well as the older, deprecated
2791         <emphasis>ip6.int</emphasis> domain.
2792         Older versions of <acronym>BIND</acronym> 9 
2793         supported the "binary label" (also known as "bitstring") format,
2794         but support of binary labels has been completely removed per
2795         RFC 3363.
2796         Many applications in <acronym>BIND</acronym> 9 do not understand
2797         the binary label format at all any more, and will return an
2798         error if given.
2799         In particular, an authoritative <acronym>BIND</acronym> 9
2800         name server will not load a zone file containing binary labels.
2801       </para>
2802
2803       <para>
2804         For an overview of the format and structure of IPv6 addresses,
2805         see <xref linkend="ipv6addresses"/>.
2806       </para>
2807
2808       <sect2>
2809         <title>Address Lookups Using AAAA Records</title>
2810
2811         <para>
2812           The IPv6 AAAA record is a parallel to the IPv4 A record,
2813           and, unlike the deprecated A6 record, specifies the entire
2814           IPv6 address in a single record.  For example,
2815         </para>
2816
2817 <programlisting>
2818 $ORIGIN example.com.
2819 host            3600    IN      AAAA    2001:db8::1
2820 </programlisting>
2821
2822         <para>
2823           Use of IPv4-in-IPv6 mapped addresses is not recommended.
2824           If a host has an IPv4 address, use an A record, not
2825           a AAAA, with <literal>::ffff:192.168.42.1</literal> as
2826           the address.
2827         </para>
2828       </sect2>
2829       <sect2>
2830         <title>Address to Name Lookups Using Nibble Format</title>
2831
2832         <para>
2833           When looking up an address in nibble format, the address
2834           components are simply reversed, just as in IPv4, and
2835           <literal>ip6.arpa.</literal> is appended to the
2836           resulting name.
2837           For example, the following would provide reverse name lookup for
2838           a host with address
2839           <literal>2001:db8::1</literal>.
2840         </para>
2841
2842 <programlisting>
2843 $ORIGIN 0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.
2844 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0  14400   IN    PTR    (
2845                                     host.example.com. )
2846 </programlisting>
2847
2848       </sect2>
2849     </sect1>
2850   </chapter>
2851
2852   <chapter id="Bv9ARM.ch05">
2853     <title>The <acronym>BIND</acronym> 9 Lightweight Resolver</title>
2854     <sect1>
2855       <title>The Lightweight Resolver Library</title>
2856       <para>
2857         Traditionally applications have been linked with a stub resolver
2858         library that sends recursive DNS queries to a local caching name
2859         server.
2860       </para>
2861       <para>
2862         IPv6 once introduced new complexity into the resolution process,
2863         such as following A6 chains and DNAME records, and simultaneous
2864         lookup of IPv4 and IPv6 addresses.  Though most of the complexity was
2865         then removed, these are hard or impossible
2866         to implement in a traditional stub resolver.
2867       </para>
2868       <para>
2869         <acronym>BIND</acronym> 9 therefore can also provide resolution
2870         services to local clients
2871         using a combination of a lightweight resolver library and a resolver
2872         daemon process running on the local host.  These communicate using
2873         a simple UDP-based protocol, the "lightweight resolver protocol"
2874         that is distinct from and simpler than the full DNS protocol.
2875       </para>
2876     </sect1>
2877     <sect1 id="lwresd">
2878       <title>Running a Resolver Daemon</title>
2879
2880       <para>
2881         To use the lightweight resolver interface, the system must
2882         run the resolver daemon <command>lwresd</command> or a
2883         local
2884         name server configured with a <command>lwres</command>
2885         statement.
2886       </para>
2887
2888       <para>
2889         By default, applications using the lightweight resolver library will
2890         make
2891         UDP requests to the IPv4 loopback address (127.0.0.1) on port 921.
2892         The
2893         address can be overridden by <command>lwserver</command>
2894         lines in
2895         <filename>/etc/resolv.conf</filename>.
2896       </para>
2897
2898       <para>
2899         The daemon currently only looks in the DNS, but in the future
2900         it may use other sources such as <filename>/etc/hosts</filename>,
2901         NIS, etc.
2902       </para>
2903
2904       <para>
2905         The <command>lwresd</command> daemon is essentially a
2906         caching-only name server that responds to requests using the
2907         lightweight
2908         resolver protocol rather than the DNS protocol.  Because it needs
2909         to run on each host, it is designed to require no or minimal
2910         configuration.
2911         Unless configured otherwise, it uses the name servers listed on
2912         <command>nameserver</command> lines in <filename>/etc/resolv.conf</filename>
2913         as forwarders, but is also capable of doing the resolution
2914         autonomously if
2915         none are specified.
2916       </para>
2917       <para>
2918         The <command>lwresd</command> daemon may also be
2919         configured with a
2920         <filename>named.conf</filename> style configuration file,
2921         in
2922         <filename>/etc/lwresd.conf</filename> by default.  A name
2923         server may also
2924         be configured to act as a lightweight resolver daemon using the
2925         <command>lwres</command> statement in <filename>named.conf</filename>.
2926       </para>
2927
2928     </sect1>
2929   </chapter>
2930
2931   <chapter id="Bv9ARM.ch06">
2932     <title><acronym>BIND</acronym> 9 Configuration Reference</title>
2933
2934     <para>
2935       <acronym>BIND</acronym> 9 configuration is broadly similar
2936       to <acronym>BIND</acronym> 8; however, there are a few new
2937       areas
2938       of configuration, such as views. <acronym>BIND</acronym>
2939       8 configuration files should work with few alterations in <acronym>BIND</acronym>
2940       9, although more complex configurations should be reviewed to check
2941       if they can be more efficiently implemented using the new features
2942       found in <acronym>BIND</acronym> 9.
2943     </para>
2944
2945     <para>
2946       <acronym>BIND</acronym> 4 configuration files can be
2947       converted to the new format
2948       using the shell script
2949       <filename>contrib/named-bootconf/named-bootconf.sh</filename>.
2950     </para>
2951     <sect1 id="configuration_file_elements">
2952       <title>Configuration File Elements</title>
2953       <para>
2954         Following is a list of elements used throughout the <acronym>BIND</acronym> configuration
2955         file documentation:
2956       </para>
2957       <informaltable colsep="0" rowsep="0">
2958         <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
2959           <colspec colname="1" colnum="1" colsep="0" colwidth="1.855in"/>
2960           <colspec colname="2" colnum="2" colsep="0" colwidth="3.770in"/>
2961           <tbody>
2962             <row rowsep="0">
2963               <entry colname="1">
2964                 <para>
2965                   <varname>acl_name</varname>
2966                 </para>
2967               </entry>
2968               <entry colname="2">
2969                 <para>
2970                   The name of an <varname>address_match_list</varname> as
2971                   defined by the <command>acl</command> statement.
2972                 </para>
2973               </entry>
2974             </row>
2975             <row rowsep="0">
2976               <entry colname="1">
2977                 <para>
2978                   <varname>address_match_list</varname>
2979                 </para>
2980               </entry>
2981               <entry colname="2">
2982                 <para>
2983                   A list of one or more
2984                   <varname>ip_addr</varname>,
2985                   <varname>ip_prefix</varname>, <varname>key_id</varname>,
2986                   or <varname>acl_name</varname> elements, see
2987                   <xref linkend="address_match_lists"/>.
2988                 </para>
2989               </entry>
2990             </row>
2991             <row rowsep="0">
2992               <entry colname="1">
2993                 <para>
2994                   <varname>masters_list</varname>
2995                 </para>
2996               </entry>
2997               <entry colname="2">
2998                 <para>
2999                   A named list of one or more <varname>ip_addr</varname>
3000                   with optional <varname>key_id</varname> and/or
3001                   <varname>ip_port</varname>.
3002                   A <varname>masters_list</varname> may include other
3003                   <varname>masters_lists</varname>.
3004                 </para>
3005               </entry>
3006             </row>
3007             <row rowsep="0">
3008               <entry colname="1">
3009                 <para>
3010                   <varname>domain_name</varname>
3011                 </para>
3012               </entry>
3013               <entry colname="2">
3014                 <para>
3015                   A quoted string which will be used as
3016                   a DNS name, for example "<literal>my.test.domain</literal>".
3017                 </para>
3018               </entry>
3019             </row>
3020             <row rowsep="0">
3021               <entry colname="1">
3022                 <para>
3023                   <varname>namelist</varname>
3024                 </para>
3025               </entry>
3026               <entry colname="2">
3027                 <para>
3028                   A list of one or more <varname>domain_name</varname>
3029                   elements.
3030                 </para>
3031               </entry>
3032             </row>
3033             <row rowsep="0">
3034               <entry colname="1">
3035                 <para>
3036                   <varname>dotted_decimal</varname>
3037                 </para>
3038               </entry>
3039               <entry colname="2">
3040                 <para>
3041                   One to four integers valued 0 through
3042                   255 separated by dots (`.'), such as <command>123</command>,
3043                   <command>45.67</command> or <command>89.123.45.67</command>.
3044                 </para>
3045               </entry>
3046             </row>
3047             <row rowsep="0">
3048               <entry colname="1">
3049                 <para>
3050                   <varname>ip4_addr</varname>
3051                 </para>
3052               </entry>
3053               <entry colname="2">
3054                 <para>
3055                   An IPv4 address with exactly four elements
3056                   in <varname>dotted_decimal</varname> notation.
3057                 </para>
3058               </entry>
3059             </row>
3060             <row rowsep="0">
3061               <entry colname="1">
3062                 <para>
3063                   <varname>ip6_addr</varname>
3064                 </para>
3065               </entry>
3066               <entry colname="2">
3067                 <para>
3068                   An IPv6 address, such as <command>2001:db8::1234</command>.
3069                   IPv6 scoped addresses that have ambiguity on their
3070                   scope zones must be disambiguated by an appropriate
3071                   zone ID with the percent character (`%') as
3072                   delimiter.  It is strongly recommended to use
3073                   string zone names rather than numeric identifiers,
3074                   in order to be robust against system configuration
3075                   changes.  However, since there is no standard
3076                   mapping for such names and identifier values,
3077                   currently only interface names as link identifiers
3078                   are supported, assuming one-to-one mapping between
3079                   interfaces and links.  For example, a link-local
3080                   address <command>fe80::1</command> on the link
3081                   attached to the interface <command>ne0</command>
3082                   can be specified as <command>fe80::1%ne0</command>.
3083                   Note that on most systems link-local addresses
3084                   always have the ambiguity, and need to be
3085                   disambiguated.
3086                 </para>
3087               </entry>
3088             </row>
3089             <row rowsep="0">
3090               <entry colname="1">
3091                 <para>
3092                   <varname>ip_addr</varname>
3093                 </para>
3094               </entry>
3095               <entry colname="2">
3096                 <para>
3097                   An <varname>ip4_addr</varname> or <varname>ip6_addr</varname>.
3098                 </para>
3099               </entry>
3100             </row>
3101             <row rowsep="0">
3102               <entry colname="1">
3103                 <para>
3104                   <varname>ip_port</varname>
3105                 </para>
3106               </entry>
3107               <entry colname="2">
3108                 <para>
3109                   An IP port <varname>number</varname>.
3110                   The <varname>number</varname> is limited to 0
3111                   through 65535, with values
3112                   below 1024 typically restricted to use by processes running
3113                   as root.
3114                   In some cases, an asterisk (`*') character can be used as a
3115                   placeholder to
3116                   select a random high-numbered port.
3117                 </para>
3118               </entry>
3119             </row>
3120             <row rowsep="0">
3121               <entry colname="1">
3122                 <para>
3123                   <varname>ip_prefix</varname>
3124                 </para>
3125               </entry>
3126               <entry colname="2">
3127                 <para>
3128                   An IP network specified as an <varname>ip_addr</varname>,
3129                   followed by a slash (`/') and then the number of bits in the
3130                   netmask.
3131                   Trailing zeros in a <varname>ip_addr</varname>
3132                   may omitted.
3133                   For example, <command>127/8</command> is the
3134                   network <command>127.0.0.0</command> with
3135                   netmask <command>255.0.0.0</command> and <command>1.2.3.0/28</command> is
3136                   network <command>1.2.3.0</command> with netmask <command>255.255.255.240</command>.
3137                 </para>
3138                 <para>
3139                   When specifying a prefix involving a IPv6 scoped address
3140                   the scope may be omitted.  In that case the prefix will
3141                   match packets from any scope.
3142                 </para>
3143               </entry>
3144             </row>
3145             <row rowsep="0">
3146               <entry colname="1">
3147                 <para>
3148                   <varname>key_id</varname>
3149                 </para>
3150               </entry>
3151               <entry colname="2">
3152                 <para>
3153                   A <varname>domain_name</varname> representing
3154                   the name of a shared key, to be used for transaction
3155                   security.
3156                 </para>
3157               </entry>
3158             </row>
3159             <row rowsep="0">
3160               <entry colname="1">
3161                 <para>
3162                   <varname>key_list</varname>
3163                 </para>
3164               </entry>
3165               <entry colname="2">
3166                 <para>
3167                   A list of one or more
3168                   <varname>key_id</varname>s,
3169                   separated by semicolons and ending with a semicolon.
3170                 </para>
3171               </entry>
3172             </row>
3173             <row rowsep="0">
3174               <entry colname="1">
3175                 <para>
3176                   <varname>number</varname>
3177                 </para>
3178               </entry>
3179               <entry colname="2">
3180                 <para>
3181                   A non-negative 32-bit integer
3182                   (i.e., a number between 0 and 4294967295, inclusive).
3183                   Its acceptable value might further
3184                   be limited by the context in which it is used.
3185                 </para>
3186               </entry>
3187             </row>
3188             <row rowsep="0">
3189               <entry colname="1">
3190                 <para>
3191                   <varname>path_name</varname>
3192                 </para>
3193               </entry>
3194               <entry colname="2">
3195                 <para>
3196                   A quoted string which will be used as
3197                   a pathname, such as <filename>zones/master/my.test.domain</filename>.
3198                 </para>
3199               </entry>
3200             </row>
3201             <row rowsep="0">
3202               <entry colname="1">
3203                 <para>
3204                   <varname>port_list</varname>
3205                 </para>
3206               </entry>
3207               <entry colname="2">
3208                 <para>
3209                   A list of an <varname>ip_port</varname> or a port
3210                   range.
3211                   A port range is specified in the form of
3212                   <userinput>range</userinput> followed by
3213                   two <varname>ip_port</varname>s,
3214                   <varname>port_low</varname> and
3215                   <varname>port_high</varname>, which represents
3216                   port numbers from <varname>port_low</varname> through
3217                   <varname>port_high</varname>, inclusive.
3218                   <varname>port_low</varname> must not be larger than
3219                   <varname>port_high</varname>.
3220                   For example,
3221                   <userinput>range 1024 65535</userinput> represents
3222                   ports from 1024 through 65535.
3223                   In either case an asterisk (`*') character is not
3224                   allowed as a valid <varname>ip_port</varname>.
3225                 </para>
3226               </entry>
3227             </row>
3228             <row rowsep="0">
3229               <entry colname="1">
3230                 <para>
3231                   <varname>size_spec</varname>
3232                 </para>
3233               </entry>
3234               <entry colname="2">
3235                 <para>
3236                   A number, the word <userinput>unlimited</userinput>,
3237                   or the word <userinput>default</userinput>.
3238                 </para>
3239                 <para>
3240                   An <varname>unlimited</varname> <varname>size_spec</varname> requests unlimited
3241                   use, or the maximum available amount. A <varname>default size_spec</varname> uses
3242                   the limit that was in force when the server was started.
3243                 </para>
3244                 <para>
3245                   A <varname>number</varname> can optionally be
3246                   followed by a scaling factor:
3247                   <userinput>K</userinput> or <userinput>k</userinput>
3248                   for kilobytes,
3249                   <userinput>M</userinput> or <userinput>m</userinput>
3250                   for megabytes, and
3251                   <userinput>G</userinput> or <userinput>g</userinput> for gigabytes,
3252                   which scale by 1024, 1024*1024, and 1024*1024*1024
3253                   respectively.
3254                 </para>
3255                 <para>
3256                   The value must be representable as a 64-bit unsigned integer
3257                   (0 to 18446744073709551615, inclusive).
3258                   Using <varname>unlimited</varname> is the best
3259                   way
3260                   to safely set a really large number.
3261                 </para>
3262               </entry>
3263             </row>
3264             <row rowsep="0">
3265               <entry colname="1">
3266                 <para>
3267                   <varname>yes_or_no</varname>
3268                 </para>
3269               </entry>
3270               <entry colname="2">
3271                 <para>
3272                   Either <userinput>yes</userinput> or <userinput>no</userinput>.
3273                   The words <userinput>true</userinput> and <userinput>false</userinput> are
3274                   also accepted, as are the numbers <userinput>1</userinput>
3275                   and <userinput>0</userinput>.
3276                 </para>
3277               </entry>
3278             </row>
3279             <row rowsep="0">
3280               <entry colname="1">
3281                 <para>
3282                   <varname>dialup_option</varname>
3283                 </para>
3284               </entry>
3285               <entry colname="2">
3286                 <para>
3287                   One of <userinput>yes</userinput>,
3288                   <userinput>no</userinput>, <userinput>notify</userinput>,
3289                   <userinput>notify-passive</userinput>, <userinput>refresh</userinput> or
3290                   <userinput>passive</userinput>.
3291                   When used in a zone, <userinput>notify-passive</userinput>,
3292                   <userinput>refresh</userinput>, and <userinput>passive</userinput>
3293                   are restricted to slave and stub zones.
3294                 </para>
3295               </entry>
3296             </row>
3297           </tbody>
3298         </tgroup>
3299       </informaltable>
3300       <sect2 id="address_match_lists">
3301         <title>Address Match Lists</title>
3302         <sect3>
3303           <title>Syntax</title>
3304
3305 <programlisting><varname>address_match_list</varname> = address_match_list_element ;
3306   <optional> address_match_list_element; ... </optional>
3307 <varname>address_match_list_element</varname> = <optional> ! </optional> (ip_address <optional>/length</optional> |
3308    key key_id | acl_name | { address_match_list } )
3309 </programlisting>
3310
3311         </sect3>
3312         <sect3>
3313           <title>Definition and Usage</title>
3314           <para>
3315             Address match lists are primarily used to determine access
3316             control for various server operations. They are also used in
3317             the <command>listen-on</command> and <command>sortlist</command>
3318             statements. The elements which constitute an address match
3319             list can be any of the following:
3320           </para>
3321           <itemizedlist>
3322             <listitem>
3323               <simpara>an IP address (IPv4 or IPv6)</simpara>
3324             </listitem>
3325             <listitem>
3326               <simpara>an IP prefix (in `/' notation)</simpara>
3327             </listitem>
3328             <listitem>
3329               <simpara>
3330                 a key ID, as defined by the <command>key</command>
3331                 statement
3332               </simpara>
3333             </listitem>
3334             <listitem>
3335               <simpara>the name of an address match list defined with
3336                 the <command>acl</command> statement
3337               </simpara>
3338             </listitem>
3339             <listitem>
3340               <simpara>a nested address match list enclosed in braces</simpara>
3341             </listitem>
3342           </itemizedlist>
3343
3344           <para>
3345             Elements can be negated with a leading exclamation mark (`!'),
3346             and the match list names "any", "none", "localhost", and
3347             "localnets" are predefined. More information on those names
3348             can be found in the description of the acl statement.
3349           </para>
3350
3351           <para>
3352             The addition of the key clause made the name of this syntactic
3353             element something of a misnomer, since security keys can be used
3354             to validate access without regard to a host or network address.
3355             Nonetheless, the term "address match list" is still used
3356             throughout the documentation.
3357           </para>
3358
3359           <para>
3360             When a given IP address or prefix is compared to an address
3361             match list, the comparison takes place in approximately O(1)
3362             time.  However, key comparisons require that the list of keys
3363             be traversed until a matching key is found, and therefore may
3364             be somewhat slower.
3365           </para>
3366
3367           <para>
3368             The interpretation of a match depends on whether the list is being
3369             used for access control, defining <command>listen-on</command> ports, or in a
3370             <command>sortlist</command>, and whether the element was negated.
3371           </para>
3372
3373           <para>
3374             When used as an access control list, a non-negated match
3375             allows access and a negated match denies access. If
3376             there is no match, access is denied. The clauses
3377             <command>allow-notify</command>,
3378             <command>allow-recursion</command>,
3379             <command>allow-recursion-on</command>,
3380             <command>allow-query</command>,
3381             <command>allow-query-on</command>,
3382             <command>allow-query-cache</command>,
3383             <command>allow-query-cache-on</command>,
3384             <command>allow-transfer</command>,
3385             <command>allow-update</command>,
3386             <command>allow-update-forwarding</command>, and
3387             <command>blackhole</command> all use address match
3388             lists.  Similarly, the <command>listen-on</command> option will cause the
3389             server to refuse queries on any of the machine's
3390             addresses which do not match the list.
3391           </para>
3392
3393           <para>
3394             Order of insertion is significant.  If more than one element
3395             in an ACL is found to match a given IP address or prefix,
3396             preference will be given to the one that came
3397             <emphasis>first</emphasis> in the ACL definition.
3398             Because of this first-match behavior, an element that
3399             defines a subset of another element in the list should
3400             come before the broader element, regardless of whether
3401             either is negated. For example, in
3402             <command>1.2.3/24; ! 1.2.3.13;</command>
3403             the 1.2.3.13 element is completely useless because the
3404             algorithm will match any lookup for 1.2.3.13 to the 1.2.3/24
3405             element.  Using <command>! 1.2.3.13; 1.2.3/24</command> fixes
3406             that problem by having 1.2.3.13 blocked by the negation, but
3407             all other 1.2.3.* hosts fall through.
3408           </para>
3409         </sect3>
3410       </sect2>
3411
3412       <sect2>
3413         <title>Comment Syntax</title>
3414
3415         <para>
3416           The <acronym>BIND</acronym> 9 comment syntax allows for
3417           comments to appear
3418           anywhere that whitespace may appear in a <acronym>BIND</acronym> configuration
3419           file. To appeal to programmers of all kinds, they can be written
3420           in the C, C++, or shell/perl style.
3421         </para>
3422
3423         <sect3>
3424           <title>Syntax</title>
3425
3426           <para>
3427             <programlisting>/* This is a <acronym>BIND</acronym> comment as in C */</programlisting>
3428             <programlisting>// This is a <acronym>BIND</acronym> comment as in C++</programlisting>
3429             <programlisting># This is a <acronym>BIND</acronym> comment as in common UNIX shells
3430 # and perl</programlisting>
3431           </para>
3432         </sect3>
3433         <sect3>
3434           <title>Definition and Usage</title>
3435           <para>
3436             Comments may appear anywhere that whitespace may appear in
3437             a <acronym>BIND</acronym> configuration file.
3438           </para>
3439           <para>
3440             C-style comments start with the two characters /* (slash,
3441             star) and end with */ (star, slash). Because they are completely
3442             delimited with these characters, they can be used to comment only
3443             a portion of a line or to span multiple lines.
3444           </para>
3445           <para>
3446             C-style comments cannot be nested. For example, the following
3447             is not valid because the entire comment ends with the first */:
3448           </para>
3449           <para>
3450
3451 <programlisting>/* This is the start of a comment.
3452    This is still part of the comment.
3453 /* This is an incorrect attempt at nesting a comment. */
3454    This is no longer in any comment. */
3455 </programlisting>
3456
3457           </para>
3458
3459           <para>
3460             C++-style comments start with the two characters // (slash,
3461             slash) and continue to the end of the physical line. They cannot
3462             be continued across multiple physical lines; to have one logical
3463             comment span multiple lines, each line must use the // pair.
3464             For example:
3465           </para>
3466           <para>
3467
3468 <programlisting>// This is the start of a comment.  The next line
3469 // is a new comment, even though it is logically
3470 // part of the previous comment.
3471 </programlisting>
3472
3473           </para>
3474           <para>
3475             Shell-style (or perl-style, if you prefer) comments start
3476             with the character <literal>#</literal> (number sign)
3477             and continue to the end of the
3478             physical line, as in C++ comments.
3479             For example:
3480           </para>
3481
3482           <para>
3483
3484 <programlisting># This is the start of a comment.  The next line
3485 # is a new comment, even though it is logically
3486 # part of the previous comment.
3487 </programlisting>
3488
3489           </para>
3490
3491           <warning>
3492             <para>
3493               You cannot use the semicolon (`;') character
3494               to start a comment such as you would in a zone file. The
3495               semicolon indicates the end of a configuration
3496               statement.
3497             </para>
3498           </warning>
3499         </sect3>
3500       </sect2>
3501     </sect1>
3502
3503     <sect1 id="Configuration_File_Grammar">
3504       <title>Configuration File Grammar</title>
3505
3506       <para>
3507         A <acronym>BIND</acronym> 9 configuration consists of
3508         statements and comments.
3509         Statements end with a semicolon. Statements and comments are the
3510         only elements that can appear without enclosing braces. Many
3511         statements contain a block of sub-statements, which are also
3512         terminated with a semicolon.
3513       </para>
3514
3515       <para>
3516         The following statements are supported:
3517       </para>
3518
3519       <informaltable colsep="0" rowsep="0">
3520         <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
3521           <colspec colname="1" colnum="1" colsep="0" colwidth="1.336in"/>
3522           <colspec colname="2" colnum="2" colsep="0" colwidth="3.778in"/>
3523           <tbody>
3524             <row rowsep="0">
3525               <entry colname="1">
3526                 <para><command>acl</command></para>
3527               </entry>
3528               <entry colname="2">
3529                 <para>
3530                   defines a named IP address
3531                   matching list, for access control and other uses.
3532                 </para>
3533               </entry>
3534             </row>
3535             <row rowsep="0">
3536               <entry colname="1">
3537                 <para><command>controls</command></para>
3538               </entry>
3539               <entry colname="2">
3540                 <para>
3541                   declares control channels to be used
3542                   by the <command>rndc</command> utility.
3543                 </para>
3544               </entry>
3545             </row>
3546             <row rowsep="0">
3547               <entry colname="1">
3548                 <para><command>include</command></para>
3549               </entry>
3550               <entry colname="2">
3551                 <para>
3552                   includes a file.
3553                 </para>
3554               </entry>
3555             </row>
3556             <row rowsep="0">
3557               <entry colname="1">
3558                 <para><command>key</command></para>
3559               </entry>
3560               <entry colname="2">
3561                 <para>
3562                   specifies key information for use in
3563                   authentication and authorization using TSIG.
3564                 </para>
3565               </entry>
3566             </row>
3567             <row rowsep="0">
3568               <entry colname="1">
3569                 <para><command>logging</command></para>
3570               </entry>
3571               <entry colname="2">
3572                 <para>
3573                   specifies what the server logs, and where
3574                   the log messages are sent.
3575                 </para>
3576               </entry>
3577             </row>
3578             <row rowsep="0">
3579               <entry colname="1">
3580                 <para><command>lwres</command></para>
3581               </entry>
3582               <entry colname="2">
3583                 <para>
3584                   configures <command>named</command> to
3585                   also act as a light-weight resolver daemon (<command>lwresd</command>).
3586                 </para>
3587               </entry>
3588             </row>
3589             <row rowsep="0">
3590               <entry colname="1">
3591                 <para><command>masters</command></para>
3592               </entry>
3593               <entry colname="2">
3594                 <para>
3595                   defines a named masters list for
3596                   inclusion in stub and slave zone masters clauses.
3597                 </para>
3598               </entry>
3599             </row>
3600             <row rowsep="0">
3601               <entry colname="1">
3602                 <para><command>options</command></para>
3603               </entry>
3604               <entry colname="2">
3605                 <para>
3606                   controls global server configuration
3607                   options and sets defaults for other statements.
3608                 </para>
3609               </entry>
3610             </row>
3611             <row rowsep="0">
3612               <entry colname="1">
3613                 <para><command>server</command></para>
3614               </entry>
3615               <entry colname="2">
3616                 <para>
3617                   sets certain configuration options on
3618                   a per-server basis.
3619                 </para>
3620               </entry>
3621             </row>
3622             <row rowsep="0">
3623               <entry colname="1">
3624                 <para><command>statistics-channels</command></para>
3625               </entry>
3626               <entry colname="2">
3627                 <para>
3628                   declares communication channels to get access to
3629                   <command>named</command> statistics.
3630                 </para>
3631               </entry>
3632             </row>
3633             <row rowsep="0">
3634               <entry colname="1">
3635                 <para><command>trusted-keys</command></para>
3636               </entry>
3637               <entry colname="2">
3638                 <para>
3639                   defines trusted DNSSEC keys.
3640                 </para>
3641               </entry>
3642             </row>
3643             <row rowsep="0">
3644               <entry colname="1">
3645                 <para><command>managed-keys</command></para>
3646               </entry>
3647               <entry colname="2">
3648                 <para>
3649                   lists DNSSEC keys to be kept up to date
3650                   using RFC 5011 trust anchor maintenance.
3651                 </para>
3652               </entry>
3653             </row>
3654             <row rowsep="0">
3655               <entry colname="1">
3656                 <para><command>view</command></para>
3657               </entry>
3658               <entry colname="2">
3659                 <para>
3660                   defines a view.
3661                 </para>
3662               </entry>
3663             </row>
3664             <row rowsep="0">
3665               <entry colname="1">
3666                 <para><command>zone</command></para>
3667               </entry>
3668               <entry colname="2">
3669                 <para>
3670                   defines a zone.
3671                 </para>
3672               </entry>
3673             </row>
3674           </tbody>
3675         </tgroup>
3676       </informaltable>
3677
3678       <para>
3679         The <command>logging</command> and
3680         <command>options</command> statements may only occur once
3681         per
3682         configuration.
3683       </para>
3684
3685       <sect2>
3686         <title><command>acl</command> Statement Grammar</title>
3687
3688 <programlisting><command>acl</command> acl-name {
3689     address_match_list
3690 };
3691 </programlisting>
3692
3693       </sect2>
3694       <sect2 id="acl">
3695         <title><command>acl</command> Statement Definition and
3696           Usage</title>
3697
3698         <para>
3699           The <command>acl</command> statement assigns a symbolic
3700           name to an address match list. It gets its name from a primary
3701           use of address match lists: Access Control Lists (ACLs).
3702         </para>
3703
3704         <para>
3705           Note that an address match list's name must be defined
3706           with <command>acl</command> before it can be used
3707           elsewhere; no forward references are allowed.
3708         </para>
3709
3710         <para>
3711           The following ACLs are built-in:
3712         </para>
3713
3714         <informaltable colsep="0" rowsep="0">
3715           <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
3716             <colspec colname="1" colnum="1" colsep="0" colwidth="1.130in"/>
3717             <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
3718             <tbody>
3719               <row rowsep="0">
3720                 <entry colname="1">
3721                   <para><command>any</command></para>
3722                 </entry>
3723                 <entry colname="2">
3724                   <para>
3725                     Matches all hosts.
3726                   </para>
3727                 </entry>
3728               </row>
3729               <row rowsep="0">
3730                 <entry colname="1">
3731                   <para><command>none</command></para>
3732                 </entry>
3733                 <entry colname="2">
3734                   <para>
3735                     Matches no hosts.
3736                   </para>
3737                 </entry>
3738               </row>
3739               <row rowsep="0">
3740                 <entry colname="1">
3741                   <para><command>localhost</command></para>
3742                 </entry>
3743                 <entry colname="2">
3744                   <para>
3745                     Matches the IPv4 and IPv6 addresses of all network
3746                     interfaces on the system.
3747                   </para>
3748                 </entry>
3749               </row>
3750               <row rowsep="0">
3751                 <entry colname="1">
3752                   <para><command>localnets</command></para>
3753                 </entry>
3754                 <entry colname="2">
3755                   <para>
3756                     Matches any host on an IPv4 or IPv6 network
3757                     for which the system has an interface.
3758                     Some systems do not provide a way to determine the prefix
3759                     lengths of
3760                     local IPv6 addresses.
3761                     In such a case, <command>localnets</command>
3762                     only matches the local
3763                     IPv6 addresses, just like <command>localhost</command>.
3764                   </para>
3765                 </entry>
3766               </row>
3767             </tbody>
3768           </tgroup>
3769         </informaltable>
3770
3771       </sect2>
3772       <sect2>
3773         <title><command>controls</command> Statement Grammar</title>
3774
3775 <programlisting><command>controls</command> {
3776    [ inet ( ip_addr | * ) [ port ip_port ]
3777                 allow { <replaceable> address_match_list </replaceable> }
3778                 keys { <replaceable>key_list</replaceable> }; ]
3779    [ inet ...; ]
3780    [ unix <replaceable>path</replaceable> perm <replaceable>number</replaceable> owner <replaceable>number</replaceable> group <replaceable>number</replaceable>
3781      keys { <replaceable>key_list</replaceable> }; ]
3782    [ unix ...; ]
3783 };
3784 </programlisting>
3785
3786       </sect2>
3787
3788       <sect2 id="controls_statement_definition_and_usage">
3789         <title><command>controls</command> Statement Definition and
3790           Usage</title>
3791
3792         <para>
3793           The <command>controls</command> statement declares control
3794           channels to be used by system administrators to control the
3795           operation of the name server. These control channels are
3796           used by the <command>rndc</command> utility to send
3797           commands to and retrieve non-DNS results from a name server.
3798         </para>
3799
3800         <para>
3801           An <command>inet</command> control channel is a TCP socket
3802           listening at the specified <command>ip_port</command> on the
3803           specified <command>ip_addr</command>, which can be an IPv4 or IPv6
3804           address.  An <command>ip_addr</command> of <literal>*</literal> (asterisk) is
3805           interpreted as the IPv4 wildcard address; connections will be
3806           accepted on any of the system's IPv4 addresses.
3807           To listen on the IPv6 wildcard address,
3808           use an <command>ip_addr</command> of <literal>::</literal>.
3809           If you will only use <command>rndc</command> on the local host,
3810           using the loopback address (<literal>127.0.0.1</literal>
3811           or <literal>::1</literal>) is recommended for maximum security.
3812         </para>
3813
3814         <para>
3815           If no port is specified, port 953 is used. The asterisk
3816           "<literal>*</literal>" cannot be used for <command>ip_port</command>.
3817         </para>
3818
3819         <para>
3820           The ability to issue commands over the control channel is
3821           restricted by the <command>allow</command> and
3822           <command>keys</command> clauses.
3823           Connections to the control channel are permitted based on the
3824           <command>address_match_list</command>.  This is for simple
3825           IP address based filtering only; any <command>key_id</command>
3826           elements of the <command>address_match_list</command>
3827           are ignored.
3828         </para>
3829
3830         <para>
3831           A <command>unix</command> control channel is a UNIX domain
3832           socket listening at the specified path in the file system.
3833           Access to the socket is specified by the <command>perm</command>,
3834           <command>owner</command> and <command>group</command> clauses.
3835           Note on some platforms (SunOS and Solaris) the permissions
3836           (<command>perm</command>) are applied to the parent directory
3837           as the permissions on the socket itself are ignored.
3838         </para>
3839
3840         <para>
3841           The primary authorization mechanism of the command
3842           channel is the <command>key_list</command>, which
3843           contains a list of <command>key_id</command>s.
3844           Each <command>key_id</command> in the <command>key_list</command>
3845           is authorized to execute commands over the control channel.
3846           See <xref linkend="rndc"/> in <xref linkend="admin_tools"/>)
3847           for information about configuring keys in <command>rndc</command>.
3848         </para>
3849
3850         <para>
3851           If no <command>controls</command> statement is present,
3852           <command>named</command> will set up a default
3853           control channel listening on the loopback address 127.0.0.1
3854           and its IPv6 counterpart ::1.
3855           In this case, and also when the <command>controls</command> statement
3856           is present but does not have a <command>keys</command> clause,
3857           <command>named</command> will attempt to load the command channel key
3858           from the file <filename>rndc.key</filename> in
3859           <filename>/etc</filename> (or whatever <varname>sysconfdir</varname>
3860           was specified as when <acronym>BIND</acronym> was built).
3861           To create a <filename>rndc.key</filename> file, run
3862           <userinput>rndc-confgen -a</userinput>.
3863         </para>
3864
3865         <para>
3866           The <filename>rndc.key</filename> feature was created to
3867           ease the transition of systems from <acronym>BIND</acronym> 8,
3868           which did not have digital signatures on its command channel
3869           messages and thus did not have a <command>keys</command> clause.
3870
3871           It makes it possible to use an existing <acronym>BIND</acronym> 8
3872           configuration file in <acronym>BIND</acronym> 9 unchanged,
3873           and still have <command>rndc</command> work the same way
3874           <command>ndc</command> worked in BIND 8, simply by executing the
3875           command <userinput>rndc-confgen -a</userinput> after BIND 9 is
3876           installed.
3877         </para>
3878
3879         <para>
3880           Since the <filename>rndc.key</filename> feature
3881           is only intended to allow the backward-compatible usage of
3882           <acronym>BIND</acronym> 8 configuration files, this
3883           feature does not
3884           have a high degree of configurability.  You cannot easily change
3885           the key name or the size of the secret, so you should make a
3886           <filename>rndc.conf</filename> with your own key if you
3887           wish to change
3888           those things.  The <filename>rndc.key</filename> file
3889           also has its
3890           permissions set such that only the owner of the file (the user that
3891           <command>named</command> is running as) can access it.
3892           If you
3893           desire greater flexibility in allowing other users to access
3894           <command>rndc</command> commands, then you need to create
3895           a
3896           <filename>rndc.conf</filename> file and make it group
3897           readable by a group
3898           that contains the users who should have access.
3899         </para>
3900
3901         <para>
3902           To disable the command channel, use an empty
3903           <command>controls</command> statement:
3904           <command>controls { };</command>.
3905         </para>
3906
3907       </sect2>
3908       <sect2>
3909         <title><command>include</command> Statement Grammar</title>
3910         <programlisting><command>include</command> <replaceable>filename</replaceable>;</programlisting>
3911       </sect2>
3912       <sect2>
3913         <title><command>include</command> Statement Definition and
3914           Usage</title>
3915
3916         <para>
3917           The <command>include</command> statement inserts the
3918           specified file at the point where the <command>include</command>
3919           statement is encountered. The <command>include</command>
3920                 statement facilitates the administration of configuration
3921           files
3922           by permitting the reading or writing of some things but not
3923           others. For example, the statement could include private keys
3924           that are readable only by the name server.
3925         </para>
3926
3927       </sect2>
3928       <sect2>
3929         <title><command>key</command> Statement Grammar</title>
3930
3931 <programlisting><command>key</command> <replaceable>key_id</replaceable> {
3932     algorithm <replaceable>string</replaceable>;
3933     secret <replaceable>string</replaceable>;
3934 };
3935 </programlisting>
3936
3937       </sect2>
3938
3939       <sect2>
3940         <title><command>key</command> Statement Definition and Usage</title>
3941
3942         <para>
3943           The <command>key</command> statement defines a shared
3944           secret key for use with TSIG (see <xref linkend="tsig"/>)
3945           or the command channel
3946           (see <xref linkend="controls_statement_definition_and_usage"/>).
3947         </para>
3948
3949         <para>
3950           The <command>key</command> statement can occur at the
3951           top level
3952           of the configuration file or inside a <command>view</command>
3953           statement.  Keys defined in top-level <command>key</command>
3954           statements can be used in all views.  Keys intended for use in
3955           a <command>controls</command> statement
3956           (see <xref linkend="controls_statement_definition_and_usage"/>)
3957           must be defined at the top level.
3958         </para>
3959
3960         <para>
3961           The <replaceable>key_id</replaceable>, also known as the
3962           key name, is a domain name uniquely identifying the key. It can
3963           be used in a <command>server</command>
3964           statement to cause requests sent to that
3965           server to be signed with this key, or in address match lists to
3966           verify that incoming requests have been signed with a key
3967           matching this name, algorithm, and secret.
3968         </para>
3969
3970         <para>
3971           The <replaceable>algorithm_id</replaceable> is a string
3972           that specifies a security/authentication algorithm.  Named
3973           supports <literal>hmac-md5</literal>,
3974           <literal>hmac-sha1</literal>, <literal>hmac-sha224</literal>,
3975           <literal>hmac-sha256</literal>, <literal>hmac-sha384</literal>
3976           and <literal>hmac-sha512</literal> TSIG authentication.
3977           Truncated hashes are supported by appending the minimum
3978           number of required bits preceded by a dash, e.g.
3979           <literal>hmac-sha1-80</literal>.  The
3980           <replaceable>secret_string</replaceable> is the secret
3981           to be used by the algorithm, and is treated as a base-64
3982           encoded string.
3983         </para>
3984
3985       </sect2>
3986       <sect2>
3987         <title><command>logging</command> Statement Grammar</title>
3988
3989 <programlisting><command>logging</command> {
3990    [ <command>channel</command> <replaceable>channel_name</replaceable> {
3991      ( <command>file</command> <replaceable>path_name</replaceable>
3992          [ <command>versions</command> ( <replaceable>number</replaceable> | <command>unlimited</command> ) ]
3993          [ <command>size</command> <replaceable>size spec</replaceable> ]
3994        | <command>syslog</command> <replaceable>syslog_facility</replaceable>
3995        | <command>stderr</command>
3996        | <command>null</command> );
3997      [ <command>severity</command> (<option>critical</option> | <option>error</option> | <option>warning</option> | <option>notice</option> |
3998                  <option>info</option> | <option>debug</option> [ <replaceable>level</replaceable> ] | <option>dynamic</option> ); ]
3999      [ <command>print-category</command> <option>yes</option> or <option>no</option>; ]
4000      [ <command>print-severity</command> <option>yes</option> or <option>no</option>; ]
4001      [ <command>print-time</command> <option>yes</option> or <option>no</option>; ]
4002    }; ]
4003    [ <command>category</command> <replaceable>category_name</replaceable> {
4004      <replaceable>channel_name</replaceable> ; [ <replaceable>channel_name</replaceable> ; ... ]
4005    }; ]
4006    ...
4007 };
4008 </programlisting>
4009
4010       </sect2>
4011
4012       <sect2>
4013         <title><command>logging</command> Statement Definition and
4014           Usage</title>
4015
4016         <para>
4017           The <command>logging</command> statement configures a
4018           wide
4019           variety of logging options for the name server. Its <command>channel</command> phrase
4020           associates output methods, format options and severity levels with
4021           a name that can then be used with the <command>category</command> phrase
4022           to select how various classes of messages are logged.
4023         </para>
4024         <para>
4025           Only one <command>logging</command> statement is used to
4026           define
4027           as many channels and categories as are wanted. If there is no <command>logging</command> statement,
4028           the logging configuration will be:
4029         </para>
4030
4031 <programlisting>logging {
4032      category default { default_syslog; default_debug; };
4033      category unmatched { null; };
4034 };
4035 </programlisting>
4036
4037         <para>
4038           In <acronym>BIND</acronym> 9, the logging configuration
4039           is only established when
4040           the entire configuration file has been parsed.  In <acronym>BIND</acronym> 8, it was
4041           established as soon as the <command>logging</command>
4042           statement
4043           was parsed. When the server is starting up, all logging messages
4044           regarding syntax errors in the configuration file go to the default
4045           channels, or to standard error if the "<option>-g</option>" option
4046           was specified.
4047         </para>
4048
4049         <sect3>
4050           <title>The <command>channel</command> Phrase</title>
4051
4052           <para>
4053             All log output goes to one or more <emphasis>channels</emphasis>;
4054             you can make as many of them as you want.
4055           </para>
4056
4057           <para>
4058             Every channel definition must include a destination clause that
4059             says whether messages selected for the channel go to a file, to a
4060             particular syslog facility, to the standard error stream, or are
4061             discarded. It can optionally also limit the message severity level
4062             that will be accepted by the channel (the default is
4063             <command>info</command>), and whether to include a
4064             <command>named</command>-generated time stamp, the
4065             category name
4066             and/or severity level (the default is not to include any).
4067           </para>
4068
4069           <para>
4070             The <command>null</command> destination clause
4071             causes all messages sent to the channel to be discarded;
4072             in that case, other options for the channel are meaningless.
4073           </para>
4074
4075           <para>
4076             The <command>file</command> destination clause directs
4077             the channel
4078             to a disk file.  It can include limitations
4079             both on how large the file is allowed to become, and how many
4080             versions
4081             of the file will be saved each time the file is opened.
4082           </para>
4083
4084           <para>
4085             If you use the <command>versions</command> log file
4086             option, then
4087             <command>named</command> will retain that many backup
4088             versions of the file by
4089             renaming them when opening.  For example, if you choose to keep
4090             three old versions
4091             of the file <filename>lamers.log</filename>, then just
4092             before it is opened
4093             <filename>lamers.log.1</filename> is renamed to
4094             <filename>lamers.log.2</filename>, <filename>lamers.log.0</filename> is renamed
4095             to <filename>lamers.log.1</filename>, and <filename>lamers.log</filename> is
4096             renamed to <filename>lamers.log.0</filename>.
4097             You can say <command>versions unlimited</command> to
4098             not limit
4099             the number of versions.
4100             If a <command>size</command> option is associated with
4101             the log file,
4102             then renaming is only done when the file being opened exceeds the
4103             indicated size.  No backup versions are kept by default; any
4104             existing
4105             log file is simply appended.
4106           </para>
4107
4108           <para>
4109             The <command>size</command> option for files is used
4110             to limit log
4111             growth. If the file ever exceeds the size, then <command>named</command> will
4112             stop writing to the file unless it has a <command>versions</command> option
4113             associated with it.  If backup versions are kept, the files are
4114             rolled as
4115             described above and a new one begun.  If there is no
4116             <command>versions</command> option, no more data will
4117             be written to the log
4118             until some out-of-band mechanism removes or truncates the log to
4119             less than the
4120             maximum size.  The default behavior is not to limit the size of
4121             the
4122             file.
4123           </para>
4124
4125           <para>
4126             Example usage of the <command>size</command> and
4127             <command>versions</command> options:
4128           </para>
4129
4130 <programlisting>channel an_example_channel {
4131     file "example.log" versions 3 size 20m;
4132     print-time yes;
4133     print-category yes;
4134 };
4135 </programlisting>
4136
4137           <para>
4138             The <command>syslog</command> destination clause
4139             directs the
4140             channel to the system log.  Its argument is a
4141             syslog facility as described in the <command>syslog</command> man
4142             page. Known facilities are <command>kern</command>, <command>user</command>,
4143             <command>mail</command>, <command>daemon</command>, <command>auth</command>,
4144             <command>syslog</command>, <command>lpr</command>, <command>news</command>,
4145             <command>uucp</command>, <command>cron</command>, <command>authpriv</command>,
4146             <command>ftp</command>, <command>local0</command>, <command>local1</command>,
4147             <command>local2</command>, <command>local3</command>, <command>local4</command>,
4148             <command>local5</command>, <command>local6</command> and
4149             <command>local7</command>, however not all facilities
4150             are supported on
4151             all operating systems.
4152             How <command>syslog</command> will handle messages
4153             sent to
4154             this facility is described in the <command>syslog.conf</command> man
4155             page. If you have a system which uses a very old version of <command>syslog</command> that
4156             only uses two arguments to the <command>openlog()</command> function,
4157             then this clause is silently ignored.
4158           </para>
4159           <para>
4160             The <command>severity</command> clause works like <command>syslog</command>'s
4161             "priorities", except that they can also be used if you are writing
4162             straight to a file rather than using <command>syslog</command>.
4163             Messages which are not at least of the severity level given will
4164             not be selected for the channel; messages of higher severity
4165             levels
4166             will be accepted.
4167           </para>
4168           <para>
4169             If you are using <command>syslog</command>, then the <command>syslog.conf</command> priorities
4170             will also determine what eventually passes through. For example,
4171             defining a channel facility and severity as <command>daemon</command> and <command>debug</command> but
4172             only logging <command>daemon.warning</command> via <command>syslog.conf</command> will
4173             cause messages of severity <command>info</command> and
4174             <command>notice</command> to
4175             be dropped. If the situation were reversed, with <command>named</command> writing
4176             messages of only <command>warning</command> or higher,
4177             then <command>syslogd</command> would
4178             print all messages it received from the channel.
4179           </para>
4180
4181           <para>
4182             The <command>stderr</command> destination clause
4183             directs the
4184             channel to the server's standard error stream.  This is intended
4185             for
4186             use when the server is running as a foreground process, for
4187             example
4188             when debugging a configuration.
4189           </para>
4190
4191           <para>
4192             The server can supply extensive debugging information when
4193             it is in debugging mode. If the server's global debug level is
4194             greater
4195             than zero, then debugging mode will be active. The global debug
4196             level is set either by starting the <command>named</command> server
4197             with the <option>-d</option> flag followed by a positive integer,
4198             or by running <command>rndc trace</command>.
4199             The global debug level
4200             can be set to zero, and debugging mode turned off, by running <command>rndc
4201 notrace</command>. All debugging messages in the server have a debug
4202             level, and higher debug levels give more detailed output. Channels
4203             that specify a specific debug severity, for example:
4204           </para>
4205
4206 <programlisting>channel specific_debug_level {
4207     file "foo";
4208     severity debug 3;
4209 };
4210 </programlisting>
4211
4212           <para>
4213             will get debugging output of level 3 or less any time the
4214             server is in debugging mode, regardless of the global debugging
4215             level. Channels with <command>dynamic</command>
4216             severity use the
4217             server's global debug level to determine what messages to print.
4218           </para>
4219           <para>
4220             If <command>print-time</command> has been turned on,
4221             then
4222             the date and time will be logged. <command>print-time</command> may
4223             be specified for a <command>syslog</command> channel,
4224             but is usually
4225             pointless since <command>syslog</command> also logs
4226             the date and
4227             time. If <command>print-category</command> is
4228             requested, then the
4229             category of the message will be logged as well. Finally, if <command>print-severity</command> is
4230             on, then the severity level of the message will be logged. The <command>print-</command> options may
4231             be used in any combination, and will always be printed in the
4232             following
4233             order: time, category, severity. Here is an example where all
4234             three <command>print-</command> options
4235             are on:
4236           </para>
4237
4238           <para>
4239             <computeroutput>28-Feb-2000 15:05:32.863 general: notice: running</computeroutput>
4240           </para>
4241
4242           <para>
4243             There are four predefined channels that are used for
4244             <command>named</command>'s default logging as follows.
4245             How they are
4246             used is described in <xref linkend="the_category_phrase"/>.
4247           </para>
4248
4249 <programlisting>channel default_syslog {
4250     // send to syslog's daemon facility
4251     syslog daemon;
4252     // only send priority info and higher
4253     severity info;
4254
4255 channel default_debug {
4256     // write to named.run in the working directory
4257     // Note: stderr is used instead of "named.run" if
4258     // the server is started with the '-f' option.
4259     file "named.run";
4260     // log at the server's current debug level
4261     severity dynamic;
4262 };
4263
4264 channel default_stderr {
4265     // writes to stderr
4266     stderr;
4267     // only send priority info and higher
4268     severity info;
4269 };
4270
4271 channel null {
4272    // toss anything sent to this channel
4273    null;
4274 };
4275 </programlisting>
4276
4277           <para>
4278             The <command>default_debug</command> channel has the
4279             special
4280             property that it only produces output when the server's debug
4281             level is
4282             nonzero.  It normally writes to a file called <filename>named.run</filename>
4283             in the server's working directory.
4284           </para>
4285
4286           <para>
4287             For security reasons, when the "<option>-u</option>"
4288             command line option is used, the <filename>named.run</filename> file
4289             is created only after <command>named</command> has
4290             changed to the
4291             new UID, and any debug output generated while <command>named</command> is
4292             starting up and still running as root is discarded.  If you need
4293             to capture this output, you must run the server with the "<option>-g</option>"
4294             option and redirect standard error to a file.
4295           </para>
4296
4297           <para>
4298             Once a channel is defined, it cannot be redefined. Thus you
4299             cannot alter the built-in channels directly, but you can modify
4300             the default logging by pointing categories at channels you have
4301             defined.
4302           </para>
4303         </sect3>
4304
4305         <sect3 id="the_category_phrase">
4306           <title>The <command>category</command> Phrase</title>
4307
4308           <para>
4309             There are many categories, so you can send the logs you want
4310             to see wherever you want, without seeing logs you don't want. If
4311             you don't specify a list of channels for a category, then log
4312             messages
4313             in that category will be sent to the <command>default</command> category
4314             instead. If you don't specify a default category, the following
4315             "default default" is used:
4316           </para>
4317
4318 <programlisting>category default { default_syslog; default_debug; };
4319 </programlisting>
4320
4321           <para>
4322             As an example, let's say you want to log security events to
4323             a file, but you also want keep the default logging behavior. You'd
4324             specify the following:
4325           </para>
4326
4327 <programlisting>channel my_security_channel {
4328     file "my_security_file";
4329     severity info;
4330 };
4331 category security {
4332     my_security_channel;
4333     default_syslog;
4334     default_debug;
4335 };</programlisting>
4336
4337           <para>
4338             To discard all messages in a category, specify the <command>null</command> channel:
4339           </para>
4340
4341 <programlisting>category xfer-out { null; };
4342 category notify { null; };
4343 </programlisting>
4344
4345           <para>
4346             Following are the available categories and brief descriptions
4347             of the types of log information they contain. More
4348             categories may be added in future <acronym>BIND</acronym> releases.
4349           </para>
4350           <informaltable colsep="0" rowsep="0">
4351             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
4352               <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
4353               <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
4354               <tbody>
4355                 <row rowsep="0">
4356                   <entry colname="1">
4357                     <para><command>default</command></para>
4358                   </entry>
4359                   <entry colname="2">
4360                     <para>
4361                       The default category defines the logging
4362                       options for those categories where no specific
4363                       configuration has been
4364                       defined.
4365                     </para>
4366                   </entry>
4367                 </row>
4368                 <row rowsep="0">
4369                   <entry colname="1">
4370                     <para><command>general</command></para>
4371                   </entry>
4372                   <entry colname="2">
4373                     <para>
4374                       The catch-all. Many things still aren't
4375                       classified into categories, and they all end up here.
4376                     </para>
4377                   </entry>
4378                 </row>
4379                 <row rowsep="0">
4380                   <entry colname="1">
4381                     <para><command>database</command></para>
4382                   </entry>
4383                   <entry colname="2">
4384                     <para>
4385                       Messages relating to the databases used
4386                       internally by the name server to store zone and cache
4387                       data.
4388                     </para>
4389                   </entry>
4390                 </row>
4391                 <row rowsep="0">
4392                   <entry colname="1">
4393                     <para><command>security</command></para>
4394                   </entry>
4395                   <entry colname="2">
4396                     <para>
4397                       Approval and denial of requests.
4398                     </para>
4399                   </entry>
4400                 </row>
4401                 <row rowsep="0">
4402                   <entry colname="1">
4403                     <para><command>config</command></para>
4404                   </entry>
4405                   <entry colname="2">
4406                     <para>
4407                       Configuration file parsing and processing.
4408                     </para>
4409                   </entry>
4410                 </row>
4411                 <row rowsep="0">
4412                   <entry colname="1">
4413                     <para><command>resolver</command></para>
4414                   </entry>
4415                   <entry colname="2">
4416                     <para>
4417                       DNS resolution, such as the recursive
4418                       lookups performed on behalf of clients by a caching name
4419                       server.
4420                     </para>
4421                   </entry>
4422                 </row>
4423                 <row rowsep="0">
4424                   <entry colname="1">
4425                     <para><command>xfer-in</command></para>
4426                   </entry>
4427                   <entry colname="2">
4428                     <para>
4429                       Zone transfers the server is receiving.
4430                     </para>
4431                   </entry>
4432                 </row>
4433                 <row rowsep="0">
4434                   <entry colname="1">
4435                     <para><command>xfer-out</command></para>
4436                   </entry>
4437                   <entry colname="2">
4438                     <para>
4439                       Zone transfers the server is sending.
4440                     </para>
4441                   </entry>
4442                 </row>
4443                 <row rowsep="0">
4444                   <entry colname="1">
4445                     <para><command>notify</command></para>
4446                   </entry>
4447                   <entry colname="2">
4448                     <para>
4449                       The NOTIFY protocol.
4450                     </para>
4451                   </entry>
4452                 </row>
4453                 <row rowsep="0">
4454                   <entry colname="1">
4455                     <para><command>client</command></para>
4456                   </entry>
4457                   <entry colname="2">
4458                     <para>
4459                       Processing of client requests.
4460                     </para>
4461                   </entry>
4462                 </row>
4463                 <row rowsep="0">
4464                   <entry colname="1">
4465                     <para><command>unmatched</command></para>
4466                   </entry>
4467                   <entry colname="2">
4468                     <para>
4469                       Messages that <command>named</command> was unable to determine the
4470                       class of or for which there was no matching <command>view</command>.
4471                       A one line summary is also logged to the <command>client</command> category.
4472                       This category is best sent to a file or stderr, by
4473                       default it is sent to
4474                       the <command>null</command> channel.
4475                     </para>
4476                   </entry>
4477                 </row>
4478                 <row rowsep="0">
4479                   <entry colname="1">
4480                     <para><command>network</command></para>
4481                   </entry>
4482                   <entry colname="2">
4483                     <para>
4484                       Network operations.
4485                     </para>
4486                   </entry>
4487                 </row>
4488                 <row rowsep="0">
4489                   <entry colname="1">
4490                     <para><command>update</command></para>
4491                   </entry>
4492                   <entry colname="2">
4493                     <para>
4494                       Dynamic updates.
4495                     </para>
4496                   </entry>
4497                 </row>
4498                 <row rowsep="0">
4499                   <entry colname="1">
4500                     <para><command>update-security</command></para>
4501                   </entry>
4502                   <entry colname="2">
4503                     <para>
4504                       Approval and denial of update requests.
4505                     </para>
4506                   </entry>
4507                 </row>
4508                 <row rowsep="0">
4509                   <entry colname="1">
4510                     <para><command>queries</command></para>
4511                   </entry>
4512                   <entry colname="2">
4513                     <para>
4514                       Specify where queries should be logged to.
4515                     </para>
4516                     <para>
4517                       At startup, specifying the category <command>queries</command> will also
4518                       enable query logging unless <command>querylog</command> option has been
4519                       specified.
4520                     </para>
4521
4522                     <para>
4523                       The query log entry reports the client's IP
4524                       address and port number, and the query name,
4525                       class and type.  Next it reports whether the
4526                       Recursion Desired flag was set (+ if set, -
4527                       if not set), if the query was signed (S),
4528                       EDNS was in use (E), if TCP was used (T), if
4529                       DO (DNSSEC Ok) was set (D), or if CD (Checking
4530                       Disabled) was set (C).  After this the
4531                       destination address the query was sent to is
4532                       reported.
4533                     </para>
4534
4535                     <para>
4536                       <computeroutput>client 127.0.0.1#62536: query: www.example.com IN AAAA +SE</computeroutput>
4537                     </para>
4538                     <para>
4539                       <computeroutput>client ::1#62537: query: www.example.net IN AAAA -SE</computeroutput>
4540                     </para>
4541                   </entry>
4542                 </row>
4543                 <row rowsep="0">
4544                   <entry colname="1">
4545                     <para><command>query-errors</command></para>
4546                   </entry>
4547                   <entry colname="2">
4548                     <para>
4549                       Information about queries that resulted in some
4550                       failure.
4551                     </para>
4552                   </entry>
4553                 </row>
4554                 <row rowsep="0">
4555                   <entry colname="1">
4556                     <para><command>dispatch</command></para>
4557                   </entry>
4558                   <entry colname="2">
4559                     <para>
4560                       Dispatching of incoming packets to the
4561                       server modules where they are to be processed.
4562                     </para>
4563                   </entry>
4564                 </row>
4565                 <row rowsep="0">
4566                   <entry colname="1">
4567                     <para><command>dnssec</command></para>
4568                   </entry>
4569                   <entry colname="2">
4570                     <para>
4571                       DNSSEC and TSIG protocol processing.
4572                     </para>
4573                   </entry>
4574                 </row>
4575                 <row rowsep="0">
4576                   <entry colname="1">
4577                     <para><command>lame-servers</command></para>
4578                   </entry>
4579                   <entry colname="2">
4580                     <para>
4581                       Lame servers.  These are misconfigurations
4582                       in remote servers, discovered by BIND 9 when trying to
4583                       query those servers during resolution.
4584                     </para>
4585                   </entry>
4586                 </row>
4587                 <row rowsep="0">
4588                   <entry colname="1">
4589                     <para><command>delegation-only</command></para>
4590                   </entry>
4591                   <entry colname="2">
4592                     <para>
4593                       Delegation only.  Logs queries that have been
4594                       forced to NXDOMAIN as the result of a
4595                       delegation-only zone or a
4596                       <command>delegation-only</command> in a hint
4597                       or stub zone declaration.
4598                     </para>
4599                   </entry>
4600                 </row>
4601                 <row rowsep="0">
4602                   <entry colname="1">
4603                     <para><command>edns-disabled</command></para>
4604                   </entry>
4605                   <entry colname="2">
4606                     <para>
4607                       Log queries that have been forced to use plain
4608                       DNS due to timeouts.  This is often due to
4609                       the remote servers not being RFC 1034 compliant
4610                       (not always returning FORMERR or similar to
4611                       EDNS queries and other extensions to the DNS
4612                       when they are not understood).  In other words, this is
4613                       targeted at servers that fail to respond to
4614                       DNS queries that they don't understand.
4615                     </para>
4616                     <para>
4617                       Note: the log message can also be due to
4618                       packet loss.  Before reporting servers for
4619                       non-RFC 1034 compliance they should be re-tested
4620                       to determine the nature of the non-compliance.
4621                       This testing should prevent or reduce the
4622                       number of false-positive reports.
4623                     </para>
4624                     <para>
4625                       Note: eventually <command>named</command> will have to stop
4626                       treating such timeouts as due to RFC 1034 non
4627                       compliance and start treating it as plain
4628                       packet loss.  Falsely classifying packet
4629                       loss as due to RFC 1034 non compliance impacts
4630                       on DNSSEC validation which requires EDNS for
4631                       the DNSSEC records to be returned.
4632                     </para>
4633                   </entry>
4634                 </row>
4635               </tbody>
4636             </tgroup>
4637           </informaltable>
4638         </sect3>
4639         <sect3>
4640           <title>The <command>query-errors</command> Category</title>
4641           <para>
4642             The <command>query-errors</command> category is
4643             specifically intended for debugging purposes: To identify
4644             why and how specific queries result in responses which
4645             indicate an error.
4646             Messages of this category are therefore only logged
4647             with <command>debug</command> levels.
4648           </para>
4649
4650           <para>
4651             At the debug levels of 1 or higher, each response with the
4652             rcode of SERVFAIL is logged as follows:
4653           </para>
4654           <para>
4655             <computeroutput>client 127.0.0.1#61502: query failed (SERVFAIL) for www.example.com/IN/AAAA at query.c:3880</computeroutput>
4656           </para>
4657           <para>
4658             This means an error resulting in SERVFAIL was
4659             detected at line 3880 of source file
4660             <filename>query.c</filename>.
4661             Log messages of this level will particularly
4662             help identify the cause of SERVFAIL for an
4663             authoritative server.
4664           </para>
4665           <para>
4666             At the debug levels of 2 or higher, detailed context
4667             information of recursive resolutions that resulted in
4668             SERVFAIL is logged.
4669             The log message will look like as follows:
4670           </para>
4671           <para>
4672 <!-- NOTE: newlines and some spaces added so this would fit on page -->
4673             <programlisting>
4674 fetch completed at resolver.c:2970 for www.example.com/A
4675 in 30.000183: timed out/success [domain:example.com,
4676 referral:2,restart:7,qrysent:8,timeout:5,lame:0,neterr:0,
4677 badresp:1,adberr:0,findfail:0,valfail:0]
4678             </programlisting>
4679           </para>
4680           <para>
4681             The first part before the colon shows that a recursive
4682             resolution for AAAA records of www.example.com completed
4683             in 30.000183 seconds and the final result that led to the
4684             SERVFAIL was determined at line 2970 of source file
4685             <filename>resolver.c</filename>.
4686           </para>
4687           <para>
4688             The following part shows the detected final result and the
4689             latest result of DNSSEC validation.
4690             The latter is always success when no validation attempt
4691             is made.
4692             In this example, this query resulted in SERVFAIL probably
4693             because all name servers are down or unreachable, leading
4694             to a timeout in 30 seconds.
4695             DNSSEC validation was probably not attempted.
4696           </para>
4697           <para>
4698             The last part enclosed in square brackets shows statistics
4699             information collected for this particular resolution
4700             attempt.
4701             The <varname>domain</varname> field shows the deepest zone
4702             that the resolver reached;
4703             it is the zone where the error was finally detected.
4704             The meaning of the other fields is summarized in the
4705             following table.
4706           </para>
4707
4708           <informaltable colsep="0" rowsep="0">
4709             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
4710               <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
4711               <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
4712               <tbody>
4713                 <row rowsep="0">
4714                   <entry colname="1">
4715                     <para><varname>referral</varname></para>
4716                   </entry>
4717                   <entry colname="2">
4718                     <para>
4719                       The number of referrals the resolver received
4720                       throughout the resolution process.
4721                       In the above example this is 2, which are most
4722                       likely com and example.com.
4723                     </para>
4724                   </entry>
4725                 </row>
4726                 <row rowsep="0">
4727                   <entry colname="1">
4728                     <para><varname>restart</varname></para>
4729                   </entry>
4730                   <entry colname="2">
4731                     <para>
4732                       The number of cycles that the resolver tried
4733                       remote servers at the <varname>domain</varname>
4734                       zone.
4735                       In each cycle the resolver sends one query
4736                       (possibly resending it, depending on the response)
4737                       to each known name server of
4738                       the <varname>domain</varname> zone.
4739                     </para>
4740                   </entry>
4741                 </row>
4742                 <row rowsep="0">
4743                   <entry colname="1">
4744                     <para><varname>qrysent</varname></para>
4745                   </entry>
4746                   <entry colname="2">
4747                     <para>
4748                       The number of queries the resolver sent at the
4749                       <varname>domain</varname> zone.
4750                     </para>
4751                   </entry>
4752                 </row>
4753                 <row rowsep="0">
4754                   <entry colname="1">
4755                     <para><varname>timeout</varname></para>
4756                   </entry>
4757                   <entry colname="2">
4758                     <para>
4759                       The number of timeouts since the resolver
4760                       received the last response.
4761                     </para>
4762                   </entry>
4763                 </row>
4764                 <row rowsep="0">
4765                   <entry colname="1">
4766                     <para><varname>lame</varname></para>
4767                   </entry>
4768                   <entry colname="2">
4769                     <para>
4770                       The number of lame servers the resolver detected
4771                       at the <varname>domain</varname> zone.
4772                       A server is detected to be lame either by an
4773                       invalid response or as a result of lookup in
4774                       BIND9's address database (ADB), where lame
4775                       servers are cached.
4776                     </para>
4777                   </entry>
4778                 </row>
4779                 <row rowsep="0">
4780                   <entry colname="1">
4781                     <para><varname>neterr</varname></para>
4782                   </entry>
4783                   <entry colname="2">
4784                     <para>
4785                       The number of erroneous results that the
4786                       resolver encountered in sending queries
4787                       at the <varname>domain</varname> zone.
4788                       One common case is the remote server is
4789                       unreachable and the resolver receives an ICMP
4790                       unreachable error message.
4791                     </para>
4792                   </entry>
4793                 </row>
4794                 <row rowsep="0">
4795                   <entry colname="1">
4796                     <para><varname>badresp</varname></para>
4797                   </entry>
4798                   <entry colname="2">
4799                     <para>
4800                       The number of unexpected responses (other than
4801                       <varname>lame</varname>) to queries sent by the
4802                       resolver at the <varname>domain</varname> zone.
4803                     </para>
4804                   </entry>
4805                 </row>
4806                 <row rowsep="0">
4807                   <entry colname="1">
4808                     <para><varname>adberr</varname></para>
4809                   </entry>
4810                   <entry colname="2">
4811                     <para>
4812                       Failures in finding remote server addresses
4813                       of the <varname>domain</varname> zone in the ADB.
4814                       One common case of this is that the remote
4815                       server's name does not have any address records.
4816                     </para>
4817                   </entry>
4818                 </row>
4819                 <row rowsep="0">
4820                   <entry colname="1">
4821                     <para><varname>findfail</varname></para>
4822                   </entry>
4823                   <entry colname="2">
4824                     <para>
4825                       Failures of resolving remote server addresses.
4826                       This is a total number of failures throughout
4827                       the resolution process.
4828                     </para>
4829                   </entry>
4830                 </row>
4831                 <row rowsep="0">
4832                   <entry colname="1">
4833                     <para><varname>valfail</varname></para>
4834                   </entry>
4835                   <entry colname="2">
4836                     <para>
4837                       Failures of DNSSEC validation.
4838                       Validation failures are counted throughout
4839                       the resolution process (not limited to
4840                       the <varname>domain</varname> zone), but should
4841                       only happen in <varname>domain</varname>.
4842                     </para>
4843                   </entry>
4844                 </row>
4845               </tbody>
4846             </tgroup>
4847           </informaltable>
4848           <para>
4849             At the debug levels of 3 or higher, the same messages
4850             as those at the debug 1 level are logged for other errors
4851             than SERVFAIL.
4852             Note that negative responses such as NXDOMAIN are not
4853             regarded as errors here.
4854           </para>
4855           <para>
4856             At the debug levels of 4 or higher, the same messages
4857             as those at the debug 2 level are logged for other errors
4858             than SERVFAIL.
4859             Unlike the above case of level 3, messages are logged for
4860             negative responses.
4861             This is because any unexpected results can be difficult to
4862             debug in the recursion case.
4863           </para>
4864         </sect3>
4865       </sect2>
4866
4867       <sect2>
4868         <title><command>lwres</command> Statement Grammar</title>
4869
4870         <para>
4871            This is the grammar of the <command>lwres</command>
4872           statement in the <filename>named.conf</filename> file:
4873         </para>
4874
4875 <programlisting><command>lwres</command> {
4876     <optional> listen-on { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
4877                 <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
4878     <optional> view <replaceable>view_name</replaceable>; </optional>
4879     <optional> search { <replaceable>domain_name</replaceable> ; <optional> <replaceable>domain_name</replaceable> ; ... </optional> }; </optional>
4880     <optional> ndots <replaceable>number</replaceable>; </optional>
4881 };
4882 </programlisting>
4883
4884       </sect2>
4885       <sect2>
4886         <title><command>lwres</command> Statement Definition and Usage</title>
4887
4888         <para>
4889           The <command>lwres</command> statement configures the
4890           name
4891           server to also act as a lightweight resolver server. (See
4892           <xref linkend="lwresd"/>.)  There may be multiple
4893           <command>lwres</command> statements configuring
4894           lightweight resolver servers with different properties.
4895         </para>
4896
4897         <para>
4898           The <command>listen-on</command> statement specifies a
4899           list of
4900           addresses (and ports) that this instance of a lightweight resolver
4901           daemon
4902           should accept requests on.  If no port is specified, port 921 is
4903           used.
4904           If this statement is omitted, requests will be accepted on
4905           127.0.0.1,
4906           port 921.
4907         </para>
4908
4909         <para>
4910           The <command>view</command> statement binds this
4911           instance of a
4912           lightweight resolver daemon to a view in the DNS namespace, so that
4913           the
4914           response will be constructed in the same manner as a normal DNS
4915           query
4916           matching this view.  If this statement is omitted, the default view
4917           is
4918           used, and if there is no default view, an error is triggered.
4919         </para>
4920
4921         <para>
4922           The <command>search</command> statement is equivalent to
4923           the
4924           <command>search</command> statement in
4925           <filename>/etc/resolv.conf</filename>.  It provides a
4926           list of domains
4927           which are appended to relative names in queries.
4928         </para>
4929
4930         <para>
4931           The <command>ndots</command> statement is equivalent to
4932           the
4933           <command>ndots</command> statement in
4934           <filename>/etc/resolv.conf</filename>.  It indicates the
4935           minimum
4936           number of dots in a relative domain name that should result in an
4937           exact match lookup before search path elements are appended.
4938         </para>
4939       </sect2>
4940       <sect2>
4941         <title><command>masters</command> Statement Grammar</title>
4942
4943 <programlisting>
4944 <command>masters</command> <replaceable>name</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> { ( <replaceable>masters_list</replaceable> | 
4945       <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> };
4946 </programlisting>
4947
4948       </sect2>
4949
4950       <sect2>
4951         <title><command>masters</command> Statement Definition and
4952           Usage</title>
4953         <para><command>masters</command>
4954           lists allow for a common set of masters to be easily used by
4955           multiple stub and slave zones.
4956         </para>
4957       </sect2>
4958
4959       <sect2>
4960         <title><command>options</command> Statement Grammar</title>
4961
4962         <para>
4963           This is the grammar of the <command>options</command>
4964           statement in the <filename>named.conf</filename> file:
4965         </para>
4966
4967 <programlisting><command>options</command> {
4968     <optional> attach-cache <replaceable>cache_name</replaceable>; </optional>
4969     <optional> version <replaceable>version_string</replaceable>; </optional>
4970     <optional> hostname <replaceable>hostname_string</replaceable>; </optional>
4971     <optional> server-id <replaceable>server_id_string</replaceable>; </optional>
4972     <optional> directory <replaceable>path_name</replaceable>; </optional>
4973     <optional> key-directory <replaceable>path_name</replaceable>; </optional>
4974     <optional> managed-keys-directory <replaceable>path_name</replaceable>; </optional>
4975     <optional> named-xfer <replaceable>path_name</replaceable>; </optional>
4976     <optional> tkey-gssapi-credential <replaceable>principal</replaceable>; </optional>
4977     <optional> tkey-domain <replaceable>domainname</replaceable>; </optional>
4978     <optional> tkey-dhkey <replaceable>key_name</replaceable> <replaceable>key_tag</replaceable>; </optional>
4979     <optional> cache-file <replaceable>path_name</replaceable>; </optional>
4980     <optional> dump-file <replaceable>path_name</replaceable>; </optional>
4981     <optional> bindkeys-file <replaceable>path_name</replaceable>; </optional>
4982     <optional> memstatistics <replaceable>yes_or_no</replaceable>; </optional>
4983     <optional> memstatistics-file <replaceable>path_name</replaceable>; </optional>
4984     <optional> pid-file <replaceable>path_name</replaceable>; </optional>
4985     <optional> recursing-file <replaceable>path_name</replaceable>; </optional>
4986     <optional> statistics-file <replaceable>path_name</replaceable>; </optional>
4987     <optional> zone-statistics <replaceable>yes_or_no</replaceable>; </optional>
4988     <optional> auth-nxdomain <replaceable>yes_or_no</replaceable>; </optional>
4989     <optional> deallocate-on-exit <replaceable>yes_or_no</replaceable>; </optional>
4990     <optional> dialup <replaceable>dialup_option</replaceable>; </optional>
4991     <optional> fake-iquery <replaceable>yes_or_no</replaceable>; </optional>
4992     <optional> fetch-glue <replaceable>yes_or_no</replaceable>; </optional>
4993     <optional> flush-zones-on-shutdown <replaceable>yes_or_no</replaceable>; </optional>
4994     <optional> has-old-clients <replaceable>yes_or_no</replaceable>; </optional>
4995     <optional> host-statistics <replaceable>yes_or_no</replaceable>; </optional>
4996     <optional> host-statistics-max <replaceable>number</replaceable>; </optional>
4997     <optional> minimal-responses <replaceable>yes_or_no</replaceable>; </optional>
4998     <optional> multiple-cnames <replaceable>yes_or_no</replaceable>; </optional>
4999     <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable>; </optional>
5000     <optional> recursion <replaceable>yes_or_no</replaceable>; </optional>
5001     <optional> rfc2308-type1 <replaceable>yes_or_no</replaceable>; </optional>
5002     <optional> use-id-pool <replaceable>yes_or_no</replaceable>; </optional>
5003     <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable>; </optional>
5004     <optional> ixfr-from-differences (<replaceable>yes_or_no</replaceable> | <constant>master</constant> | <constant>slave</constant>); </optional>
5005     <optional> dnssec-enable <replaceable>yes_or_no</replaceable>; </optional>
5006     <optional> dnssec-validation <replaceable>yes_or_no</replaceable>; </optional>
5007     <optional> dnssec-lookaside ( <replaceable>auto</replaceable> | 
5008                         <replaceable>domain</replaceable> trust-anchor <replaceable>domain</replaceable> ); </optional>
5009     <optional> dnssec-must-be-secure <replaceable>domain yes_or_no</replaceable>; </optional>
5010     <optional> dnssec-accept-expired <replaceable>yes_or_no</replaceable>; </optional>
5011     <optional> forward ( <replaceable>only</replaceable> | <replaceable>first</replaceable> ); </optional>
5012     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
5013     <optional> dual-stack-servers <optional>port <replaceable>ip_port</replaceable></optional> {
5014         ( <replaceable>domain_name</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> |
5015           <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ) ; 
5016         ... }; </optional>
5017     <optional> check-names ( <replaceable>master</replaceable> | <replaceable>slave</replaceable> | <replaceable>response</replaceable> )
5018         ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
5019     <optional> check-dup-records ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
5020     <optional> check-mx ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
5021     <optional> check-wildcard <replaceable>yes_or_no</replaceable>; </optional>
5022     <optional> check-integrity <replaceable>yes_or_no</replaceable>; </optional>
5023     <optional> check-mx-cname ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
5024     <optional> check-srv-cname ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
5025     <optional> check-sibling <replaceable>yes_or_no</replaceable>; </optional>
5026     <optional> allow-new-zones { <replaceable>yes_or_no</replaceable> }; </optional>
5027     <optional> allow-notify { <replaceable>address_match_list</replaceable> }; </optional>
5028     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
5029     <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
5030     <optional> allow-query-cache { <replaceable>address_match_list</replaceable> }; </optional>
5031     <optional> allow-query-cache-on { <replaceable>address_match_list</replaceable> }; </optional>
5032     <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
5033     <optional> allow-recursion { <replaceable>address_match_list</replaceable> }; </optional>
5034     <optional> allow-recursion-on { <replaceable>address_match_list</replaceable> }; </optional>
5035     <optional> allow-update { <replaceable>address_match_list</replaceable> }; </optional>
5036     <optional> allow-update-forwarding { <replaceable>address_match_list</replaceable> }; </optional>
5037     <optional> update-check-ksk <replaceable>yes_or_no</replaceable>; </optional>
5038     <optional> dnssec-dnskey-kskonly <replaceable>yes_or_no</replaceable>; </optional>
5039     <optional> dnssec-secure-to-insecure <replaceable>yes_or_no</replaceable> ;</optional>
5040     <optional> try-tcp-refresh <replaceable>yes_or_no</replaceable>; </optional>
5041     <optional> allow-v6-synthesis { <replaceable>address_match_list</replaceable> }; </optional>
5042     <optional> blackhole { <replaceable>address_match_list</replaceable> }; </optional>
5043     <optional> use-v4-udp-ports { <replaceable>port_list</replaceable> }; </optional>
5044     <optional> avoid-v4-udp-ports { <replaceable>port_list</replaceable> }; </optional>
5045     <optional> use-v6-udp-ports { <replaceable>port_list</replaceable> }; </optional>
5046     <optional> avoid-v6-udp-ports { <replaceable>port_list</replaceable> }; </optional>
5047     <optional> listen-on <optional> port <replaceable>ip_port</replaceable> </optional> { <replaceable>address_match_list</replaceable> }; </optional>
5048     <optional> listen-on-v6 <optional> port <replaceable>ip_port</replaceable> </optional> { <replaceable>address_match_list</replaceable> }; </optional>
5049     <optional> query-source ( ( <replaceable>ip4_addr</replaceable> | <replaceable>*</replaceable> )
5050         <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> |
5051         <optional> address ( <replaceable>ip4_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
5052         <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> ) ; </optional>
5053     <optional> query-source-v6 ( ( <replaceable>ip6_addr</replaceable> | <replaceable>*</replaceable> )
5054         <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> | 
5055         <optional> address ( <replaceable>ip6_addr</replaceable> | <replaceable>*</replaceable> ) </optional> 
5056         <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> ) ; </optional>
5057     <optional> use-queryport-pool <replaceable>yes_or_no</replaceable>; </optional>
5058     <optional> queryport-pool-ports <replaceable>number</replaceable>; </optional>
5059     <optional> queryport-pool-updateinterval <replaceable>number</replaceable>; </optional>
5060     <optional> max-transfer-time-in <replaceable>number</replaceable>; </optional>
5061     <optional> max-transfer-time-out <replaceable>number</replaceable>; </optional>
5062     <optional> max-transfer-idle-in <replaceable>number</replaceable>; </optional>
5063     <optional> max-transfer-idle-out <replaceable>number</replaceable>; </optional>
5064     <optional> tcp-clients <replaceable>number</replaceable>; </optional>
5065     <optional> reserved-sockets <replaceable>number</replaceable>; </optional>
5066     <optional> recursive-clients <replaceable>number</replaceable>; </optional>
5067     <optional> serial-query-rate <replaceable>number</replaceable>; </optional>
5068     <optional> serial-queries <replaceable>number</replaceable>; </optional>
5069     <optional> tcp-listen-queue <replaceable>number</replaceable>; </optional>
5070     <optional> transfer-format <replaceable>( one-answer | many-answers )</replaceable>; </optional>
5071     <optional> transfers-in  <replaceable>number</replaceable>; </optional>
5072     <optional> transfers-out <replaceable>number</replaceable>; </optional>
5073     <optional> transfers-per-ns <replaceable>number</replaceable>; </optional>
5074     <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
5075     <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
5076     <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
5077     <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
5078                              <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
5079     <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
5080     <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
5081     <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
5082     <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
5083     <optional> notify-to-soa <replaceable>yes_or_no</replaceable> ; </optional>
5084     <optional> also-notify { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
5085                   <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
5086     <optional> max-ixfr-log-size <replaceable>number</replaceable>; </optional>
5087     <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
5088     <optional> coresize <replaceable>size_spec</replaceable> ; </optional>
5089     <optional> datasize <replaceable>size_spec</replaceable> ; </optional>
5090     <optional> files <replaceable>size_spec</replaceable> ; </optional>
5091     <optional> stacksize <replaceable>size_spec</replaceable> ; </optional>
5092     <optional> cleaning-interval <replaceable>number</replaceable>; </optional>
5093     <optional> heartbeat-interval <replaceable>number</replaceable>; </optional>
5094     <optional> interface-interval <replaceable>number</replaceable>; </optional>
5095     <optional> statistics-interval <replaceable>number</replaceable>; </optional>
5096     <optional> topology { <replaceable>address_match_list</replaceable> }</optional>;
5097     <optional> sortlist { <replaceable>address_match_list</replaceable> }</optional>;
5098     <optional> rrset-order { <replaceable>order_spec</replaceable> ; <optional> <replaceable>order_spec</replaceable> ; ... </optional> </optional> };
5099     <optional> lame-ttl <replaceable>number</replaceable>; </optional>
5100     <optional> max-ncache-ttl <replaceable>number</replaceable>; </optional>
5101     <optional> max-cache-ttl <replaceable>number</replaceable>; </optional>
5102     <optional> sig-validity-interval <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
5103     <optional> sig-signing-nodes <replaceable>number</replaceable> ; </optional>
5104     <optional> sig-signing-signatures <replaceable>number</replaceable> ; </optional>
5105     <optional> sig-signing-type <replaceable>number</replaceable> ; </optional>
5106     <optional> min-roots <replaceable>number</replaceable>; </optional>
5107     <optional> use-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
5108     <optional> provide-ixfr <replaceable>yes_or_no</replaceable>; </optional>
5109     <optional> request-ixfr <replaceable>yes_or_no</replaceable>; </optional>
5110     <optional> treat-cr-as-space <replaceable>yes_or_no</replaceable> ; </optional>
5111     <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
5112     <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
5113     <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
5114     <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
5115     <optional> port <replaceable>ip_port</replaceable>; </optional>
5116     <optional> additional-from-auth <replaceable>yes_or_no</replaceable> ; </optional>
5117     <optional> additional-from-cache <replaceable>yes_or_no</replaceable> ; </optional>
5118     <optional> random-device <replaceable>path_name</replaceable> ; </optional>
5119     <optional> max-cache-size <replaceable>size_spec</replaceable> ; </optional>
5120     <optional> match-mapped-addresses <replaceable>yes_or_no</replaceable>; </optional>
5121     <optional> filter-aaaa-on-v4 ( <replaceable>yes_or_no</replaceable> | <replaceable>break-dnssec</replaceable> ); </optional>
5122     <optional> filter-aaaa { <replaceable>address_match_list</replaceable> }; </optional>
5123     <optional> preferred-glue ( <replaceable>A</replaceable> | <replaceable>AAAA</replaceable> | <replaceable>NONE</replaceable> ); </optional>
5124     <optional> edns-udp-size <replaceable>number</replaceable>; </optional>
5125     <optional> max-udp-size <replaceable>number</replaceable>; </optional>
5126     <optional> root-delegation-only <optional> exclude { <replaceable>namelist</replaceable> } </optional> ; </optional>
5127     <optional> querylog <replaceable>yes_or_no</replaceable> ; </optional>
5128     <optional> disable-algorithms <replaceable>domain</replaceable> { <replaceable>algorithm</replaceable>;
5129                                 <optional> <replaceable>algorithm</replaceable>; </optional> }; </optional>
5130     <optional> acache-enable <replaceable>yes_or_no</replaceable> ; </optional>
5131     <optional> acache-cleaning-interval <replaceable>number</replaceable>; </optional>
5132     <optional> max-acache-size <replaceable>size_spec</replaceable> ; </optional>
5133     <optional> clients-per-query <replaceable>number</replaceable> ; </optional>
5134     <optional> max-clients-per-query <replaceable>number</replaceable> ; </optional>
5135     <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
5136     <optional> empty-server <replaceable>name</replaceable> ; </optional>
5137     <optional> empty-contact <replaceable>name</replaceable> ; </optional>
5138     <optional> empty-zones-enable <replaceable>yes_or_no</replaceable> ; </optional>
5139     <optional> disable-empty-zone <replaceable>zone_name</replaceable> ; </optional>
5140     <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
5141     <optional> zero-no-soa-ttl-cache <replaceable>yes_or_no</replaceable> ; </optional>
5142     <optional> deny-answer-addresses { <replaceable>address_match_list</replaceable> } <optional> except-from { <replaceable>namelist</replaceable> } </optional>;</optional>
5143     <optional> deny-answer-aliases { <replaceable>namelist</replaceable> } <optional> except-from { <replaceable>namelist</replaceable> } </optional>;</optional>
5144 };
5145 </programlisting>
5146
5147       </sect2>
5148
5149       <sect2 id="options">
5150         <title><command>options</command> Statement Definition and
5151           Usage</title>
5152
5153         <para>
5154           The <command>options</command> statement sets up global
5155           options
5156           to be used by <acronym>BIND</acronym>. This statement
5157           may appear only
5158           once in a configuration file. If there is no <command>options</command>
5159           statement, an options block with each option set to its default will
5160           be used.
5161         </para>
5162
5163         <variablelist>
5164
5165             <varlistentry>
5166               <term><command>attach-cache</command></term>
5167               <listitem>
5168                 <para>
5169                   Allows multiple views to share a single cache
5170                   database.
5171                   Each view has its own cache database by default, but
5172                   if multiple views have the same operational policy
5173                   for name resolution and caching, those views can
5174                   share a single cache to save memory and possibly
5175                   improve resolution efficiency by using this option.
5176                 </para>
5177
5178                 <para>
5179                   The <command>attach-cache</command> option
5180                   may also be specified in <command>view</command>
5181                   statements, in which case it overrides the
5182                   global <command>attach-cache</command> option.
5183                 </para>
5184
5185                 <para>
5186                   The <replaceable>cache_name</replaceable> specifies
5187                   the cache to be shared.
5188                   When the <command>named</command> server configures
5189                   views which are supposed to share a cache, it
5190                   creates a cache with the specified name for the
5191                   first view of these sharing views.
5192                   The rest of the views will simply refer to the
5193                   already created cache.
5194                 </para>
5195
5196                 <para>
5197                   One common configuration to share a cache would be to
5198                   allow all views to share a single cache.
5199                   This can be done by specifying
5200                   the <command>attach-cache</command> as a global
5201                   option with an arbitrary name.
5202                 </para>
5203
5204                 <para>
5205                   Another possible operation is to allow a subset of
5206                   all views to share a cache while the others to
5207                   retain their own caches.
5208                   For example, if there are three views A, B, and C,
5209                   and only A and B should share a cache, specify the
5210                   <command>attach-cache</command> option as a view A (or
5211                   B)'s option, referring to the other view name:
5212                 </para>
5213
5214 <programlisting>
5215   view "A" {
5216     // this view has its own cache
5217     ...
5218   };
5219   view "B" {
5220     // this view refers to A's cache
5221     attach-cache "A";
5222   };
5223   view "C" {
5224     // this view has its own cache
5225     ...
5226   };
5227 </programlisting>
5228
5229                 <para>
5230                   Views that share a cache must have the same policy
5231                   on configurable parameters that may affect caching.
5232                   The current implementation requires the following
5233                   configurable options be consistent among these
5234                   views:
5235                   <command>check-names</command>,
5236                   <command>cleaning-interval</command>,
5237                   <command>dnssec-accept-expired</command>,
5238                   <command>dnssec-validation</command>,
5239                   <command>max-cache-ttl</command>,
5240                   <command>max-ncache-ttl</command>,
5241                   <command>max-cache-size</command>, and
5242                   <command>zero-no-soa-ttl</command>.
5243                 </para>
5244
5245                 <para>
5246                   Note that there may be other parameters that may
5247                   cause confusion if they are inconsistent for
5248                   different views that share a single cache.
5249                   For example, if these views define different sets of
5250                   forwarders that can return different answers for the
5251                   same question, sharing the answer does not make
5252                   sense or could even be harmful.
5253                   It is administrator's responsibility to ensure
5254                   configuration differences in different views do
5255                   not cause disruption with a shared cache.
5256                 </para>
5257               </listitem>
5258
5259             </varlistentry>
5260
5261           <varlistentry>
5262             <term><command>directory</command></term>
5263             <listitem>
5264               <para>
5265                 The working directory of the server.
5266                 Any non-absolute pathnames in the configuration file will be
5267                 taken
5268                 as relative to this directory. The default location for most
5269                 server
5270                 output files (e.g. <filename>named.run</filename>)
5271                 is this directory.
5272                 If a directory is not specified, the working directory
5273                 defaults to `<filename>.</filename>', the directory from
5274                 which the server
5275                 was started. The directory specified should be an absolute
5276                 path.
5277               </para>
5278             </listitem>
5279           </varlistentry>
5280
5281           <varlistentry>
5282             <term><command>key-directory</command></term>
5283             <listitem>
5284               <para>
5285                 When performing dynamic update of secure zones, the
5286                 directory where the public and private DNSSEC key files
5287                 should be found, if different than the current working
5288                 directory.  (Note that this option has no effect on the
5289                 paths for files containing non-DNSSEC keys such as
5290                 <filename>bind.keys</filename>,
5291                 <filename>rndc.key</filename> or
5292                 <filename>session.key</filename>.)
5293               </para>
5294             </listitem>
5295           </varlistentry>
5296
5297           <varlistentry>
5298             <term><command>managed-keys-directory</command></term>
5299             <listitem>
5300               <para>
5301                 The directory used to hold the files used to track managed keys.
5302                 By default it is the working directory.  It there are no
5303                 views then the file <filename>managed-keys.bind</filename>
5304                 otherwise a SHA256 hash of the view name is used with
5305                 <filename>.mkeys</filename> extension added.
5306               </para>
5307             </listitem>
5308           </varlistentry>
5309
5310           <varlistentry>
5311             <term><command>named-xfer</command></term>
5312             <listitem>
5313               <para>
5314                 <emphasis>This option is obsolete.</emphasis> It
5315                 was used in <acronym>BIND</acronym> 8 to specify
5316                 the pathname to the <command>named-xfer</command>
5317                 program.  In <acronym>BIND</acronym> 9, no separate
5318                 <command>named-xfer</command> program is needed;
5319                 its functionality is built into the name server.
5320               </para>
5321             </listitem>
5322           </varlistentry>
5323
5324           <varlistentry>
5325             <term><command>tkey-gssapi-credential</command></term>
5326             <listitem>
5327               <para>
5328                 The security credential with which the server should
5329                 authenticate keys requested by the GSS-TSIG protocol.
5330                 Currently only Kerberos 5 authentication is available
5331                 and the credential is a Kerberos principal which
5332                 the server can acquire through the default system
5333                 key file, normally <filename>/etc/krb5.keytab</filename>.
5334                 Normally this principal is of the form
5335                 "<userinput>DNS/</userinput><varname>server.domain</varname>".
5336                 To use GSS-TSIG, <command>tkey-domain</command>
5337                 must also be set.
5338               </para>
5339             </listitem>
5340           </varlistentry>
5341
5342           <varlistentry>
5343             <term><command>tkey-domain</command></term>
5344             <listitem>
5345               <para>
5346                 The domain appended to the names of all shared keys
5347                 generated with <command>TKEY</command>.  When a
5348                 client requests a <command>TKEY</command> exchange,
5349                 it may or may not specify the desired name for the
5350                 key. If present, the name of the shared key will
5351                 be <varname>client specified part</varname> +
5352                 <varname>tkey-domain</varname>.  Otherwise, the
5353                 name of the shared key will be <varname>random hex
5354                 digits</varname> + <varname>tkey-domain</varname>.
5355                 In most cases, the <command>domainname</command>
5356                 should be the server's domain name, or an otherwise
5357                 non-existent subdomain like
5358                 "_tkey.<varname>domainname</varname>".  If you are
5359                 using GSS-TSIG, this variable must be defined.
5360               </para>
5361             </listitem>
5362           </varlistentry>
5363
5364           <varlistentry>
5365             <term><command>tkey-dhkey</command></term>
5366             <listitem>
5367               <para>
5368                 The Diffie-Hellman key used by the server
5369                 to generate shared keys with clients using the Diffie-Hellman
5370                 mode
5371                 of <command>TKEY</command>. The server must be
5372                 able to load the
5373                 public and private keys from files in the working directory.
5374                 In
5375                 most cases, the keyname should be the server's host name.
5376               </para>
5377             </listitem>
5378           </varlistentry>
5379
5380           <varlistentry>
5381             <term><command>cache-file</command></term>
5382             <listitem>
5383               <para>
5384                 This is for testing only.  Do not use.
5385               </para>
5386             </listitem>
5387           </varlistentry>
5388
5389           <varlistentry>
5390             <term><command>dump-file</command></term>
5391             <listitem>
5392               <para>
5393                 The pathname of the file the server dumps
5394                 the database to when instructed to do so with
5395                 <command>rndc dumpdb</command>.
5396                 If not specified, the default is <filename>named_dump.db</filename>.
5397               </para>
5398             </listitem>
5399           </varlistentry>
5400
5401           <varlistentry>
5402             <term><command>memstatistics-file</command></term>
5403             <listitem>
5404               <para>
5405                 The pathname of the file the server writes memory
5406                 usage statistics to on exit. If not specified,
5407                 the default is <filename>named.memstats</filename>.
5408               </para>
5409             </listitem>
5410           </varlistentry>
5411
5412           <varlistentry>
5413             <term><command>pid-file</command></term>
5414             <listitem>
5415               <para>
5416                 The pathname of the file the server writes its process ID
5417                 in. If not specified, the default is
5418                 <filename>/var/run/named/named.pid</filename>.
5419                 The PID file is used by programs that want to send signals to
5420                 the running
5421                 name server. Specifying <command>pid-file none</command> disables the
5422                 use of a PID file &mdash; no file will be written and any
5423                 existing one will be removed.  Note that <command>none</command>
5424                 is a keyword, not a filename, and therefore is not enclosed
5425                 in
5426                 double quotes.
5427               </para>
5428             </listitem>
5429           </varlistentry>
5430
5431           <varlistentry>
5432             <term><command>recursing-file</command></term>
5433             <listitem>
5434               <para>
5435                 The pathname of the file the server dumps
5436                 the queries that are currently recursing when instructed
5437                 to do so with <command>rndc recursing</command>.
5438                 If not specified, the default is <filename>named.recursing</filename>.
5439               </para>
5440             </listitem>
5441           </varlistentry>
5442
5443           <varlistentry>
5444             <term><command>statistics-file</command></term>
5445             <listitem>
5446               <para>
5447                 The pathname of the file the server appends statistics
5448                 to when instructed to do so using <command>rndc stats</command>.
5449                 If not specified, the default is <filename>named.stats</filename> in the
5450                 server's current directory.  The format of the file is
5451                 described
5452                 in <xref linkend="statsfile"/>.
5453               </para>
5454             </listitem>
5455           </varlistentry>
5456
5457           <varlistentry>
5458             <term><command>bindkeys-file</command></term>
5459             <listitem>
5460               <para>
5461                 The pathname of a file to override the built-in trusted
5462                 keys provided by <command>named</command>.
5463                 See the discussion of <command>dnssec-lookaside</command>
5464                 for details.  If not specified, the default is
5465                 <filename>/etc/bind.keys</filename>.
5466               </para>
5467             </listitem>
5468           </varlistentry>
5469
5470           <varlistentry>
5471             <term><command>secroots-file</command></term>
5472             <listitem>
5473               <para>
5474                 The pathname of the file the server dumps
5475                 security roots to when instructed to do so with
5476                 <command>rndc secroots</command>.
5477                 If not specified, the default is <filename>named.secroots</filename>.
5478               </para>
5479             </listitem>
5480           </varlistentry>
5481
5482           <varlistentry>
5483             <term><command>session-keyfile</command></term>
5484             <listitem>
5485               <para>
5486                 The pathname of the file into which to write a TSIG
5487                 session key generated by <command>named</command> for use by
5488                 <command>nsupdate -l</command>.  If not specified, the
5489                 default is <filename>/var/run/named/session.key</filename>.
5490                 (See <xref linkend="dynamic_update_policies"/>, and in
5491                 particular the discussion of the
5492                 <command>update-policy</command> statement's
5493                 <userinput>local</userinput> option for more
5494                 information about this feature.)
5495               </para>
5496             </listitem>
5497           </varlistentry>
5498
5499           <varlistentry>
5500             <term><command>session-keyname</command></term>
5501             <listitem>
5502               <para>
5503                 The key name to use for the TSIG session key.
5504                 If not specified, the default is "local-ddns".
5505               </para>
5506             </listitem>
5507           </varlistentry>
5508
5509           <varlistentry>
5510             <term><command>session-keyalg</command></term>
5511             <listitem>
5512               <para>
5513                 The algorithm to use for the TSIG session key.
5514                 Valid values are hmac-sha1, hmac-sha224, hmac-sha256,
5515                 hmac-sha384, hmac-sha512 and hmac-md5.  If not
5516                 specified, the default is hmac-sha256.
5517               </para>
5518             </listitem>
5519           </varlistentry>
5520
5521           <varlistentry>
5522             <term><command>session-keyfile</command></term>
5523             <listitem>
5524               <para>
5525                 The pathname of the file into which to write a session TSIG
5526                 key for use by <command>nsupdate -l</command>.  (See the
5527                 discussion of the <command>update-policy</command>
5528                 statement's <userinput>local</userinput> option for more
5529                 details on this feature.)
5530               </para>
5531             </listitem>
5532           </varlistentry>
5533
5534           <varlistentry>
5535             <term><command>port</command></term>
5536             <listitem>
5537               <para>
5538                 The UDP/TCP port number the server uses for
5539                 receiving and sending DNS protocol traffic.
5540                 The default is 53.  This option is mainly intended for server
5541                 testing;
5542                 a server using a port other than 53 will not be able to
5543                 communicate with
5544                 the global DNS.
5545               </para>
5546             </listitem>
5547           </varlistentry>
5548
5549           <varlistentry>
5550             <term><command>random-device</command></term>
5551             <listitem>
5552               <para>
5553                 The source of entropy to be used by the server.  Entropy is
5554                 primarily needed
5555                 for DNSSEC operations, such as TKEY transactions and dynamic
5556                 update of signed
5557                 zones.  This options specifies the device (or file) from which
5558                 to read
5559                 entropy.  If this is a file, operations requiring entropy will
5560                 fail when the
5561                 file has been exhausted.  If not specified, the default value
5562                 is
5563                 <filename>/dev/random</filename>
5564                 (or equivalent) when present, and none otherwise.  The
5565                 <command>random-device</command> option takes
5566                 effect during
5567                 the initial configuration load at server startup time and
5568                 is ignored on subsequent reloads.
5569               </para>
5570             </listitem>
5571           </varlistentry>
5572
5573           <varlistentry>
5574             <term><command>preferred-glue</command></term>
5575             <listitem>
5576               <para>
5577                 If specified, the listed type (A or AAAA) will be emitted
5578                 before other glue
5579                 in the additional section of a query response.
5580                 The default is not to prefer any type (NONE).
5581               </para>
5582             </listitem>
5583           </varlistentry>
5584
5585           <varlistentry id="root_delegation_only">
5586             <term><command>root-delegation-only</command></term>
5587             <listitem>
5588               <para>
5589                 Turn on enforcement of delegation-only in TLDs
5590                 (top level domains) and root zones with an optional
5591                 exclude list.
5592               </para>
5593               <para>
5594                 DS queries are expected to be made to and be answered by
5595                 delegation only zones.  Such queries and responses are
5596                 treated as an exception to delegation-only processing
5597                 and are not converted to NXDOMAIN responses provided
5598                 a CNAME is not discovered at the query name.
5599               </para>
5600               <para>
5601                 If a delegation only zone server also serves a child
5602                 zone it is not always possible to determine whether
5603                 an answer comes from the delegation only zone or the
5604                 child zone.  SOA NS and DNSKEY records are apex
5605                 only records and a matching response that contains
5606                 these records or DS is treated as coming from a
5607                 child zone.  RRSIG records are also examined to see
5608                 if they are signed by a child zone or not.  The
5609                 authority section is also examined to see if there
5610                 is evidence that the answer is from the child zone.
5611                 Answers that are determined to be from a child zone
5612                 are not converted to NXDOMAIN responses.  Despite
5613                 all these checks there is still a possibility of
5614                 false negatives when a child zone is being served.
5615               </para>
5616               <para>
5617                 Similarly false positives can arise from empty nodes
5618                 (no records at the name) in the delegation only zone
5619                 when the query type is not ANY.
5620               </para>
5621               <para>
5622                 Note some TLDs are not delegation only (e.g. "DE", "LV",
5623                 "US" and "MUSEUM").  This list is not exhaustive.
5624               </para>
5625
5626 <programlisting>
5627 options {
5628         root-delegation-only exclude { "de"; "lv"; "us"; "museum"; };
5629 };
5630 </programlisting>
5631
5632             </listitem>
5633           </varlistentry>
5634
5635           <varlistentry>
5636             <term><command>disable-algorithms</command></term>
5637             <listitem>
5638               <para>
5639                 Disable the specified DNSSEC algorithms at and below the
5640                 specified name.
5641                 Multiple <command>disable-algorithms</command>
5642                 statements are allowed.
5643                 Only the most specific will be applied.
5644               </para>
5645             </listitem>
5646           </varlistentry>
5647
5648           <varlistentry>
5649             <term><command>dnssec-lookaside</command></term>
5650             <listitem>
5651               <para>
5652                 When set, <command>dnssec-lookaside</command> provides the
5653                 validator with an alternate method to validate DNSKEY
5654                 records at the top of a zone.  When a DNSKEY is at or
5655                 below a domain specified by the deepest
5656                 <command>dnssec-lookaside</command>, and the normal DNSSEC
5657                 validation has left the key untrusted, the trust-anchor
5658                 will be appended to the key name and a DLV record will be
5659                 looked up to see if it can validate the key.  If the DLV
5660                 record validates a DNSKEY (similarly to the way a DS
5661                 record does) the DNSKEY RRset is deemed to be trusted.
5662               </para>
5663               <para>
5664                 If <command>dnssec-lookaside</command> is set to
5665                 <userinput>auto</userinput>, then built-in default
5666                 values for the DLV domain and trust anchor will be
5667                 used, along with a built-in key for validation.
5668               </para>
5669               <para>
5670                 The default DLV key is stored in the file
5671                 <filename>bind.keys</filename>, which
5672                 <command>named</command> loads at startup if
5673                 <command>dnssec-lookaside</command> is set to
5674                 <constant>auto</constant>.  A copy of that file is
5675                 installed along with <acronym>BIND</acronym> 9, and is
5676                 current as of the release date.  If the DLV key expires, a
5677                 new copy of <filename>bind.keys</filename> can be downloaded
5678                 from <ulink>https://www.isc.org/solutions/dlv</ulink>.
5679               </para>
5680               <para>
5681                 (To prevent problems if <filename>bind.keys</filename> is
5682                 not found, the current key is also compiled in to
5683                 <command>named</command>.  Relying on this is not
5684                 recommended, however, as it requires <command>named</command>
5685                 to be recompiled with a new key when the DLV key expires.)
5686               </para>
5687               <para>
5688                 NOTE: Using <filename>bind.keys</filename> to store
5689                 locally-configured keys is possible, but not
5690                 recommended, as the file will be overwritten whenever
5691                 <acronym>BIND</acronym> 9 is re-installed or upgraded.
5692               </para>
5693             </listitem>
5694           </varlistentry>
5695
5696           <varlistentry>
5697             <term><command>dnssec-must-be-secure</command></term>
5698             <listitem>
5699               <para>
5700                 Specify hierarchies which must be or may not be secure
5701                 (signed and validated).  If <userinput>yes</userinput>,
5702                 then <command>named</command> will only accept answers if
5703                 they are secure.  If <userinput>no</userinput>, then normal
5704                 DNSSEC validation applies allowing for insecure answers to
5705                 be accepted.  The specified domain must be under a
5706                 <command>trusted-keys</command> or
5707                 <command>managed-keys</command> statement, or
5708                 <command>dnssec-lookaside</command> must be active.
5709               </para>
5710             </listitem>
5711           </varlistentry>
5712
5713         </variablelist>
5714
5715         <sect3 id="boolean_options">
5716           <title>Boolean Options</title>
5717
5718           <variablelist>
5719
5720             <varlistentry>
5721               <term><command>allow-new-zones</command></term>
5722               <listitem>
5723                 <para>
5724                   If <userinput>yes</userinput>, then zones can be
5725                   added at runtime via <command>rndc addzone</command>
5726                   or deleted via <command>rndc delzone</command>.
5727                   The default is <userinput>no</userinput>.
5728                 </para>
5729               </listitem>
5730             </varlistentry>
5731
5732             <varlistentry>
5733               <term><command>auth-nxdomain</command></term>
5734               <listitem>
5735                 <para>
5736                   If <userinput>yes</userinput>, then the <command>AA</command> bit
5737                   is always set on NXDOMAIN responses, even if the server is
5738                   not actually
5739                   authoritative. The default is <userinput>no</userinput>;
5740                   this is
5741                   a change from <acronym>BIND</acronym> 8. If you
5742                   are using very old DNS software, you
5743                   may need to set it to <userinput>yes</userinput>.
5744                 </para>
5745               </listitem>
5746             </varlistentry>
5747
5748             <varlistentry>
5749               <term><command>deallocate-on-exit</command></term>
5750               <listitem>
5751                 <para>
5752                   This option was used in <acronym>BIND</acronym>
5753                   8 to enable checking
5754                   for memory leaks on exit. <acronym>BIND</acronym> 9 ignores the option and always performs
5755                   the checks.
5756                 </para>
5757               </listitem>
5758             </varlistentry>
5759
5760             <varlistentry>
5761               <term><command>memstatistics</command></term>
5762               <listitem>
5763                 <para>
5764                   Write memory statistics to the file specified by
5765                   <command>memstatistics-file</command> at exit.
5766                   The default is <userinput>no</userinput> unless
5767                   '-m record' is specified on the command line in
5768                   which case it is <userinput>yes</userinput>.
5769                 </para>
5770               </listitem>
5771             </varlistentry>
5772
5773             <varlistentry>
5774               <term><command>dialup</command></term>
5775               <listitem>
5776                 <para>
5777                   If <userinput>yes</userinput>, then the
5778                   server treats all zones as if they are doing zone transfers
5779                   across
5780                   a dial-on-demand dialup link, which can be brought up by
5781                   traffic
5782                   originating from this server. This has different effects
5783                   according
5784                   to zone type and concentrates the zone maintenance so that
5785                   it all
5786                   happens in a short interval, once every <command>heartbeat-interval</command> and
5787                   hopefully during the one call. It also suppresses some of
5788                   the normal
5789                   zone maintenance traffic. The default is <userinput>no</userinput>.
5790                 </para>
5791                 <para>
5792                   The <command>dialup</command> option
5793                   may also be specified in the <command>view</command> and
5794                   <command>zone</command> statements,
5795                   in which case it overrides the global <command>dialup</command>
5796                   option.
5797                 </para>
5798                 <para>
5799                   If the zone is a master zone, then the server will send out a
5800                   NOTIFY
5801                   request to all the slaves (default). This should trigger the
5802                   zone serial
5803                   number check in the slave (providing it supports NOTIFY)
5804                   allowing the slave
5805                   to verify the zone while the connection is active.
5806                   The set of servers to which NOTIFY is sent can be controlled
5807                   by
5808                   <command>notify</command> and <command>also-notify</command>.
5809                 </para>
5810                 <para>
5811                   If the
5812                   zone is a slave or stub zone, then the server will suppress
5813                   the regular
5814                   "zone up to date" (refresh) queries and only perform them
5815                   when the
5816                   <command>heartbeat-interval</command> expires in
5817                   addition to sending
5818                   NOTIFY requests.
5819                 </para>
5820                 <para>
5821                   Finer control can be achieved by using
5822                   <userinput>notify</userinput> which only sends NOTIFY
5823                   messages,
5824                   <userinput>notify-passive</userinput> which sends NOTIFY
5825                   messages and
5826                   suppresses the normal refresh queries, <userinput>refresh</userinput>
5827                   which suppresses normal refresh processing and sends refresh
5828                   queries
5829                   when the <command>heartbeat-interval</command>
5830                   expires, and
5831                   <userinput>passive</userinput> which just disables normal
5832                   refresh
5833                   processing.
5834                 </para>
5835
5836                 <informaltable colsep="0" rowsep="0">
5837                   <tgroup cols="4" colsep="0" rowsep="0" tgroupstyle="4Level-table">
5838                     <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
5839                     <colspec colname="2" colnum="2" colsep="0" colwidth="1.150in"/>
5840                     <colspec colname="3" colnum="3" colsep="0" colwidth="1.150in"/>
5841                     <colspec colname="4" colnum="4" colsep="0" colwidth="1.150in"/>
5842                     <tbody>
5843                       <row rowsep="0">
5844                         <entry colname="1">
5845                           <para>
5846                             dialup mode
5847                           </para>
5848                         </entry>
5849                         <entry colname="2">
5850                           <para>
5851                             normal refresh
5852                           </para>
5853                         </entry>
5854                         <entry colname="3">
5855                           <para>
5856                             heart-beat refresh
5857                           </para>
5858                         </entry>
5859                         <entry colname="4">
5860                           <para>
5861                             heart-beat notify
5862                           </para>
5863                         </entry>
5864                       </row>
5865                       <row rowsep="0">
5866                         <entry colname="1">
5867                           <para><command>no</command> (default)</para>
5868                         </entry>
5869                         <entry colname="2">
5870                           <para>
5871                             yes
5872                           </para>
5873                         </entry>
5874                         <entry colname="3">
5875                           <para>
5876                             no
5877                           </para>
5878                         </entry>
5879                         <entry colname="4">
5880                           <para>
5881                             no
5882                           </para>
5883                         </entry>
5884                       </row>
5885                       <row rowsep="0">
5886                         <entry colname="1">
5887                           <para><command>yes</command></para>
5888                         </entry>
5889                         <entry colname="2">
5890                           <para>
5891                             no
5892                           </para>
5893                         </entry>
5894                         <entry colname="3">
5895                           <para>
5896                             yes
5897                           </para>
5898                         </entry>
5899                         <entry colname="4">
5900                           <para>
5901                             yes
5902                           </para>
5903                         </entry>
5904                       </row>
5905                       <row rowsep="0">
5906                         <entry colname="1">
5907                           <para><command>notify</command></para>
5908                         </entry>
5909                         <entry colname="2">
5910                           <para>
5911                             yes
5912                           </para>
5913                         </entry>
5914                         <entry colname="3">
5915                           <para>
5916                             no
5917                           </para>
5918                         </entry>
5919                         <entry colname="4">
5920                           <para>
5921                             yes
5922                           </para>
5923                         </entry>
5924                       </row>
5925                       <row rowsep="0">
5926                         <entry colname="1">
5927                           <para><command>refresh</command></para>
5928                         </entry>
5929                         <entry colname="2">
5930                           <para>
5931                             no
5932                           </para>
5933                         </entry>
5934                         <entry colname="3">
5935                           <para>
5936                             yes
5937                           </para>
5938                         </entry>
5939                         <entry colname="4">
5940                           <para>
5941                             no
5942                           </para>
5943                         </entry>
5944                       </row>
5945                       <row rowsep="0">
5946                         <entry colname="1">
5947                           <para><command>passive</command></para>
5948                         </entry>
5949                         <entry colname="2">
5950                           <para>
5951                             no
5952                           </para>
5953                         </entry>
5954                         <entry colname="3">
5955                           <para>
5956                             no
5957                           </para>
5958                         </entry>
5959                         <entry colname="4">
5960                           <para>
5961                             no
5962                           </para>
5963                         </entry>
5964                       </row>
5965                       <row rowsep="0">
5966                         <entry colname="1">
5967                           <para><command>notify-passive</command></para>
5968                         </entry>
5969                         <entry colname="2">
5970                           <para>
5971                             no
5972                           </para>
5973                         </entry>
5974                         <entry colname="3">
5975                           <para>
5976                             no
5977                           </para>
5978                         </entry>
5979                         <entry colname="4">
5980                           <para>
5981                             yes
5982                           </para>
5983                         </entry>
5984                       </row>
5985                     </tbody>
5986                   </tgroup>
5987                 </informaltable>
5988
5989                 <para>
5990                   Note that normal NOTIFY processing is not affected by
5991                   <command>dialup</command>.
5992                 </para>
5993
5994               </listitem>
5995             </varlistentry>
5996
5997             <varlistentry>
5998               <term><command>fake-iquery</command></term>
5999               <listitem>
6000                 <para>
6001                   In <acronym>BIND</acronym> 8, this option
6002                   enabled simulating the obsolete DNS query type
6003                   IQUERY. <acronym>BIND</acronym> 9 never does
6004                   IQUERY simulation.
6005                 </para>
6006               </listitem>
6007             </varlistentry>
6008
6009             <varlistentry>
6010               <term><command>fetch-glue</command></term>
6011               <listitem>
6012                 <para>
6013                   This option is obsolete.
6014                   In BIND 8, <userinput>fetch-glue yes</userinput>
6015                   caused the server to attempt to fetch glue resource records
6016                   it
6017                   didn't have when constructing the additional
6018                   data section of a response.  This is now considered a bad
6019                   idea
6020                   and BIND 9 never does it.
6021                 </para>
6022               </listitem>
6023             </varlistentry>
6024
6025             <varlistentry>
6026               <term><command>flush-zones-on-shutdown</command></term>
6027               <listitem>
6028                 <para>
6029                   When the nameserver exits due receiving SIGTERM,
6030                   flush or do not flush any pending zone writes.  The default
6031                   is
6032                   <command>flush-zones-on-shutdown</command> <userinput>no</userinput>.
6033                 </para>
6034               </listitem>
6035             </varlistentry>
6036
6037             <varlistentry>
6038               <term><command>has-old-clients</command></term>
6039               <listitem>
6040                 <para>
6041                   This option was incorrectly implemented
6042                   in <acronym>BIND</acronym> 8, and is ignored by <acronym>BIND</acronym> 9.
6043                   To achieve the intended effect
6044                   of
6045                   <command>has-old-clients</command> <userinput>yes</userinput>, specify
6046                   the two separate options <command>auth-nxdomain</command> <userinput>yes</userinput>
6047                   and <command>rfc2308-type1</command> <userinput>no</userinput> instead.
6048                 </para>
6049               </listitem>
6050             </varlistentry>
6051
6052             <varlistentry>
6053               <term><command>host-statistics</command></term>
6054               <listitem>
6055                 <para>
6056                   In BIND 8, this enables keeping of
6057                   statistics for every host that the name server interacts
6058                   with.
6059                   Not implemented in BIND 9.
6060                 </para>
6061               </listitem>
6062             </varlistentry>
6063
6064             <varlistentry>
6065               <term><command>maintain-ixfr-base</command></term>
6066               <listitem>
6067                 <para>
6068                   <emphasis>This option is obsolete</emphasis>.
6069                   It was used in <acronym>BIND</acronym> 8 to
6070                   determine whether a transaction log was
6071                   kept for Incremental Zone Transfer. <acronym>BIND</acronym> 9 maintains a transaction
6072                   log whenever possible.  If you need to disable outgoing
6073                   incremental zone
6074                   transfers, use <command>provide-ixfr</command> <userinput>no</userinput>.
6075                 </para>
6076               </listitem>
6077             </varlistentry>
6078
6079             <varlistentry>
6080               <term><command>minimal-responses</command></term>
6081               <listitem>
6082                 <para>
6083                   If <userinput>yes</userinput>, then when generating
6084                   responses the server will only add records to the authority
6085                   and additional data sections when they are required (e.g.
6086                   delegations, negative responses).  This may improve the
6087                   performance of the server.
6088                   The default is <userinput>no</userinput>.
6089                 </para>
6090               </listitem>
6091             </varlistentry>
6092
6093             <varlistentry>
6094               <term><command>multiple-cnames</command></term>
6095               <listitem>
6096                 <para>
6097                   This option was used in <acronym>BIND</acronym> 8 to allow
6098                   a domain name to have multiple CNAME records in violation of
6099                   the DNS standards.  <acronym>BIND</acronym> 9.2 onwards
6100                   always strictly enforces the CNAME rules both in master
6101                   files and dynamic updates.
6102                 </para>
6103               </listitem>
6104             </varlistentry>
6105
6106             <varlistentry>
6107               <term><command>notify</command></term>
6108               <listitem>
6109                 <para>
6110                   If <userinput>yes</userinput> (the default),
6111                   DNS NOTIFY messages are sent when a zone the server is
6112                   authoritative for
6113                   changes, see <xref linkend="notify"/>.  The messages are
6114                   sent to the
6115                   servers listed in the zone's NS records (except the master
6116                   server identified
6117                   in the SOA MNAME field), and to any servers listed in the
6118                   <command>also-notify</command> option.
6119                 </para>
6120                 <para>
6121                   If <userinput>master-only</userinput>, notifies are only
6122                   sent
6123                   for master zones.
6124                   If <userinput>explicit</userinput>, notifies are sent only
6125                   to
6126                   servers explicitly listed using <command>also-notify</command>.
6127                   If <userinput>no</userinput>, no notifies are sent.
6128                 </para>
6129                 <para>
6130                   The <command>notify</command> option may also be
6131                   specified in the <command>zone</command>
6132                   statement,
6133                   in which case it overrides the <command>options notify</command> statement.
6134                   It would only be necessary to turn off this option if it
6135                   caused slaves
6136                   to crash.
6137                 </para>
6138               </listitem>
6139             </varlistentry>
6140
6141             <varlistentry>
6142               <term><command>notify-to-soa</command></term>
6143               <listitem>
6144                 <para>
6145                   If <userinput>yes</userinput> do not check the nameservers
6146                   in the NS RRset against the SOA MNAME.  Normally a NOTIFY
6147                   message is not sent to the SOA MNAME (SOA ORIGIN) as it is
6148                   supposed to contain the name of the ultimate master.
6149                   Sometimes, however, a slave is listed as the SOA MNAME in
6150                   hidden master configurations and in that case you would
6151                   want the ultimate master to still send NOTIFY messages to
6152                   all the nameservers listed in the NS RRset.
6153                 </para>
6154               </listitem>
6155             </varlistentry>
6156
6157             <varlistentry>
6158               <term><command>recursion</command></term>
6159               <listitem>
6160                 <para>
6161                   If <userinput>yes</userinput>, and a
6162                   DNS query requests recursion, then the server will attempt
6163                   to do
6164                   all the work required to answer the query. If recursion is
6165                   off
6166                   and the server does not already know the answer, it will
6167                   return a
6168                   referral response. The default is
6169                   <userinput>yes</userinput>.
6170                   Note that setting <command>recursion no</command> does not prevent
6171                   clients from getting data from the server's cache; it only
6172                   prevents new data from being cached as an effect of client
6173                   queries.
6174                   Caching may still occur as an effect the server's internal
6175                   operation, such as NOTIFY address lookups.
6176                   See also <command>fetch-glue</command> above.
6177                 </para>
6178               </listitem>
6179             </varlistentry>
6180
6181             <varlistentry>
6182               <term><command>rfc2308-type1</command></term>
6183               <listitem>
6184                 <para>
6185                   Setting this to <userinput>yes</userinput> will
6186                   cause the server to send NS records along with the SOA
6187                   record for negative
6188                   answers. The default is <userinput>no</userinput>.
6189                 </para>
6190                 <note>
6191                   <simpara>
6192                     Not yet implemented in <acronym>BIND</acronym>
6193                     9.
6194                   </simpara>
6195                 </note>
6196               </listitem>
6197             </varlistentry>
6198
6199             <varlistentry>
6200               <term><command>use-id-pool</command></term>
6201               <listitem>
6202                 <para>
6203                   <emphasis>This option is obsolete</emphasis>.
6204                   <acronym>BIND</acronym> 9 always allocates query
6205                   IDs from a pool.
6206                 </para>
6207               </listitem>
6208             </varlistentry>
6209
6210             <varlistentry>
6211               <term><command>zone-statistics</command></term>
6212               <listitem>
6213                 <para>
6214                   If <userinput>yes</userinput>, the server will collect
6215                   statistical data on all zones (unless specifically turned
6216                   off
6217                   on a per-zone basis by specifying <command>zone-statistics no</command>
6218                   in the <command>zone</command> statement).
6219                   The default is <userinput>no</userinput>.
6220                   These statistics may be accessed
6221                   using <command>rndc stats</command>, which will
6222                   dump them to the file listed
6223                   in the <command>statistics-file</command>.  See
6224                   also <xref linkend="statsfile"/>.
6225                 </para>
6226               </listitem>
6227             </varlistentry>
6228
6229             <varlistentry>
6230               <term><command>use-ixfr</command></term>
6231               <listitem>
6232                 <para>
6233                   <emphasis>This option is obsolete</emphasis>.
6234                   If you need to disable IXFR to a particular server or
6235                   servers, see
6236                   the information on the <command>provide-ixfr</command> option
6237                   in <xref linkend="server_statement_definition_and_usage"/>.
6238                   See also
6239                   <xref linkend="incremental_zone_transfers"/>.
6240                 </para>
6241               </listitem>
6242             </varlistentry>
6243
6244             <varlistentry>
6245               <term><command>provide-ixfr</command></term>
6246               <listitem>
6247                 <para>
6248                   See the description of
6249                   <command>provide-ixfr</command> in
6250                   <xref linkend="server_statement_definition_and_usage"/>.
6251                 </para>
6252               </listitem>
6253             </varlistentry>
6254
6255             <varlistentry>
6256               <term><command>request-ixfr</command></term>
6257               <listitem>
6258                 <para>
6259                   See the description of
6260                   <command>request-ixfr</command> in
6261                   <xref linkend="server_statement_definition_and_usage"/>.
6262                 </para>
6263               </listitem>
6264             </varlistentry>
6265
6266             <varlistentry>
6267               <term><command>treat-cr-as-space</command></term>
6268               <listitem>
6269                 <para>
6270                   This option was used in <acronym>BIND</acronym>
6271                   8 to make
6272                   the server treat carriage return ("<command>\r</command>") characters the same way
6273                   as a space or tab character,
6274                   to facilitate loading of zone files on a UNIX system that
6275                   were generated
6276                   on an NT or DOS machine. In <acronym>BIND</acronym> 9, both UNIX "<command>\n</command>"
6277                   and NT/DOS "<command>\r\n</command>" newlines
6278                   are always accepted,
6279                   and the option is ignored.
6280                 </para>
6281               </listitem>
6282             </varlistentry>
6283
6284             <varlistentry>
6285               <term><command>additional-from-auth</command></term>
6286               <term><command>additional-from-cache</command></term>
6287               <listitem>
6288
6289                 <para>
6290                   These options control the behavior of an authoritative
6291                   server when
6292                   answering queries which have additional data, or when
6293                   following CNAME
6294                   and DNAME chains.
6295                 </para>
6296
6297                 <para>
6298                   When both of these options are set to <userinput>yes</userinput>
6299                   (the default) and a
6300                   query is being answered from authoritative data (a zone
6301                   configured into the server), the additional data section of
6302                   the
6303                   reply will be filled in using data from other authoritative
6304                   zones
6305                   and from the cache.  In some situations this is undesirable,
6306                   such
6307                   as when there is concern over the correctness of the cache,
6308                   or
6309                   in servers where slave zones may be added and modified by
6310                   untrusted third parties.  Also, avoiding
6311                   the search for this additional data will speed up server
6312                   operations
6313                   at the possible expense of additional queries to resolve
6314                   what would
6315                   otherwise be provided in the additional section.
6316                 </para>
6317
6318                 <para>
6319                   For example, if a query asks for an MX record for host <literal>foo.example.com</literal>,
6320                   and the record found is "<literal>MX 10 mail.example.net</literal>", normally the address
6321                   records (A and AAAA) for <literal>mail.example.net</literal> will be provided as well,
6322                   if known, even though they are not in the example.com zone.
6323                   Setting these options to <command>no</command>
6324                   disables this behavior and makes
6325                   the server only search for additional data in the zone it
6326                   answers from.
6327                 </para>
6328
6329                 <para>
6330                   These options are intended for use in authoritative-only
6331                   servers, or in authoritative-only views.  Attempts to set
6332                   them to <command>no</command> without also
6333                   specifying
6334                   <command>recursion no</command> will cause the
6335                   server to
6336                   ignore the options and log a warning message.
6337                 </para>
6338
6339                 <para>
6340                   Specifying <command>additional-from-cache no</command> actually
6341                   disables the use of the cache not only for additional data
6342                   lookups
6343                   but also when looking up the answer.  This is usually the
6344                   desired
6345                   behavior in an authoritative-only server where the
6346                   correctness of
6347                   the cached data is an issue.
6348                 </para>
6349
6350                 <para>
6351                   When a name server is non-recursively queried for a name
6352                   that is not
6353                   below the apex of any served zone, it normally answers with
6354                   an
6355                   "upwards referral" to the root servers or the servers of
6356                   some other
6357                   known parent of the query name.  Since the data in an
6358                   upwards referral
6359                   comes from the cache, the server will not be able to provide
6360                   upwards
6361                   referrals when <command>additional-from-cache no</command>
6362                   has been specified.  Instead, it will respond to such
6363                   queries
6364                   with REFUSED.  This should not cause any problems since
6365                   upwards referrals are not required for the resolution
6366                   process.
6367                 </para>
6368
6369               </listitem>
6370             </varlistentry>
6371
6372             <varlistentry>
6373               <term><command>match-mapped-addresses</command></term>
6374               <listitem>
6375                 <para>
6376                   If <userinput>yes</userinput>, then an
6377                   IPv4-mapped IPv6 address will match any address match
6378                   list entries that match the corresponding IPv4 address.
6379                 </para>
6380                 <para>
6381                   This option was introduced to work around a kernel quirk
6382                   in some operating systems that causes IPv4 TCP
6383                   connections, such as zone transfers, to be accepted on an
6384                   IPv6 socket using mapped addresses.  This caused address
6385                   match lists designed for IPv4 to fail to match.  However,
6386                   <command>named</command> now solves this problem
6387                   internally.  The use of this option is discouraged.
6388                 </para>
6389               </listitem>
6390             </varlistentry>
6391
6392             <varlistentry>
6393               <term><command>filter-aaaa-on-v4</command></term>
6394               <listitem>
6395                 <para>
6396                   This option is only available when
6397                   <acronym>BIND</acronym> 9 is compiled with the
6398                   <userinput>--enable-filter-aaaa</userinput> option on the
6399                   "configure" command line.  It is intended to help the
6400                   transition from IPv4 to IPv6 by not giving IPv6 addresses
6401                   to DNS clients unless they have connections to the IPv6
6402                   Internet.  This is not recommended unless absolutely
6403                   necessary.  The default is <userinput>no</userinput>.
6404                   The <command>filter-aaaa-on-v4</command> option
6405                   may also be specified in <command>view</command> statements
6406                   to override the global <command>filter-aaaa-on-v4</command>
6407                   option.
6408                 </para>
6409                 <para>
6410                   If <userinput>yes</userinput>,
6411                   the DNS client is at an IPv4 address, in <command>filter-aaaa</command>,
6412                   and if the response does not include DNSSEC signatures, 
6413                   then all AAAA records are deleted from the response.
6414                   This filtering applies to all responses and not only
6415                   authoritative responses.
6416                 </para>
6417                 <para>
6418                   If <userinput>break-dnssec</userinput>,
6419                   then AAAA records are deleted even when dnssec is enabled.
6420                   As suggested by the name, this makes the response not verify,
6421                   because the DNSSEC protocol is designed detect deletions.
6422                 </para>
6423                 <para>
6424                   This mechanism can erroneously cause other servers to 
6425                   not give AAAA records to their clients.  
6426                   A recursing server with both IPv6 and IPv4 network connections
6427                   that queries an authoritative server using this mechanism
6428                   via IPv4 will be denied AAAA records even if its client is
6429                   using IPv6.
6430                 </para>
6431                 <para>
6432                   This mechanism is applied to authoritative as well as
6433                   non-authoritative records.
6434                   A client using IPv4 that is not allowed recursion can
6435                   erroneously be given AAAA records because the server is not
6436                   allowed to check for A records.
6437                 </para>
6438                 <para>
6439                   Some AAAA records are given to IPv4 clients in glue records.
6440                   IPv4 clients that are servers can then erroneously
6441                   answer requests for AAAA records received via IPv4.
6442                 </para>
6443               </listitem>
6444             </varlistentry>
6445
6446             <varlistentry>
6447               <term><command>ixfr-from-differences</command></term>
6448               <listitem>
6449                 <para>
6450                   When <userinput>yes</userinput> and the server loads a new version of a master
6451                   zone from its zone file or receives a new version of a slave
6452                   file by a non-incremental zone transfer, it will compare
6453                   the new version to the previous one and calculate a set
6454                   of differences.  The differences are then logged in the
6455                   zone's journal file such that the changes can be transmitted
6456                   to downstream slaves as an incremental zone transfer.
6457                 </para>
6458                 <para>
6459                   By allowing incremental zone transfers to be used for
6460                   non-dynamic zones, this option saves bandwidth at the
6461                   expense of increased CPU and memory consumption at the
6462                   master.
6463                   In particular, if the new version of a zone is completely
6464                   different from the previous one, the set of differences
6465                   will be of a size comparable to the combined size of the
6466                   old and new zone version, and the server will need to
6467                   temporarily allocate memory to hold this complete
6468                   difference set.
6469                 </para>
6470                 <para><command>ixfr-from-differences</command>
6471                   also accepts <command>master</command> and
6472                   <command>slave</command> at the view and options
6473                   levels which causes
6474                   <command>ixfr-from-differences</command> to be enabled for
6475                   all <command>master</command> or
6476                   <command>slave</command> zones respectively.
6477                   It is off by default.
6478                 </para>
6479               </listitem>
6480             </varlistentry>
6481
6482             <varlistentry>
6483               <term><command>multi-master</command></term>
6484               <listitem>
6485                 <para>
6486                   This should be set when you have multiple masters for a zone
6487                   and the
6488                   addresses refer to different machines.  If <userinput>yes</userinput>, <command>named</command> will
6489                   not log
6490                   when the serial number on the master is less than what <command>named</command>
6491                   currently
6492                   has.  The default is <userinput>no</userinput>.
6493                 </para>
6494               </listitem>
6495             </varlistentry>
6496
6497             <varlistentry>
6498               <term><command>dnssec-enable</command></term>
6499               <listitem>
6500                 <para>
6501                   Enable DNSSEC support in <command>named</command>.  Unless set to <userinput>yes</userinput>,
6502                   <command>named</command> behaves as if it does not support DNSSEC.
6503                   The default is <userinput>yes</userinput>.
6504                 </para>
6505               </listitem>
6506             </varlistentry>
6507
6508             <varlistentry>
6509               <term><command>dnssec-validation</command></term>
6510               <listitem>
6511                 <para>
6512                   Enable DNSSEC validation in <command>named</command>.
6513                   Note <command>dnssec-enable</command> also needs to be
6514                   set to <userinput>yes</userinput> to be effective.
6515                   The default is <userinput>yes</userinput>.
6516                 </para>
6517               </listitem>
6518             </varlistentry>
6519
6520             <varlistentry>
6521               <term><command>dnssec-accept-expired</command></term>
6522               <listitem>
6523                 <para>
6524                   Accept expired signatures when verifying DNSSEC signatures.
6525                   The default is <userinput>no</userinput>.
6526                   Setting this option to <userinput>yes</userinput>
6527                   leaves <command>named</command> vulnerable to
6528                   replay attacks.
6529                 </para>
6530               </listitem>
6531             </varlistentry>
6532
6533             <varlistentry>
6534               <term><command>querylog</command></term>
6535               <listitem>
6536                 <para>
6537                   Specify whether query logging should be started when <command>named</command>
6538                   starts.
6539                   If <command>querylog</command> is not specified,
6540                   then the query logging
6541                   is determined by the presence of the logging category <command>queries</command>.
6542                 </para>
6543               </listitem>
6544             </varlistentry>
6545
6546             <varlistentry>
6547               <term><command>check-names</command></term>
6548               <listitem>
6549                 <para>
6550                   This option is used to restrict the character set and syntax
6551                   of
6552                   certain domain names in master files and/or DNS responses
6553                   received
6554                   from the network.  The default varies according to usage
6555                   area.  For
6556                   <command>master</command> zones the default is <command>fail</command>.
6557                   For <command>slave</command> zones the default
6558                   is <command>warn</command>.
6559                   For answers received from the network (<command>response</command>)
6560                   the default is <command>ignore</command>.
6561                 </para>
6562                 <para>
6563                   The rules for legal hostnames and mail domains are derived
6564                   from RFC 952 and RFC 821 as modified by RFC 1123.
6565                 </para>
6566                 <para><command>check-names</command>
6567                   applies to the owner names of A, AAAA and MX records.
6568                   It also applies to the domain names in the RDATA of NS, SOA,
6569                   MX, and SRV records.
6570                   It also applies to the RDATA of PTR records where the owner
6571                   name indicated that it is a reverse lookup of a hostname
6572                   (the owner name ends in IN-ADDR.ARPA, IP6.ARPA, or IP6.INT).
6573                 </para>
6574               </listitem>
6575             </varlistentry>
6576
6577             <varlistentry>
6578               <term><command>check-dup-records</command></term>
6579               <listitem>
6580                 <para>
6581                   Check master zones for records that are treated as different
6582                   by DNSSEC but are semantically equal in plain DNS.  The
6583                   default is to <command>warn</command>.  Other possible
6584                   values are <command>fail</command> and
6585                   <command>ignore</command>.
6586                 </para>
6587               </listitem>
6588             </varlistentry>
6589
6590             <varlistentry>
6591               <term><command>check-mx</command></term>
6592               <listitem>
6593                 <para>
6594                   Check whether the MX record appears to refer to a IP address.
6595                   The default is to <command>warn</command>.  Other possible
6596                   values are <command>fail</command> and
6597                   <command>ignore</command>.
6598                 </para>
6599               </listitem>
6600             </varlistentry>
6601             <varlistentry>
6602               <term><command>check-mx</command></term>
6603               <listitem>
6604                 <para>
6605                   Check whether the MX record appears to refer to a IP address.
6606                   The default is to <command>warn</command>.  Other possible
6607                   values are <command>fail</command> and
6608                   <command>ignore</command>.
6609                 </para>
6610               </listitem>
6611             </varlistentry>
6612
6613             <varlistentry>
6614               <term><command>check-wildcard</command></term>
6615               <listitem>
6616                 <para>
6617                   This option is used to check for non-terminal wildcards.
6618                   The use of non-terminal wildcards is almost always as a
6619                   result of a failure
6620                   to understand the wildcard matching algorithm (RFC 1034).
6621                   This option
6622                   affects master zones.  The default (<command>yes</command>) is to check
6623                   for non-terminal wildcards and issue a warning.
6624                 </para>
6625               </listitem>
6626             </varlistentry>
6627
6628             <varlistentry>
6629               <term><command>check-integrity</command></term>
6630               <listitem>
6631                 <para>
6632                   Perform post load zone integrity checks on master
6633                   zones.  This checks that MX and SRV records refer
6634                   to address (A or AAAA) records and that glue
6635                   address records exist for delegated zones.  For
6636                   MX and SRV records only in-zone hostnames are
6637                   checked (for out-of-zone hostnames use
6638                   <command>named-checkzone</command>).
6639                   For NS records only names below top of zone are
6640                   checked (for out-of-zone names and glue consistency
6641                   checks use <command>named-checkzone</command>).
6642                   The default is <command>yes</command>.
6643                 </para>
6644               </listitem>
6645             </varlistentry>
6646
6647             <varlistentry>
6648               <term><command>check-mx-cname</command></term>
6649               <listitem>
6650                 <para>
6651                   If <command>check-integrity</command> is set then
6652                   fail, warn or ignore MX records that refer
6653                   to CNAMES.  The default is to <command>warn</command>.
6654                 </para>
6655               </listitem>
6656             </varlistentry>
6657
6658             <varlistentry>
6659               <term><command>check-srv-cname</command></term>
6660               <listitem>
6661                 <para>
6662                   If <command>check-integrity</command> is set then
6663                   fail, warn or ignore SRV records that refer
6664                   to CNAMES.  The default is to <command>warn</command>.
6665                 </para>
6666               </listitem>
6667             </varlistentry>
6668
6669             <varlistentry>
6670               <term><command>check-sibling</command></term>
6671               <listitem>
6672                 <para>
6673                   When performing integrity checks, also check that
6674                   sibling glue exists.  The default is <command>yes</command>.
6675                 </para>
6676               </listitem>
6677             </varlistentry>
6678
6679             <varlistentry>
6680               <term><command>zero-no-soa-ttl</command></term>
6681               <listitem>
6682                 <para>
6683                   When returning authoritative negative responses to
6684                   SOA queries set the TTL of the SOA record returned in
6685                   the authority section to zero.
6686                   The default is <command>yes</command>.
6687                 </para>
6688               </listitem>
6689             </varlistentry>
6690
6691             <varlistentry>
6692               <term><command>zero-no-soa-ttl-cache</command></term>
6693               <listitem>
6694                 <para>
6695                   When caching a negative response to a SOA query
6696                   set the TTL to zero.
6697                   The default is <command>no</command>.
6698                 </para>
6699               </listitem>
6700             </varlistentry>
6701
6702             <varlistentry>
6703               <term><command>update-check-ksk</command></term>
6704               <listitem>
6705                 <para>
6706                   When set to the default value of <literal>yes</literal>,
6707                   check the KSK bit in each key to determine how the key
6708                   should be used when generating RRSIGs for a secure zone.
6709                 </para>
6710                 <para>
6711                   Ordinarily, zone-signing keys (that is, keys without the
6712                   KSK bit set) are used to sign the entire zone, while
6713                   key-signing keys (keys with the KSK bit set) are only
6714                   used to sign the DNSKEY RRset at the zone apex.
6715                   However, if this option is set to <literal>no</literal>,
6716                   then the KSK bit is ignored; KSKs are treated as if they
6717                   were ZSKs and are used to sign the entire zone.  This is
6718                   similar to the <command>dnssec-signzone -z</command>
6719                   command line option.
6720                 </para>
6721                 <para>
6722                   When this option is set to <literal>yes</literal>, there
6723                   must be at least two active keys for every algorithm
6724                   represented in the DNSKEY RRset: at least one KSK and one
6725                   ZSK per algorithm.  If there is any algorithm for which
6726                   this requirement is not met, this option will be ignored
6727                   for that algorithm.
6728                 </para>
6729               </listitem>
6730             </varlistentry>
6731
6732             <varlistentry>
6733               <term><command>dnssec-dnskey-kskonly</command></term>
6734               <listitem>
6735                 <para>
6736                   When this option and <command>update-check-ksk</command>
6737                   are both set to <literal>yes</literal>, only key-signing
6738                   keys (that is, keys with the KSK bit set) will be used
6739                   to sign the DNSKEY RRset at the zone apex.  Zone-signing
6740                   keys (keys without the KSK bit set) will be used to sign
6741                   the remainder of the zone, but not the DNSKEY RRset.
6742                   This is similar to the
6743                   <command>dnssec-signzone -x</command> command line option.
6744                 </para>
6745                 <para>
6746                   The default is <command>no</command>.  If
6747                   <command>update-check-ksk</command> is set to
6748                   <literal>no</literal>, this option is ignored.
6749                 </para>
6750               </listitem>
6751             </varlistentry>
6752
6753             <varlistentry>
6754               <term><command>try-tcp-refresh</command></term>
6755               <listitem>
6756                 <para>
6757                   Try to refresh the zone using TCP if UDP queries fail.
6758                   For BIND 8 compatibility, the default is
6759                   <command>yes</command>.
6760                 </para>
6761               </listitem>
6762             </varlistentry>
6763
6764             <varlistentry>
6765               <term><command>dnssec-secure-to-insecure</command></term>
6766               <listitem>
6767                 <para>
6768                   Allow a dynamic zone to transition from secure to
6769                   insecure (i.e., signed to unsigned) by deleting all
6770                   of the DNSKEY records.  The default is <command>no</command>.
6771                   If set to <command>yes</command>, and if the DNSKEY RRset
6772                   at the zone apex is deleted, all RRSIG and NSEC records
6773                   will be removed from the zone as well.
6774                 </para>
6775                 <para>
6776                   If the zone uses NSEC3, then it is also necessary to
6777                   delete the NSEC3PARAM RRset from the zone apex; this will
6778                   cause the removal of all corresponding NSEC3 records.
6779                   (It is expected that this requirement will be eliminated
6780                   in a future release.)
6781                 </para>
6782                 <para>
6783                   Note that if a zone has been configured with
6784                   <command>auto-dnssec maintain</command> and the
6785                   private keys remain accessible in the key repository,
6786                   then the zone will be automatically signed again the
6787                   next time <command>named</command> is started.
6788                 </para>
6789               </listitem>
6790             </varlistentry>
6791
6792           </variablelist>
6793
6794         </sect3>
6795
6796         <sect3>
6797           <title>Forwarding</title>
6798           <para>
6799             The forwarding facility can be used to create a large site-wide
6800             cache on a few servers, reducing traffic over links to external
6801             name servers. It can also be used to allow queries by servers that
6802             do not have direct access to the Internet, but wish to look up
6803             exterior
6804             names anyway. Forwarding occurs only on those queries for which
6805             the server is not authoritative and does not have the answer in
6806             its cache.
6807           </para>
6808
6809           <variablelist>
6810             <varlistentry>
6811               <term><command>forward</command></term>
6812               <listitem>
6813                 <para>
6814                   This option is only meaningful if the
6815                   forwarders list is not empty. A value of <varname>first</varname>,
6816                   the default, causes the server to query the forwarders
6817                   first &mdash; and
6818                   if that doesn't answer the question, the server will then
6819                   look for
6820                   the answer itself. If <varname>only</varname> is
6821                   specified, the
6822                   server will only query the forwarders.
6823                 </para>
6824               </listitem>
6825             </varlistentry>
6826
6827             <varlistentry>
6828               <term><command>forwarders</command></term>
6829               <listitem>
6830                 <para>
6831                   Specifies the IP addresses to be used
6832                   for forwarding. The default is the empty list (no
6833                   forwarding).
6834                 </para>
6835               </listitem>
6836             </varlistentry>
6837
6838           </variablelist>
6839
6840           <para>
6841             Forwarding can also be configured on a per-domain basis, allowing
6842             for the global forwarding options to be overridden in a variety
6843             of ways. You can set particular domains to use different
6844             forwarders,
6845             or have a different <command>forward only/first</command> behavior,
6846             or not forward at all, see <xref linkend="zone_statement_grammar"/>.
6847           </para>
6848         </sect3>
6849
6850         <sect3>
6851           <title>Dual-stack Servers</title>
6852           <para>
6853             Dual-stack servers are used as servers of last resort to work
6854             around
6855             problems in reachability due the lack of support for either IPv4
6856             or IPv6
6857             on the host machine.
6858           </para>
6859
6860           <variablelist>
6861             <varlistentry>
6862               <term><command>dual-stack-servers</command></term>
6863               <listitem>
6864                 <para>
6865                   Specifies host names or addresses of machines with access to
6866                   both IPv4 and IPv6 transports. If a hostname is used, the
6867                   server must be able
6868                   to resolve the name using only the transport it has.  If the
6869                   machine is dual
6870                   stacked, then the <command>dual-stack-servers</command> have no effect unless
6871                   access to a transport has been disabled on the command line
6872                   (e.g. <command>named -4</command>).
6873                 </para>
6874               </listitem>
6875             </varlistentry>
6876           </variablelist>
6877         </sect3>
6878
6879         <sect3 id="access_control">
6880           <title>Access Control</title>
6881
6882           <para>
6883             Access to the server can be restricted based on the IP address
6884             of the requesting system. See <xref linkend="address_match_lists"/> for
6885             details on how to specify IP address lists.
6886           </para>
6887
6888           <variablelist>
6889
6890             <varlistentry>
6891               <term><command>allow-notify</command></term>
6892               <listitem>
6893                 <para>
6894                   Specifies which hosts are allowed to
6895                   notify this server, a slave, of zone changes in addition
6896                   to the zone masters.
6897                   <command>allow-notify</command> may also be
6898                   specified in the
6899                   <command>zone</command> statement, in which case
6900                   it overrides the
6901                   <command>options allow-notify</command>
6902                   statement.  It is only meaningful
6903                   for a slave zone.  If not specified, the default is to
6904                   process notify messages
6905                   only from a zone's master.
6906                 </para>
6907               </listitem>
6908             </varlistentry>
6909
6910             <varlistentry>
6911               <term><command>allow-query</command></term>
6912               <listitem>
6913                 <para>
6914                   Specifies which hosts are allowed to ask ordinary
6915                   DNS questions. <command>allow-query</command> may
6916                   also be specified in the <command>zone</command>
6917                   statement, in which case it overrides the
6918                   <command>options allow-query</command> statement.
6919                   If not specified, the default is to allow queries
6920                   from all hosts.
6921                 </para>
6922                 <note>
6923                   <para>
6924                     <command>allow-query-cache</command> is now
6925                     used to specify access to the cache.
6926                   </para>
6927                 </note>
6928               </listitem>
6929             </varlistentry>
6930
6931             <varlistentry>
6932               <term><command>allow-query-on</command></term>
6933               <listitem>
6934                 <para>
6935                   Specifies which local addresses can accept ordinary
6936                   DNS questions. This makes it possible, for instance,
6937                   to allow queries on internal-facing interfaces but
6938                   disallow them on external-facing ones, without
6939                   necessarily knowing the internal network's addresses.
6940                 </para>
6941                 <para>
6942                   <command>allow-query-on</command> may
6943                   also be specified in the <command>zone</command>
6944                   statement, in which case it overrides the
6945                   <command>options allow-query-on</command> statement.
6946                 </para>
6947                 <para>
6948                   If not specified, the default is to allow queries
6949                   on all addresses.
6950                 </para>
6951                 <note>
6952                   <para>
6953                     <command>allow-query-cache</command> is
6954                     used to specify access to the cache.
6955                   </para>
6956                 </note>
6957               </listitem>
6958             </varlistentry>
6959
6960             <varlistentry>
6961               <term><command>allow-query-cache</command></term>
6962               <listitem>
6963                 <para>
6964                   Specifies which hosts are allowed to get answers
6965                   from the cache.  If <command>allow-query-cache</command>
6966                   is not set then <command>allow-recursion</command>
6967                   is used if set, otherwise <command>allow-query</command>
6968                   is used if set unless <command>recursion no;</command> is
6969                   set in which case <command>none;</command> is used,
6970                   otherwise the default (<command>localnets;</command>
6971                   <command>localhost;</command>) is used.
6972                 </para>
6973               </listitem>
6974             </varlistentry>
6975
6976             <varlistentry>
6977               <term><command>allow-query-cache-on</command></term>
6978               <listitem>
6979                 <para>
6980                   Specifies which local addresses can give answers
6981                   from the cache.  If not specified, the default is
6982                   to allow cache queries on any address,
6983                   <command>localnets</command> and
6984                   <command>localhost</command>.
6985                 </para>
6986               </listitem>
6987             </varlistentry>
6988
6989             <varlistentry>
6990               <term><command>allow-recursion</command></term>
6991               <listitem>
6992                 <para>
6993                   Specifies which hosts are allowed to make recursive
6994                   queries through this server. If
6995                   <command>allow-recursion</command> is not set
6996                   then <command>allow-query-cache</command> is
6997                   used if set, otherwise <command>allow-query</command>
6998                   is used if set, otherwise the default
6999                   (<command>localnets;</command>
7000                   <command>localhost;</command>) is used.
7001                 </para>
7002               </listitem>
7003             </varlistentry>
7004
7005             <varlistentry>
7006               <term><command>allow-recursion-on</command></term>
7007               <listitem>
7008                 <para>
7009                   Specifies which local addresses can accept recursive
7010                   queries.  If not specified, the default is to allow
7011                   recursive queries on all addresses.
7012                 </para>
7013               </listitem>
7014             </varlistentry>
7015
7016             <varlistentry>
7017               <term><command>allow-update</command></term>
7018               <listitem>
7019                 <para>
7020                   Specifies which hosts are allowed to
7021                   submit Dynamic DNS updates for master zones. The default is
7022                   to deny
7023                   updates from all hosts.  Note that allowing updates based
7024                   on the requestor's IP address is insecure; see
7025                   <xref linkend="dynamic_update_security"/> for details.
7026                 </para>
7027               </listitem>
7028             </varlistentry>
7029
7030             <varlistentry>
7031               <term><command>allow-update-forwarding</command></term>
7032               <listitem>
7033                 <para>
7034                   Specifies which hosts are allowed to
7035                   submit Dynamic DNS updates to slave zones to be forwarded to
7036                   the
7037                   master.  The default is <userinput>{ none; }</userinput>,
7038                   which
7039                   means that no update forwarding will be performed.  To
7040                   enable
7041                   update forwarding, specify
7042                   <userinput>allow-update-forwarding { any; };</userinput>.
7043                   Specifying values other than <userinput>{ none; }</userinput> or
7044                   <userinput>{ any; }</userinput> is usually
7045                   counterproductive, since
7046                   the responsibility for update access control should rest
7047                   with the
7048                   master server, not the slaves.
7049                 </para>
7050                 <para>
7051                   Note that enabling the update forwarding feature on a slave
7052                   server
7053                   may expose master servers relying on insecure IP address
7054                   based
7055                   access control to attacks; see <xref linkend="dynamic_update_security"/>
7056                   for more details.
7057                 </para>
7058               </listitem>
7059             </varlistentry>
7060
7061             <varlistentry>
7062               <term><command>allow-v6-synthesis</command></term>
7063               <listitem>
7064                 <para>
7065                   This option was introduced for the smooth transition from
7066                   AAAA
7067                   to A6 and from "nibble labels" to binary labels.
7068                   However, since both A6 and binary labels were then
7069                   deprecated,
7070                   this option was also deprecated.
7071                   It is now ignored with some warning messages.
7072                 </para>
7073               </listitem>
7074             </varlistentry>
7075
7076             <varlistentry>
7077               <term><command>allow-transfer</command></term>
7078               <listitem>
7079                 <para>
7080                   Specifies which hosts are allowed to
7081                   receive zone transfers from the server. <command>allow-transfer</command> may
7082                   also be specified in the <command>zone</command>
7083                   statement, in which
7084                   case it overrides the <command>options allow-transfer</command> statement.
7085                   If not specified, the default is to allow transfers to all
7086                   hosts.
7087                 </para>
7088               </listitem>
7089             </varlistentry>
7090
7091             <varlistentry>
7092               <term><command>blackhole</command></term>
7093               <listitem>
7094                 <para>
7095                   Specifies a list of addresses that the
7096                   server will not accept queries from or use to resolve a
7097                   query. Queries
7098                   from these addresses will not be responded to. The default
7099                   is <userinput>none</userinput>.
7100                 </para>
7101               </listitem>
7102             </varlistentry>
7103
7104             <varlistentry>
7105               <term><command>filter-aaaa</command></term>
7106               <listitem>
7107                 <para>
7108                   Specifies a list of addresses to which
7109                   <command>filter-aaaa-on-v4</command>
7110                   is applies.  The default is <userinput>any</userinput>.
7111                 </para>
7112               </listitem>
7113             </varlistentry>
7114
7115           </variablelist>
7116
7117         </sect3>
7118
7119         <sect3>
7120           <title>Interfaces</title>
7121           <para>
7122             The interfaces and ports that the server will answer queries
7123             from may be specified using the <command>listen-on</command> option. <command>listen-on</command> takes
7124             an optional port and an <varname>address_match_list</varname>.
7125             The server will listen on all interfaces allowed by the address
7126             match list. If a port is not specified, port 53 will be used.
7127           </para>
7128           <para>
7129             Multiple <command>listen-on</command> statements are
7130             allowed.
7131             For example,
7132           </para>
7133
7134 <programlisting>listen-on { 5.6.7.8; };
7135 listen-on port 1234 { !1.2.3.4; 1.2/16; };
7136 </programlisting>
7137
7138           <para>
7139             will enable the name server on port 53 for the IP address
7140             5.6.7.8, and on port 1234 of an address on the machine in net
7141             1.2 that is not 1.2.3.4.
7142           </para>
7143
7144           <para>
7145             If no <command>listen-on</command> is specified, the
7146             server will listen on port 53 on all IPv4 interfaces.
7147           </para>
7148
7149           <para>
7150             The <command>listen-on-v6</command> option is used to
7151             specify the interfaces and the ports on which the server will
7152             listen
7153             for incoming queries sent using IPv6.
7154           </para>
7155
7156           <para>
7157             When <programlisting>{ any; }</programlisting> is
7158             specified
7159             as the <varname>address_match_list</varname> for the
7160             <command>listen-on-v6</command> option,
7161             the server does not bind a separate socket to each IPv6 interface
7162             address as it does for IPv4 if the operating system has enough API
7163             support for IPv6 (specifically if it conforms to RFC 3493 and RFC
7164             3542).
7165             Instead, it listens on the IPv6 wildcard address.
7166             If the system only has incomplete API support for IPv6, however,
7167             the behavior is the same as that for IPv4.
7168           </para>
7169
7170           <para>
7171             A list of particular IPv6 addresses can also be specified, in
7172             which case
7173             the server listens on a separate socket for each specified
7174             address,
7175             regardless of whether the desired API is supported by the system.
7176           </para>
7177
7178           <para>
7179             Multiple <command>listen-on-v6</command> options can
7180             be used.
7181             For example,
7182           </para>
7183
7184 <programlisting>listen-on-v6 { any; };
7185 listen-on-v6 port 1234 { !2001:db8::/32; any; };
7186 </programlisting>
7187
7188           <para>
7189             will enable the name server on port 53 for any IPv6 addresses
7190             (with a single wildcard socket),
7191             and on port 1234 of IPv6 addresses that is not in the prefix
7192             2001:db8::/32 (with separate sockets for each matched address.)
7193           </para>
7194
7195           <para>
7196             To make the server not listen on any IPv6 address, use
7197           </para>
7198
7199 <programlisting>listen-on-v6 { none; };
7200 </programlisting>
7201
7202           <para>
7203             If no <command>listen-on-v6</command> option is
7204             specified, the server will not listen on any IPv6 address
7205             unless <command>-6</command> is specified when <command>named</command> is
7206             invoked.  If <command>-6</command> is specified then
7207             <command>named</command> will listen on port 53 on all IPv6 interfaces by default.
7208           </para>
7209         </sect3>
7210
7211         <sect3 id="query_address">
7212           <title>Query Address</title>
7213           <para>
7214             If the server doesn't know the answer to a question, it will
7215             query other name servers. <command>query-source</command> specifies
7216             the address and port used for such queries. For queries sent over
7217             IPv6, there is a separate <command>query-source-v6</command> option.
7218             If <command>address</command> is <command>*</command> (asterisk) or is omitted,
7219             a wildcard IP address (<command>INADDR_ANY</command>)
7220             will be used.
7221           </para>
7222
7223           <para>
7224             If <command>port</command> is <command>*</command> or is omitted,
7225             a random port number from a pre-configured
7226             range is picked up and will be used for each query.
7227             The port range(s) is that specified in
7228             the <command>use-v4-udp-ports</command> (for IPv4)
7229             and <command>use-v6-udp-ports</command> (for IPv6)
7230             options, excluding the ranges specified in
7231             the <command>avoid-v4-udp-ports</command>
7232             and <command>avoid-v6-udp-ports</command> options, respectively.
7233           </para>
7234
7235           <para>
7236             The defaults of the <command>query-source</command> and
7237             <command>query-source-v6</command> options
7238             are:
7239           </para>
7240
7241 <programlisting>query-source address * port *;
7242 query-source-v6 address * port *;
7243 </programlisting>
7244
7245           <para>
7246             If <command>use-v4-udp-ports</command> or
7247             <command>use-v6-udp-ports</command> is unspecified,
7248             <command>named</command> will check if the operating
7249             system provides a programming interface to retrieve the
7250             system's default range for ephemeral ports.
7251             If such an interface is available,
7252             <command>named</command> will use the corresponding system
7253             default range; otherwise, it will use its own defaults:
7254          </para>
7255
7256 <programlisting>use-v4-udp-ports { range 1024 65535; };
7257 use-v6-udp-ports { range 1024 65535; };
7258 </programlisting>
7259
7260           <para>
7261             Note: make sure the ranges be sufficiently large for
7262             security.  A desirable size depends on various parameters,
7263             but we generally recommend it contain at least 16384 ports
7264             (14 bits of entropy).
7265             Note also that the system's default range when used may be
7266             too small for this purpose, and that the range may even be
7267             changed while <command>named</command> is running; the new
7268             range will automatically be applied when <command>named</command>
7269             is reloaded.
7270             It is encouraged to
7271             configure <command>use-v4-udp-ports</command> and
7272             <command>use-v6-udp-ports</command> explicitly so that the
7273             ranges are sufficiently large and are reasonably
7274             independent from the ranges used by other applications.
7275           </para>
7276
7277           <para>
7278             Note: the operational configuration
7279             where <command>named</command> runs may prohibit the use
7280             of some ports.  For example, UNIX systems will not allow
7281             <command>named</command> running without a root privilege
7282             to use ports less than 1024.
7283             If such ports are included in the specified (or detected)
7284             set of query ports, the corresponding query attempts will
7285             fail, resulting in resolution failures or delay.
7286             It is therefore important to configure the set of ports
7287             that can be safely used in the expected operational environment.
7288           </para>
7289
7290           <para>
7291             The defaults of the <command>avoid-v4-udp-ports</command> and
7292             <command>avoid-v6-udp-ports</command> options
7293             are:
7294           </para>
7295
7296 <programlisting>avoid-v4-udp-ports {};
7297 avoid-v6-udp-ports {};
7298 </programlisting>
7299
7300           <para>
7301             Note: BIND 9.5.0 introduced
7302             the <command>use-queryport-pool</command> 
7303             option to support a pool of such random ports, but this
7304             option is now obsolete because reusing the same ports in
7305             the pool may not be sufficiently secure.
7306             For the same reason, it is generally strongly discouraged to
7307             specify a particular port for the
7308             <command>query-source</command> or
7309             <command>query-source-v6</command> options;
7310             it implicitly disables the use of randomized port numbers.
7311           </para>
7312
7313           <variablelist>
7314             <varlistentry>
7315               <term><command>use-queryport-pool</command></term>
7316               <listitem>
7317                 <para>
7318                   This option is obsolete.
7319                 </para>
7320               </listitem>
7321             </varlistentry>
7322
7323             <varlistentry>
7324               <term><command>queryport-pool-ports</command></term>
7325               <listitem>
7326                 <para>
7327                   This option is obsolete.
7328                 </para>
7329               </listitem>
7330             </varlistentry>
7331
7332             <varlistentry>
7333               <term><command>queryport-pool-updateinterval</command></term>
7334               <listitem>
7335                 <para>
7336                   This option is obsolete.
7337                 </para>
7338               </listitem>
7339             </varlistentry>
7340             
7341           </variablelist>
7342           <note>
7343             <para>
7344               The address specified in the <command>query-source</command> option
7345               is used for both UDP and TCP queries, but the port applies only
7346               to UDP queries.  TCP queries always use a random
7347               unprivileged port.
7348             </para>
7349           </note>
7350           <note>
7351             <para>
7352               Solaris 2.5.1 and earlier does not support setting the source
7353               address for TCP sockets.
7354             </para>
7355           </note>
7356           <note>
7357             <para>
7358               See also <command>transfer-source</command> and
7359               <command>notify-source</command>.
7360             </para>
7361           </note>
7362         </sect3>
7363
7364         <sect3 id="zone_transfers">
7365           <title>Zone Transfers</title>
7366           <para>
7367             <acronym>BIND</acronym> has mechanisms in place to
7368             facilitate zone transfers
7369             and set limits on the amount of load that transfers place on the
7370             system. The following options apply to zone transfers.
7371           </para>
7372
7373           <variablelist>
7374
7375             <varlistentry>
7376               <term><command>also-notify</command></term>
7377               <listitem>
7378                 <para>
7379                   Defines a global list of IP addresses of name servers
7380                   that are also sent NOTIFY messages whenever a fresh copy of
7381                   the
7382                   zone is loaded, in addition to the servers listed in the
7383                   zone's NS records.
7384                   This helps to ensure that copies of the zones will
7385                   quickly converge on stealth servers.
7386                   Optionally, a port may be specified with each
7387                   <command>also-notify</command> address to send
7388                   the notify messages to a port other than the
7389                   default of 53.
7390                   If an <command>also-notify</command> list
7391                   is given in a <command>zone</command> statement,
7392                   it will override
7393                   the <command>options also-notify</command>
7394                   statement. When a <command>zone notify</command>
7395                   statement
7396                   is set to <command>no</command>, the IP
7397                   addresses in the global <command>also-notify</command> list will
7398                   not be sent NOTIFY messages for that zone. The default is
7399                   the empty
7400                   list (no global notification list).
7401                 </para>
7402               </listitem>
7403             </varlistentry>
7404
7405             <varlistentry>
7406               <term><command>max-transfer-time-in</command></term>
7407               <listitem>
7408                 <para>
7409                   Inbound zone transfers running longer than
7410                   this many minutes will be terminated. The default is 120
7411                   minutes
7412                   (2 hours).  The maximum value is 28 days (40320 minutes).
7413                 </para>
7414               </listitem>
7415             </varlistentry>
7416
7417             <varlistentry>
7418               <term><command>max-transfer-idle-in</command></term>
7419               <listitem>
7420                 <para>
7421                   Inbound zone transfers making no progress
7422                   in this many minutes will be terminated. The default is 60
7423                   minutes
7424                   (1 hour).  The maximum value is 28 days (40320 minutes).
7425                 </para>
7426               </listitem>
7427             </varlistentry>
7428
7429             <varlistentry>
7430               <term><command>max-transfer-time-out</command></term>
7431               <listitem>
7432                 <para>
7433                   Outbound zone transfers running longer than
7434                   this many minutes will be terminated. The default is 120
7435                   minutes
7436                   (2 hours).  The maximum value is 28 days (40320 minutes).
7437                 </para>
7438               </listitem>
7439             </varlistentry>
7440
7441             <varlistentry>
7442               <term><command>max-transfer-idle-out</command></term>
7443               <listitem>
7444                 <para>
7445                   Outbound zone transfers making no progress
7446                   in this many minutes will be terminated.  The default is 60
7447                   minutes (1
7448                   hour).  The maximum value is 28 days (40320 minutes).
7449                 </para>
7450               </listitem>
7451             </varlistentry>
7452
7453             <varlistentry>
7454               <term><command>serial-query-rate</command></term>
7455               <listitem>
7456                 <para>
7457                   Slave servers will periodically query master servers
7458                   to find out if zone serial numbers have changed. Each such
7459                   query uses
7460                   a minute amount of the slave server's network bandwidth.  To
7461                   limit the
7462                   amount of bandwidth used, BIND 9 limits the rate at which
7463                   queries are
7464                   sent.  The value of the <command>serial-query-rate</command> option,
7465                   an integer, is the maximum number of queries sent per
7466                   second.
7467                   The default is 20.
7468                 </para>
7469               </listitem>
7470             </varlistentry>
7471
7472             <varlistentry>
7473               <term><command>serial-queries</command></term>
7474               <listitem>
7475                 <para>
7476                   In BIND 8, the <command>serial-queries</command>
7477                   option
7478                   set the maximum number of concurrent serial number queries
7479                   allowed to be outstanding at any given time.
7480                   BIND 9 does not limit the number of outstanding
7481                   serial queries and ignores the <command>serial-queries</command> option.
7482                   Instead, it limits the rate at which the queries are sent
7483                   as defined using the <command>serial-query-rate</command> option.
7484                 </para>
7485               </listitem>
7486             </varlistentry>
7487
7488             <varlistentry>
7489               <term><command>transfer-format</command></term>
7490               <listitem>
7491
7492                 <para>
7493                   Zone transfers can be sent using two different formats,
7494                   <command>one-answer</command> and
7495                   <command>many-answers</command>.
7496                   The <command>transfer-format</command> option is used
7497                   on the master server to determine which format it sends.
7498                   <command>one-answer</command> uses one DNS message per
7499                   resource record transferred.
7500                   <command>many-answers</command> packs as many resource
7501                   records as possible into a message.
7502                   <command>many-answers</command> is more efficient, but is
7503                   only supported by relatively new slave servers,
7504                   such as <acronym>BIND</acronym> 9, <acronym>BIND</acronym>
7505                   8.x and <acronym>BIND</acronym> 4.9.5 onwards.
7506                   The <command>many-answers</command> format is also supported by
7507                   recent Microsoft Windows nameservers.
7508                   The default is <command>many-answers</command>.
7509                   <command>transfer-format</command> may be overridden on a
7510                   per-server basis by using the <command>server</command>
7511                   statement.
7512                 </para>
7513
7514               </listitem>
7515             </varlistentry>
7516
7517             <varlistentry>
7518               <term><command>transfers-in</command></term>
7519               <listitem>
7520                 <para>
7521                   The maximum number of inbound zone transfers
7522                   that can be running concurrently. The default value is <literal>10</literal>.
7523                   Increasing <command>transfers-in</command> may
7524                   speed up the convergence
7525                   of slave zones, but it also may increase the load on the
7526                   local system.
7527                 </para>
7528               </listitem>
7529             </varlistentry>
7530
7531             <varlistentry>
7532               <term><command>transfers-out</command></term>
7533               <listitem>
7534                 <para>
7535                   The maximum number of outbound zone transfers
7536                   that can be running concurrently. Zone transfer requests in
7537                   excess
7538                   of the limit will be refused. The default value is <literal>10</literal>.
7539                 </para>
7540               </listitem>
7541             </varlistentry>
7542
7543             <varlistentry>
7544               <term><command>transfers-per-ns</command></term>
7545               <listitem>
7546                 <para>
7547                   The maximum number of inbound zone transfers
7548                   that can be concurrently transferring from a given remote
7549                   name server.
7550                   The default value is <literal>2</literal>.
7551                   Increasing <command>transfers-per-ns</command>
7552                   may
7553                   speed up the convergence of slave zones, but it also may
7554                   increase
7555                   the load on the remote name server. <command>transfers-per-ns</command> may
7556                   be overridden on a per-server basis by using the <command>transfers</command> phrase
7557                   of the <command>server</command> statement.
7558                 </para>
7559               </listitem>
7560             </varlistentry>
7561
7562             <varlistentry>
7563               <term><command>transfer-source</command></term>
7564               <listitem>
7565                 <para><command>transfer-source</command>
7566                   determines which local address will be bound to IPv4
7567                   TCP connections used to fetch zones transferred
7568                   inbound by the server.  It also determines the
7569                   source IPv4 address, and optionally the UDP port,
7570                   used for the refresh queries and forwarded dynamic
7571                   updates.  If not set, it defaults to a system
7572                   controlled value which will usually be the address
7573                   of the interface "closest to" the remote end. This
7574                   address must appear in the remote end's
7575                   <command>allow-transfer</command> option for the
7576                   zone being transferred, if one is specified. This
7577                   statement sets the
7578                   <command>transfer-source</command> for all zones,
7579                   but can be overridden on a per-view or per-zone
7580                   basis by including a
7581                   <command>transfer-source</command> statement within
7582                   the <command>view</command> or
7583                   <command>zone</command> block in the configuration
7584                   file.
7585                 </para>
7586                 <note>
7587                   <para>
7588                     Solaris 2.5.1 and earlier does not support setting the
7589                     source address for TCP sockets.
7590                   </para>
7591                 </note>
7592               </listitem>
7593             </varlistentry>
7594
7595             <varlistentry>
7596               <term><command>transfer-source-v6</command></term>
7597               <listitem>
7598                 <para>
7599                   The same as <command>transfer-source</command>,
7600                   except zone transfers are performed using IPv6.
7601                 </para>
7602               </listitem>
7603             </varlistentry>
7604
7605             <varlistentry>
7606               <term><command>alt-transfer-source</command></term>
7607               <listitem>
7608                 <para>
7609                   An alternate transfer source if the one listed in
7610                   <command>transfer-source</command> fails and
7611                   <command>use-alt-transfer-source</command> is
7612                   set.
7613                 </para>
7614                 <note>
7615                   If you do not wish the alternate transfer source
7616                   to be used, you should set
7617                   <command>use-alt-transfer-source</command>
7618                   appropriately and you should not depend upon
7619                   getting an answer back to the first refresh
7620                   query.
7621                 </note>
7622               </listitem>
7623             </varlistentry>
7624
7625             <varlistentry>
7626               <term><command>alt-transfer-source-v6</command></term>
7627               <listitem>
7628                 <para>
7629                   An alternate transfer source if the one listed in
7630                   <command>transfer-source-v6</command> fails and
7631                   <command>use-alt-transfer-source</command> is
7632                   set.
7633                 </para>
7634               </listitem>
7635             </varlistentry>
7636
7637             <varlistentry>
7638               <term><command>use-alt-transfer-source</command></term>
7639               <listitem>
7640                 <para>
7641                   Use the alternate transfer sources or not.  If views are
7642                   specified this defaults to <command>no</command>
7643                   otherwise it defaults to
7644                   <command>yes</command> (for BIND 8
7645                   compatibility).
7646                 </para>
7647               </listitem>
7648             </varlistentry>
7649
7650             <varlistentry>
7651               <term><command>notify-source</command></term>
7652               <listitem>
7653                 <para><command>notify-source</command>
7654                   determines which local source address, and
7655                   optionally UDP port, will be used to send NOTIFY
7656                   messages.  This address must appear in the slave
7657                   server's <command>masters</command> zone clause or
7658                   in an <command>allow-notify</command> clause.  This
7659                   statement sets the <command>notify-source</command>
7660                   for all zones, but can be overridden on a per-zone or
7661                   per-view basis by including a
7662                   <command>notify-source</command> statement within
7663                   the <command>zone</command> or
7664                   <command>view</command> block in the configuration
7665                   file.
7666                 </para>
7667                 <note>
7668                   <para>
7669                     Solaris 2.5.1 and earlier does not support setting the
7670                     source address for TCP sockets.
7671                   </para>
7672                 </note>
7673               </listitem>
7674             </varlistentry>
7675
7676             <varlistentry>
7677               <term><command>notify-source-v6</command></term>
7678               <listitem>
7679                 <para>
7680                   Like <command>notify-source</command>,
7681                   but applies to notify messages sent to IPv6 addresses.
7682                 </para>
7683               </listitem>
7684             </varlistentry>
7685
7686           </variablelist>
7687
7688         </sect3>
7689
7690         <sect3>
7691           <title>UDP Port Lists</title>
7692           <para>
7693             <command>use-v4-udp-ports</command>,
7694             <command>avoid-v4-udp-ports</command>,
7695             <command>use-v6-udp-ports</command>, and
7696             <command>avoid-v6-udp-ports</command>
7697             specify a list of IPv4 and IPv6 UDP ports that will be
7698             used or not used as source ports for UDP messages.
7699             See <xref linkend="query_address"/> about how the
7700             available ports are determined.
7701             For example, with the following configuration
7702           </para>
7703
7704 <programlisting>
7705 use-v6-udp-ports { range 32768 65535; };
7706 avoid-v6-udp-ports { 40000; range 50000 60000; };
7707 </programlisting>
7708
7709            <para>
7710              UDP ports of IPv6 messages sent
7711              from <command>named</command> will be in one
7712              of the following ranges: 32768 to 39999, 40001 to 49999,
7713              and 60001 to 65535.
7714            </para>
7715
7716            <para>
7717              <command>avoid-v4-udp-ports</command> and
7718              <command>avoid-v6-udp-ports</command> can be used
7719              to prevent <command>named</command> from choosing as its random source port a
7720              port that is blocked by your firewall or a port that is
7721              used by other applications;
7722              if a query went out with a source port blocked by a
7723              firewall, the
7724              answer would not get by the firewall and the name server would
7725              have to query again.
7726              Note: the desired range can also be represented only with
7727              <command>use-v4-udp-ports</command> and
7728              <command>use-v6-udp-ports</command>, and the
7729              <command>avoid-</command> options are redundant in that
7730              sense; they are provided for backward compatibility and
7731              to possibly simplify the port specification.
7732            </para>
7733         </sect3>
7734
7735         <sect3>
7736           <title>Operating System Resource Limits</title>
7737
7738           <para>
7739             The server's usage of many system resources can be limited.
7740             Scaled values are allowed when specifying resource limits.  For
7741             example, <command>1G</command> can be used instead of
7742             <command>1073741824</command> to specify a limit of
7743             one
7744             gigabyte. <command>unlimited</command> requests
7745             unlimited use, or the
7746             maximum available amount. <command>default</command>
7747             uses the limit
7748             that was in force when the server was started. See the description
7749             of <command>size_spec</command> in <xref linkend="configuration_file_elements"/>.
7750           </para>
7751
7752           <para>
7753             The following options set operating system resource limits for
7754             the name server process.  Some operating systems don't support
7755             some or
7756             any of the limits. On such systems, a warning will be issued if
7757             the
7758             unsupported limit is used.
7759           </para>
7760
7761           <variablelist>
7762
7763             <varlistentry>
7764               <term><command>coresize</command></term>
7765               <listitem>
7766                 <para>
7767                   The maximum size of a core dump. The default
7768                   is <literal>default</literal>.
7769                 </para>
7770               </listitem>
7771             </varlistentry>
7772
7773             <varlistentry>
7774               <term><command>datasize</command></term>
7775               <listitem>
7776                 <para>
7777                   The maximum amount of data memory the server
7778                   may use. The default is <literal>default</literal>.
7779                   This is a hard limit on server memory usage.
7780                   If the server attempts to allocate memory in excess of this
7781                   limit, the allocation will fail, which may in turn leave
7782                   the server unable to perform DNS service.  Therefore,
7783                   this option is rarely useful as a way of limiting the
7784                   amount of memory used by the server, but it can be used
7785                   to raise an operating system data size limit that is
7786                   too small by default.  If you wish to limit the amount
7787                   of memory used by the server, use the
7788                   <command>max-cache-size</command> and
7789                   <command>recursive-clients</command>
7790                   options instead.
7791                 </para>
7792               </listitem>
7793             </varlistentry>
7794
7795             <varlistentry>
7796               <term><command>files</command></term>
7797               <listitem>
7798                 <para>
7799                   The maximum number of files the server
7800                   may have open concurrently. The default is <literal>unlimited</literal>.
7801                 </para>
7802               </listitem>
7803             </varlistentry>
7804
7805             <varlistentry>
7806               <term><command>stacksize</command></term>
7807               <listitem>
7808                 <para>
7809                   The maximum amount of stack memory the server
7810                   may use. The default is <literal>default</literal>.
7811                 </para>
7812               </listitem>
7813             </varlistentry>
7814
7815           </variablelist>
7816
7817         </sect3>
7818
7819         <sect3 id="server_resource_limits">
7820           <title>Server  Resource Limits</title>
7821
7822           <para>
7823             The following options set limits on the server's
7824             resource consumption that are enforced internally by the
7825             server rather than the operating system.
7826           </para>
7827
7828           <variablelist>
7829
7830             <varlistentry>
7831               <term><command>max-ixfr-log-size</command></term>
7832               <listitem>
7833                 <para>
7834                   This option is obsolete; it is accepted
7835                   and ignored for BIND 8 compatibility.  The option
7836                   <command>max-journal-size</command> performs a
7837                   similar function in BIND 9.
7838                 </para>
7839               </listitem>
7840             </varlistentry>
7841
7842             <varlistentry>
7843               <term><command>max-journal-size</command></term>
7844               <listitem>
7845                 <para>
7846                   Sets a maximum size for each journal file
7847                   (see <xref linkend="journal"/>).  When the journal file
7848                   approaches
7849                   the specified size, some of the oldest transactions in the
7850                   journal
7851                   will be automatically removed.  The default is
7852                   <literal>unlimited</literal>.
7853                   This may also be set on a per-zone basis.
7854                 </para>
7855               </listitem>
7856             </varlistentry>
7857
7858             <varlistentry>
7859               <term><command>host-statistics-max</command></term>
7860               <listitem>
7861                 <para>
7862                   In BIND 8, specifies the maximum number of host statistics
7863                   entries to be kept.
7864                   Not implemented in BIND 9.
7865                 </para>
7866               </listitem>
7867             </varlistentry>
7868
7869             <varlistentry>
7870               <term><command>recursive-clients</command></term>
7871               <listitem>
7872                 <para>
7873                   The maximum number of simultaneous recursive lookups
7874                   the server will perform on behalf of clients.  The default
7875                   is
7876                   <literal>1000</literal>.  Because each recursing
7877                   client uses a fair
7878                   bit of memory, on the order of 20 kilobytes, the value of
7879                   the
7880                   <command>recursive-clients</command> option may
7881                   have to be decreased
7882                   on hosts with limited memory.
7883                 </para>
7884               </listitem>
7885             </varlistentry>
7886
7887             <varlistentry>
7888               <term><command>tcp-clients</command></term>
7889               <listitem>
7890                 <para>
7891                   The maximum number of simultaneous client TCP
7892                   connections that the server will accept.
7893                   The default is <literal>100</literal>.
7894                 </para>
7895               </listitem>
7896             </varlistentry>
7897
7898             <varlistentry>
7899               <term><command>reserved-sockets</command></term>
7900               <listitem>
7901                 <para>
7902                   The number of file descriptors reserved for TCP, stdio,
7903                   etc.  This needs to be big enough to cover the number of
7904                   interfaces <command>named</command> listens on, <command>tcp-clients</command> as well as
7905                   to provide room for outgoing TCP queries and incoming zone
7906                   transfers.  The default is <literal>512</literal>.
7907                   The minimum value is <literal>128</literal> and the
7908                   maximum value is <literal>128</literal> less than
7909                   maxsockets (-S).  This option may be removed in the future.
7910                 </para>
7911                 <para>
7912                   This option has little effect on Windows.
7913                 </para>
7914               </listitem>
7915             </varlistentry>
7916
7917             <varlistentry>
7918               <term><command>max-cache-size</command></term>
7919               <listitem>
7920                 <para>
7921                   The maximum amount of memory to use for the
7922                   server's cache, in bytes.
7923                   When the amount of data in the cache
7924                   reaches this limit, the server will cause records to expire
7925                   prematurely based on an LRU based strategy so that
7926                   the limit is not exceeded.
7927                   A value of 0 is special, meaning that
7928                   records are purged from the cache only when their
7929                   TTLs expire.
7930                   Another special keyword <userinput>unlimited</userinput>
7931                   means the maximum value of 32-bit unsigned integers
7932                   (0xffffffff), which may not have the same effect as
7933                   0 on machines that support more than 32 bits of
7934                   memory space.
7935                   Any positive values less than 2MB will be ignored reset
7936                   to 2MB.
7937                   In a server with multiple views, the limit applies
7938                   separately to the cache of each view.
7939                   The default is 0.
7940                 </para>
7941               </listitem>
7942             </varlistentry>
7943
7944             <varlistentry>
7945               <term><command>tcp-listen-queue</command></term>
7946               <listitem>
7947                 <para>
7948                   The listen queue depth.  The default and minimum is 3.
7949                   If the kernel supports the accept filter "dataready" this
7950                   also controls how
7951                   many TCP connections that will be queued in kernel space
7952                   waiting for
7953                   some data before being passed to accept.  Values less than 3
7954                   will be
7955                   silently raised.
7956                 </para>
7957               </listitem>
7958             </varlistentry>
7959
7960           </variablelist>
7961
7962         </sect3>
7963
7964         <sect3>
7965           <title>Periodic Task Intervals</title>
7966
7967           <variablelist>
7968
7969             <varlistentry>
7970               <term><command>cleaning-interval</command></term>
7971               <listitem>
7972                 <para>
7973                   This interval is effectively obsolete.  Previously,
7974                   the server would remove expired resource records
7975                   from the cache every <command>cleaning-interval</command> minutes.
7976                   <acronym>BIND</acronym> 9 now manages cache
7977                   memory in a more sophisticated manner and does not
7978                   rely on the periodic cleaning any more.
7979                   Specifying this option therefore has no effect on
7980                   the server's behavior.
7981                 </para>
7982               </listitem>
7983             </varlistentry>
7984
7985             <varlistentry>
7986               <term><command>heartbeat-interval</command></term>
7987               <listitem>
7988                 <para>
7989                   The server will perform zone maintenance tasks
7990                   for all zones marked as <command>dialup</command> whenever this
7991                   interval expires. The default is 60 minutes. Reasonable
7992                   values are up
7993                   to 1 day (1440 minutes).  The maximum value is 28 days
7994                   (40320 minutes).
7995                   If set to 0, no zone maintenance for these zones will occur.
7996                 </para>
7997               </listitem>
7998             </varlistentry>
7999
8000             <varlistentry>
8001               <term><command>interface-interval</command></term>
8002               <listitem>
8003                 <para>
8004                   The server will scan the network interface list
8005                   every <command>interface-interval</command>
8006                   minutes. The default
8007                   is 60 minutes. The maximum value is 28 days (40320 minutes).
8008                   If set to 0, interface scanning will only occur when
8009                   the configuration file is  loaded. After the scan, the
8010                   server will
8011                   begin listening for queries on any newly discovered
8012                   interfaces (provided they are allowed by the
8013                   <command>listen-on</command> configuration), and
8014                   will
8015                   stop listening on interfaces that have gone away.
8016                 </para>
8017               </listitem>
8018             </varlistentry>
8019
8020             <varlistentry>
8021               <term><command>statistics-interval</command></term>
8022               <listitem>
8023                 <para>
8024                   Name server statistics will be logged
8025                   every <command>statistics-interval</command>
8026                   minutes. The default is
8027                   60. The maximum value is 28 days (40320 minutes).
8028                   If set to 0, no statistics will be logged.
8029                   </para><note>
8030                   <simpara>
8031                     Not yet implemented in
8032                     <acronym>BIND</acronym> 9.
8033                   </simpara>
8034                 </note>
8035               </listitem>
8036             </varlistentry>
8037
8038           </variablelist>
8039
8040         </sect3>
8041
8042         <sect3 id="topology">
8043           <title>Topology</title>
8044
8045           <para>
8046             All other things being equal, when the server chooses a name
8047             server
8048             to query from a list of name servers, it prefers the one that is
8049             topologically closest to itself. The <command>topology</command> statement
8050             takes an <command>address_match_list</command> and
8051             interprets it
8052             in a special way. Each top-level list element is assigned a
8053             distance.
8054             Non-negated elements get a distance based on their position in the
8055             list, where the closer the match is to the start of the list, the
8056             shorter the distance is between it and the server. A negated match
8057             will be assigned the maximum distance from the server. If there
8058             is no match, the address will get a distance which is further than
8059             any non-negated list element, and closer than any negated element.
8060             For example,
8061           </para>
8062
8063 <programlisting>topology {
8064     10/8;
8065     !1.2.3/24;
8066     { 1.2/16; 3/8; };
8067 };</programlisting>
8068
8069           <para>
8070             will prefer servers on network 10 the most, followed by hosts
8071             on network 1.2.0.0 (netmask 255.255.0.0) and network 3, with the
8072             exception of hosts on network 1.2.3 (netmask 255.255.255.0), which
8073             is preferred least of all.
8074           </para>
8075           <para>
8076             The default topology is
8077           </para>
8078
8079 <programlisting>    topology { localhost; localnets; };
8080 </programlisting>
8081
8082           <note>
8083             <simpara>
8084               The <command>topology</command> option
8085               is not implemented in <acronym>BIND</acronym> 9.
8086             </simpara>
8087           </note>
8088         </sect3>
8089
8090         <sect3 id="the_sortlist_statement">
8091
8092           <title>The <command>sortlist</command> Statement</title>
8093
8094           <para>
8095             The response to a DNS query may consist of multiple resource
8096             records (RRs) forming a resource records set (RRset).
8097             The name server will normally return the
8098             RRs within the RRset in an indeterminate order
8099             (but see the <command>rrset-order</command>
8100             statement in <xref linkend="rrset_ordering"/>).
8101             The client resolver code should rearrange the RRs as appropriate,
8102             that is, using any addresses on the local net in preference to
8103             other addresses.
8104             However, not all resolvers can do this or are correctly
8105             configured.
8106             When a client is using a local server, the sorting can be performed
8107             in the server, based on the client's address. This only requires
8108             configuring the name servers, not all the clients.
8109           </para>
8110
8111           <para>
8112             The <command>sortlist</command> statement (see below)
8113             takes
8114             an <command>address_match_list</command> and
8115             interprets it even
8116             more specifically than the <command>topology</command>
8117             statement
8118             does (<xref linkend="topology"/>).
8119             Each top level statement in the <command>sortlist</command> must
8120             itself be an explicit <command>address_match_list</command> with
8121             one or two elements. The first element (which may be an IP
8122             address,
8123             an IP prefix, an ACL name or a nested <command>address_match_list</command>)
8124             of each top level list is checked against the source address of
8125             the query until a match is found.
8126           </para>
8127           <para>
8128             Once the source address of the query has been matched, if
8129             the top level statement contains only one element, the actual
8130             primitive
8131             element that matched the source address is used to select the
8132             address
8133             in the response to move to the beginning of the response. If the
8134             statement is a list of two elements, then the second element is
8135             treated the same as the <command>address_match_list</command> in
8136             a <command>topology</command> statement. Each top
8137             level element
8138             is assigned a distance and the address in the response with the
8139             minimum
8140             distance is moved to the beginning of the response.
8141           </para>
8142           <para>
8143             In the following example, any queries received from any of
8144             the addresses of the host itself will get responses preferring
8145             addresses
8146             on any of the locally connected networks. Next most preferred are
8147             addresses
8148             on the 192.168.1/24 network, and after that either the
8149             192.168.2/24
8150             or
8151             192.168.3/24 network with no preference shown between these two
8152             networks. Queries received from a host on the 192.168.1/24 network
8153             will prefer other addresses on that network to the 192.168.2/24
8154             and
8155             192.168.3/24 networks. Queries received from a host on the
8156             192.168.4/24
8157             or the 192.168.5/24 network will only prefer other addresses on
8158             their directly connected networks.
8159           </para>
8160
8161 <programlisting>sortlist {
8162     // IF the local host
8163     // THEN first fit on the following nets
8164     { localhost;
8165         { localnets;
8166             192.168.1/24;
8167             { 192.168.2/24; 192.168.3/24; }; }; };
8168     // IF on class C 192.168.1 THEN use .1, or .2 or .3
8169     { 192.168.1/24;
8170         { 192.168.1/24;
8171             { 192.168.2/24; 192.168.3/24; }; }; };
8172     // IF on class C 192.168.2 THEN use .2, or .1 or .3
8173     { 192.168.2/24;
8174         { 192.168.2/24;
8175             { 192.168.1/24; 192.168.3/24; }; }; };
8176     // IF on class C 192.168.3 THEN use .3, or .1 or .2
8177     { 192.168.3/24;
8178         { 192.168.3/24;
8179             { 192.168.1/24; 192.168.2/24; }; }; };
8180     // IF .4 or .5 THEN prefer that net
8181     { { 192.168.4/24; 192.168.5/24; };
8182     };
8183 };</programlisting>
8184
8185           <para>
8186             The following example will give reasonable behavior for the
8187             local host and hosts on directly connected networks. It is similar
8188             to the behavior of the address sort in <acronym>BIND</acronym> 4.9.x. Responses sent
8189             to queries from the local host will favor any of the directly
8190             connected
8191             networks. Responses sent to queries from any other hosts on a
8192             directly
8193             connected network will prefer addresses on that same network.
8194             Responses
8195             to other queries will not be sorted.
8196           </para>
8197
8198 <programlisting>sortlist {
8199            { localhost; localnets; };
8200            { localnets; };
8201 };
8202 </programlisting>
8203
8204         </sect3>
8205         <sect3 id="rrset_ordering">
8206           <title id="rrset_ordering_title">RRset Ordering</title>
8207           <para>
8208             When multiple records are returned in an answer it may be
8209             useful to configure the order of the records placed into the
8210             response.
8211             The <command>rrset-order</command> statement permits
8212             configuration
8213             of the ordering of the records in a multiple record response.
8214             See also the <command>sortlist</command> statement,
8215             <xref linkend="the_sortlist_statement"/>.
8216           </para>
8217
8218           <para>
8219             An <command>order_spec</command> is defined as
8220             follows:
8221           </para>
8222           <para>
8223             <optional>class <replaceable>class_name</replaceable></optional>
8224             <optional>type <replaceable>type_name</replaceable></optional>
8225             <optional>name <replaceable>"domain_name"</replaceable></optional>
8226             order <replaceable>ordering</replaceable>
8227           </para>
8228           <para>
8229             If no class is specified, the default is <command>ANY</command>.
8230             If no type is specified, the default is <command>ANY</command>.
8231             If no name is specified, the default is "<command>*</command>" (asterisk).
8232           </para>
8233           <para>
8234             The legal values for <command>ordering</command> are:
8235           </para>
8236           <informaltable colsep="0" rowsep="0">
8237             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
8238               <colspec colname="1" colnum="1" colsep="0" colwidth="0.750in"/>
8239               <colspec colname="2" colnum="2" colsep="0" colwidth="3.750in"/>
8240               <tbody>
8241                 <row rowsep="0">
8242                   <entry colname="1">
8243                     <para><command>fixed</command></para>
8244                   </entry>
8245                   <entry colname="2">
8246                     <para>
8247                       Records are returned in the order they
8248                       are defined in the zone file.
8249                     </para>
8250                   </entry>
8251                 </row>
8252                 <row rowsep="0">
8253                   <entry colname="1">
8254                     <para><command>random</command></para>
8255                   </entry>
8256                   <entry colname="2">
8257                     <para>
8258                       Records are returned in some random order.
8259                     </para>
8260                   </entry>
8261                 </row>
8262                 <row rowsep="0">
8263                   <entry colname="1">
8264                     <para><command>cyclic</command></para>
8265                   </entry>
8266                   <entry colname="2">
8267                     <para>
8268                       Records are returned in a cyclic round-robin order.
8269                     </para>
8270                     <para>
8271                       If <acronym>BIND</acronym> is configured with the
8272                       "--enable-fixed-rrset" option at compile time, then
8273                       the initial ordering of the RRset will match the
8274                       one specified in the zone file.
8275                     </para>
8276                   </entry>
8277                 </row>
8278               </tbody>
8279             </tgroup>
8280           </informaltable>
8281           <para>
8282             For example:
8283           </para>
8284
8285 <programlisting>rrset-order {
8286    class IN type A name "host.example.com" order random;
8287    order cyclic;
8288 };
8289 </programlisting>
8290
8291           <para>
8292             will cause any responses for type A records in class IN that
8293             have "<literal>host.example.com</literal>" as a
8294             suffix, to always be returned
8295             in random order. All other records are returned in cyclic order.
8296           </para>
8297           <para>
8298             If multiple <command>rrset-order</command> statements
8299             appear,
8300             they are not combined &mdash; the last one applies.
8301           </para>
8302
8303           <note>
8304             <simpara>
8305               In this release of <acronym>BIND</acronym> 9, the
8306               <command>rrset-order</command> statement does not support
8307               "fixed" ordering by default.  Fixed ordering can be enabled
8308               at compile time by specifying "--enable-fixed-rrset" on
8309               the "configure" command line.
8310             </simpara>
8311           </note>
8312         </sect3>
8313
8314         <sect3 id="tuning">
8315           <title>Tuning</title>
8316
8317           <variablelist>
8318
8319             <varlistentry>
8320               <term><command>lame-ttl</command></term>
8321               <listitem>
8322                 <para>
8323                   Sets the number of seconds to cache a
8324                   lame server indication. 0 disables caching. (This is
8325                   <emphasis role="bold">NOT</emphasis> recommended.)
8326                   The default is <literal>600</literal> (10 minutes) and the
8327                   maximum value is
8328                   <literal>1800</literal> (30 minutes).
8329                 </para>
8330
8331                 <para>
8332                   Lame-ttl also controls the amount of time DNSSEC
8333                   validation failures are cached.  There is a minimum
8334                   of 30 seconds applied to bad cache entries if the
8335                   lame-ttl is set to less than 30 seconds.
8336                 </para>
8337
8338               </listitem>
8339             </varlistentry>
8340
8341             <varlistentry>
8342               <term><command>max-ncache-ttl</command></term>
8343               <listitem>
8344                 <para>
8345                   To reduce network traffic and increase performance,
8346                   the server stores negative answers. <command>max-ncache-ttl</command> is
8347                   used to set a maximum retention time for these answers in
8348                   the server
8349                   in seconds. The default
8350                   <command>max-ncache-ttl</command> is <literal>10800</literal> seconds (3 hours).
8351                   <command>max-ncache-ttl</command> cannot exceed
8352                   7 days and will
8353                   be silently truncated to 7 days if set to a greater value.
8354                 </para>
8355               </listitem>
8356             </varlistentry>
8357
8358             <varlistentry>
8359               <term><command>max-cache-ttl</command></term>
8360               <listitem>
8361                 <para>
8362                   Sets the maximum time for which the server will
8363                   cache ordinary (positive) answers. The default is
8364                   one week (7 days).
8365                   A value of zero may cause all queries to return
8366                   SERVFAIL, because of lost caches of intermediate
8367                   RRsets (such as NS and glue AAAA/A records) in the
8368                   resolution process.
8369                 </para>
8370               </listitem>
8371             </varlistentry>
8372
8373             <varlistentry>
8374               <term><command>min-roots</command></term>
8375               <listitem>
8376                 <para>
8377                   The minimum number of root servers that
8378                   is required for a request for the root servers to be
8379                   accepted. The default
8380                   is <userinput>2</userinput>.
8381                 </para>
8382                 <note>
8383                   <simpara>
8384                     Not implemented in <acronym>BIND</acronym> 9.
8385                   </simpara>
8386                 </note>
8387               </listitem>
8388             </varlistentry>
8389
8390             <varlistentry>
8391               <term><command>sig-validity-interval</command></term>
8392               <listitem>
8393                 <para>
8394                   Specifies the number of days into the future when
8395                   DNSSEC signatures automatically generated as a
8396                   result of dynamic updates (<xref
8397                   linkend="dynamic_update"/>) will expire.  There
8398                   is an optional second field which specifies how
8399                   long before expiry that the signatures will be
8400                   regenerated.  If not specified, the signatures will
8401                   be regenerated at 1/4 of base interval.  The second
8402                   field is specified in days if the base interval is
8403                   greater than 7 days otherwise it is specified in hours.
8404                   The default base interval is <literal>30</literal> days
8405                   giving a re-signing interval of 7 1/2 days.  The maximum
8406                   values are 10 years (3660 days).
8407                 </para>
8408                 <para>
8409                   The signature inception time is unconditionally
8410                   set to one hour before the current time to allow
8411                   for a limited amount of clock skew.
8412                 </para>
8413                 <para>
8414                   The <command>sig-validity-interval</command>
8415                   should be, at least, several multiples of the SOA
8416                   expire interval to allow for reasonable interaction
8417                   between the various timer and expiry dates.
8418                 </para>
8419               </listitem>
8420             </varlistentry>
8421
8422             <varlistentry>
8423               <term><command>sig-signing-nodes</command></term>
8424               <listitem>
8425                 <para>
8426                   Specify the maximum number of nodes to be
8427                   examined in each quantum when signing a zone with
8428                   a new DNSKEY. The default is
8429                   <literal>100</literal>.
8430                 </para>
8431               </listitem>
8432             </varlistentry>
8433
8434             <varlistentry>
8435               <term><command>sig-signing-signatures</command></term>
8436               <listitem>
8437                 <para>
8438                   Specify a threshold number of signatures that
8439                   will terminate processing a quantum when signing
8440                   a zone with a new DNSKEY.  The default is
8441                   <literal>10</literal>.
8442                 </para>
8443               </listitem>
8444             </varlistentry>
8445
8446             <varlistentry>
8447               <term><command>sig-signing-type</command></term>
8448               <listitem>
8449                 <para>
8450                   Specify a private RDATA type to be used when generating
8451                   key signing records.  The default is
8452                   <literal>65535</literal>.
8453                 </para>
8454                 <para>
8455                   It is expected that this parameter may be removed
8456                   in a future version once there is a standard type.
8457                 </para>
8458               </listitem>
8459             </varlistentry>
8460
8461             <varlistentry>
8462               <term><command>min-refresh-time</command></term>
8463               <term><command>max-refresh-time</command></term>
8464               <term><command>min-retry-time</command></term>
8465               <term><command>max-retry-time</command></term>
8466               <listitem>
8467                 <para>
8468                   These options control the server's behavior on refreshing a
8469                   zone
8470                   (querying for SOA changes) or retrying failed transfers.
8471                   Usually the SOA values for the zone are used, but these
8472                   values
8473                   are set by the master, giving slave server administrators
8474                   little
8475                   control over their contents.
8476                 </para>
8477                 <para>
8478                   These options allow the administrator to set a minimum and
8479                   maximum
8480                   refresh and retry time either per-zone, per-view, or
8481                   globally.
8482                   These options are valid for slave and stub zones,
8483                   and clamp the SOA refresh and retry times to the specified
8484                   values.
8485                 </para>
8486               </listitem>
8487             </varlistentry>
8488
8489             <varlistentry>
8490               <term><command>edns-udp-size</command></term>
8491               <listitem>
8492                 <para>
8493                   Sets the advertised EDNS UDP buffer size in bytes
8494                   to control the size of packets received.
8495                   Valid values are 1024 to 4096 (values outside this range
8496                   will be silently adjusted).  The default value
8497                   is 4096.  The usual reason for setting
8498                   <command>edns-udp-size</command> to a non-default
8499                   value is to get UDP answers to pass through broken
8500                   firewalls that block fragmented packets and/or
8501                   block UDP packets that are greater than 512 bytes.
8502                 </para>
8503                 <para>
8504                   <command>named</command> will fallback to using 512 bytes
8505                   if it get a series of timeout at the initial value.  512
8506                   bytes is not being offered to encourage sites to fix their
8507                   firewalls.  Small EDNS UDP sizes will result in the
8508                   excessive use of TCP.
8509                 </para>
8510               </listitem>
8511             </varlistentry>
8512
8513             <varlistentry>
8514               <term><command>max-udp-size</command></term>
8515               <listitem>
8516                 <para>
8517                   Sets the maximum EDNS UDP message size
8518                   <command>named</command> will send in bytes.
8519                   Valid values are 512 to 4096 (values outside this
8520                   range will be silently adjusted).  The default
8521                   value is 4096.  The usual reason for setting
8522                   <command>max-udp-size</command> to a non-default
8523                   value is to get UDP answers to pass through broken
8524                   firewalls that block fragmented packets and/or
8525                   block UDP packets that are greater than 512 bytes.
8526                   This is independent of the advertised receive
8527                   buffer (<command>edns-udp-size</command>).
8528                 </para>
8529                 <para>
8530                   Setting this to a low value will encourge additional
8531                   TCP traffic to the nameserver.
8532                 </para>
8533               </listitem>
8534             </varlistentry>
8535
8536             <varlistentry>
8537               <term><command>masterfile-format</command></term>
8538               <listitem>
8539                 <para>Specifies
8540                   the file format of zone files (see
8541                   <xref linkend="zonefile_format"/>).
8542                   The default value is <constant>text</constant>, which is the
8543                   standard textual representation.  Files in other formats
8544                   than <constant>text</constant> are typically expected
8545                   to be generated by the <command>named-compilezone</command> tool.
8546                   Note that when a zone file in a different format than
8547                   <constant>text</constant> is loaded, <command>named</command>
8548                   may omit some of the checks which would be performed for a
8549                   file in the <constant>text</constant> format.  In particular,
8550                   <command>check-names</command> checks do not apply
8551                   for the <constant>raw</constant> format.  This means
8552                   a zone file in the <constant>raw</constant> format
8553                   must be generated with the same check level as that
8554                   specified in the <command>named</command> configuration
8555                   file.  This statement sets the
8556                   <command>masterfile-format</command> for all zones,
8557                   but can be overridden on a per-zone or per-view basis
8558                   by including a <command>masterfile-format</command>
8559                   statement within the <command>zone</command> or
8560                   <command>view</command> block in the configuration
8561                   file.
8562                 </para>
8563               </listitem>
8564             </varlistentry>
8565
8566             <varlistentry id="clients-per-query">
8567               <term><command>clients-per-query</command></term>
8568               <term><command>max-clients-per-query</command></term>
8569               <listitem>
8570                 <para>These set the
8571                   initial value (minimum) and maximum number of recursive
8572                   simultaneous clients for any given query
8573                   (&lt;qname,qtype,qclass&gt;) that the server will accept
8574                   before dropping additional clients.  <command>named</command> will attempt to
8575                   self tune this value and changes will be logged.  The
8576                   default values are 10 and 100.
8577                 </para>
8578                 <para>
8579                   This value should reflect how many queries come in for
8580                   a given name in the time it takes to resolve that name.
8581                   If the number of queries exceed this value, <command>named</command> will
8582                   assume that it is dealing with a non-responsive zone
8583                   and will drop additional queries.  If it gets a response
8584                   after dropping queries, it will raise the estimate.  The
8585                   estimate will then be lowered in 20 minutes if it has
8586                   remained unchanged.
8587                 </para>
8588                 <para>
8589                   If <command>clients-per-query</command> is set to zero,
8590                   then there is no limit on the number of clients per query
8591                   and no queries will be dropped.
8592                 </para>
8593                 <para>
8594                   If <command>max-clients-per-query</command> is set to zero,
8595                   then there is no upper bound other than imposed by
8596                   <command>recursive-clients</command>.
8597                 </para>
8598               </listitem>
8599             </varlistentry>
8600
8601             <varlistentry>
8602               <term><command>notify-delay</command></term>
8603               <listitem>
8604                 <para>
8605                   The delay, in seconds, between sending sets of notify
8606                   messages for a zone.  The default is five (5) seconds.
8607                 </para>
8608               </listitem>
8609             </varlistentry>
8610           </variablelist>
8611
8612         </sect3>
8613
8614         <sect3 id="builtin">
8615           <title>Built-in server information zones</title>
8616
8617           <para>
8618             The server provides some helpful diagnostic information
8619             through a number of built-in zones under the
8620             pseudo-top-level-domain <literal>bind</literal> in the
8621             <command>CHAOS</command> class.  These zones are part
8622             of a
8623             built-in view (see <xref linkend="view_statement_grammar"/>) of
8624             class
8625             <command>CHAOS</command> which is separate from the
8626             default view of
8627             class <command>IN</command>; therefore, any global
8628             server options
8629             such as <command>allow-query</command> do not apply
8630             the these zones.
8631             If you feel the need to disable these zones, use the options
8632             below, or hide the built-in <command>CHAOS</command>
8633             view by
8634             defining an explicit view of class <command>CHAOS</command>
8635             that matches all clients.
8636           </para>
8637
8638           <variablelist>
8639
8640             <varlistentry>
8641               <term><command>version</command></term>
8642               <listitem>
8643                 <para>
8644                   The version the server should report
8645                   via a query of the name <literal>version.bind</literal>
8646                   with type <command>TXT</command>, class <command>CHAOS</command>.
8647                   The default is the real version number of this server.
8648                   Specifying <command>version none</command>
8649                   disables processing of the queries.
8650                 </para>
8651               </listitem>
8652             </varlistentry>
8653
8654             <varlistentry>
8655               <term><command>hostname</command></term>
8656               <listitem>
8657                 <para>
8658                   The hostname the server should report via a query of
8659                   the name <filename>hostname.bind</filename>
8660                   with type <command>TXT</command>, class <command>CHAOS</command>.
8661                   This defaults to the hostname of the machine hosting the
8662                   name server as
8663                   found by the gethostname() function.  The primary purpose of such queries
8664                   is to
8665                   identify which of a group of anycast servers is actually
8666                   answering your queries.  Specifying <command>hostname none;</command>
8667                   disables processing of the queries.
8668                 </para>
8669               </listitem>
8670             </varlistentry>
8671
8672             <varlistentry>
8673               <term><command>server-id</command></term>
8674               <listitem>
8675                 <para>
8676                   The ID the server should report when receiving a Name
8677                   Server Identifier (NSID) query, or a query of the name
8678                   <filename>ID.SERVER</filename> with type
8679                   <command>TXT</command>, class <command>CHAOS</command>.
8680                   The primary purpose of such queries is to
8681                   identify which of a group of anycast servers is actually
8682                   answering your queries.  Specifying <command>server-id none;</command>
8683                   disables processing of the queries.
8684                   Specifying <command>server-id hostname;</command> will cause <command>named</command> to
8685                   use the hostname as found by the gethostname() function.
8686                   The default <command>server-id</command> is <command>none</command>.
8687                 </para>
8688               </listitem>
8689             </varlistentry>
8690
8691           </variablelist>
8692
8693         </sect3>
8694
8695         <sect3 id="empty">
8696           <title>Built-in Empty Zones</title>
8697           <para>
8698             Named has some built-in empty zones (SOA and NS records only).
8699             These are for zones that should normally be answered locally
8700             and which queries should not be sent to the Internet's root
8701             servers.  The official servers which cover these namespaces
8702             return NXDOMAIN responses to these queries.  In particular,
8703             these cover the reverse namespace for addresses from RFC 1918 and
8704             RFC 3330.  They also include the reverse namespace for IPv6 local
8705             address (locally assigned), IPv6 link local addresses, the IPv6
8706             loopback address and the IPv6 unknown address.
8707           </para>
8708           <para>
8709             Named will attempt to determine if a built-in zone already exists
8710             or is active (covered by a forward-only forwarding declaration)
8711             and will not create an empty zone in that case.
8712           </para>
8713           <para>
8714             The current list of empty zones is:
8715             <itemizedlist>
8716 <!-- XXX: The RFC1918 addresses are #defined out in sources currently.
8717               <listitem>10.IN-ADDR.ARPA</listitem>
8718               <listitem>16.172.IN-ADDR.ARPA</listitem>
8719               <listitem>17.172.IN-ADDR.ARPA</listitem>
8720               <listitem>18.172.IN-ADDR.ARPA</listitem>
8721               <listitem>19.172.IN-ADDR.ARPA</listitem>
8722               <listitem>20.172.IN-ADDR.ARPA</listitem>
8723               <listitem>21.172.IN-ADDR.ARPA</listitem>
8724               <listitem>22.172.IN-ADDR.ARPA</listitem>
8725               <listitem>23.172.IN-ADDR.ARPA</listitem>
8726               <listitem>24.172.IN-ADDR.ARPA</listitem>
8727               <listitem>25.172.IN-ADDR.ARPA</listitem>
8728               <listitem>26.172.IN-ADDR.ARPA</listitem>
8729               <listitem>27.172.IN-ADDR.ARPA</listitem>
8730               <listitem>28.172.IN-ADDR.ARPA</listitem>
8731               <listitem>29.172.IN-ADDR.ARPA</listitem>
8732               <listitem>30.172.IN-ADDR.ARPA</listitem>
8733               <listitem>31.172.IN-ADDR.ARPA</listitem>
8734               <listitem>168.192.IN-ADDR.ARPA</listitem>
8735 XXX: end of RFC1918 addresses #defined out -->
8736               <listitem>0.IN-ADDR.ARPA</listitem>
8737               <listitem>127.IN-ADDR.ARPA</listitem>
8738               <listitem>254.169.IN-ADDR.ARPA</listitem>
8739               <listitem>2.0.192.IN-ADDR.ARPA</listitem>
8740               <listitem>255.255.255.255.IN-ADDR.ARPA</listitem>
8741               <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>
8742               <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>
8743               <listitem>D.F.IP6.ARPA</listitem>
8744               <listitem>8.E.F.IP6.ARPA</listitem>
8745               <listitem>9.E.F.IP6.ARPA</listitem>
8746               <listitem>A.E.F.IP6.ARPA</listitem>
8747               <listitem>B.E.F.IP6.ARPA</listitem>
8748             </itemizedlist>
8749           </para>
8750           <para>
8751             Empty zones are settable at the view level and only apply to
8752             views of class IN.  Disabled empty zones are only inherited
8753             from options if there are no disabled empty zones specified
8754             at the view level.  To override the options list of disabled
8755             zones, you can disable the root zone at the view level, for example:
8756 <programlisting>
8757             disable-empty-zone ".";
8758 </programlisting>
8759           </para>
8760           <para>
8761             If you are using the address ranges covered here, you should
8762             already have reverse zones covering the addresses you use.
8763             In practice this appears to not be the case with many queries
8764             being made to the infrastructure servers for names in these
8765             spaces.  So many in fact that sacrificial servers were needed
8766             to be deployed to channel the query load away from the
8767             infrastructure servers.
8768           </para>
8769           <note>
8770             The real parent servers for these zones should disable all
8771             empty zone under the parent zone they serve.  For the real
8772             root servers, this is all built-in empty zones.  This will
8773             enable them to return referrals to deeper in the tree.
8774           </note>
8775           <variablelist>
8776             <varlistentry>
8777               <term><command>empty-server</command></term>
8778               <listitem>
8779                 <para>
8780                   Specify what server name will appear in the returned
8781                   SOA record for empty zones.  If none is specified, then
8782                   the zone's name will be used.
8783                 </para>
8784                </listitem>
8785             </varlistentry>
8786               
8787             <varlistentry>
8788               <term><command>empty-contact</command></term>
8789               <listitem>
8790                 <para>
8791                   Specify what contact name will appear in the returned
8792                   SOA record for empty zones.  If none is specified, then
8793                   "." will be used.
8794                 </para>
8795               </listitem>
8796             </varlistentry>
8797   
8798             <varlistentry>
8799               <term><command>empty-zones-enable</command></term>
8800               <listitem>
8801                 <para>
8802                   Enable or disable all empty zones.  By default, they
8803                   are enabled.
8804                 </para>
8805               </listitem>
8806             </varlistentry>
8807   
8808             <varlistentry>
8809             <term><command>disable-empty-zone</command></term>
8810               <listitem>
8811                 <para>
8812                   Disable individual empty zones.  By default, none are
8813                   disabled.  This option can be specified multiple times.
8814                 </para>
8815               </listitem>
8816             </varlistentry>
8817           </variablelist>
8818         </sect3>
8819
8820         <sect3 id="acache">
8821           <title>Additional Section Caching</title>
8822
8823           <para>
8824             The additional section cache, also called <command>acache</command>,
8825             is an internal cache to improve the response performance of BIND 9.
8826             When additional section caching is enabled, BIND 9 will
8827             cache an internal short-cut to the additional section content for
8828             each answer RR.
8829             Note that <command>acache</command> is an internal caching
8830             mechanism of BIND 9, and is not related to the DNS caching
8831             server function.
8832           </para>
8833
8834           <para>
8835             Additional section caching does not change the
8836             response content (except the RRsets ordering of the additional
8837             section, see below), but can improve the response performance
8838             significantly.
8839             It is particularly effective when BIND 9 acts as an authoritative
8840             server for a zone that has many delegations with many glue RRs.
8841           </para>
8842
8843           <para>
8844             In order to obtain the maximum performance improvement
8845             from additional section caching, setting
8846             <command>additional-from-cache</command>
8847             to <command>no</command> is recommended, since the current
8848             implementation of <command>acache</command>
8849             does not short-cut of additional section information from the
8850             DNS cache data.
8851           </para>
8852
8853           <para>
8854             One obvious disadvantage of <command>acache</command> is
8855             that it requires much more
8856             memory for the internal cached data.
8857             Thus, if the response performance does not matter and memory
8858             consumption is much more critical, the
8859             <command>acache</command> mechanism can be
8860             disabled by setting <command>acache-enable</command> to
8861             <command>no</command>.
8862             It is also possible to specify the upper limit of memory
8863             consumption
8864             for acache by using <command>max-acache-size</command>.
8865           </para>
8866
8867           <para>
8868             Additional section caching also has a minor effect on the
8869             RRset ordering in the additional section.
8870             Without <command>acache</command>,
8871             <command>cyclic</command> order is effective for the additional
8872             section as well as the answer and authority sections.
8873             However, additional section caching fixes the ordering when it
8874             first caches an RRset for the additional section, and the same
8875             ordering will be kept in succeeding responses, regardless of the
8876             setting of <command>rrset-order</command>.
8877             The effect of this should be minor, however, since an
8878             RRset in the additional section
8879             typically only contains a small number of RRs (and in many cases
8880             it only contains a single RR), in which case the
8881             ordering does not matter much.
8882           </para>
8883
8884           <para>
8885             The following is a summary of options related to
8886             <command>acache</command>.
8887           </para>
8888
8889           <variablelist>
8890
8891             <varlistentry>
8892               <term><command>acache-enable</command></term>
8893               <listitem>
8894                 <para>
8895                   If <command>yes</command>, additional section caching is
8896                   enabled.  The default value is <command>no</command>.
8897                 </para>
8898               </listitem>
8899             </varlistentry>
8900
8901             <varlistentry>
8902               <term><command>acache-cleaning-interval</command></term>
8903               <listitem>
8904                 <para>
8905                   The server will remove stale cache entries, based on an LRU
8906                   based
8907                   algorithm, every <command>acache-cleaning-interval</command> minutes.
8908                   The default is 60 minutes.
8909                   If set to 0, no periodic cleaning will occur.
8910                 </para>
8911               </listitem>
8912             </varlistentry>
8913
8914             <varlistentry>
8915               <term><command>max-acache-size</command></term>
8916               <listitem>
8917                 <para>
8918                   The maximum amount of memory in bytes to use for the server's acache.
8919                   When the amount of data in the acache reaches this limit,
8920                   the server
8921                   will clean more aggressively so that the limit is not
8922                   exceeded.
8923                   In a server with multiple views, the limit applies
8924                   separately to the
8925                   acache of each view.
8926                   The default is <literal>16M</literal>.
8927                 </para>
8928               </listitem>
8929             </varlistentry>
8930
8931           </variablelist>
8932
8933         </sect3>
8934
8935         <sect3>
8936           <title>Content Filtering</title>
8937           <para>
8938             <acronym>BIND</acronym> 9 provides the ability to filter
8939             out DNS responses from external DNS servers containing
8940             certain types of data in the answer section.
8941             Specifically, it can reject address (A or AAAA) records if
8942             the corresponding IPv4 or IPv6 addresses match the given
8943             <varname>address_match_list</varname> of the
8944             <command>deny-answer-addresses</command> option.
8945             It can also reject CNAME or DNAME records if the "alias"
8946             name (i.e., the CNAME alias or the substituted query name
8947             due to DNAME) matches the
8948             given <varname>namelist</varname> of the
8949             <command>deny-answer-aliases</command> option, where
8950             "match" means the alias name is a subdomain of one of
8951             the <varname>name_list</varname> elements.
8952             If the optional <varname>namelist</varname> is specified
8953             with <command>except-from</command>, records whose query name
8954             matches the list will be accepted regardless of the filter
8955             setting.
8956             Likewise, if the alias name is a subdomain of the
8957             corresponding zone, the <command>deny-answer-aliases</command>
8958             filter will not apply;
8959             for example, even if "example.com" is specified for
8960             <command>deny-answer-aliases</command>,
8961           </para>
8962 <programlisting>www.example.com. CNAME xxx.example.com.</programlisting>
8963
8964           <para>
8965             returned by an "example.com" server will be accepted.
8966           </para>
8967
8968           <para>
8969             In the <varname>address_match_list</varname> of the
8970             <command>deny-answer-addresses</command> option, only
8971             <varname>ip_addr</varname>
8972             and <varname>ip_prefix</varname>
8973             are meaningful;
8974             any <varname>key_id</varname> will be silently ignored.
8975           </para>
8976
8977           <para>
8978             If a response message is rejected due to the filtering,
8979             the entire message is discarded without being cached, and
8980             a SERVFAIL error will be returned to the client.
8981           </para>
8982
8983           <para>
8984             This filtering is intended to prevent "DNS rebinding attacks," in
8985             which an attacker, in response to a query for a domain name the
8986             attacker controls, returns an IP address within your own network or
8987             an alias name within your own domain.
8988             A naive web browser or script could then serve as an
8989             unintended proxy, allowing the attacker
8990             to get access to an internal node of your local network
8991             that couldn't be externally accessed otherwise.
8992             See the paper available at
8993             <ulink>
8994             http://portal.acm.org/citation.cfm?id=1315245.1315298
8995             </ulink>
8996             for more details about the attacks.
8997           </para>
8998
8999           <para>
9000             For example, if you own a domain named "example.net" and
9001             your internal network uses an IPv4 prefix 192.0.2.0/24,
9002             you might specify the following rules:
9003           </para>
9004
9005 <programlisting>deny-answer-addresses { 192.0.2.0/24; } except-from { "example.net"; };
9006 deny-answer-aliases { "example.net"; };
9007 </programlisting>
9008
9009           <para>
9010             If an external attacker lets a web browser in your local
9011             network look up an IPv4 address of "attacker.example.com",
9012             the attacker's DNS server would return a response like this:
9013           </para>
9014
9015 <programlisting>attacker.example.com. A 192.0.2.1</programlisting>
9016
9017           <para>
9018             in the answer section.
9019             Since the rdata of this record (the IPv4 address) matches
9020             the specified prefix 192.0.2.0/24, this response will be
9021             ignored.
9022           </para>
9023
9024           <para>
9025             On the other hand, if the browser looks up a legitimate
9026             internal web server "www.example.net" and the
9027             following response is returned to
9028             the <acronym>BIND</acronym> 9 server
9029           </para>
9030
9031 <programlisting>www.example.net. A 192.0.2.2</programlisting>
9032
9033           <para>
9034             it will be accepted since the owner name "www.example.net"
9035             matches the <command>except-from</command> element,
9036             "example.net".
9037           </para>
9038
9039           <para>
9040             Note that this is not really an attack on the DNS per se.
9041             In fact, there is nothing wrong for an "external" name to
9042             be mapped to your "internal" IP address or domain name
9043             from the DNS point of view.
9044             It might actually be provided for a legitimate purpose,
9045             such as for debugging.
9046             As long as the mapping is provided by the correct owner,
9047             it is not possible or does not make sense to detect
9048             whether the intent of the mapping is legitimate or not
9049             within the DNS.
9050             The "rebinding" attack must primarily be protected at the
9051             application that uses the DNS.
9052             For a large site, however, it may be difficult to protect
9053             all possible applications at once.
9054             This filtering feature is provided only to help such an
9055             operational environment;
9056             it is generally discouraged to turn it on unless you are
9057             very sure you have no other choice and the attack is a
9058             real threat for your applications.
9059           </para>
9060
9061           <para>
9062             Care should be particularly taken if you want to use this
9063             option for addresses within 127.0.0.0/8.
9064             These addresses are obviously "internal", but many
9065             applications conventionally rely on a DNS mapping from
9066             some name to such an address.
9067             Filtering out DNS records containing this address
9068             spuriously can break such applications.
9069           </para>
9070         </sect3>
9071       </sect2>
9072
9073       <sect2 id="server_statement_grammar">
9074         <title><command>server</command> Statement Grammar</title>
9075
9076 <programlisting><command>server</command> <replaceable>ip_addr[/prefixlen]</replaceable> {
9077     <optional> bogus <replaceable>yes_or_no</replaceable> ; </optional>
9078     <optional> provide-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
9079     <optional> request-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
9080     <optional> edns <replaceable>yes_or_no</replaceable> ; </optional>
9081     <optional> edns-udp-size <replaceable>number</replaceable> ; </optional>
9082     <optional> max-udp-size <replaceable>number</replaceable> ; </optional>
9083     <optional> transfers <replaceable>number</replaceable> ; </optional>
9084     <optional> transfer-format <replaceable>( one-answer | many-answers )</replaceable> ; ]</optional>
9085     <optional> keys <replaceable>{ string ; <optional> string ; <optional>...</optional></optional> }</replaceable> ; </optional>
9086     <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9087     <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9088     <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9089     <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9090     <optional> query-source <optional> address ( <replaceable>ip_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
9091                   <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional>; </optional>
9092     <optional> query-source-v6 <optional> address ( <replaceable>ip_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
9093                      <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional>; </optional>
9094     <optional> use-queryport-pool <replaceable>yes_or_no</replaceable>; </optional>
9095     <optional> queryport-pool-ports <replaceable>number</replaceable>; </optional>
9096     <optional> queryport-pool-updateinterval <replaceable>number</replaceable>; </optional>
9097 };
9098 </programlisting>
9099
9100         </sect2>
9101
9102         <sect2 id="server_statement_definition_and_usage">
9103           <title><command>server</command> Statement Definition and
9104             Usage</title>
9105
9106           <para>
9107             The <command>server</command> statement defines
9108             characteristics
9109             to be associated with a remote name server.  If a prefix length is
9110             specified, then a range of servers is covered.  Only the most
9111             specific
9112             server clause applies regardless of the order in
9113             <filename>named.conf</filename>.
9114           </para>
9115
9116           <para>
9117             The <command>server</command> statement can occur at
9118             the top level of the
9119             configuration file or inside a <command>view</command>
9120             statement.
9121             If a <command>view</command> statement contains
9122             one or more <command>server</command> statements, only
9123             those
9124             apply to the view and any top-level ones are ignored.
9125             If a view contains no <command>server</command>
9126             statements,
9127             any top-level <command>server</command> statements are
9128             used as
9129             defaults.
9130           </para>
9131
9132           <para>
9133             If you discover that a remote server is giving out bad data,
9134             marking it as bogus will prevent further queries to it. The
9135             default
9136             value of <command>bogus</command> is <command>no</command>.
9137           </para>
9138           <para>
9139             The <command>provide-ixfr</command> clause determines
9140             whether
9141             the local server, acting as master, will respond with an
9142             incremental
9143             zone transfer when the given remote server, a slave, requests it.
9144             If set to <command>yes</command>, incremental transfer
9145             will be provided
9146             whenever possible. If set to <command>no</command>,
9147             all transfers
9148             to the remote server will be non-incremental. If not set, the
9149             value
9150             of the <command>provide-ixfr</command> option in the
9151             view or
9152             global options block is used as a default.
9153           </para>
9154
9155           <para>
9156             The <command>request-ixfr</command> clause determines
9157             whether
9158             the local server, acting as a slave, will request incremental zone
9159             transfers from the given remote server, a master. If not set, the
9160             value of the <command>request-ixfr</command> option in
9161             the view or
9162             global options block is used as a default.
9163           </para>
9164
9165           <para>
9166             IXFR requests to servers that do not support IXFR will
9167             automatically
9168             fall back to AXFR.  Therefore, there is no need to manually list
9169             which servers support IXFR and which ones do not; the global
9170             default
9171             of <command>yes</command> should always work.
9172             The purpose of the <command>provide-ixfr</command> and
9173             <command>request-ixfr</command> clauses is
9174             to make it possible to disable the use of IXFR even when both
9175             master
9176             and slave claim to support it, for example if one of the servers
9177             is buggy and crashes or corrupts data when IXFR is used.
9178           </para>
9179
9180           <para>
9181             The <command>edns</command> clause determines whether
9182             the local server will attempt to use EDNS when communicating
9183             with the remote server.  The default is <command>yes</command>.
9184           </para>
9185
9186           <para>
9187             The <command>edns-udp-size</command> option sets the EDNS UDP size
9188             that is advertised by <command>named</command> when querying the remote server.
9189             Valid values are 512 to 4096 bytes (values outside this range will be
9190             silently adjusted).  This option is useful when you wish to
9191             advertises a different value to this server than the value you
9192             advertise globally, for example, when there is a firewall at the
9193             remote site that is blocking large replies.
9194           </para>
9195
9196           <para>
9197             The <command>max-udp-size</command> option sets the
9198             maximum EDNS UDP message size <command>named</command> will send.  Valid
9199             values are 512 to 4096 bytes (values outside this range will
9200             be silently adjusted).  This option is useful when you
9201             know that there is a firewall that is blocking large
9202             replies from <command>named</command>.
9203           </para>
9204
9205           <para>
9206             The server supports two zone transfer methods. The first, <command>one-answer</command>,
9207             uses one DNS message per resource record transferred. <command>many-answers</command> packs
9208             as many resource records as possible into a message. <command>many-answers</command> is
9209             more efficient, but is only known to be understood by <acronym>BIND</acronym> 9, <acronym>BIND</acronym>
9210             8.x, and patched versions of <acronym>BIND</acronym>
9211             4.9.5. You can specify which method
9212             to use for a server with the <command>transfer-format</command> option.
9213             If <command>transfer-format</command> is not
9214             specified, the <command>transfer-format</command>
9215             specified
9216             by the <command>options</command> statement will be
9217             used.
9218           </para>
9219
9220           <para><command>transfers</command>
9221             is used to limit the number of concurrent inbound zone
9222             transfers from the specified server. If no
9223             <command>transfers</command> clause is specified, the
9224             limit is set according to the
9225             <command>transfers-per-ns</command> option.
9226           </para>
9227
9228           <para>
9229             The <command>keys</command> clause identifies a
9230             <command>key_id</command> defined by the <command>key</command> statement,
9231             to be used for transaction security (TSIG, <xref linkend="tsig"/>)
9232             when talking to the remote server.
9233             When a request is sent to the remote server, a request signature
9234             will be generated using the key specified here and appended to the
9235             message. A request originating from the remote server is not
9236             required
9237             to be signed by this key.
9238           </para>
9239
9240           <para>
9241             Although the grammar of the <command>keys</command>
9242             clause
9243             allows for multiple keys, only a single key per server is
9244             currently
9245             supported.
9246           </para>
9247
9248           <para>
9249             The <command>transfer-source</command> and
9250             <command>transfer-source-v6</command> clauses specify
9251             the IPv4 and IPv6 source
9252             address to be used for zone transfer with the remote server,
9253             respectively.
9254             For an IPv4 remote server, only <command>transfer-source</command> can
9255             be specified.
9256             Similarly, for an IPv6 remote server, only
9257             <command>transfer-source-v6</command> can be
9258             specified.
9259             For more details, see the description of
9260             <command>transfer-source</command> and
9261             <command>transfer-source-v6</command> in
9262             <xref linkend="zone_transfers"/>.
9263           </para>
9264
9265           <para>
9266             The <command>notify-source</command> and
9267             <command>notify-source-v6</command> clauses specify the
9268             IPv4 and IPv6 source address to be used for notify
9269             messages sent to remote servers, respectively.  For an
9270             IPv4 remote server, only <command>notify-source</command>
9271             can be specified.  Similarly, for an IPv6 remote server,
9272             only <command>notify-source-v6</command> can be specified.
9273           </para>
9274
9275           <para>
9276             The <command>query-source</command> and
9277             <command>query-source-v6</command> clauses specify the
9278             IPv4 and IPv6 source address to be used for queries
9279             sent to remote servers, respectively.  For an IPv4
9280             remote server, only <command>query-source</command> can
9281             be specified.  Similarly, for an IPv6 remote server,
9282             only <command>query-source-v6</command> can be specified.
9283           </para>
9284
9285         </sect2>
9286
9287       <sect2 id="statschannels">
9288         <title><command>statistics-channels</command> Statement Grammar</title>
9289
9290 <programlisting><command>statistics-channels</command> {
9291    [ inet ( ip_addr | * ) [ port ip_port ]
9292    [ allow { <replaceable> address_match_list </replaceable> } ]; ]
9293    [ inet ...; ]
9294 };
9295 </programlisting>
9296       </sect2>
9297
9298       <sect2>
9299           <title><command>statistics-channels</command> Statement Definition and
9300             Usage</title>
9301
9302         <para>
9303           The <command>statistics-channels</command> statement
9304           declares communication channels to be used by system
9305           administrators to get access to statistics information of
9306           the name server.
9307         </para>
9308
9309         <para>
9310           This statement intends to be flexible to support multiple
9311           communication protocols in the future, but currently only
9312           HTTP access is supported.
9313           It requires that BIND 9 be compiled with libxml2;
9314           the <command>statistics-channels</command> statement is
9315           still accepted even if it is built without the library,
9316           but any HTTP access will fail with an error.
9317         </para>
9318
9319         <para>
9320           An <command>inet</command> control channel is a TCP socket
9321           listening at the specified <command>ip_port</command> on the
9322           specified <command>ip_addr</command>, which can be an IPv4 or IPv6
9323           address.  An <command>ip_addr</command> of <literal>*</literal> (asterisk) is
9324           interpreted as the IPv4 wildcard address; connections will be
9325           accepted on any of the system's IPv4 addresses.
9326           To listen on the IPv6 wildcard address,
9327           use an <command>ip_addr</command> of <literal>::</literal>.
9328         </para>
9329
9330         <para>
9331           If no port is specified, port 80 is used for HTTP channels.
9332           The asterisk "<literal>*</literal>" cannot be used for
9333           <command>ip_port</command>.
9334         </para>
9335
9336         <para>
9337           The attempt of opening a statistics channel is
9338           restricted by the optional <command>allow</command> clause.
9339           Connections to the statistics channel are permitted based on the
9340           <command>address_match_list</command>.
9341           If no <command>allow</command> clause is present,
9342           <command>named</command> accepts connection
9343           attempts from any address; since the statistics may
9344           contain sensitive internal information, it is highly
9345           recommended to restrict the source of connection requests
9346           appropriately.
9347         </para>
9348
9349         <para>
9350           If no <command>statistics-channels</command> statement is present,
9351           <command>named</command> will not open any communication channels.
9352         </para>
9353
9354       </sect2>
9355
9356         <sect2 id="trusted-keys">
9357           <title><command>trusted-keys</command> Statement Grammar</title>
9358
9359 <programlisting><command>trusted-keys</command> {
9360     <replaceable>string</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ;
9361     <optional> <replaceable>string</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; <optional>...</optional></optional>
9362 };
9363 </programlisting>
9364
9365         </sect2>
9366         <sect2>
9367           <title><command>trusted-keys</command> Statement Definition
9368             and Usage</title>
9369           <para>
9370             The <command>trusted-keys</command> statement defines
9371             DNSSEC security roots. DNSSEC is described in <xref
9372             linkend="DNSSEC"/>. A security root is defined when the
9373             public key for a non-authoritative zone is known, but
9374             cannot be securely obtained through DNS, either because
9375             it is the DNS root zone or because its parent zone is
9376             unsigned.  Once a key has been configured as a trusted
9377             key, it is treated as if it had been validated and
9378             proven secure. The resolver attempts DNSSEC validation
9379             on all DNS data in subdomains of a security root.
9380           </para>
9381           <para>
9382             All keys (and corresponding zones) listed in
9383             <command>trusted-keys</command> are deemed to exist regardless
9384             of what parent zones say.  Similarly for all keys listed in
9385             <command>trusted-keys</command> only those keys are
9386             used to validate the DNSKEY RRset.  The parent's DS RRset
9387             will not be used.
9388           </para>
9389           <para>
9390             The <command>trusted-keys</command> statement can contain
9391             multiple key entries, each consisting of the key's
9392             domain name, flags, protocol, algorithm, and the Base-64
9393             representation of the key data.
9394             Spaces, tabs, newlines and carriage returns are ignored
9395             in the key data, so the configuration may be split up into
9396             multiple lines.
9397           </para>
9398           <para>
9399             <command>trusted-keys</command> may be set at the top level
9400             of <filename>named.conf</filename> or within a view.  If it is
9401             set in both places, they are additive: keys defined at the top
9402             level are inherited by all views, but keys defined in a view
9403             are only used within that view.
9404           </para>
9405         </sect2>
9406
9407         <sect2>
9408           <title><command>managed-keys</command> Statement Grammar</title>
9409
9410 <programlisting><command>managed-keys</command> {
9411     <replaceable>string</replaceable> initial-key <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ;
9412     <optional> <replaceable>string</replaceable> initial-key <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; <optional>...</optional></optional>
9413 };
9414 </programlisting>
9415
9416         </sect2>
9417         <sect2 id="managed-keys">
9418           <title><command>managed-keys</command> Statement Definition
9419             and Usage</title>
9420           <para>
9421             The <command>managed-keys</command> statement, like 
9422             <command>trusted-keys</command>, defines DNSSEC
9423             security roots.  The difference is that
9424             <command>managed-keys</command> can be kept up to date
9425             automatically, without intervention from the resolver
9426             operator.
9427           </para>
9428           <para>
9429             Suppose, for example, that a zone's key-signing
9430             key was compromised, and the zone owner had to revoke and
9431             replace the key.  A resolver which had the old key in a
9432             <command>trusted-keys</command> statement would be
9433             unable to validate this zone any longer; it would
9434             reply with a SERVFAIL response code.  This would
9435             continue until the resolver operator had updated the
9436             <command>trusted-keys</command> statement with the new key.
9437           </para>
9438           <para>
9439             If, however, the zone were listed in a
9440             <command>managed-keys</command> statement instead, then the
9441             zone owner could add a "stand-by" key to the zone in advance.
9442             <command>named</command> would store the stand-by key, and
9443             when the original key was revoked, <command>named</command>
9444             would be able to transition smoothly to the new key.  It would
9445             also recognize that the old key had been revoked, and cease
9446             using that key to validate answers, minimizing the damage that
9447             the compromised key could do.
9448           </para>
9449           <para>
9450             A <command>managed-keys</command> statement contains a list of
9451             the keys to be managed, along with information about how the
9452             keys are to be initialized for the first time.  The only
9453             initialization method currently supported (as of
9454             <acronym>BIND</acronym> 9.7.0) is <literal>initial-key</literal>.
9455             This means the <command>managed-keys</command> statement must
9456             contain a copy of the initializing key.  (Future releases may
9457             allow keys to be initialized by other methods, eliminating this
9458             requirement.)
9459           </para>
9460           <para>
9461             Consequently, a <command>managed-keys</command> statement
9462             appears similar to a <command>trusted-keys</command>, differing
9463             in the presence of the second field, containing the keyword
9464             <literal>initial-key</literal>.  The difference is, whereas the
9465             keys listed in a <command>trusted-keys</command> continue to be
9466             trusted until they are removed from
9467             <filename>named.conf</filename>, an initializing key listed 
9468             in a <command>managed-keys</command> statement is only trusted
9469             <emphasis>once</emphasis>: for as long as it takes to load the
9470             managed key database and start the RFC 5011 key maintenance
9471             process.
9472           </para>
9473           <para>
9474             The first time <command>named</command> runs with a managed key
9475             configured in <filename>named.conf</filename>, it fetches the
9476             DNSKEY RRset directly from the zone apex, and validates it
9477             using the key specified in the <command>managed-keys</command>
9478             statement.  If the DNSKEY RRset is validly signed, then it is
9479             used as the basis for a new managed keys database.
9480           </para>
9481           <para>
9482             From that point on, whenever <command>named</command> runs, it
9483             sees the <command>managed-keys</command> statement, checks to
9484             make sure RFC 5011 key maintenance has already been initialized
9485             for the specified domain, and if so, it simply moves on.  The
9486             key specified in the <command>managed-keys</command> is not
9487             used to validate answers; it has been superseded by the key or
9488             keys stored in the managed keys database.
9489           </para>
9490           <para>
9491             The next time <command>named</command> runs after a name
9492             has been <emphasis>removed</emphasis> from the
9493             <command>managed-keys</command> statement, the corresponding
9494             zone will be removed from the managed keys database,
9495             and RFC 5011 key maintenance will no longer be used for that
9496             domain.
9497           </para>
9498           <para>
9499             <command>named</command> only maintains a single managed keys
9500             database; consequently, unlike <command>trusted-keys</command>,
9501             <command>managed-keys</command> may only be set at the top
9502             level of <filename>named.conf</filename>, not within a view.
9503           </para>
9504           <para>
9505             In the current implementation, the managed keys database is
9506             stored as a master-format zone file called
9507             <filename>managed-keys.bind</filename>.  When the key database
9508             is changed, the zone is updated.  As with any other dynamic
9509             zone, changes will be written into a journal file,
9510             <filename>managed-keys.bind.jnl</filename>.  They are committed
9511             to the master file as soon as possible afterward; in the case
9512             of the managed key database, this will usually occur within 30
9513             seconds.  So, whenever <command>named</command> is using
9514             automatic key maintenace, those two files can be expected to
9515             exist in the working directory.  (For this reason among others,
9516             the working directory should be always be writable by
9517             <command>named</command>.)
9518           </para>
9519           <para>
9520             If the <command>dnssec-lookaside</command> option is
9521             set to <userinput>auto</userinput>, <command>named</command>
9522             will automatically initialize a managed key for the
9523             zone <literal>dlv.isc.org</literal>.  The key that is
9524             used to initialize the key maintenance process is built
9525             into <command>named</command>, and can be overridden
9526             from <command>bindkeys-file</command>.
9527           </para>
9528         </sect2>
9529
9530         <sect2 id="view_statement_grammar">
9531           <title><command>view</command> Statement Grammar</title>
9532
9533 <programlisting><command>view</command> <replaceable>view_name</replaceable>
9534       <optional><replaceable>class</replaceable></optional> {
9535       match-clients { <replaceable>address_match_list</replaceable> };
9536       match-destinations { <replaceable>address_match_list</replaceable> };
9537       match-recursive-only <replaceable>yes_or_no</replaceable> ;
9538       <optional> <replaceable>view_option</replaceable>; ...</optional>
9539       <optional> <replaceable>zone_statement</replaceable>; ...</optional>
9540 };
9541 </programlisting>
9542
9543         </sect2>
9544         <sect2>
9545           <title><command>view</command> Statement Definition and Usage</title>
9546
9547           <para>
9548             The <command>view</command> statement is a powerful
9549             feature
9550             of <acronym>BIND</acronym> 9 that lets a name server
9551             answer a DNS query differently
9552             depending on who is asking. It is particularly useful for
9553             implementing
9554             split DNS setups without having to run multiple servers.
9555           </para>
9556
9557           <para>
9558             Each <command>view</command> statement defines a view
9559             of the
9560             DNS namespace that will be seen by a subset of clients.  A client
9561             matches
9562             a view if its source IP address matches the
9563             <varname>address_match_list</varname> of the view's
9564             <command>match-clients</command> clause and its
9565             destination IP address matches
9566             the <varname>address_match_list</varname> of the
9567             view's
9568             <command>match-destinations</command> clause.  If not
9569             specified, both
9570             <command>match-clients</command> and <command>match-destinations</command>
9571             default to matching all addresses.  In addition to checking IP
9572             addresses
9573             <command>match-clients</command> and <command>match-destinations</command>
9574             can also take <command>keys</command> which provide an
9575             mechanism for the
9576             client to select the view.  A view can also be specified
9577             as <command>match-recursive-only</command>, which
9578             means that only recursive
9579             requests from matching clients will match that view.
9580             The order of the <command>view</command> statements is
9581             significant &mdash;
9582             a client request will be resolved in the context of the first
9583             <command>view</command> that it matches.
9584           </para>
9585
9586           <para>
9587             Zones defined within a <command>view</command>
9588             statement will
9589             only be accessible to clients that match the <command>view</command>.
9590             By defining a zone of the same name in multiple views, different
9591             zone data can be given to different clients, for example,
9592             "internal"
9593             and "external" clients in a split DNS setup.
9594           </para>
9595
9596           <para>
9597             Many of the options given in the <command>options</command> statement
9598             can also be used within a <command>view</command>
9599             statement, and then
9600             apply only when resolving queries with that view.  When no
9601             view-specific
9602             value is given, the value in the <command>options</command> statement
9603             is used as a default.  Also, zone options can have default values
9604             specified
9605             in the <command>view</command> statement; these
9606             view-specific defaults
9607             take precedence over those in the <command>options</command> statement.
9608           </para>
9609
9610           <para>
9611             Views are class specific.  If no class is given, class IN
9612             is assumed.  Note that all non-IN views must contain a hint zone,
9613             since only the IN class has compiled-in default hints.
9614           </para>
9615
9616           <para>
9617             If there are no <command>view</command> statements in
9618             the config
9619             file, a default view that matches any client is automatically
9620             created
9621             in class IN. Any <command>zone</command> statements
9622             specified on
9623             the top level of the configuration file are considered to be part
9624             of
9625             this default view, and the <command>options</command>
9626             statement will
9627             apply to the default view. If any explicit <command>view</command>
9628             statements are present, all <command>zone</command>
9629             statements must
9630             occur inside <command>view</command> statements.
9631           </para>
9632
9633           <para>
9634             Here is an example of a typical split DNS setup implemented
9635             using <command>view</command> statements:
9636           </para>
9637
9638 <programlisting>view "internal" {
9639       // This should match our internal networks.
9640       match-clients { 10.0.0.0/8; };
9641
9642       // Provide recursive service to internal
9643       // clients only.
9644       recursion yes;
9645
9646       // Provide a complete view of the example.com
9647       // zone including addresses of internal hosts.
9648       zone "example.com" {
9649             type master;
9650             file "example-internal.db";
9651       };
9652 };
9653
9654 view "external" {
9655       // Match all clients not matched by the
9656       // previous view.
9657       match-clients { any; };
9658
9659       // Refuse recursive service to external clients.
9660       recursion no;
9661
9662       // Provide a restricted view of the example.com
9663       // zone containing only publicly accessible hosts.
9664       zone "example.com" {
9665            type master;
9666            file "example-external.db";
9667       };
9668 };
9669 </programlisting>
9670
9671         </sect2>
9672         <sect2 id="zone_statement_grammar">
9673           <title><command>zone</command>
9674             Statement Grammar</title>
9675
9676 <programlisting><command>zone</command> <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
9677     type master;
9678     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
9679     <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
9680     <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
9681     <optional> allow-update { <replaceable>address_match_list</replaceable> }; </optional>
9682     <optional> update-policy <replaceable>local</replaceable> | { <replaceable>update_policy_rule</replaceable> <optional>...</optional> }; </optional>
9683     <optional> also-notify { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
9684                   <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
9685     <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
9686     <optional> check-mx (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
9687     <optional> check-wildcard <replaceable>yes_or_no</replaceable>; </optional>
9688     <optional> check-integrity <replaceable>yes_or_no</replaceable> ; </optional>
9689     <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
9690     <optional> file <replaceable>string</replaceable> ; </optional>
9691     <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
9692     <optional> journal <replaceable>string</replaceable> ; </optional>
9693     <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
9694     <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
9695     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
9696     <optional> ixfr-base <replaceable>string</replaceable> ; </optional>
9697     <optional> ixfr-from-differences <replaceable>yes_or_no</replaceable>; </optional>
9698     <optional> ixfr-tmp-file <replaceable>string</replaceable> ; </optional>
9699     <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable> ; </optional>
9700     <optional> max-ixfr-log-size <replaceable>number</replaceable> ; </optional>
9701     <optional> max-transfer-idle-out <replaceable>number</replaceable> ; </optional>
9702     <optional> max-transfer-time-out <replaceable>number</replaceable> ; </optional>
9703     <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable> ; </optional>
9704     <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
9705     <optional> notify-to-soa <replaceable>yes_or_no</replaceable>; </optional>
9706     <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
9707     <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9708     <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9709     <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
9710     <optional> sig-validity-interval <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
9711     <optional> sig-signing-nodes <replaceable>number</replaceable> ; </optional>
9712     <optional> sig-signing-signatures <replaceable>number</replaceable> ; </optional>
9713     <optional> sig-signing-type <replaceable>number</replaceable> ; </optional>
9714     <optional> database <replaceable>string</replaceable> ; </optional>
9715     <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
9716     <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
9717     <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
9718     <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
9719     <optional> key-directory <replaceable>path_name</replaceable>; </optional>
9720     <optional> auto-dnssec <constant>allow</constant>|<constant>maintain</constant>|<constant>create</constant>|<constant>off</constant>; </optional>
9721     <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
9722 };
9723
9724 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
9725     type slave;
9726     <optional> allow-notify { <replaceable>address_match_list</replaceable> }; </optional>
9727     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
9728     <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
9729     <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
9730     <optional> allow-update-forwarding { <replaceable>address_match_list</replaceable> }; </optional>
9731     <optional> update-check-ksk <replaceable>yes_or_no</replaceable>; </optional>
9732     <optional> dnssec-dnskey-kskonly <replaceable>yes_or_no</replaceable>; </optional>
9733     <optional> dnssec-secure-to-insecure <replaceable>yes_or_no</replaceable> ; </optional>
9734     <optional> try-tcp-refresh <replaceable>yes_or_no</replaceable>; </optional>
9735     <optional> also-notify { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ;
9736                   <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
9737     <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
9738     <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
9739     <optional> file <replaceable>string</replaceable> ; </optional>
9740     <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
9741     <optional> journal <replaceable>string</replaceable> ; </optional>
9742     <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
9743     <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
9744     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
9745     <optional> ixfr-base <replaceable>string</replaceable> ; </optional>
9746     <optional> ixfr-from-differences <replaceable>yes_or_no</replaceable>; </optional>
9747     <optional> ixfr-tmp-file <replaceable>string</replaceable> ; </optional>
9748     <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable> ; </optional>
9749     <optional> masters <optional>port <replaceable>ip_port</replaceable></optional> { ( <replaceable>masters_list</replaceable> | <replaceable>ip_addr</replaceable>
9750                               <optional>port <replaceable>ip_port</replaceable></optional>
9751                               <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> }; </optional>
9752     <optional> max-ixfr-log-size <replaceable>number</replaceable> ; </optional>
9753     <optional> max-transfer-idle-in <replaceable>number</replaceable> ; </optional>
9754     <optional> max-transfer-idle-out <replaceable>number</replaceable> ; </optional>
9755     <optional> max-transfer-time-in <replaceable>number</replaceable> ; </optional>
9756     <optional> max-transfer-time-out <replaceable>number</replaceable> ; </optional>
9757     <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable> ; </optional>
9758     <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
9759     <optional> notify-to-soa <replaceable>yes_or_no</replaceable>; </optional>
9760     <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
9761     <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9762     <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9763     <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9764     <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
9765                              <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9766     <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
9767     <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9768     <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9769     <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
9770     <optional> database <replaceable>string</replaceable> ; </optional>
9771     <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
9772     <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
9773     <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
9774     <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
9775     <optional> multi-master <replaceable>yes_or_no</replaceable> ; </optional>
9776     <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
9777 };
9778
9779 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
9780     type hint;
9781     file <replaceable>string</replaceable> ;
9782     <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
9783     <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional> // Not Implemented.
9784 };
9785
9786 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
9787     type stub;
9788     <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
9789     <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
9790     <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
9791     <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
9792     <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
9793     <optional> file <replaceable>string</replaceable> ; </optional>
9794     <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
9795     <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
9796     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
9797     <optional> masters <optional>port <replaceable>ip_port</replaceable></optional> { ( <replaceable>masters_list</replaceable> | <replaceable>ip_addr</replaceable>
9798                               <optional>port <replaceable>ip_port</replaceable></optional>
9799                               <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> }; </optional>
9800     <optional> max-transfer-idle-in <replaceable>number</replaceable> ; </optional>
9801     <optional> max-transfer-time-in <replaceable>number</replaceable> ; </optional>
9802     <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
9803     <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9804     <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
9805                          <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9806     <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9807     <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
9808                             <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
9809     <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
9810     <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
9811     <optional> database <replaceable>string</replaceable> ; </optional>
9812     <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
9813     <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
9814     <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
9815     <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
9816     <optional> multi-master <replaceable>yes_or_no</replaceable> ; </optional>
9817 };
9818
9819 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
9820     type forward;
9821     <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
9822     <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> ; ... </optional> }; </optional>
9823     <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
9824 };
9825
9826 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
9827     type delegation-only;
9828 };
9829
9830 </programlisting>
9831
9832         </sect2>
9833         <sect2>
9834           <title><command>zone</command> Statement Definition and Usage</title>
9835           <sect3>
9836             <title>Zone Types</title>
9837             <informaltable colsep="0" rowsep="0">
9838               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
9839                 <!--colspec colname="1" colnum="1" colsep="0" colwidth="1.108in"/-->
9840                 <!--colspec colname="2" colnum="2" colsep="0" colwidth="4.017in"/-->
9841                 <colspec colname="1" colnum="1" colsep="0"/>
9842                 <colspec colname="2" colnum="2" colsep="0" colwidth="4.017in"/>
9843                 <tbody>
9844                   <row rowsep="0">
9845                     <entry colname="1">
9846                       <para>
9847                         <varname>master</varname>
9848                       </para>
9849                     </entry>
9850                     <entry colname="2">
9851                       <para>
9852                         The server has a master copy of the data
9853                         for the zone and will be able to provide authoritative
9854                         answers for
9855                         it.
9856                       </para>
9857                     </entry>
9858                   </row>
9859                   <row rowsep="0">
9860                     <entry colname="1">
9861                       <para>
9862                         <varname>slave</varname>
9863                       </para>
9864                     </entry>
9865                     <entry colname="2">
9866                       <para>
9867                         A slave zone is a replica of a master
9868                         zone. The <command>masters</command> list
9869                         specifies one or more IP addresses
9870                         of master servers that the slave contacts to update
9871                         its copy of the zone.
9872                         Masters list elements can also be names of other
9873                         masters lists.
9874                         By default, transfers are made from port 53 on the
9875                         servers; this can
9876                         be changed for all servers by specifying a port number
9877                         before the
9878                         list of IP addresses, or on a per-server basis after
9879                         the IP address.
9880                         Authentication to the master can also be done with
9881                         per-server TSIG keys.
9882                         If a file is specified, then the
9883                         replica will be written to this file whenever the zone
9884                         is changed,
9885                         and reloaded from this file on a server restart. Use
9886                         of a file is
9887                         recommended, since it often speeds server startup and
9888                         eliminates
9889                         a needless waste of bandwidth. Note that for large
9890                         numbers (in the
9891                         tens or hundreds of thousands) of zones per server, it
9892                         is best to
9893                         use a two-level naming scheme for zone filenames. For
9894                         example,
9895                         a slave server for the zone <literal>example.com</literal> might place
9896                         the zone contents into a file called
9897                         <filename>ex/example.com</filename> where <filename>ex/</filename> is
9898                         just the first two letters of the zone name. (Most
9899                         operating systems
9900                         behave very slowly if you put 100000 files into
9901                         a single directory.)
9902                       </para>
9903                     </entry>
9904                   </row>
9905                   <row rowsep="0">
9906                     <entry colname="1">
9907                       <para>
9908                         <varname>stub</varname>
9909                       </para>
9910                     </entry>
9911                     <entry colname="2">
9912                       <para>
9913                         A stub zone is similar to a slave zone,
9914                         except that it replicates only the NS records of a
9915                         master zone instead
9916                         of the entire zone. Stub zones are not a standard part
9917                         of the DNS;
9918                         they are a feature specific to the <acronym>BIND</acronym> implementation.
9919                       </para>
9920
9921                       <para>
9922                         Stub zones can be used to eliminate the need for glue
9923                         NS record
9924                         in a parent zone at the expense of maintaining a stub
9925                         zone entry and
9926                         a set of name server addresses in <filename>named.conf</filename>.
9927                         This usage is not recommended for new configurations,
9928                         and BIND 9
9929                         supports it only in a limited way.
9930                         In <acronym>BIND</acronym> 4/8, zone
9931                         transfers of a parent zone
9932                         included the NS records from stub children of that
9933                         zone. This meant
9934                         that, in some cases, users could get away with
9935                         configuring child stubs
9936                         only in the master server for the parent zone. <acronym>BIND</acronym>
9937                         9 never mixes together zone data from different zones
9938                         in this
9939                         way. Therefore, if a <acronym>BIND</acronym> 9 master serving a parent
9940                         zone has child stub zones configured, all the slave
9941                         servers for the
9942                         parent zone also need to have the same child stub
9943                         zones
9944                         configured.
9945                       </para>
9946
9947                       <para>
9948                         Stub zones can also be used as a way of forcing the
9949                         resolution
9950                         of a given domain to use a particular set of
9951                         authoritative servers.
9952                         For example, the caching name servers on a private
9953                         network using
9954                         RFC1918 addressing may be configured with stub zones
9955                         for
9956                         <literal>10.in-addr.arpa</literal>
9957                         to use a set of internal name servers as the
9958                         authoritative
9959                         servers for that domain.
9960                       </para>
9961                     </entry>
9962                   </row>
9963                   <row rowsep="0">
9964                     <entry colname="1">
9965                       <para>
9966                         <varname>forward</varname>
9967                       </para>
9968                     </entry>
9969                     <entry colname="2">
9970                       <para>
9971                         A "forward zone" is a way to configure
9972                         forwarding on a per-domain basis.  A <command>zone</command> statement
9973                         of type <command>forward</command> can
9974                         contain a <command>forward</command>
9975                         and/or <command>forwarders</command>
9976                         statement,
9977                         which will apply to queries within the domain given by
9978                         the zone
9979                         name. If no <command>forwarders</command>
9980                         statement is present or
9981                         an empty list for <command>forwarders</command> is given, then no
9982                         forwarding will be done for the domain, canceling the
9983                         effects of
9984                         any forwarders in the <command>options</command> statement. Thus
9985                         if you want to use this type of zone to change the
9986                         behavior of the
9987                         global <command>forward</command> option
9988                         (that is, "forward first"
9989                         to, then "forward only", or vice versa, but want to
9990                         use the same
9991                         servers as set globally) you need to re-specify the
9992                         global forwarders.
9993                       </para>
9994                     </entry>
9995                   </row>
9996                   <row rowsep="0">
9997                     <entry colname="1">
9998                       <para>
9999                         <varname>hint</varname>
10000                       </para>
10001                     </entry>
10002                     <entry colname="2">
10003                       <para>
10004                         The initial set of root name servers is
10005                         specified using a "hint zone". When the server starts
10006                         up, it uses
10007                         the root hints to find a root name server and get the
10008                         most recent
10009                         list of root name servers. If no hint zone is
10010                         specified for class
10011                         IN, the server uses a compiled-in default set of root
10012                         servers hints.
10013                         Classes other than IN have no built-in defaults hints.
10014                       </para>
10015                     </entry>
10016                   </row>
10017                   <row rowsep="0">
10018                     <entry colname="1">
10019                       <para>
10020                         <varname>delegation-only</varname>
10021                       </para>
10022                     </entry>
10023                     <entry colname="2">
10024                       <para>
10025                         This is used to enforce the delegation-only
10026                         status of infrastructure zones (e.g. COM,
10027                         NET, ORG).  Any answer that is received
10028                         without an explicit or implicit delegation
10029                         in the authority section will be treated
10030                         as NXDOMAIN.  This does not apply to the
10031                         zone apex.  This should not be applied to
10032                         leaf zones.
10033                       </para>
10034                       <para>
10035                         <varname>delegation-only</varname> has no
10036                         effect on answers received from forwarders.
10037                       </para>
10038                       <para>
10039                         See caveats in <xref linkend="root_delegation_only"/>.
10040                       </para>
10041                     </entry>
10042                   </row>
10043                 </tbody>
10044               </tgroup>
10045             </informaltable>
10046           </sect3>
10047
10048           <sect3>
10049             <title>Class</title>
10050             <para>
10051               The zone's name may optionally be followed by a class. If
10052               a class is not specified, class <literal>IN</literal> (for <varname>Internet</varname>),
10053               is assumed. This is correct for the vast majority of cases.
10054             </para>
10055             <para>
10056               The <literal>hesiod</literal> class is
10057               named for an information service from MIT's Project Athena. It
10058               is
10059               used to share information about various systems databases, such
10060               as users, groups, printers and so on. The keyword
10061               <literal>HS</literal> is
10062               a synonym for hesiod.
10063             </para>
10064             <para>
10065               Another MIT development is Chaosnet, a LAN protocol created
10066               in the mid-1970s. Zone data for it can be specified with the <literal>CHAOS</literal> class.
10067             </para>
10068           </sect3>
10069           <sect3>
10070
10071             <title>Zone Options</title>
10072
10073             <variablelist>
10074
10075               <varlistentry>
10076                 <term><command>allow-notify</command></term>
10077                 <listitem>
10078                   <para>
10079                     See the description of
10080                     <command>allow-notify</command> in <xref linkend="access_control"/>.
10081                   </para>
10082                 </listitem>
10083               </varlistentry>
10084
10085               <varlistentry>
10086                 <term><command>allow-query</command></term>
10087                 <listitem>
10088                   <para>
10089                     See the description of
10090                     <command>allow-query</command> in <xref linkend="access_control"/>.
10091                   </para>
10092                 </listitem>
10093               </varlistentry>
10094
10095               <varlistentry>
10096                 <term><command>allow-query-on</command></term>
10097                 <listitem>
10098                   <para>
10099                     See the description of
10100                     <command>allow-query-on</command> in <xref linkend="access_control"/>.
10101                   </para>
10102                 </listitem>
10103               </varlistentry>
10104
10105               <varlistentry>
10106                 <term><command>allow-transfer</command></term>
10107                 <listitem>
10108                   <para>
10109                     See the description of <command>allow-transfer</command>
10110                     in <xref linkend="access_control"/>.
10111                   </para>
10112                 </listitem>
10113               </varlistentry>
10114
10115               <varlistentry>
10116                 <term><command>allow-update</command></term>
10117                 <listitem>
10118                   <para>
10119                     See the description of <command>allow-update</command>
10120                     in <xref linkend="access_control"/>.
10121                   </para>
10122                 </listitem>
10123               </varlistentry>
10124
10125               <varlistentry>
10126                 <term><command>update-policy</command></term>
10127                 <listitem>
10128                   <para>
10129                     Specifies a "Simple Secure Update" policy. See
10130                     <xref linkend="dynamic_update_policies"/>.
10131                   </para>
10132                 </listitem>
10133               </varlistentry>
10134
10135               <varlistentry>
10136                 <term><command>allow-update-forwarding</command></term>
10137                 <listitem>
10138                   <para>
10139                     See the description of <command>allow-update-forwarding</command>
10140                     in <xref linkend="access_control"/>.
10141                   </para>
10142                 </listitem>
10143               </varlistentry>
10144
10145               <varlistentry>
10146                 <term><command>also-notify</command></term>
10147                 <listitem>
10148                   <para>
10149                     Only meaningful if <command>notify</command>
10150                     is
10151                     active for this zone. The set of machines that will
10152                     receive a
10153                     <literal>DNS NOTIFY</literal> message
10154                     for this zone is made up of all the listed name servers
10155                     (other than
10156                     the primary master) for the zone plus any IP addresses
10157                     specified
10158                     with <command>also-notify</command>. A port
10159                     may be specified
10160                     with each <command>also-notify</command>
10161                     address to send the notify
10162                     messages to a port other than the default of 53.
10163                     <command>also-notify</command> is not
10164                     meaningful for stub zones.
10165                     The default is the empty list.
10166                   </para>
10167                 </listitem>
10168               </varlistentry>
10169
10170               <varlistentry>
10171                 <term><command>check-names</command></term>
10172                 <listitem>
10173                   <para>
10174                     This option is used to restrict the character set and
10175                     syntax of
10176                     certain domain names in master files and/or DNS responses
10177                     received from the
10178                     network.  The default varies according to zone type.  For <command>master</command> zones the default is <command>fail</command>.  For <command>slave</command>
10179                     zones the default is <command>warn</command>.
10180                     It is not implemented for <command>hint</command> zones.
10181                   </para>
10182                 </listitem>
10183               </varlistentry>
10184
10185               <varlistentry>
10186                 <term><command>check-mx</command></term>
10187                 <listitem>
10188                   <para>
10189                     See the description of
10190                     <command>check-mx</command> in <xref linkend="boolean_options"/>.
10191                   </para>
10192                 </listitem>
10193               </varlistentry>
10194
10195               <varlistentry>
10196                 <term><command>check-wildcard</command></term>
10197                 <listitem>
10198                   <para>
10199                     See the description of
10200                     <command>check-wildcard</command> in <xref linkend="boolean_options"/>.
10201                   </para>
10202                 </listitem>
10203               </varlistentry>
10204
10205               <varlistentry>
10206                 <term><command>check-integrity</command></term>
10207                 <listitem>
10208                   <para>
10209                     See the description of
10210                     <command>check-integrity</command> in <xref linkend="boolean_options"/>.
10211                   </para>
10212                 </listitem>
10213               </varlistentry>
10214
10215               <varlistentry>
10216                 <term><command>check-sibling</command></term>
10217                 <listitem>
10218                   <para>
10219                     See the description of
10220                     <command>check-sibling</command> in <xref linkend="boolean_options"/>.
10221                   </para>
10222                 </listitem>
10223               </varlistentry>
10224
10225               <varlistentry>
10226                 <term><command>zero-no-soa-ttl</command></term>
10227                 <listitem>
10228                   <para>
10229                     See the description of
10230                     <command>zero-no-soa-ttl</command> in <xref linkend="boolean_options"/>.
10231                   </para>
10232                 </listitem>
10233               </varlistentry>
10234
10235               <varlistentry>
10236                 <term><command>update-check-ksk</command></term>
10237                 <listitem>
10238                   <para>
10239                     See the description of
10240                     <command>update-check-ksk</command> in <xref linkend="boolean_options"/>.
10241                   </para>
10242                 </listitem>
10243               </varlistentry>
10244
10245               <varlistentry>
10246                 <term><command>dnssec-dnskey-kskonly</command></term>
10247                 <listitem>
10248                   <para>
10249                     See the description of
10250                     <command>dnssec-dnskey-kskonly</command> in <xref linkend="boolean_options"/>.
10251                   </para>
10252                 </listitem>
10253               </varlistentry>
10254
10255               <varlistentry>
10256                 <term><command>try-tcp-refresh</command></term>
10257                 <listitem>
10258                   <para>
10259                     See the description of
10260                     <command>try-tcp-refresh</command> in <xref linkend="boolean_options"/>.
10261                   </para>
10262                 </listitem>
10263               </varlistentry>
10264
10265               <varlistentry>
10266                 <term><command>database</command></term>
10267                 <listitem>
10268                   <para>
10269                     Specify the type of database to be used for storing the
10270                     zone data.  The string following the <command>database</command> keyword
10271                     is interpreted as a list of whitespace-delimited words.
10272                     The first word
10273                     identifies the database type, and any subsequent words are
10274                     passed
10275                     as arguments to the database to be interpreted in a way
10276                     specific
10277                     to the database type.
10278                   </para>
10279                   <para>
10280                     The default is <userinput>"rbt"</userinput>, BIND 9's
10281                     native in-memory
10282                     red-black-tree database.  This database does not take
10283                     arguments.
10284                   </para>
10285                   <para>
10286                     Other values are possible if additional database drivers
10287                     have been linked into the server.  Some sample drivers are
10288                     included
10289                     with the distribution but none are linked in by default.
10290                   </para>
10291                 </listitem>
10292               </varlistentry>
10293
10294               <varlistentry>
10295                 <term><command>dialup</command></term>
10296                 <listitem>
10297                   <para>
10298                     See the description of
10299                     <command>dialup</command> in <xref linkend="boolean_options"/>.
10300                   </para>
10301                 </listitem>
10302               </varlistentry>
10303
10304               <varlistentry>
10305                 <term><command>delegation-only</command></term>
10306                 <listitem>
10307                   <para>
10308                     The flag only applies to hint and stub zones.  If set
10309                     to <userinput>yes</userinput>, then the zone will also be
10310                     treated as if it is also a delegation-only type zone.
10311                   </para>
10312                   <para>
10313                     See caveats in <xref linkend="root_delegation_only"/>.
10314                   </para>
10315                 </listitem>
10316               </varlistentry>
10317
10318               <varlistentry>
10319                 <term><command>forward</command></term>
10320                 <listitem>
10321                   <para>
10322                     Only meaningful if the zone has a forwarders
10323                     list. The <command>only</command> value causes
10324                     the lookup to fail
10325                     after trying the forwarders and getting no answer, while <command>first</command> would
10326                     allow a normal lookup to be tried.
10327                   </para>
10328                 </listitem>
10329               </varlistentry>
10330
10331               <varlistentry>
10332                 <term><command>forwarders</command></term>
10333                 <listitem>
10334                   <para>
10335                     Used to override the list of global forwarders.
10336                     If it is not specified in a zone of type <command>forward</command>,
10337                     no forwarding is done for the zone and the global options are
10338                     not used.
10339                   </para>
10340                 </listitem>
10341               </varlistentry>
10342
10343               <varlistentry>
10344                 <term><command>ixfr-base</command></term>
10345                 <listitem>
10346                   <para>
10347                     Was used in <acronym>BIND</acronym> 8 to
10348                     specify the name
10349                     of the transaction log (journal) file for dynamic update
10350                     and IXFR.
10351                     <acronym>BIND</acronym> 9 ignores the option
10352                     and constructs the name of the journal
10353                     file by appending "<filename>.jnl</filename>"
10354                     to the name of the
10355                     zone file.
10356                   </para>
10357                 </listitem>
10358               </varlistentry>
10359
10360               <varlistentry>
10361                 <term><command>ixfr-tmp-file</command></term>
10362                 <listitem>
10363                   <para>
10364                     Was an undocumented option in <acronym>BIND</acronym> 8.
10365                     Ignored in <acronym>BIND</acronym> 9.
10366                   </para>
10367                 </listitem>
10368               </varlistentry>
10369
10370               <varlistentry>
10371                 <term><command>journal</command></term>
10372                 <listitem>
10373                   <para>
10374                     Allow the default journal's filename to be overridden.
10375                     The default is the zone's filename with "<filename>.jnl</filename>" appended.
10376                     This is applicable to <command>master</command> and <command>slave</command> zones.
10377                   </para>
10378                 </listitem>
10379               </varlistentry>
10380
10381               <varlistentry>
10382                 <term><command>max-journal-size</command></term>
10383                 <listitem>
10384                   <para>
10385                     See the description of
10386                     <command>max-journal-size</command> in <xref linkend="server_resource_limits"/>.
10387                   </para>
10388                 </listitem>
10389               </varlistentry>
10390
10391               <varlistentry>
10392                 <term><command>max-transfer-time-in</command></term>
10393                 <listitem>
10394                   <para>
10395                     See the description of
10396                     <command>max-transfer-time-in</command> in <xref linkend="zone_transfers"/>.
10397                   </para>
10398                 </listitem>
10399               </varlistentry>
10400
10401               <varlistentry>
10402                 <term><command>max-transfer-idle-in</command></term>
10403                 <listitem>
10404                   <para>
10405                     See the description of
10406                     <command>max-transfer-idle-in</command> in <xref linkend="zone_transfers"/>.
10407                   </para>
10408                 </listitem>
10409               </varlistentry>
10410
10411               <varlistentry>
10412                 <term><command>max-transfer-time-out</command></term>
10413                 <listitem>
10414                   <para>
10415                     See the description of
10416                     <command>max-transfer-time-out</command> in <xref linkend="zone_transfers"/>.
10417                   </para>
10418                 </listitem>
10419               </varlistentry>
10420
10421               <varlistentry>
10422                 <term><command>max-transfer-idle-out</command></term>
10423                 <listitem>
10424                   <para>
10425                     See the description of
10426                     <command>max-transfer-idle-out</command> in <xref linkend="zone_transfers"/>.
10427                   </para>
10428                 </listitem>
10429               </varlistentry>
10430
10431               <varlistentry>
10432                 <term><command>notify</command></term>
10433                 <listitem>
10434                   <para>
10435                     See the description of
10436                     <command>notify</command> in <xref linkend="boolean_options"/>.
10437                   </para>
10438                 </listitem>
10439               </varlistentry>
10440
10441               <varlistentry>
10442                 <term><command>notify-delay</command></term>
10443                 <listitem>
10444                   <para>
10445                     See the description of
10446                     <command>notify-delay</command> in <xref linkend="tuning"/>.
10447                   </para>
10448                 </listitem>
10449               </varlistentry>
10450
10451               <varlistentry>
10452                 <term><command>notify-to-soa</command></term>
10453                 <listitem>
10454                   <para>
10455                     See the description of
10456                     <command>notify-to-soa</command> in
10457                     <xref linkend="boolean_options"/>.
10458                   </para>
10459                 </listitem>
10460               </varlistentry>
10461
10462               <varlistentry>
10463                 <term><command>pubkey</command></term>
10464                 <listitem>
10465                   <para>
10466                     In <acronym>BIND</acronym> 8, this option was
10467                     intended for specifying
10468                     a public zone key for verification of signatures in DNSSEC
10469                     signed
10470                     zones when they are loaded from disk. <acronym>BIND</acronym> 9 does not verify signatures
10471                     on load and ignores the option.
10472                   </para>
10473                 </listitem>
10474               </varlistentry>
10475
10476               <varlistentry>
10477                 <term><command>zone-statistics</command></term>
10478                 <listitem>
10479                   <para>
10480                     If <userinput>yes</userinput>, the server will keep
10481                     statistical
10482                     information for this zone, which can be dumped to the
10483                     <command>statistics-file</command> defined in
10484                     the server options.
10485                   </para>
10486                 </listitem>
10487               </varlistentry>
10488
10489               <varlistentry>
10490                 <term><command>sig-validity-interval</command></term>
10491                 <listitem>
10492                   <para>
10493                     See the description of
10494                     <command>sig-validity-interval</command> in <xref linkend="tuning"/>.
10495                   </para>
10496                 </listitem>
10497               </varlistentry>
10498
10499               <varlistentry>
10500                 <term><command>sig-signing-nodes</command></term>
10501                 <listitem>
10502                   <para>
10503                     See the description of
10504                     <command>sig-signing-nodes</command> in <xref linkend="tuning"/>.
10505                   </para>
10506                 </listitem>
10507               </varlistentry>
10508
10509               <varlistentry>
10510                 <term><command>sig-signing-signatures</command></term>
10511                 <listitem>
10512                   <para>
10513                     See the description of
10514                     <command>sig-signing-signatures</command> in <xref linkend="tuning"/>.
10515                   </para>
10516                 </listitem>
10517               </varlistentry>
10518
10519               <varlistentry>
10520                 <term><command>sig-signing-type</command></term>
10521                 <listitem>
10522                   <para>
10523                     See the description of
10524                     <command>sig-signing-type</command> in <xref linkend="tuning"/>.
10525                   </para>
10526                 </listitem>
10527               </varlistentry>
10528
10529               <varlistentry>
10530                 <term><command>transfer-source</command></term>
10531                 <listitem>
10532                   <para>
10533                     See the description of
10534                     <command>transfer-source</command> in <xref linkend="zone_transfers"/>.
10535                   </para>
10536                 </listitem>
10537               </varlistentry>
10538
10539               <varlistentry>
10540                 <term><command>transfer-source-v6</command></term>
10541                 <listitem>
10542                   <para>
10543                     See the description of
10544                     <command>transfer-source-v6</command> in <xref linkend="zone_transfers"/>.
10545                   </para>
10546                 </listitem>
10547               </varlistentry>
10548
10549               <varlistentry>
10550                 <term><command>alt-transfer-source</command></term>
10551                 <listitem>
10552                   <para>
10553                     See the description of
10554                     <command>alt-transfer-source</command> in <xref linkend="zone_transfers"/>.
10555                   </para>
10556                 </listitem>
10557               </varlistentry>
10558
10559               <varlistentry>
10560                 <term><command>alt-transfer-source-v6</command></term>
10561                 <listitem>
10562                   <para>
10563                     See the description of
10564                     <command>alt-transfer-source-v6</command> in <xref linkend="zone_transfers"/>.
10565                   </para>
10566                 </listitem>
10567               </varlistentry>
10568
10569               <varlistentry>
10570                 <term><command>use-alt-transfer-source</command></term>
10571                 <listitem>
10572                   <para>
10573                     See the description of
10574                     <command>use-alt-transfer-source</command> in <xref linkend="zone_transfers"/>.
10575                   </para>
10576                 </listitem>
10577               </varlistentry>
10578
10579
10580               <varlistentry>
10581                 <term><command>notify-source</command></term>
10582                 <listitem>
10583                   <para>
10584                     See the description of
10585                     <command>notify-source</command> in <xref linkend="zone_transfers"/>.
10586                   </para>
10587                 </listitem>
10588               </varlistentry>
10589
10590               <varlistentry>
10591                 <term><command>notify-source-v6</command></term>
10592                 <listitem>
10593                   <para>
10594                     See the description of
10595                     <command>notify-source-v6</command> in <xref linkend="zone_transfers"/>.
10596                   </para>
10597                 </listitem>
10598               </varlistentry>
10599
10600               <varlistentry>
10601                 <term><command>min-refresh-time</command></term>
10602                 <term><command>max-refresh-time</command></term>
10603                 <term><command>min-retry-time</command></term>
10604                 <term><command>max-retry-time</command></term>
10605                 <listitem>
10606                   <para>
10607                     See the description in <xref linkend="tuning"/>.
10608                   </para>
10609                 </listitem>
10610               </varlistentry>
10611
10612               <varlistentry>
10613                 <term><command>ixfr-from-differences</command></term>
10614                 <listitem>
10615                   <para>
10616                     See the description of
10617                     <command>ixfr-from-differences</command> in <xref linkend="boolean_options"/>.
10618                     (Note that the <command>ixfr-from-differences</command>
10619                     <userinput>master</userinput> and
10620                     <userinput>slave</userinput> choices are not
10621                     available at the zone level.)
10622                   </para>
10623                 </listitem>
10624               </varlistentry>
10625
10626               <varlistentry>
10627                 <term><command>key-directory</command></term>
10628                 <listitem>
10629                   <para>
10630                     See the description of
10631                     <command>key-directory</command> in <xref linkend="options"/>.
10632                   </para>
10633                 </listitem>
10634               </varlistentry>
10635
10636               <varlistentry>
10637                 <term><command>auto-dnssec</command></term>
10638                 <listitem>
10639                   <para>
10640                     Zones configured for dynamic DNS may also use this
10641                     option to allow varying levels of autonatic DNSSEC key
10642                     management. There are four possible settings:
10643                   </para>
10644                   <para>
10645                     <command>auto-dnssec allow;</command> permits
10646                     keys to be updated and the zone fully re-signed
10647                     whenever the user issues the command <command>rndc sign
10648                     <replaceable>zonename</replaceable></command>.
10649                   </para>
10650                   <para>
10651                     <command>auto-dnssec maintain;</command> includes the
10652                     above, but also automatically adjusts the zone's DNSSEC
10653                     keys on schedule, according to the keys' timing metadata
10654                     (see <xref linkend="man.dnyssec-keygen"/> and
10655                     <xref linkend="man.dnssec-settime"/>).  The command
10656                     <command>rndc sign
10657                     <replaceable>zonename</replaceable></command> causes
10658                     <command>named</command> to load keys from the key
10659                     repository and sign the zone with all keys that are
10660                     active. 
10661                     <command>rndc loadkeys
10662                     <replaceable>zonename</replaceable></command> causes
10663                     <command>named</command> to load keys from the key
10664                     repository and schedule key maintenance events to occur
10665                     in the future, but it does not sign the full zone
10666                     immediately.
10667                   </para>
10668                   <para>
10669                     <command>auto-dnssec create;</command> includes the
10670                     above, but also allows <command>named</command>
10671                     to create new keys in the key repository when needed.
10672                     (NOTE: This option is not yet implemented; the syntax is
10673                     being reserved for future use.)
10674                   </para>
10675                   <para>
10676                     The default setting is <command>auto-dnssec off</command>.
10677                   </para>
10678                 </listitem>
10679               </varlistentry>
10680
10681               <varlistentry>
10682                 <term><command>multi-master</command></term>
10683                 <listitem>
10684                   <para>
10685                     See the description of <command>multi-master</command> in
10686                     <xref linkend="boolean_options"/>.
10687                   </para>
10688                 </listitem>
10689               </varlistentry>
10690         
10691               <varlistentry>
10692                 <term><command>masterfile-format</command></term>
10693                 <listitem>
10694                   <para>
10695                     See the description of <command>masterfile-format</command>
10696                     in <xref linkend="tuning"/>.
10697                   </para>
10698                 </listitem>
10699               </varlistentry>
10700
10701               <varlistentry>
10702                 <term><command>dnssec-secure-to-insecure</command></term>
10703                 <listitem>
10704                   <para>
10705                     See the description of
10706                     <command>dnssec-secure-to-insecure</command> in <xref linkend="boolean_options"/>.
10707                   </para>
10708                 </listitem>
10709               </varlistentry>
10710
10711             </variablelist>
10712
10713           </sect3>
10714           <sect3 id="dynamic_update_policies">
10715             <title>Dynamic Update Policies</title>
10716             <para><acronym>BIND</acronym> 9 supports two alternative
10717               methods of granting clients the right to perform
10718               dynamic updates to a zone, configured by the
10719               <command>allow-update</command> and
10720               <command>update-policy</command> option, respectively.
10721             </para>
10722             <para>
10723               The <command>allow-update</command> clause works the
10724               same way as in previous versions of <acronym>BIND</acronym>.
10725               It grants given clients the permission to update any
10726               record of any name in the zone.
10727             </para>
10728             <para>
10729               The <command>update-policy</command> clause
10730               allows more fine-grained control over what updates are
10731               allowed.  A set of rules is specified, where each rule
10732               either grants or denies permissions for one or more
10733               names to be updated by one or more identities.  If
10734               the dynamic update request message is signed (that is,
10735               it includes either a TSIG or SIG(0) record), the
10736               identity of the signer can be determined.
10737             </para>
10738             <para>
10739               Rules are specified in the <command>update-policy</command>
10740               zone option, and are only meaningful for master zones.
10741               When the <command>update-policy</command> statement
10742               is present, it is a configuration error for the
10743               <command>allow-update</command> statement to be
10744               present.  The <command>update-policy</command> statement
10745               only examines the signer of a message; the source
10746               address is not relevant.
10747             </para>
10748             <para>
10749               There is a pre-defined <command>update-policy</command>
10750               rule which can be switched on with the command
10751               <command>update-policy local;</command>.
10752               Switching on this rule in a zone causes
10753               <command>named</command> to generate a TSIG session
10754               key and place it in a file, and to allow that key
10755               to update the zone.  (By default, the file is
10756               <filename>/var/run/named/session.key</filename>, the key
10757               name is "local-ddns" and the key algorithm is HMAC-SHA256,
10758               but these values are configurable with the
10759               <command>session-keyfile</command>,
10760               <command>session-keyname</command> and
10761               <command>session-keyalg</command> options, respectively).
10762             </para>
10763             <para>
10764               A client running on the local system, and with appropriate
10765               permissions, may read that file and use the key to sign update
10766               requests.  The zone's update policy will be set to allow that
10767               key to change any record within the zone.  Assuming the
10768               key name is "local-ddns", this policy is equivalent to:
10769             </para>
10770
10771             <programlisting>update-policy { grant local-ddns zonesub any; };
10772             </programlisting>
10773
10774             <para>
10775               The command <command>nsupdate -l</command> sends update
10776               requests to localhost, and signs them using the session key.
10777             </para>
10778
10779             <para>
10780               Other rule definitions look like this:
10781             </para>
10782
10783 <programlisting>
10784 ( <command>grant</command> | <command>deny</command> ) <replaceable>identity</replaceable> <replaceable>nametype</replaceable> <optional> <replaceable>name</replaceable> </optional> <optional> <replaceable>types</replaceable> </optional>
10785 </programlisting>
10786
10787             <para>
10788               Each rule grants or denies privileges.  Once a message has
10789               successfully matched a rule, the operation is immediately
10790               granted or denied and no further rules are examined.  A rule
10791               is matched when the signer matches the identity field, the
10792               name matches the name field in accordance with the nametype
10793               field, and the type matches the types specified in the type
10794               field.
10795             </para>
10796             <para>
10797               No signer is required for <replaceable>tcp-self</replaceable>
10798               or <replaceable>6to4-self</replaceable> however the standard
10799               reverse mapping / prefix conversion must match the identity
10800               field.
10801             </para>
10802             <para>
10803               The identity field specifies a name or a wildcard
10804               name.  Normally, this is the name of the TSIG or
10805               SIG(0) key used to sign the update request.  When a
10806               TKEY exchange has been used to create a shared secret,
10807               the identity of the shared secret is the same as the
10808               identity of the key used to authenticate the TKEY
10809               exchange.  TKEY is also the negotiation method used
10810               by GSS-TSIG, which establishes an identity that is
10811               the Kerberos principal of the client, such as
10812               <userinput>"user@host.domain"</userinput>.  When the
10813               <replaceable>identity</replaceable> field specifies
10814               a wildcard name, it is subject to DNS wildcard
10815               expansion, so the rule will apply to multiple identities.
10816               The <replaceable>identity</replaceable> field must
10817               contain a fully-qualified domain name.
10818             </para>
10819
10820             <para>
10821               The <replaceable>nametype</replaceable> field has 13
10822               values:
10823               <varname>name</varname>, <varname>subdomain</varname>,
10824               <varname>wildcard</varname>, <varname>self</varname>,
10825               <varname>selfsub</varname>, <varname>selfwild</varname>,
10826               <varname>krb5-self</varname>, <varname>ms-self</varname>,
10827               <varname>krb5-subdomain</varname>,
10828               <varname>ms-subdomain</varname>,
10829               <varname>tcp-self</varname>, <varname>6to4-self</varname>,
10830               and <varname>zonesub</varname>.
10831             </para>
10832             <informaltable>
10833               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
10834                 <colspec colname="1" colnum="1" colsep="0" colwidth="0.819in"/>
10835                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.681in"/>
10836                 <tbody>
10837                   <row rowsep="0">
10838                     <entry colname="1">
10839                       <para>
10840                         <varname>name</varname>
10841                       </para>
10842                     </entry> <entry colname="2">
10843                       <para>
10844                         Exact-match semantics.  This rule matches
10845                         when the name being updated is identical
10846                         to the contents of the
10847                         <replaceable>name</replaceable> field.
10848                       </para>
10849                     </entry>
10850                   </row>
10851                   <row rowsep="0">
10852                     <entry colname="1">
10853                       <para>
10854                         <varname>subdomain</varname>
10855                       </para>
10856                     </entry> <entry colname="2">
10857                       <para>
10858                         This rule matches when the name being updated
10859                         is a subdomain of, or identical to, the
10860                         contents of the <replaceable>name</replaceable>
10861                         field.
10862                       </para>
10863                     </entry>
10864                   </row>
10865                   <row rowsep="0">
10866                     <entry colname="1">
10867                       <para>
10868                         <varname>zonesub</varname>
10869                       </para>
10870                     </entry> <entry colname="2">
10871                       <para>
10872                         This rule is similar to subdomain, except that
10873                         it matches when the name being updated is a
10874                         subdomain of the zone in which the
10875                         <command>update-policy</command> statement
10876                         appears.  This obviates the need to type the zone
10877                         name twice, and enables the use of a standard
10878                         <command>update-policy</command> statement in
10879                         multiple zones without modification.
10880                       </para>
10881                       <para>
10882                         When this rule is used, the
10883                         <replaceable>name</replaceable> field is omitted.
10884                       </para>
10885                     </entry>
10886                   </row>
10887                   <row rowsep="0">
10888                     <entry colname="1">
10889                       <para>
10890                         <varname>wildcard</varname>
10891                       </para>
10892                     </entry> <entry colname="2">
10893                       <para>
10894                         The <replaceable>name</replaceable> field
10895                         is subject to DNS wildcard expansion, and
10896                         this rule matches when the name being updated
10897                         name is a valid expansion of the wildcard.
10898                       </para>
10899                     </entry>
10900                   </row>
10901                   <row rowsep="0">
10902                     <entry colname="1">
10903                       <para>
10904                         <varname>self</varname>
10905                       </para>
10906                     </entry>
10907                     <entry colname="2">
10908                       <para>
10909                         This rule matches when the name being updated
10910                         matches the contents of the
10911                         <replaceable>identity</replaceable> field.
10912                         The <replaceable>name</replaceable> field
10913                         is ignored, but should be the same as the
10914                         <replaceable>identity</replaceable> field.
10915                         The <varname>self</varname> nametype is
10916                         most useful when allowing using one key per
10917                         name to update, where the key has the same
10918                         name as the name to be updated.  The
10919                         <replaceable>identity</replaceable> would
10920                         be specified as <constant>*</constant> (an asterisk) in
10921                         this case.
10922                       </para>
10923                     </entry>
10924                   </row>
10925                   <row rowsep="0">
10926                     <entry colname="1">
10927                       <para>
10928                         <varname>selfsub</varname>
10929                       </para>
10930                     </entry> <entry colname="2">
10931                       <para>
10932                         This rule is similar to <varname>self</varname>
10933                         except that subdomains of <varname>self</varname>
10934                         can also be updated.
10935                       </para>
10936                     </entry>
10937                   </row>
10938                   <row rowsep="0">
10939                     <entry colname="1">
10940                       <para>
10941                         <varname>selfwild</varname>
10942                       </para>
10943                     </entry> <entry colname="2">
10944                       <para>
10945                         This rule is similar to <varname>self</varname>
10946                         except that only subdomains of
10947                         <varname>self</varname> can be updated.
10948                       </para>
10949                     </entry>
10950                   </row>
10951                   <row rowsep="0">
10952                     <entry colname="1">
10953                       <para>
10954                         <varname>tcp-self</varname>
10955                       </para>
10956                     </entry> <entry colname="2">
10957                       <para>
10958                         Allow updates that have been sent via TCP and
10959                         for which the standard mapping from the initiating
10960                         IP address into the IN-ADDR.ARPA and IP6.ARPA
10961                         namespaces match the name to be updated.
10962                       </para>
10963                       <note>
10964                         It is theoretically possible to spoof these TCP
10965                         sessions.
10966                       </note>
10967                     </entry>
10968                   </row>
10969                   <row rowsep="0">
10970                     <entry colname="1">
10971                       <para>
10972                         <varname>6to4-self</varname>
10973                       </para>
10974                     </entry> <entry colname="2">
10975                       <para>
10976                         Allow the 6to4 prefix to be update by any TCP
10977                         connection from the 6to4 network or from the
10978                         corresponding IPv4 address.  This is intended
10979                         to allow NS or DNAME RRsets to be added to the
10980                         reverse tree.
10981                       </para>
10982                       <note>
10983                         It is theoretically possible to spoof these TCP
10984                         sessions.
10985                       </note>
10986                     </entry>
10987                   </row>
10988                 </tbody>
10989               </tgroup>
10990             </informaltable>
10991
10992             <para>
10993               In all cases, the <replaceable>name</replaceable>
10994               field must
10995               specify a fully-qualified domain name.
10996             </para>
10997
10998             <para>
10999               If no types are explicitly specified, this rule matches
11000               all types except RRSIG, NS, SOA, NSEC and NSEC3. Types
11001               may be specified by name, including "ANY" (ANY matches
11002               all types except NSEC and NSEC3, which can never be
11003               updated).  Note that when an attempt is made to delete
11004               all records associated with a name, the rules are
11005               checked for each existing record type.
11006             </para>
11007           </sect3>
11008         </sect2>
11009       </sect1>
11010       <sect1>
11011         <title>Zone File</title>
11012         <sect2 id="types_of_resource_records_and_when_to_use_them">
11013           <title>Types of Resource Records and When to Use Them</title>
11014           <para>
11015             This section, largely borrowed from RFC 1034, describes the
11016             concept of a Resource Record (RR) and explains when each is used.
11017             Since the publication of RFC 1034, several new RRs have been
11018             identified
11019             and implemented in the DNS. These are also included.
11020           </para>
11021           <sect3>
11022             <title>Resource Records</title>
11023
11024             <para>
11025               A domain name identifies a node.  Each node has a set of
11026               resource information, which may be empty.  The set of resource
11027               information associated with a particular name is composed of
11028               separate RRs. The order of RRs in a set is not significant and
11029               need not be preserved by name servers, resolvers, or other
11030               parts of the DNS. However, sorting of multiple RRs is
11031               permitted for optimization purposes, for example, to specify
11032               that a particular nearby server be tried first. See <xref linkend="the_sortlist_statement"/> and <xref linkend="rrset_ordering"/>.
11033             </para>
11034
11035             <para>
11036               The components of a Resource Record are:
11037             </para>
11038             <informaltable colsep="0" rowsep="0">
11039               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
11040                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.000in"/>
11041                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.500in"/>
11042                 <tbody>
11043                   <row rowsep="0">
11044                     <entry colname="1">
11045                       <para>
11046                         owner name
11047                       </para>
11048                     </entry>
11049                     <entry colname="2">
11050                       <para>
11051                         The domain name where the RR is found.
11052                       </para>
11053                     </entry>
11054                   </row>
11055                   <row rowsep="0">
11056                     <entry colname="1">
11057                       <para>
11058                         type
11059                       </para>
11060                     </entry>
11061                     <entry colname="2">
11062                       <para>
11063                         An encoded 16-bit value that specifies
11064                         the type of the resource record.
11065                       </para>
11066                     </entry>
11067                   </row>
11068                   <row rowsep="0">
11069                     <entry colname="1">
11070                       <para>
11071                         TTL
11072                       </para>
11073                     </entry>
11074                     <entry colname="2">
11075                       <para>
11076                         The time-to-live of the RR. This field
11077                         is a 32-bit integer in units of seconds, and is
11078                         primarily used by
11079                         resolvers when they cache RRs. The TTL describes how
11080                         long a RR can
11081                         be cached before it should be discarded.
11082                       </para>
11083                     </entry>
11084                   </row>
11085                   <row rowsep="0">
11086                     <entry colname="1">
11087                       <para>
11088                         class
11089                       </para>
11090                     </entry>
11091                     <entry colname="2">
11092                       <para>
11093                         An encoded 16-bit value that identifies
11094                         a protocol family or instance of a protocol.
11095                       </para>
11096                     </entry>
11097                   </row>
11098                   <row rowsep="0">
11099                     <entry colname="1">
11100                       <para>
11101                         RDATA
11102                       </para>
11103                     </entry>
11104                     <entry colname="2">
11105                       <para>
11106                         The resource data.  The format of the
11107                         data is type (and sometimes class) specific.
11108                       </para>
11109                     </entry>
11110                   </row>
11111                 </tbody>
11112               </tgroup>
11113             </informaltable>
11114             <para>
11115               The following are <emphasis>types</emphasis> of valid RRs:
11116             </para>
11117             <informaltable colsep="0" rowsep="0">
11118               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
11119                 <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
11120                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.625in"/>
11121                 <tbody>
11122                   <row rowsep="0">
11123                     <entry colname="1">
11124                       <para>
11125                         A
11126                       </para>
11127                     </entry>
11128                     <entry colname="2">
11129                       <para>
11130                         A host address.  In the IN class, this is a
11131                         32-bit IP address.  Described in RFC 1035.
11132                       </para>
11133                     </entry>
11134                   </row>
11135                   <row rowsep="0">
11136                     <entry colname="1">
11137                       <para>
11138                         AAAA
11139                       </para>
11140                     </entry>
11141                     <entry colname="2">
11142                       <para>
11143                         IPv6 address.  Described in RFC 1886.
11144                       </para>
11145                     </entry>
11146                   </row>
11147                   <row rowsep="0">
11148                     <entry colname="1">
11149                       <para>
11150                         A6
11151                       </para>
11152                     </entry>
11153                     <entry colname="2">
11154                       <para>
11155                         IPv6 address.  This can be a partial
11156                         address (a suffix) and an indirection to the name
11157                         where the rest of the
11158                         address (the prefix) can be found.  Experimental.
11159                         Described in RFC 2874.
11160                       </para>
11161                     </entry>
11162                   </row>
11163                   <row rowsep="0">
11164                     <entry colname="1">
11165                       <para>
11166                         AFSDB
11167                       </para>
11168                     </entry>
11169                     <entry colname="2">
11170                       <para>
11171                         Location of AFS database servers.
11172                         Experimental.  Described in RFC 1183.
11173                       </para>
11174                     </entry>
11175                   </row>
11176                   <row rowsep="0">
11177                     <entry colname="1">
11178                       <para>
11179                         APL
11180                       </para>
11181                     </entry>
11182                     <entry colname="2">
11183                       <para>
11184                         Address prefix list.  Experimental.
11185                         Described in RFC 3123.
11186                       </para>
11187                     </entry>
11188                   </row>
11189                   <row rowsep="0">
11190                     <entry colname="1">
11191                       <para>
11192                         CERT
11193                       </para>
11194                     </entry>
11195                     <entry colname="2">
11196                       <para>
11197                         Holds a digital certificate.
11198                         Described in RFC 2538.
11199                       </para>
11200                     </entry>
11201                   </row>
11202                   <row rowsep="0">
11203                     <entry colname="1">
11204                       <para>
11205                         CNAME
11206                       </para>
11207                     </entry>
11208                     <entry colname="2">
11209                       <para>
11210                         Identifies the canonical name of an alias.
11211                         Described in RFC 1035.
11212                       </para>
11213                     </entry>
11214                   </row>
11215                   <row rowsep="0">
11216                     <entry colname="1">
11217                       <para>
11218                         DHCID
11219                       </para>
11220                     </entry>
11221                     <entry colname="2">
11222                       <para>
11223                         Is used for identifying which DHCP client is
11224                         associated with this name.  Described in RFC 4701.
11225                       </para>
11226                     </entry>
11227                   </row>
11228                   <row rowsep="0">
11229                     <entry colname="1">
11230                       <para>
11231                         DNAME
11232                       </para>
11233                     </entry>
11234                     <entry colname="2">
11235                       <para>
11236                         Replaces the domain name specified with
11237                         another name to be looked up, effectively aliasing an
11238                         entire
11239                         subtree of the domain name space rather than a single
11240                         record
11241                         as in the case of the CNAME RR.
11242                         Described in RFC 2672.
11243                       </para>
11244                     </entry>
11245                   </row>
11246                   <row rowsep="0">
11247                     <entry colname="1">
11248                       <para>
11249                         DNSKEY
11250                       </para>
11251                     </entry>
11252                     <entry colname="2">
11253                       <para>
11254                         Stores a public key associated with a signed
11255                         DNS zone.  Described in RFC 4034.
11256                       </para>
11257                     </entry>
11258                   </row>
11259                   <row rowsep="0">
11260                     <entry colname="1">
11261                       <para>
11262                         DS
11263                       </para>
11264                     </entry>
11265                     <entry colname="2">
11266                       <para>
11267                         Stores the hash of a public key associated with a
11268                         signed DNS zone.  Described in RFC 4034.
11269                       </para>
11270                     </entry>
11271                   </row>
11272                   <row rowsep="0">
11273                     <entry colname="1">
11274                       <para>
11275                         GPOS
11276                       </para>
11277                     </entry>
11278                     <entry colname="2">
11279                       <para>
11280                         Specifies the global position.  Superseded by LOC.
11281                       </para>
11282                     </entry>
11283                   </row>
11284                   <row rowsep="0">
11285                     <entry colname="1">
11286                       <para>
11287                         HINFO
11288                       </para>
11289                     </entry>
11290                     <entry colname="2">
11291                       <para>
11292                         Identifies the CPU and OS used by a host.
11293                         Described in RFC 1035.
11294                       </para>
11295                     </entry>
11296                   </row>
11297                   <row rowsep="0">
11298                     <entry colname="1">
11299                       <para>
11300                         IPSECKEY
11301                       </para>
11302                     </entry>
11303                     <entry colname="2">
11304                       <para>
11305                         Provides a method for storing IPsec keying material in
11306                         DNS.  Described in RFC 4025.
11307                       </para>
11308                     </entry>
11309                   </row>
11310                   <row rowsep="0">
11311                     <entry colname="1">
11312                       <para>
11313                         ISDN
11314                       </para>
11315                     </entry>
11316                     <entry colname="2">
11317                       <para>
11318                         Representation of ISDN addresses.
11319                         Experimental.  Described in RFC 1183.
11320                       </para>
11321                     </entry>
11322                   </row>
11323                   <row rowsep="0">
11324                     <entry colname="1">
11325                       <para>
11326                         KEY
11327                       </para>
11328                     </entry>
11329                     <entry colname="2">
11330                       <para>
11331                         Stores a public key associated with a
11332                         DNS name.  Used in original DNSSEC; replaced
11333                         by DNSKEY in DNSSECbis, but still used with
11334                         SIG(0).  Described in RFCs 2535 and 2931.
11335                       </para>
11336                     </entry>
11337                   </row>
11338                   <row rowsep="0">
11339                     <entry colname="1">
11340                       <para>
11341                         KX
11342                       </para>
11343                     </entry>
11344                     <entry colname="2">
11345                       <para>
11346                         Identifies a key exchanger for this
11347                         DNS name.  Described in RFC 2230.
11348                       </para>
11349                     </entry>
11350                   </row>
11351                   <row rowsep="0">
11352                     <entry colname="1">
11353                       <para>
11354                         LOC
11355                       </para>
11356                     </entry>
11357                     <entry colname="2">
11358                       <para>
11359                         For storing GPS info.  Described in RFC 1876.
11360                         Experimental.
11361                       </para>
11362                     </entry>
11363                   </row>
11364                   <row rowsep="0">
11365                     <entry colname="1">
11366                       <para>
11367                         MX
11368                       </para>
11369                     </entry>
11370                     <entry colname="2">
11371                       <para>
11372                         Identifies a mail exchange for the domain with
11373                         a 16-bit preference value (lower is better)
11374                         followed by the host name of the mail exchange.
11375                         Described in RFC 974, RFC 1035.
11376                       </para>
11377                     </entry>
11378                   </row>
11379                   <row rowsep="0">
11380                     <entry colname="1">
11381                       <para>
11382                         NAPTR
11383                       </para>
11384                     </entry>
11385                     <entry colname="2">
11386                       <para>
11387                         Name authority pointer.  Described in RFC 2915.
11388                       </para>
11389                     </entry>
11390                   </row>
11391                   <row rowsep="0">
11392                     <entry colname="1">
11393                       <para>
11394                         NSAP
11395                       </para>
11396                     </entry>
11397                     <entry colname="2">
11398                       <para>
11399                         A network service access point.
11400                         Described in RFC 1706.
11401                       </para>
11402                     </entry>
11403                   </row>
11404                   <row rowsep="0">
11405                     <entry colname="1">
11406                       <para>
11407                         NS
11408                       </para>
11409                     </entry>
11410                     <entry colname="2">
11411                       <para>
11412                         The authoritative name server for the
11413                         domain.  Described in RFC 1035.
11414                       </para>
11415                     </entry>
11416                   </row>
11417                   <row rowsep="0">
11418                     <entry colname="1">
11419                       <para>
11420                         NSEC
11421                       </para>
11422                     </entry>
11423                     <entry colname="2">
11424                       <para>
11425                         Used in DNSSECbis to securely indicate that
11426                         RRs with an owner name in a certain name interval do
11427                         not exist in
11428                         a zone and indicate what RR types are present for an
11429                         existing name.
11430                         Described in RFC 4034.
11431                       </para>
11432                     </entry>
11433                   </row>
11434                   <row rowsep="0">
11435                     <entry colname="1">
11436                       <para>
11437                         NSEC3
11438                       </para>
11439                     </entry>
11440                     <entry colname="2">
11441                       <para>
11442                         Used in DNSSECbis to securely indicate that
11443                         RRs with an owner name in a certain name
11444                         interval do not exist in a zone and indicate
11445                         what RR types are present for an existing
11446                         name.  NSEC3 differs from NSEC in that it
11447                         prevents zone enumeration but is more
11448                         computationally expensive on both the server
11449                         and the client than NSEC.  Described in RFC
11450                         5155.
11451                       </para>
11452                     </entry>
11453                   </row>
11454                   <row rowsep="0">
11455                     <entry colname="1">
11456                       <para>
11457                         NSEC3PARAM
11458                       </para>
11459                     </entry>
11460                     <entry colname="2">
11461                       <para>
11462                         Used in DNSSECbis to tell the authoritative
11463                         server which NSEC3 chains are available to use.
11464                         Described in RFC 5155.
11465                       </para>
11466                     </entry>
11467                   </row>
11468                   <row rowsep="0">
11469                     <entry colname="1">
11470                       <para>
11471                         NXT
11472                       </para>
11473                     </entry>
11474                     <entry colname="2">
11475                       <para>
11476                         Used in DNSSEC to securely indicate that
11477                         RRs with an owner name in a certain name interval do
11478                         not exist in
11479                         a zone and indicate what RR types are present for an
11480                         existing name.
11481                         Used in original DNSSEC; replaced by NSEC in
11482                         DNSSECbis.
11483                         Described in RFC 2535.
11484                       </para>
11485                     </entry>
11486                   </row>
11487                   <row rowsep="0">
11488                     <entry colname="1">
11489                       <para>
11490                         PTR
11491                       </para>
11492                     </entry>
11493                     <entry colname="2">
11494                       <para>
11495                         A pointer to another part of the domain
11496                         name space.  Described in RFC 1035.
11497                       </para>
11498                     </entry>
11499                   </row>
11500                   <row rowsep="0">
11501                     <entry colname="1">
11502                       <para>
11503                         PX
11504                       </para>
11505                     </entry>
11506                     <entry colname="2">
11507                       <para>
11508                         Provides mappings between RFC 822 and X.400
11509                         addresses.  Described in RFC 2163.
11510                       </para>
11511                     </entry>
11512                   </row>
11513                   <row rowsep="0">
11514                     <entry colname="1">
11515                       <para>
11516                         RP
11517                       </para>
11518                     </entry>
11519                     <entry colname="2">
11520                       <para>
11521                         Information on persons responsible
11522                         for the domain.  Experimental.  Described in RFC 1183.
11523                       </para>
11524                     </entry>
11525                   </row>
11526                   <row rowsep="0">
11527                     <entry colname="1">
11528                       <para>
11529                         RRSIG
11530                       </para>
11531                     </entry>
11532                     <entry colname="2">
11533                       <para>
11534                         Contains DNSSECbis signature data.  Described
11535                         in RFC 4034.
11536                       </para>
11537                     </entry>
11538                   </row>
11539                   <row rowsep="0">
11540                     <entry colname="1">
11541                       <para>
11542                         RT
11543                       </para>
11544                     </entry>
11545                     <entry colname="2">
11546                       <para>
11547                         Route-through binding for hosts that
11548                         do not have their own direct wide area network
11549                         addresses.
11550                         Experimental.  Described in RFC 1183.
11551                       </para>
11552                     </entry>
11553                   </row>
11554                   <row rowsep="0">
11555                     <entry colname="1">
11556                       <para>
11557                         SIG
11558                       </para>
11559                     </entry>
11560                     <entry colname="2">
11561                       <para>
11562                         Contains DNSSEC signature data.  Used in
11563                         original DNSSEC; replaced by RRSIG in
11564                         DNSSECbis, but still used for SIG(0).
11565                         Described in RFCs 2535 and 2931.
11566                       </para>
11567                     </entry>
11568                   </row>
11569                   <row rowsep="0">
11570                     <entry colname="1">
11571                       <para>
11572                         SOA
11573                       </para>
11574                     </entry>
11575                     <entry colname="2">
11576                       <para>
11577                         Identifies the start of a zone of authority.
11578                         Described in RFC 1035.
11579                       </para>
11580                     </entry>
11581                   </row>
11582                   <row rowsep="0">
11583                     <entry colname="1">
11584                       <para>
11585                         SPF
11586                       </para>
11587                     </entry>
11588                     <entry colname="2">
11589                       <para>
11590                         Contains the Sender Policy Framework information
11591                         for a given email domain.  Described in RFC 4408.
11592                       </para>
11593                     </entry>
11594                   </row>
11595                   <row rowsep="0">
11596                     <entry colname="1">
11597                       <para>
11598                         SRV
11599                       </para>
11600                     </entry>
11601                     <entry colname="2">
11602                       <para>
11603                         Information about well known network
11604                         services (replaces WKS).  Described in RFC 2782.
11605                       </para>
11606                     </entry>
11607                   </row>
11608                   <row rowsep="0">
11609                     <entry colname="1">
11610                       <para>
11611                         SSHFP
11612                       </para>
11613                     </entry>
11614                     <entry colname="2">
11615                       <para>
11616                         Provides a way to securely publish a secure shell key's
11617                         fingerprint.  Described in RFC 4255.
11618                       </para>
11619                     </entry>
11620                   </row>
11621                   <row rowsep="0">
11622                     <entry colname="1">
11623                       <para>
11624                         TXT
11625                       </para>
11626                     </entry>
11627                     <entry colname="2">
11628                       <para>
11629                         Text records.  Described in RFC 1035.
11630                       </para>
11631                     </entry>
11632                   </row>
11633                   <row rowsep="0">
11634                     <entry colname="1">
11635                       <para>
11636                         WKS
11637                       </para>
11638                     </entry>
11639                     <entry colname="2">
11640                       <para>
11641                         Information about which well known
11642                         network services, such as SMTP, that a domain
11643                         supports. Historical.
11644                       </para>
11645                     </entry>
11646                   </row>
11647                   <row rowsep="0">
11648                     <entry colname="1">
11649                       <para>
11650                         X25
11651                       </para>
11652                     </entry>
11653                     <entry colname="2">
11654                       <para>
11655                         Representation of X.25 network addresses.
11656                         Experimental.  Described in RFC 1183.
11657                       </para>
11658                     </entry>
11659                   </row>
11660                 </tbody>
11661               </tgroup>
11662             </informaltable>
11663             <para>
11664               The following <emphasis>classes</emphasis> of resource records
11665               are currently valid in the DNS:
11666             </para>
11667             <informaltable colsep="0" rowsep="0"><tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
11668                 <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
11669                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.625in"/>
11670                 <tbody>
11671
11672                   <row rowsep="0">
11673                     <entry colname="1">
11674                       <para>
11675                         IN
11676                       </para>
11677                     </entry>
11678                     <entry colname="2">
11679                       <para>
11680                         The Internet.
11681                       </para>
11682                     </entry>
11683                   </row>
11684
11685                   <row rowsep="0">
11686                     <entry colname="1">
11687                       <para>
11688                         CH
11689                       </para>
11690                     </entry>
11691                     <entry colname="2">
11692                       <para>
11693                         Chaosnet, a LAN protocol created at MIT in the
11694                         mid-1970s.
11695                         Rarely used for its historical purpose, but reused for
11696                         BIND's
11697                         built-in server information zones, e.g.,
11698                         <literal>version.bind</literal>.
11699                       </para>
11700                     </entry>
11701                   </row>
11702
11703                   <row rowsep="0">
11704                     <entry colname="1">
11705                       <para>
11706                         HS
11707                       </para>
11708                     </entry>
11709                     <entry colname="2">
11710                       <para>
11711                         Hesiod, an information service
11712                         developed by MIT's Project Athena. It is used to share
11713                         information
11714                         about various systems databases, such as users,
11715                         groups, printers
11716                         and so on.
11717                       </para>
11718                     </entry>
11719                   </row>
11720
11721                 </tbody>
11722               </tgroup>
11723             </informaltable>
11724
11725             <para>
11726               The owner name is often implicit, rather than forming an
11727               integral
11728               part of the RR.  For example, many name servers internally form
11729               tree
11730               or hash structures for the name space, and chain RRs off nodes.
11731               The remaining RR parts are the fixed header (type, class, TTL)
11732               which is consistent for all RRs, and a variable part (RDATA)
11733               that
11734               fits the needs of the resource being described.
11735             </para>
11736             <para>
11737               The meaning of the TTL field is a time limit on how long an
11738               RR can be kept in a cache.  This limit does not apply to
11739               authoritative
11740               data in zones; it is also timed out, but by the refreshing
11741               policies
11742               for the zone.  The TTL is assigned by the administrator for the
11743               zone where the data originates.  While short TTLs can be used to
11744               minimize caching, and a zero TTL prohibits caching, the
11745               realities
11746               of Internet performance suggest that these times should be on
11747               the
11748               order of days for the typical host.  If a change can be
11749               anticipated,
11750               the TTL can be reduced prior to the change to minimize
11751               inconsistency
11752               during the change, and then increased back to its former value
11753               following
11754               the change.
11755             </para>
11756             <para>
11757               The data in the RDATA section of RRs is carried as a combination
11758               of binary strings and domain names.  The domain names are
11759               frequently
11760               used as "pointers" to other data in the DNS.
11761             </para>
11762           </sect3>
11763           <sect3>
11764             <title>Textual expression of RRs</title>
11765             <para>
11766               RRs are represented in binary form in the packets of the DNS
11767               protocol, and are usually represented in highly encoded form
11768               when
11769               stored in a name server or resolver.  In the examples provided
11770               in
11771               RFC 1034, a style similar to that used in master files was
11772               employed
11773               in order to show the contents of RRs.  In this format, most RRs
11774               are shown on a single line, although continuation lines are
11775               possible
11776               using parentheses.
11777             </para>
11778             <para>
11779               The start of the line gives the owner of the RR.  If a line
11780               begins with a blank, then the owner is assumed to be the same as
11781               that of the previous RR.  Blank lines are often included for
11782               readability.
11783             </para>
11784             <para>
11785               Following the owner, we list the TTL, type, and class of the
11786               RR.  Class and type use the mnemonics defined above, and TTL is
11787               an integer before the type field.  In order to avoid ambiguity
11788               in
11789               parsing, type and class mnemonics are disjoint, TTLs are
11790               integers,
11791               and the type mnemonic is always last. The IN class and TTL
11792               values
11793               are often omitted from examples in the interests of clarity.
11794             </para>
11795             <para>
11796               The resource data or RDATA section of the RR are given using
11797               knowledge of the typical representation for the data.
11798             </para>
11799             <para>
11800               For example, we might show the RRs carried in a message as:
11801             </para>
11802             <informaltable colsep="0" rowsep="0"><tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
11803                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.381in"/>
11804                 <colspec colname="2" colnum="2" colsep="0" colwidth="1.020in"/>
11805                 <colspec colname="3" colnum="3" colsep="0" colwidth="2.099in"/>
11806                 <tbody>
11807                   <row rowsep="0">
11808                     <entry colname="1">
11809                       <para>
11810                         <literal>ISI.EDU.</literal>
11811                       </para>
11812                     </entry>
11813                     <entry colname="2">
11814                       <para>
11815                         <literal>MX</literal>
11816                       </para>
11817                     </entry>
11818                     <entry colname="3">
11819                       <para>
11820                         <literal>10 VENERA.ISI.EDU.</literal>
11821                       </para>
11822                     </entry>
11823                   </row>
11824                   <row rowsep="0">
11825                     <entry colname="1">
11826                       <para/>
11827                     </entry>
11828                     <entry colname="2">
11829                       <para>
11830                         <literal>MX</literal>
11831                       </para>
11832                     </entry>
11833                     <entry colname="3">
11834                       <para>
11835                         <literal>10 VAXA.ISI.EDU</literal>
11836                       </para>
11837                     </entry>
11838                   </row>
11839                   <row rowsep="0">
11840                     <entry colname="1">
11841                       <para>
11842                         <literal>VENERA.ISI.EDU</literal>
11843                       </para>
11844                     </entry>
11845                     <entry colname="2">
11846                       <para>
11847                         <literal>A</literal>
11848                       </para>
11849                     </entry>
11850                     <entry colname="3">
11851                       <para>
11852                         <literal>128.9.0.32</literal>
11853                       </para>
11854                     </entry>
11855                   </row>
11856                   <row rowsep="0">
11857                     <entry colname="1">
11858                       <para/>
11859                     </entry>
11860                     <entry colname="2">
11861                       <para>
11862                         <literal>A</literal>
11863                       </para>
11864                     </entry>
11865                     <entry colname="3">
11866                       <para>
11867                         <literal>10.1.0.52</literal>
11868                       </para>
11869                     </entry>
11870                   </row>
11871                   <row rowsep="0">
11872                     <entry colname="1">
11873                       <para>
11874                         <literal>VAXA.ISI.EDU</literal>
11875                       </para>
11876                     </entry>
11877                     <entry colname="2">
11878                       <para>
11879                         <literal>A</literal>
11880                       </para>
11881                     </entry>
11882                     <entry colname="3">
11883                       <para>
11884                         <literal>10.2.0.27</literal>
11885                       </para>
11886                     </entry>
11887                   </row>
11888                   <row rowsep="0">
11889                     <entry colname="1">
11890                       <para/>
11891                     </entry>
11892                     <entry colname="2">
11893                       <para>
11894                         <literal>A</literal>
11895                       </para>
11896                     </entry>
11897                     <entry colname="3">
11898                       <para>
11899                         <literal>128.9.0.33</literal>
11900                       </para>
11901                     </entry>
11902                   </row>
11903                 </tbody>
11904               </tgroup>
11905             </informaltable>
11906             <para>
11907               The MX RRs have an RDATA section which consists of a 16-bit
11908               number followed by a domain name.  The address RRs use a
11909               standard
11910               IP address format to contain a 32-bit internet address.
11911             </para>
11912             <para>
11913               The above example shows six RRs, with two RRs at each of three
11914               domain names.
11915             </para>
11916             <para>
11917               Similarly we might see:
11918             </para>
11919             <informaltable colsep="0" rowsep="0"><tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
11920                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.491in"/>
11921                 <colspec colname="2" colnum="2" colsep="0" colwidth="1.067in"/>
11922                 <colspec colname="3" colnum="3" colsep="0" colwidth="2.067in"/>
11923                 <tbody>
11924                   <row rowsep="0">
11925                     <entry colname="1">
11926                       <para>
11927                         <literal>XX.LCS.MIT.EDU.</literal>
11928                       </para>
11929                     </entry>
11930                     <entry colname="2">
11931                       <para>
11932                         <literal>IN A</literal>
11933                       </para>
11934                     </entry>
11935                     <entry colname="3">
11936                       <para>
11937                         <literal>10.0.0.44</literal>
11938                       </para>
11939                     </entry>
11940                   </row>
11941                   <row rowsep="0">
11942                     <entry colname="1"/>
11943                     <entry colname="2">
11944                       <para>
11945                         <literal>CH A</literal>
11946                       </para>
11947                     </entry>
11948                     <entry colname="3">
11949                       <para>
11950                         <literal>MIT.EDU. 2420</literal>
11951                       </para>
11952                     </entry>
11953                   </row>
11954                 </tbody>
11955               </tgroup>
11956             </informaltable>
11957             <para>
11958               This example shows two addresses for
11959               <literal>XX.LCS.MIT.EDU</literal>, each of a different class.
11960             </para>
11961           </sect3>
11962         </sect2>
11963
11964         <sect2>
11965           <title>Discussion of MX Records</title>
11966
11967           <para>
11968             As described above, domain servers store information as a
11969             series of resource records, each of which contains a particular
11970             piece of information about a given domain name (which is usually,
11971             but not always, a host). The simplest way to think of a RR is as
11972             a typed pair of data, a domain name matched with a relevant datum,
11973             and stored with some additional type information to help systems
11974             determine when the RR is relevant.
11975           </para>
11976
11977           <para>
11978             MX records are used to control delivery of email. The data
11979             specified in the record is a priority and a domain name. The
11980             priority
11981             controls the order in which email delivery is attempted, with the
11982             lowest number first. If two priorities are the same, a server is
11983             chosen randomly. If no servers at a given priority are responding,
11984             the mail transport agent will fall back to the next largest
11985             priority.
11986             Priority numbers do not have any absolute meaning &mdash; they are
11987             relevant
11988             only respective to other MX records for that domain name. The
11989             domain
11990             name given is the machine to which the mail will be delivered.
11991             It <emphasis>must</emphasis> have an associated address record
11992             (A or AAAA) &mdash; CNAME is not sufficient.
11993           </para>
11994           <para>
11995             For a given domain, if there is both a CNAME record and an
11996             MX record, the MX record is in error, and will be ignored.
11997             Instead,
11998             the mail will be delivered to the server specified in the MX
11999             record
12000             pointed to by the CNAME.
12001             For example:
12002           </para>
12003           <informaltable colsep="0" rowsep="0">
12004             <tgroup cols="5" colsep="0" rowsep="0" tgroupstyle="3Level-table">
12005               <colspec colname="1" colnum="1" colsep="0" colwidth="1.708in"/>
12006               <colspec colname="2" colnum="2" colsep="0" colwidth="0.444in"/>
12007               <colspec colname="3" colnum="3" colsep="0" colwidth="0.444in"/>
12008               <colspec colname="4" colnum="4" colsep="0" colwidth="0.976in"/>
12009               <colspec colname="5" colnum="5" colsep="0" colwidth="1.553in"/>
12010               <tbody>
12011                 <row rowsep="0">
12012                   <entry colname="1">
12013                     <para>
12014                       <literal>example.com.</literal>
12015                     </para>
12016                   </entry>
12017                   <entry colname="2">
12018                     <para>
12019                       <literal>IN</literal>
12020                     </para>
12021                   </entry>
12022                   <entry colname="3">
12023                     <para>
12024                       <literal>MX</literal>
12025                     </para>
12026                   </entry>
12027                   <entry colname="4">
12028                     <para>
12029                       <literal>10</literal>
12030                     </para>
12031                   </entry>
12032                   <entry colname="5">
12033                     <para>
12034                       <literal>mail.example.com.</literal>
12035                     </para>
12036                   </entry>
12037                 </row>
12038                 <row rowsep="0">
12039                   <entry colname="1">
12040                     <para/>
12041                   </entry>
12042                   <entry colname="2">
12043                     <para>
12044                       <literal>IN</literal>
12045                     </para>
12046                   </entry>
12047                   <entry colname="3">
12048                     <para>
12049                       <literal>MX</literal>
12050                     </para>
12051                   </entry>
12052                   <entry colname="4">
12053                     <para>
12054                       <literal>10</literal>
12055                     </para>
12056                   </entry>
12057                   <entry colname="5">
12058                     <para>
12059                       <literal>mail2.example.com.</literal>
12060                     </para>
12061                   </entry>
12062                 </row>
12063                 <row rowsep="0">
12064                   <entry colname="1">
12065                     <para/>
12066                   </entry>
12067                   <entry colname="2">
12068                     <para>
12069                       <literal>IN</literal>
12070                     </para>
12071                   </entry>
12072                   <entry colname="3">
12073                     <para>
12074                       <literal>MX</literal>
12075                     </para>
12076                   </entry>
12077                   <entry colname="4">
12078                     <para>
12079                       <literal>20</literal>
12080                     </para>
12081                   </entry>
12082                   <entry colname="5">
12083                     <para>
12084                       <literal>mail.backup.org.</literal>
12085                     </para>
12086                   </entry>
12087                 </row>
12088                 <row rowsep="0">
12089                   <entry colname="1">
12090                     <para>
12091                       <literal>mail.example.com.</literal>
12092                     </para>
12093                   </entry>
12094                   <entry colname="2">
12095                     <para>
12096                       <literal>IN</literal>
12097                     </para>
12098                   </entry>
12099                   <entry colname="3">
12100                     <para>
12101                       <literal>A</literal>
12102                     </para>
12103                   </entry>
12104                   <entry colname="4">
12105                     <para>
12106                       <literal>10.0.0.1</literal>
12107                     </para>
12108                   </entry>
12109                   <entry colname="5">
12110                     <para/>
12111                   </entry>
12112                 </row>
12113                 <row rowsep="0">
12114                   <entry colname="1">
12115                     <para>
12116                       <literal>mail2.example.com.</literal>
12117                     </para>
12118                   </entry>
12119                   <entry colname="2">
12120                     <para>
12121                       <literal>IN</literal>
12122                     </para>
12123                   </entry>
12124                   <entry colname="3">
12125                     <para>
12126                       <literal>A</literal>
12127                     </para>
12128                   </entry>
12129                   <entry colname="4">
12130                     <para>
12131                       <literal>10.0.0.2</literal>
12132                     </para>
12133                   </entry>
12134                   <entry colname="5">
12135                     <para/>
12136                   </entry>
12137                 </row>
12138               </tbody>
12139             </tgroup>
12140             </informaltable><para>
12141             Mail delivery will be attempted to <literal>mail.example.com</literal> and
12142             <literal>mail2.example.com</literal> (in
12143             any order), and if neither of those succeed, delivery to <literal>mail.backup.org</literal> will
12144             be attempted.
12145           </para>
12146         </sect2>
12147         <sect2 id="Setting_TTLs">
12148           <title>Setting TTLs</title>
12149           <para>
12150             The time-to-live of the RR field is a 32-bit integer represented
12151             in units of seconds, and is primarily used by resolvers when they
12152             cache RRs. The TTL describes how long a RR can be cached before it
12153             should be discarded. The following three types of TTL are
12154             currently
12155             used in a zone file.
12156           </para>
12157           <informaltable colsep="0" rowsep="0">
12158             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
12159               <colspec colname="1" colnum="1" colsep="0" colwidth="0.750in"/>
12160               <colspec colname="2" colnum="2" colsep="0" colwidth="4.375in"/>
12161               <tbody>
12162                 <row rowsep="0">
12163                   <entry colname="1">
12164                     <para>
12165                       SOA
12166                     </para>
12167                   </entry>
12168                   <entry colname="2">
12169                     <para>
12170                       The last field in the SOA is the negative
12171                       caching TTL. This controls how long other servers will
12172                       cache no-such-domain
12173                       (NXDOMAIN) responses from you.
12174                     </para>
12175                     <para>
12176                       The maximum time for
12177                       negative caching is 3 hours (3h).
12178                     </para>
12179                   </entry>
12180                 </row>
12181                 <row rowsep="0">
12182                   <entry colname="1">
12183                     <para>
12184                       $TTL
12185                     </para>
12186                   </entry>
12187                   <entry colname="2">
12188                     <para>
12189                       The $TTL directive at the top of the
12190                       zone file (before the SOA) gives a default TTL for every
12191                       RR without
12192                       a specific TTL set.
12193                     </para>
12194                   </entry>
12195                 </row>
12196                 <row rowsep="0">
12197                   <entry colname="1">
12198                     <para>
12199                       RR TTLs
12200                     </para>
12201                   </entry>
12202                   <entry colname="2">
12203                     <para>
12204                       Each RR can have a TTL as the second
12205                       field in the RR, which will control how long other
12206                       servers can cache
12207                       the it.
12208                     </para>
12209                   </entry>
12210                 </row>
12211               </tbody>
12212             </tgroup>
12213           </informaltable>
12214           <para>
12215             All of these TTLs default to units of seconds, though units
12216             can be explicitly specified, for example, <literal>1h30m</literal>.
12217           </para>
12218         </sect2>
12219         <sect2>
12220           <title>Inverse Mapping in IPv4</title>
12221           <para>
12222             Reverse name resolution (that is, translation from IP address
12223             to name) is achieved by means of the <emphasis>in-addr.arpa</emphasis> domain
12224             and PTR records. Entries in the in-addr.arpa domain are made in
12225             least-to-most significant order, read left to right. This is the
12226             opposite order to the way IP addresses are usually written. Thus,
12227             a machine with an IP address of 10.1.2.3 would have a
12228             corresponding
12229             in-addr.arpa name of
12230             3.2.1.10.in-addr.arpa. This name should have a PTR resource record
12231             whose data field is the name of the machine or, optionally,
12232             multiple
12233             PTR records if the machine has more than one name. For example,
12234             in the <optional>example.com</optional> domain:
12235           </para>
12236           <informaltable colsep="0" rowsep="0">
12237             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
12238               <colspec colname="1" colnum="1" colsep="0" colwidth="1.125in"/>
12239               <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
12240               <tbody>
12241                 <row rowsep="0">
12242                   <entry colname="1">
12243                     <para>
12244                       <literal>$ORIGIN</literal>
12245                     </para>
12246                   </entry>
12247                   <entry colname="2">
12248                     <para>
12249                       <literal>2.1.10.in-addr.arpa</literal>
12250                     </para>
12251                   </entry>
12252                 </row>
12253                 <row rowsep="0">
12254                   <entry colname="1">
12255                     <para>
12256                       <literal>3</literal>
12257                     </para>
12258                   </entry>
12259                   <entry colname="2">
12260                     <para>
12261                       <literal>IN PTR foo.example.com.</literal>
12262                     </para>
12263                   </entry>
12264                 </row>
12265               </tbody>
12266             </tgroup>
12267           </informaltable>
12268           <note>
12269             <para>
12270               The <command>$ORIGIN</command> lines in the examples
12271               are for providing context to the examples only &mdash; they do not
12272               necessarily
12273               appear in the actual usage. They are only used here to indicate
12274               that the example is relative to the listed origin.
12275             </para>
12276           </note>
12277         </sect2>
12278         <sect2>
12279           <title>Other Zone File Directives</title>
12280           <para>
12281             The Master File Format was initially defined in RFC 1035 and
12282             has subsequently been extended. While the Master File Format
12283             itself
12284             is class independent all records in a Master File must be of the
12285             same
12286             class.
12287           </para>
12288           <para>
12289             Master File Directives include <command>$ORIGIN</command>, <command>$INCLUDE</command>,
12290             and <command>$TTL.</command>
12291           </para>
12292           <sect3>
12293             <title>The <command>@</command> (at-sign)</title>
12294             <para>
12295               When used in the label (or name) field, the asperand or
12296               at-sign (@) symbol represents the current origin.
12297               At the start of the zone file, it is the 
12298               &lt;<varname>zone_name</varname>&gt; (followed by
12299               trailing dot).
12300             </para>
12301           </sect3>
12302           <sect3>
12303             <title>The <command>$ORIGIN</command> Directive</title>
12304             <para>
12305               Syntax: <command>$ORIGIN</command>
12306               <replaceable>domain-name</replaceable>
12307               <optional><replaceable>comment</replaceable></optional>
12308             </para>
12309             <para><command>$ORIGIN</command>
12310               sets the domain name that will be appended to any
12311               unqualified records. When a zone is first read in there
12312               is an implicit <command>$ORIGIN</command>
12313               &lt;<varname>zone_name</varname>&gt;<command>.</command>
12314               (followed by trailing dot).
12315               The current <command>$ORIGIN</command> is appended to
12316               the domain specified in the <command>$ORIGIN</command>
12317               argument if it is not absolute.
12318             </para>
12319
12320 <programlisting>
12321 $ORIGIN example.com.
12322 WWW     CNAME   MAIN-SERVER
12323 </programlisting>
12324
12325             <para>
12326               is equivalent to
12327             </para>
12328
12329 <programlisting>
12330 WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
12331 </programlisting>
12332
12333           </sect3>
12334           <sect3>
12335             <title>The <command>$INCLUDE</command> Directive</title>
12336             <para>
12337               Syntax: <command>$INCLUDE</command>
12338               <replaceable>filename</replaceable>
12339               <optional>
12340 <replaceable>origin</replaceable> </optional>
12341               <optional> <replaceable>comment</replaceable> </optional>
12342             </para>
12343             <para>
12344               Read and process the file <filename>filename</filename> as
12345               if it were included into the file at this point.  If <command>origin</command> is
12346               specified the file is processed with <command>$ORIGIN</command> set
12347               to that value, otherwise the current <command>$ORIGIN</command> is
12348               used.
12349             </para>
12350             <para>
12351               The origin and the current domain name
12352               revert to the values they had prior to the <command>$INCLUDE</command> once
12353               the file has been read.
12354             </para>
12355             <note>
12356               <para>
12357                 RFC 1035 specifies that the current origin should be restored
12358                 after
12359                 an <command>$INCLUDE</command>, but it is silent
12360                 on whether the current
12361                 domain name should also be restored.  BIND 9 restores both of
12362                 them.
12363                 This could be construed as a deviation from RFC 1035, a
12364                 feature, or both.
12365               </para>
12366             </note>
12367           </sect3>
12368           <sect3>
12369             <title>The <command>$TTL</command> Directive</title>
12370             <para>
12371               Syntax: <command>$TTL</command>
12372               <replaceable>default-ttl</replaceable>
12373               <optional>
12374 <replaceable>comment</replaceable> </optional>
12375             </para>
12376             <para>
12377               Set the default Time To Live (TTL) for subsequent records
12378               with undefined TTLs. Valid TTLs are of the range 0-2147483647
12379               seconds.
12380             </para>
12381             <para><command>$TTL</command>
12382                is defined in RFC 2308.
12383             </para>
12384           </sect3>
12385         </sect2>
12386         <sect2>
12387           <title><acronym>BIND</acronym> Master File Extension: the  <command>$GENERATE</command> Directive</title>
12388           <para>
12389             Syntax: <command>$GENERATE</command>
12390             <replaceable>range</replaceable>
12391             <replaceable>lhs</replaceable>
12392             <optional><replaceable>ttl</replaceable></optional>
12393             <optional><replaceable>class</replaceable></optional>
12394             <replaceable>type</replaceable>
12395             <replaceable>rhs</replaceable>
12396             <optional><replaceable>comment</replaceable></optional>
12397           </para>
12398           <para><command>$GENERATE</command>
12399             is used to create a series of resource records that only
12400             differ from each other by an
12401             iterator. <command>$GENERATE</command> can be used to
12402             easily generate the sets of records required to support
12403             sub /24 reverse delegations described in RFC 2317:
12404             Classless IN-ADDR.ARPA delegation.
12405           </para>
12406
12407 <programlisting>$ORIGIN 0.0.192.IN-ADDR.ARPA.
12408 $GENERATE 1-2 @ NS SERVER$.EXAMPLE.
12409 $GENERATE 1-127 $ CNAME $.0</programlisting>
12410
12411           <para>
12412             is equivalent to
12413           </para>
12414
12415 <programlisting>0.0.0.192.IN-ADDR.ARPA. NS SERVER1.EXAMPLE.
12416 0.0.0.192.IN-ADDR.ARPA. NS SERVER2.EXAMPLE.
12417 1.0.0.192.IN-ADDR.ARPA. CNAME 1.0.0.0.192.IN-ADDR.ARPA.
12418 2.0.0.192.IN-ADDR.ARPA. CNAME 2.0.0.0.192.IN-ADDR.ARPA.
12419 ...
12420 127.0.0.192.IN-ADDR.ARPA. CNAME 127.0.0.0.192.IN-ADDR.ARPA.
12421 </programlisting>
12422
12423            <para>
12424             Generate a set of A and MX records.  Note the MX's right hand
12425             side is a quoted string.  The quotes will be stripped when the
12426             right hand side is processed.
12427            </para>
12428
12429 <programlisting>
12430 $ORIGIN EXAMPLE.
12431 $GENERATE 1-127 HOST-$ A 1.2.3.$
12432 $GENERATE 1-127 HOST-$ MX "0 ."</programlisting>
12433
12434           <para>
12435             is equivalent to
12436           </para>
12437
12438 <programlisting>HOST-1.EXAMPLE.   A  1.2.3.1
12439 HOST-1.EXAMPLE.   MX 0 .
12440 HOST-2.EXAMPLE.   A  1.2.3.2
12441 HOST-2.EXAMPLE.   MX 0 .
12442 HOST-3.EXAMPLE.   A  1.2.3.3
12443 HOST-3.EXAMPLE.   MX 0 .
12444 ...
12445 HOST-127.EXAMPLE. A  1.2.3.127
12446 HOST-127.EXAMPLE. MX 0 .
12447 </programlisting>
12448
12449           <informaltable colsep="0" rowsep="0">
12450             <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
12451                         <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
12452               <colspec colname="2" colnum="2" colsep="0" colwidth="4.250in"/>
12453               <tbody>
12454                 <row rowsep="0">
12455                   <entry colname="1">
12456                     <para><command>range</command></para>
12457                   </entry>
12458                   <entry colname="2">
12459                     <para>
12460                       This can be one of two forms: start-stop
12461                       or start-stop/step. If the first form is used, then step
12462                       is set to
12463                       1. All of start, stop and step must be positive.
12464                     </para>
12465                   </entry>
12466                 </row>
12467                 <row rowsep="0">
12468                   <entry colname="1">
12469                     <para><command>lhs</command></para>
12470                   </entry>
12471                   <entry colname="2">
12472                     <para>This
12473                       describes the owner name of the resource records
12474                       to be created.  Any single <command>$</command>
12475                       (dollar sign)
12476                       symbols within the <command>lhs</command> string
12477                       are replaced by the iterator value.
12478
12479                       To get a $ in the output, you need to escape the
12480                       <command>$</command> using a backslash
12481                       <command>\</command>,
12482                       e.g. <command>\$</command>. The
12483                       <command>$</command> may optionally be followed
12484                       by modifiers which change the offset from the
12485                       iterator, field width and base.
12486
12487                       Modifiers are introduced by a
12488                       <command>{</command> (left brace) immediately following the
12489                       <command>$</command> as
12490                       <command>${offset[,width[,base]]}</command>.
12491                       For example, <command>${-20,3,d}</command>
12492                       subtracts 20 from the current value, prints the
12493                       result as a decimal in a zero-padded field of
12494                       width 3.
12495
12496                       Available output forms are decimal
12497                       (<command>d</command>), octal
12498                       (<command>o</command>), hexadecimal
12499                       (<command>x</command> or <command>X</command>
12500                       for uppercase) and nibble
12501                       (<command>n</command> or <command>N</command>\
12502                       for uppercase).  The default modifier is
12503                       <command>${0,0,d}</command>.  If the
12504                       <command>lhs</command> is not absolute, the
12505                       current <command>$ORIGIN</command> is appended
12506                       to the name.
12507                     </para>
12508                     <para>
12509                       In nibble mode the value will be treated as
12510                       if it was a reversed hexadecimal string
12511                       with each hexadecimal digit as a separate
12512                       label.  The width field includes the label
12513                       separator.
12514                     </para>
12515                     <para>
12516                       For compatibility with earlier versions,
12517                       <command>$$</command> is still recognized as
12518                       indicating a literal $ in the output.
12519                     </para>
12520                   </entry>
12521                 </row>
12522                 <row rowsep="0">
12523                   <entry colname="1">
12524                     <para><command>ttl</command></para>
12525                   </entry>
12526                   <entry colname="2">
12527                     <para>
12528                       Specifies the time-to-live of the generated records. If
12529                       not specified this will be inherited using the
12530                       normal TTL inheritance rules.
12531                     </para>
12532                     <para><command>class</command>
12533                       and <command>ttl</command> can be
12534                       entered in either order.
12535                     </para>
12536                   </entry>
12537                 </row>
12538                 <row rowsep="0">
12539                   <entry colname="1">
12540                     <para><command>class</command></para>
12541                   </entry>
12542                   <entry colname="2">
12543                     <para>
12544                       Specifies the class of the generated records.
12545                       This must match the zone class if it is
12546                       specified.
12547                     </para>
12548                     <para><command>class</command>
12549                       and <command>ttl</command> can be
12550                       entered in either order.
12551                     </para>
12552                   </entry>
12553                 </row>
12554                 <row rowsep="0">
12555                   <entry colname="1">
12556                     <para><command>type</command></para>
12557                   </entry>
12558                   <entry colname="2">
12559                     <para>
12560                       Any valid type.
12561                     </para>
12562                   </entry>
12563                 </row>
12564                 <row rowsep="0">
12565                   <entry colname="1">
12566                     <para><command>rhs</command></para>
12567                   </entry>
12568                   <entry colname="2">
12569                     <para>
12570                       <command>rhs</command>, optionally, quoted string.
12571                     </para>
12572                   </entry>
12573                 </row>
12574               </tbody>
12575             </tgroup>
12576           </informaltable>
12577           <para>
12578             The <command>$GENERATE</command> directive is a <acronym>BIND</acronym> extension
12579             and not part of the standard zone file format.
12580           </para>
12581           <para>
12582             BIND 8 does not support the optional TTL and CLASS fields.
12583           </para>
12584         </sect2>
12585
12586         <sect2 id="zonefile_format">
12587           <title>Additional File Formats</title>
12588           <para>
12589             In addition to the standard textual format, BIND 9
12590             supports the ability to read or dump to zone files in
12591             other formats.  The <constant>raw</constant> format is
12592             currently available as an additional format.  It is a
12593             binary format representing BIND 9's internal data
12594             structure directly, thereby remarkably improving the
12595             loading time.
12596           </para>
12597           <para>
12598             For a primary server, a zone file in the
12599             <constant>raw</constant> format is expected to be
12600             generated from a textual zone file by the
12601             <command>named-compilezone</command> command.  For a
12602             secondary server or for a dynamic zone, it is automatically
12603             generated (if this format is specified by the
12604             <command>masterfile-format</command> option) when
12605             <command>named</command> dumps the zone contents after
12606             zone transfer or when applying prior updates.
12607           </para>
12608           <para>
12609             If a zone file in a binary format needs manual modification,
12610             it first must be converted to a textual form by the
12611             <command>named-compilezone</command> command.  All
12612             necessary modification should go to the text file, which
12613             should then be converted to the binary form by the
12614             <command>named-compilezone</command> command again.
12615           </para>
12616           <para>
12617              Although the <constant>raw</constant> format uses the
12618              network byte order and avoids architecture-dependent
12619              data alignment so that it is as much portable as
12620              possible, it is primarily expected to be used inside
12621              the same single system.  In order to export a zone
12622              file in the <constant>raw</constant> format or make a
12623              portable backup of the file, it is recommended to
12624              convert the file to the standard textual representation.
12625           </para>
12626         </sect2>
12627       </sect1>
12628
12629       <sect1 id="statistics">
12630         <title>BIND9 Statistics</title>
12631         <para>
12632           <acronym>BIND</acronym> 9 maintains lots of statistics
12633           information and provides several interfaces for users to
12634           get access to the statistics.
12635           The available statistics include all statistics counters
12636           that were available in <acronym>BIND</acronym> 8 and
12637           are meaningful in <acronym>BIND</acronym> 9,
12638           and other information that is considered useful.
12639         </para>
12640
12641         <para>
12642           The statistics information is categorized into the following
12643           sections.
12644         </para>
12645
12646         <informaltable frame="all">
12647           <tgroup cols="2">
12648             <colspec colname="1" colnum="1" colsep="0" colwidth="3.300in"/>
12649             <colspec colname="2" colnum="2" colsep="0" colwidth="2.625in"/>
12650             <tbody>
12651
12652               <row rowsep="0">
12653                 <entry colname="1">
12654                   <para>Incoming Requests</para>
12655                 </entry>
12656                 <entry colname="2">
12657                   <para>
12658                     The number of incoming DNS requests for each OPCODE.
12659                   </para>
12660                 </entry>
12661               </row>
12662
12663               <row rowsep="0">
12664                 <entry colname="1">
12665                   <para>Incoming Queries</para>
12666                 </entry>
12667                 <entry colname="2">
12668                   <para>
12669                     The number of incoming queries for each RR type.
12670                   </para>
12671                 </entry>
12672               </row>
12673
12674               <row rowsep="0">
12675                 <entry colname="1">
12676                   <para>Outgoing Queries</para>
12677                 </entry>
12678                 <entry colname="2">
12679                   <para>
12680                     The number of outgoing queries for each RR
12681                     type sent from the internal resolver.
12682                     Maintained per view.
12683                   </para>
12684                 </entry>
12685               </row>
12686
12687               <row rowsep="0">
12688                 <entry colname="1">
12689                   <para>Name Server Statistics</para>
12690                 </entry>
12691                 <entry colname="2">
12692                   <para>
12693                     Statistics counters about incoming request processing.
12694                   </para>
12695                 </entry>
12696               </row>
12697
12698               <row rowsep="0">
12699                 <entry colname="1">
12700                   <para>Zone Maintenance Statistics</para>
12701                 </entry>
12702                 <entry colname="2">
12703                   <para>
12704                     Statistics counters regarding zone maintenance
12705                     operations such as zone transfers.
12706                   </para>
12707                 </entry>
12708               </row>
12709
12710               <row rowsep="0">
12711                 <entry colname="1">
12712                   <para>Resolver Statistics</para>
12713                 </entry>
12714                 <entry colname="2">
12715                   <para>
12716                     Statistics counters about name resolution
12717                     performed in the internal resolver.
12718                     Maintained per view.
12719                   </para>
12720                 </entry>
12721               </row>
12722
12723               <row rowsep="0">
12724                 <entry colname="1">
12725                   <para>Cache DB RRsets</para>
12726                 </entry>
12727                 <entry colname="2">
12728                   <para>
12729                     The number of RRsets per RR type and nonexistent
12730                     names stored in the cache database.
12731                     If the exclamation mark (!) is printed for a RR
12732                     type, it means that particular type of RRset is
12733                     known to be nonexistent (this is also known as
12734                     "NXRRSET").
12735                     Maintained per view.
12736                   </para>
12737                 </entry>
12738               </row>
12739
12740               <row rowsep="0">
12741                 <entry colname="1">
12742                   <para>Socket I/O Statistics</para>
12743                 </entry>
12744                 <entry colname="2">
12745                   <para>
12746                     Statistics counters about network related events.
12747                   </para>
12748                 </entry>
12749               </row>
12750
12751             </tbody>
12752           </tgroup>
12753         </informaltable>
12754
12755         <para>
12756           A subset of Name Server Statistics is collected and shown
12757           per zone for which the server has the authority when
12758           <command>zone-statistics</command> is set to
12759           <userinput>yes</userinput>.
12760           These statistics counters are shown with their zone and view
12761           names.
12762           In some cases the view names are omitted for the default view.
12763         </para>
12764
12765         <para>
12766           There are currently two user interfaces to get access to the
12767           statistics.
12768           One is in the plain text format dumped to the file specified
12769           by the <command>statistics-file</command> configuration option.
12770           The other is remotely accessible via a statistics channel
12771           when the <command>statistics-channels</command> statement
12772           is specified in the configuration file
12773           (see <xref linkend="statschannels"/>.)
12774         </para>
12775
12776         <sect3 id="statsfile">
12777           <title>The Statistics File</title>
12778           <para>
12779             The text format statistics dump begins with a line, like:
12780           </para>
12781           <para>
12782             <command>+++ Statistics Dump +++ (973798949)</command>
12783           </para>
12784           <para>
12785             The number in parentheses is a standard
12786             Unix-style timestamp, measured as seconds since January 1, 1970.
12787
12788             Following
12789             that line is a set of statistics information, which is categorized
12790             as described above.
12791             Each section begins with a line, like:
12792           </para>
12793
12794           <para>
12795             <command>++ Name Server Statistics ++</command>
12796           </para>
12797
12798           <para>
12799             Each section consists of lines, each containing the statistics
12800             counter value followed by its textual description.
12801             See below for available counters.
12802             For brevity, counters that have a value of 0 are not shown
12803             in the statistics file.
12804           </para>
12805
12806           <para>
12807             The statistics dump ends with the line where the
12808             number is identical to the number in the beginning line; for example:
12809           </para>
12810           <para>
12811             <command>--- Statistics Dump --- (973798949)</command>
12812           </para>
12813         </sect3>
12814
12815         <sect2 id="statistics_counters">
12816           <title>Statistics Counters</title>
12817           <para>
12818             The following tables summarize statistics counters that
12819             <acronym>BIND</acronym> 9 provides.
12820             For each row of the tables, the leftmost column is the
12821             abbreviated symbol name of that counter.
12822             These symbols are shown in the statistics information
12823             accessed via an HTTP statistics channel.
12824             The rightmost column gives the description of the counter,
12825             which is also shown in the statistics file
12826             (but, in this document, possibly with slight modification
12827             for better readability).
12828             Additional notes may also be provided in this column.
12829             When a middle column exists between these two columns,
12830             it gives the corresponding counter name of the
12831             <acronym>BIND</acronym> 8 statistics, if applicable.
12832           </para>
12833
12834           <sect3>
12835             <title>Name Server Statistics Counters</title>
12836
12837             <informaltable colsep="0" rowsep="0">
12838               <tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
12839                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
12840                 <colspec colname="2" colnum="2" colsep="0" colwidth="1.150in"/>
12841                 <colspec colname="3" colnum="3" colsep="0" colwidth="3.350in"/>
12842                 <tbody>
12843                   <row>
12844                     <entry colname="1">
12845                       <para>
12846                         <emphasis>Symbol</emphasis>
12847                       </para>
12848                     </entry>
12849                     <entry colname="2">
12850                       <para>
12851                         <emphasis>BIND8 Symbol</emphasis>
12852                       </para>
12853                     </entry>
12854                     <entry colname="3">
12855                       <para>
12856                         <emphasis>Description</emphasis>
12857                       </para>
12858                     </entry>
12859                   </row>
12860
12861                   <row rowsep="0">
12862                     <entry colname="1">
12863                       <para><command>Requestv4</command></para>
12864                     </entry>
12865                     <entry colname="2">
12866                       <para><command>RQ</command></para>
12867                     </entry>
12868                     <entry colname="3">
12869                       <para>
12870                         IPv4 requests received.
12871                         Note: this also counts non query requests.
12872                       </para>
12873                     </entry>
12874                   </row>
12875                   <row rowsep="0">
12876                     <entry colname="1">
12877                       <para><command>Requestv6</command></para>
12878                     </entry>
12879                     <entry colname="2">
12880                       <para><command>RQ</command></para>
12881                     </entry>
12882                     <entry colname="3">
12883                       <para>
12884                         IPv6 requests received.
12885                         Note: this also counts non query requests.
12886                       </para>
12887                     </entry>
12888                   </row>
12889                   <row rowsep="0">
12890                     <entry colname="1">
12891                       <para><command>ReqEdns0</command></para>
12892                     </entry>
12893                     <entry colname="2">
12894                       <para><command></command></para>
12895                     </entry>
12896                     <entry colname="3">
12897                       <para>
12898                         Requests with EDNS(0) received.
12899                       </para>
12900                     </entry>
12901                   </row>
12902                   <row rowsep="0">
12903                     <entry colname="1">
12904                       <para><command>ReqBadEDNSVer</command></para>
12905                     </entry>
12906                     <entry colname="2">
12907                       <para><command></command></para>
12908                     </entry>
12909                     <entry colname="3">
12910                       <para>
12911                         Requests with unsupported EDNS version received.
12912                       </para>
12913                     </entry>
12914                   </row>
12915                   <row rowsep="0">
12916                     <entry colname="1">
12917                       <para><command>ReqTSIG</command></para>
12918                     </entry>
12919                     <entry colname="2">
12920                       <para><command></command></para>
12921                     </entry>
12922                     <entry colname="3">
12923                       <para>
12924                         Requests with TSIG received.
12925                       </para>
12926                     </entry>
12927                   </row>
12928                   <row rowsep="0">
12929                     <entry colname="1">
12930                       <para><command>ReqSIG0</command></para>
12931                     </entry>
12932                     <entry colname="2">
12933                       <para><command></command></para>
12934                     </entry>
12935                     <entry colname="3">
12936                       <para>
12937                         Requests with SIG(0) received.
12938                       </para>
12939                     </entry>
12940                   </row>
12941                   <row rowsep="0">
12942                     <entry colname="1">
12943                       <para><command>ReqBadSIG</command></para>
12944                     </entry>
12945                     <entry colname="2">
12946                       <para><command></command></para>
12947                     </entry>
12948                     <entry colname="3">
12949                       <para>
12950                         Requests with invalid (TSIG or SIG(0)) signature.
12951                       </para>
12952                     </entry>
12953                   </row>
12954                   <row rowsep="0">
12955                     <entry colname="1">
12956                       <para><command>ReqTCP</command></para>
12957                     </entry>
12958                     <entry colname="2">
12959                       <para><command>RTCP</command></para>
12960                     </entry>
12961                     <entry colname="3">
12962                       <para>
12963                         TCP requests received.
12964                       </para>
12965                     </entry>
12966                   </row>
12967                   <row rowsep="0">
12968                     <entry colname="1">
12969                       <para><command>AuthQryRej</command></para>
12970                     </entry>
12971                     <entry colname="2">
12972                       <para><command>RUQ</command></para>
12973                     </entry>
12974                     <entry colname="3">
12975                       <para>
12976                         Authoritative (non recursive) queries rejected.
12977                       </para>
12978                     </entry>
12979                   </row>
12980                   <row rowsep="0">
12981                     <entry colname="1">
12982                       <para><command>RecQryRej</command></para>
12983                     </entry>
12984                     <entry colname="2">
12985                       <para><command>RURQ</command></para>
12986                     </entry>
12987                     <entry colname="3">
12988                       <para>
12989                         Recursive queries rejected.
12990                       </para>
12991                     </entry>
12992                   </row>
12993                   <row rowsep="0">
12994                     <entry colname="1">
12995                       <para><command>XfrRej</command></para>
12996                     </entry>
12997                     <entry colname="2">
12998                       <para><command>RUXFR</command></para>
12999                     </entry>
13000                     <entry colname="3">
13001                       <para>
13002                         Zone transfer requests rejected.
13003                       </para>
13004                     </entry>
13005                   </row>
13006                   <row rowsep="0">
13007                     <entry colname="1">
13008                       <para><command>UpdateRej</command></para>
13009                     </entry>
13010                     <entry colname="2">
13011                       <para><command>RUUpd</command></para>
13012                     </entry>
13013                     <entry colname="3">
13014                       <para>
13015                         Dynamic update requests rejected.
13016                       </para>
13017                     </entry>
13018                   </row>
13019                   <row rowsep="0">
13020                     <entry colname="1">
13021                       <para><command>Response</command></para>
13022                     </entry>
13023                     <entry colname="2">
13024                       <para><command>SAns</command></para>
13025                     </entry>
13026                     <entry colname="3">
13027                       <para>
13028                         Responses sent.
13029                       </para>
13030                     </entry>
13031                   </row>
13032                   <row rowsep="0">
13033                     <entry colname="1">
13034                       <para><command>RespTruncated</command></para>
13035                     </entry>
13036                     <entry colname="2">
13037                       <para><command></command></para>
13038                     </entry>
13039                     <entry colname="3">
13040                       <para>
13041                         Truncated responses sent.
13042                       </para>
13043                     </entry>
13044                   </row>
13045                   <row rowsep="0">
13046                     <entry colname="1">
13047                       <para><command>RespEDNS0</command></para>
13048                     </entry>
13049                     <entry colname="2">
13050                       <para><command></command></para>
13051                     </entry>
13052                     <entry colname="3">
13053                       <para>
13054                         Responses with EDNS(0) sent.
13055                       </para>
13056                     </entry>
13057                   </row>
13058                   <row rowsep="0">
13059                     <entry colname="1">
13060                       <para><command>RespTSIG</command></para>
13061                     </entry>
13062                     <entry colname="2">
13063                       <para><command></command></para>
13064                     </entry>
13065                     <entry colname="3">
13066                       <para>
13067                         Responses with TSIG sent.
13068                       </para>
13069                     </entry>
13070                   </row>
13071                   <row rowsep="0">
13072                     <entry colname="1">
13073                       <para><command>RespSIG0</command></para>
13074                     </entry>
13075                     <entry colname="2">
13076                       <para><command></command></para>
13077                     </entry>
13078                     <entry colname="3">
13079                       <para>
13080                         Responses with SIG(0) sent.
13081                       </para>
13082                     </entry>
13083                   </row>
13084                   <row rowsep="0">
13085                     <entry colname="1">
13086                       <para><command>QrySuccess</command></para>
13087                     </entry>
13088                     <entry colname="2">
13089                       <para><command></command></para>
13090                     </entry>
13091                     <entry colname="3">
13092                       <para>
13093                         Queries resulted in a successful answer.
13094                         This means the query which returns a NOERROR response
13095                         with at least one answer RR.
13096                         This corresponds to the
13097                         <command>success</command> counter
13098                         of previous versions of
13099                         <acronym>BIND</acronym> 9.
13100                       </para>
13101                     </entry>
13102                   </row>
13103                   <row rowsep="0">
13104                     <entry colname="1">
13105                       <para><command>QryAuthAns</command></para>
13106                     </entry>
13107                     <entry colname="2">
13108                       <para><command></command></para>
13109                     </entry>
13110                     <entry colname="3">
13111                       <para>
13112                         Queries resulted in authoritative answer.
13113                       </para>
13114                     </entry>
13115                   </row>
13116                   <row rowsep="0">
13117                     <entry colname="1">
13118                       <para><command>QryNoauthAns</command></para>
13119                     </entry>
13120                     <entry colname="2">
13121                       <para><command>SNaAns</command></para>
13122                     </entry>
13123                     <entry colname="3">
13124                       <para>
13125                         Queries resulted in non authoritative answer.
13126                       </para>
13127                     </entry>
13128                   </row>
13129                   <row rowsep="0">
13130                     <entry colname="1">
13131                       <para><command>QryReferral</command></para>
13132                     </entry>
13133                     <entry colname="2">
13134                       <para><command></command></para>
13135                     </entry>
13136                     <entry colname="3">
13137                       <para>
13138                         Queries resulted in referral answer.
13139                         This corresponds to the
13140                         <command>referral</command> counter
13141                         of previous versions of
13142                         <acronym>BIND</acronym> 9.
13143                       </para>
13144                     </entry>
13145                   </row>
13146                   <row rowsep="0">
13147                     <entry colname="1">
13148                       <para><command>QryNxrrset</command></para>
13149                     </entry>
13150                     <entry colname="2">
13151                       <para><command></command></para>
13152                     </entry>
13153                     <entry colname="3">
13154                       <para>
13155                         Queries resulted in NOERROR responses with no data.
13156                         This corresponds to the
13157                         <command>nxrrset</command> counter
13158                         of previous versions of
13159                         <acronym>BIND</acronym> 9.
13160                       </para>
13161                     </entry>
13162                   </row>
13163                   <row rowsep="0">
13164                     <entry colname="1">
13165                       <para><command>QrySERVFAIL</command></para>
13166                     </entry>
13167                     <entry colname="2">
13168                       <para><command>SFail</command></para>
13169                     </entry>
13170                     <entry colname="3">
13171                       <para>
13172                         Queries resulted in SERVFAIL.
13173                       </para>
13174                     </entry>
13175                   </row>
13176                   <row rowsep="0">
13177                     <entry colname="1">
13178                       <para><command>QryFORMERR</command></para>
13179                     </entry>
13180                     <entry colname="2">
13181                       <para><command>SFErr</command></para>
13182                     </entry>
13183                     <entry colname="3">
13184                       <para>
13185                         Queries resulted in FORMERR.
13186                       </para>
13187                     </entry>
13188                   </row>
13189                   <row rowsep="0">
13190                     <entry colname="1">
13191                       <para><command>QryNXDOMAIN</command></para>
13192                     </entry>
13193                     <entry colname="2">
13194                       <para><command>SNXD</command></para>
13195                     </entry>
13196                     <entry colname="3">
13197                       <para>
13198                         Queries resulted in NXDOMAIN.
13199                         This corresponds to the
13200                         <command>nxdomain</command> counter
13201                         of previous versions of
13202                         <acronym>BIND</acronym> 9.
13203                       </para>
13204                     </entry>
13205                   </row>
13206                   <row rowsep="0">
13207                     <entry colname="1">
13208                       <para><command>QryRecursion</command></para>
13209                     </entry>
13210                     <entry colname="2">
13211                       <para><command>RFwdQ</command></para>
13212                     </entry>
13213                     <entry colname="3">
13214                       <para>
13215                         Queries which caused the server
13216                         to perform recursion in order to find the final answer.
13217                         This corresponds to the
13218                         <command>recursion</command> counter
13219                         of previous versions of
13220                         <acronym>BIND</acronym> 9.
13221                       </para>
13222                     </entry>
13223                   </row>
13224                   <row rowsep="0">
13225                     <entry colname="1">
13226                       <para><command>QryDuplicate</command></para>
13227                     </entry>
13228                     <entry colname="2">
13229                       <para><command>RDupQ</command></para>
13230                     </entry>
13231                     <entry colname="3">
13232                       <para>
13233                         Queries which the server attempted to
13234                         recurse but discovered an existing query with the same
13235                         IP address, port, query ID, name, type and class
13236                         already being processed.
13237                         This corresponds to the
13238                         <command>duplicate</command> counter
13239                         of previous versions of
13240                         <acronym>BIND</acronym> 9.
13241                       </para>
13242                     </entry>
13243                   </row>
13244                   <row rowsep="0">
13245                     <entry colname="1">
13246                       <para><command>QryDropped</command></para>
13247                     </entry>
13248                     <entry colname="2">
13249                       <para><command></command></para>
13250                     </entry>
13251                     <entry colname="3">
13252                       <para>
13253                         Recursive queries for which the server
13254                         discovered an excessive number of existing
13255                         recursive queries for the same name, type and
13256                         class and were subsequently dropped.
13257                         This is the number of dropped queries due to
13258                         the reason explained with the
13259                         <command>clients-per-query</command>
13260                         and
13261                         <command>max-clients-per-query</command>
13262                         options
13263                         (see the description about
13264                         <xref linkend="clients-per-query"/>.)
13265                         This corresponds to the
13266                         <command>dropped</command> counter
13267                         of previous versions of
13268                         <acronym>BIND</acronym> 9.
13269                       </para>
13270                     </entry>
13271                   </row>
13272                   <row rowsep="0">
13273                     <entry colname="1">
13274                       <para><command>QryFailure</command></para>
13275                     </entry>
13276                     <entry colname="2">
13277                       <para><command></command></para>
13278                     </entry>
13279                     <entry colname="3">
13280                       <para>
13281                         Other query failures.
13282                         This corresponds to the
13283                         <command>failure</command> counter
13284                         of previous versions of
13285                         <acronym>BIND</acronym> 9.
13286                         Note: this counter is provided mainly for
13287                         backward compatibility with the previous versions.
13288                         Normally a more fine-grained counters such as
13289                         <command>AuthQryRej</command> and
13290                         <command>RecQryRej</command>
13291                         that would also fall into this counter are provided,
13292                         and so this counter would not be of much
13293                         interest in practice.
13294                       </para>
13295                     </entry>
13296                   </row>
13297                   <row rowsep="0">
13298                     <entry colname="1">
13299                       <para><command>XfrReqDone</command></para>
13300                     </entry>
13301                     <entry colname="2">
13302                       <para><command></command></para>
13303                     </entry>
13304                     <entry colname="3">
13305                       <para>
13306                         Requested zone transfers completed.
13307                       </para>
13308                     </entry>
13309                   </row>
13310                   <row rowsep="0">
13311                     <entry colname="1">
13312                       <para><command>UpdateReqFwd</command></para>
13313                     </entry>
13314                     <entry colname="2">
13315                       <para><command></command></para>
13316                     </entry>
13317                     <entry colname="3">
13318                       <para>
13319                         Update requests forwarded.
13320                       </para>
13321                     </entry>
13322                   </row>
13323                   <row rowsep="0">
13324                     <entry colname="1">
13325                       <para><command>UpdateRespFwd</command></para>
13326                     </entry>
13327                     <entry colname="2">
13328                       <para><command></command></para>
13329                     </entry>
13330                     <entry colname="3">
13331                       <para>
13332                         Update responses forwarded.
13333                       </para>
13334                     </entry>
13335                   </row>
13336                   <row rowsep="0">
13337                     <entry colname="1">
13338                       <para><command>UpdateFwdFail</command></para>
13339                     </entry>
13340                     <entry colname="2">
13341                       <para><command></command></para>
13342                     </entry>
13343                     <entry colname="3">
13344                       <para>
13345                         Dynamic update forward failed.
13346                       </para>
13347                     </entry>
13348                   </row>
13349                   <row rowsep="0">
13350                     <entry colname="1">
13351                       <para><command>UpdateDone</command></para>
13352                     </entry>
13353                     <entry colname="2">
13354                       <para><command></command></para>
13355                     </entry>
13356                     <entry colname="3">
13357                       <para>
13358                         Dynamic updates completed.
13359                       </para>
13360                     </entry>
13361                   </row>
13362                   <row rowsep="0">
13363                     <entry colname="1">
13364                       <para><command>UpdateFail</command></para>
13365                     </entry>
13366                     <entry colname="2">
13367                       <para><command></command></para>
13368                     </entry>
13369                     <entry colname="3">
13370                       <para>
13371                         Dynamic updates failed.
13372                       </para>
13373                     </entry>
13374                   </row>
13375                   <row rowsep="0">
13376                     <entry colname="1">
13377                       <para><command>UpdateBadPrereq</command></para>
13378                     </entry>
13379                     <entry colname="2">
13380                       <para><command></command></para>
13381                     </entry>
13382                     <entry colname="3">
13383                       <para>
13384                         Dynamic updates rejected due to prerequisite failure.
13385                       </para>
13386                     </entry>
13387                   </row>
13388                 </tbody>
13389               </tgroup>
13390             </informaltable>
13391           </sect3>
13392
13393           <sect3>
13394             <title>Zone Maintenance Statistics Counters</title>
13395
13396             <informaltable colsep="0" rowsep="0">
13397               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
13398                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
13399                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
13400                 <tbody>
13401                   <row>
13402                     <entry colname="1">
13403                       <para>
13404                         <emphasis>Symbol</emphasis>
13405                       </para>
13406                     </entry>
13407                     <entry colname="2">
13408                       <para>
13409                         <emphasis>Description</emphasis>
13410                       </para>
13411                     </entry>
13412                   </row>
13413
13414                   <row rowsep="0">
13415                     <entry colname="1">
13416                       <para><command>NotifyOutv4</command></para>
13417                     </entry>
13418                     <entry colname="2">
13419                       <para>
13420                         IPv4 notifies sent.
13421                       </para>
13422                     </entry>
13423                   </row>
13424                   <row rowsep="0">
13425                     <entry colname="1">
13426                       <para><command>NotifyOutv6</command></para>
13427                     </entry>
13428                     <entry colname="2">
13429                       <para>
13430                         IPv6 notifies sent.
13431                       </para>
13432                     </entry>
13433                   </row>
13434                   <row rowsep="0">
13435                     <entry colname="1">
13436                       <para><command>NotifyInv4</command></para>
13437                     </entry>
13438                     <entry colname="2">
13439                       <para>
13440                         IPv4 notifies received.
13441                       </para>
13442                     </entry>
13443                   </row>
13444                   <row rowsep="0">
13445                     <entry colname="1">
13446                       <para><command>NotifyInv6</command></para>
13447                     </entry>
13448                     <entry colname="2">
13449                       <para>
13450                         IPv6 notifies received.
13451                       </para>
13452                     </entry>
13453                   </row>
13454                   <row rowsep="0">
13455                     <entry colname="1">
13456                       <para><command>NotifyRej</command></para>
13457                     </entry>
13458                     <entry colname="2">
13459                       <para>
13460                         Incoming notifies rejected.
13461                       </para>
13462                     </entry>
13463                   </row>
13464                   <row rowsep="0">
13465                     <entry colname="1">
13466                       <para><command>SOAOutv4</command></para>
13467                     </entry>
13468                     <entry colname="2">
13469                       <para>
13470                         IPv4 SOA queries sent.
13471                       </para>
13472                     </entry>
13473                   </row>
13474                   <row rowsep="0">
13475                     <entry colname="1">
13476                       <para><command>SOAOutv6</command></para>
13477                     </entry>
13478                     <entry colname="2">
13479                       <para>
13480                         IPv6 SOA queries sent.
13481                       </para>
13482                     </entry>
13483                   </row>
13484                   <row rowsep="0">
13485                     <entry colname="1">
13486                       <para><command>AXFRReqv4</command></para>
13487                     </entry>
13488                     <entry colname="2">
13489                       <para>
13490                         IPv4 AXFR requested.
13491                       </para>
13492                     </entry>
13493                   </row>
13494                   <row rowsep="0">
13495                     <entry colname="1">
13496                       <para><command>AXFRReqv6</command></para>
13497                     </entry>
13498                     <entry colname="2">
13499                       <para>
13500                         IPv6 AXFR requested.
13501                       </para>
13502                     </entry>
13503                   </row>
13504                   <row rowsep="0">
13505                     <entry colname="1">
13506                       <para><command>IXFRReqv4</command></para>
13507                     </entry>
13508                     <entry colname="2">
13509                       <para>
13510                         IPv4 IXFR requested.
13511                       </para>
13512                     </entry>
13513                   </row>
13514                   <row rowsep="0">
13515                     <entry colname="1">
13516                       <para><command>IXFRReqv6</command></para>
13517                     </entry>
13518                     <entry colname="2">
13519                       <para>
13520                         IPv6 IXFR requested.
13521                       </para>
13522                     </entry>
13523                   </row>
13524                   <row rowsep="0">
13525                     <entry colname="1">
13526                       <para><command>XfrSuccess</command></para>
13527                     </entry>
13528                     <entry colname="2">
13529                       <para>
13530                         Zone transfer requests succeeded.
13531                       </para>
13532                     </entry>
13533                   </row>
13534                   <row rowsep="0">
13535                     <entry colname="1">
13536                       <para><command>XfrFail</command></para>
13537                     </entry>
13538                     <entry colname="2">
13539                       <para>
13540                         Zone transfer requests failed.
13541                       </para>
13542                     </entry>
13543                   </row>
13544                 </tbody>
13545               </tgroup>
13546             </informaltable>
13547           </sect3>
13548
13549           <sect3>
13550             <title>Resolver Statistics Counters</title>
13551
13552             <informaltable colsep="0" rowsep="0">
13553               <tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
13554                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
13555                 <colspec colname="2" colnum="2" colsep="0" colwidth="1.150in"/>
13556                 <colspec colname="3" colnum="3" colsep="0" colwidth="3.350in"/>
13557                 <tbody>
13558                   <row>
13559                     <entry colname="1">
13560                       <para>
13561                         <emphasis>Symbol</emphasis>
13562                       </para>
13563                     </entry>
13564                     <entry colname="2">
13565                       <para>
13566                         <emphasis>BIND8 Symbol</emphasis>
13567                       </para>
13568                     </entry>
13569                     <entry colname="3">
13570                       <para>
13571                         <emphasis>Description</emphasis>
13572                       </para>
13573                     </entry>
13574                   </row>
13575
13576                   <row rowsep="0">
13577                     <entry colname="1">
13578                       <para><command>Queryv4</command></para>
13579                     </entry>
13580                     <entry colname="2">
13581                       <para><command>SFwdQ</command></para>
13582                     </entry>
13583                     <entry colname="3">
13584                       <para>
13585                         IPv4 queries sent.
13586                       </para>
13587                     </entry>
13588                   </row>
13589                   <row rowsep="0">
13590                     <entry colname="1">
13591                       <para><command>Queryv6</command></para>
13592                     </entry>
13593                     <entry colname="2">
13594                       <para><command>SFwdQ</command></para>
13595                     </entry>
13596                     <entry colname="3">
13597                       <para>
13598                         IPv6 queries sent.
13599                       </para>
13600                     </entry>
13601                   </row>
13602                   <row rowsep="0">
13603                     <entry colname="1">
13604                       <para><command>Responsev4</command></para>
13605                     </entry>
13606                     <entry colname="2">
13607                       <para><command>RR</command></para>
13608                     </entry>
13609                     <entry colname="3">
13610                       <para>
13611                         IPv4 responses received.
13612                       </para>
13613                     </entry>
13614                   </row>
13615                   <row rowsep="0">
13616                     <entry colname="1">
13617                       <para><command>Responsev6</command></para>
13618                     </entry>
13619                     <entry colname="2">
13620                       <para><command>RR</command></para>
13621                     </entry>
13622                     <entry colname="3">
13623                       <para>
13624                         IPv6 responses received.
13625                       </para>
13626                     </entry>
13627                   </row>
13628                   <row rowsep="0">
13629                     <entry colname="1">
13630                       <para><command>NXDOMAIN</command></para>
13631                     </entry>
13632                     <entry colname="2">
13633                       <para><command>RNXD</command></para>
13634                     </entry>
13635                     <entry colname="3">
13636                       <para>
13637                         NXDOMAIN received.
13638                       </para>
13639                     </entry>
13640                   </row>
13641                   <row rowsep="0">
13642                     <entry colname="1">
13643                       <para><command>SERVFAIL</command></para>
13644                     </entry>
13645                     <entry colname="2">
13646                       <para><command>RFail</command></para>
13647                     </entry>
13648                     <entry colname="3">
13649                       <para>
13650                         SERVFAIL received.
13651                       </para>
13652                     </entry>
13653                   </row>
13654                   <row rowsep="0">
13655                     <entry colname="1">
13656                       <para><command>FORMERR</command></para>
13657                     </entry>
13658                     <entry colname="2">
13659                       <para><command>RFErr</command></para>
13660                     </entry>
13661                     <entry colname="3">
13662                       <para>
13663                         FORMERR received.
13664                       </para>
13665                     </entry>
13666                   </row>
13667                   <row rowsep="0">
13668                     <entry colname="1">
13669                       <para><command>OtherError</command></para>
13670                     </entry>
13671                     <entry colname="2">
13672                       <para><command>RErr</command></para>
13673                     </entry>
13674                     <entry colname="3">
13675                       <para>
13676                         Other errors received.
13677                       </para>
13678                     </entry>
13679                   </row>
13680                   <row rowsep="0">
13681                     <entry colname="1">
13682                       <para><command>EDNS0Fail</command></para>
13683                                                  </entry>
13684                     <entry colname="2">
13685                       <para><command></command></para>
13686                     </entry>
13687                     <entry colname="3">
13688                       <para>
13689                         EDNS(0) query failures.
13690                       </para>
13691                     </entry>
13692                   </row>
13693                   <row rowsep="0">
13694                     <entry colname="1">
13695                       <para><command>Mismatch</command></para>
13696                     </entry>
13697                     <entry colname="2">
13698                       <para><command>RDupR</command></para>
13699                     </entry>
13700                     <entry colname="3">
13701                       <para>
13702                         Mismatch responses received.
13703                         The DNS ID, response's source address,
13704                         and/or the response's source port does not
13705                         match what was expected.
13706                         (The port must be 53 or as defined by
13707                         the <command>port</command> option.)
13708                         This may be an indication of a cache
13709                         poisoning attempt.
13710                       </para>
13711                     </entry>
13712                   </row>
13713                   <row rowsep="0">
13714                     <entry colname="1">
13715                       <para><command>Truncated</command></para>
13716                     </entry>
13717                     <entry colname="2">
13718                       <para><command></command></para>
13719                     </entry>
13720                     <entry colname="3">
13721                       <para>
13722                         Truncated responses received.
13723                       </para>
13724                     </entry>
13725                   </row>
13726                   <row rowsep="0">
13727                     <entry colname="1">
13728                       <para><command>Lame</command></para>
13729                     </entry>
13730                     <entry colname="2">
13731                       <para><command>RLame</command></para>
13732                     </entry>
13733                     <entry colname="3">
13734                       <para>
13735                         Lame delegations received.
13736                       </para>
13737                     </entry>
13738                   </row>
13739                   <row rowsep="0">
13740                     <entry colname="1">
13741                       <para><command>Retry</command></para>
13742                     </entry>
13743                     <entry colname="2">
13744                       <para><command>SDupQ</command></para>
13745                     </entry>
13746                     <entry colname="3">
13747                       <para>
13748                         Query retries performed.
13749                       </para>
13750                     </entry>
13751                   </row>
13752                   <row rowsep="0">
13753                     <entry colname="1">
13754                       <para><command>QueryAbort</command></para>
13755                     </entry>
13756                     <entry colname="2">
13757                       <para><command></command></para>
13758                     </entry>
13759                     <entry colname="3">
13760                       <para>
13761                         Queries aborted due to quota control.
13762                       </para>
13763                     </entry>
13764                   </row>
13765                   <row rowsep="0">
13766                     <entry colname="1">
13767                       <para><command>QuerySockFail</command></para>
13768                     </entry>
13769                     <entry colname="2">
13770                       <para><command></command></para>
13771                     </entry>
13772                     <entry colname="3">
13773                       <para>
13774                         Failures in opening query sockets.
13775                         One common reason for such failures is a
13776                         failure of opening a new socket due to a
13777                         limitation on file descriptors.
13778                       </para>
13779                     </entry>
13780                   </row>
13781                   <row rowsep="0">
13782                     <entry colname="1">
13783                       <para><command>QueryTimeout</command></para>
13784                     </entry>
13785                     <entry colname="2">
13786                       <para><command></command></para>
13787                     </entry>
13788                     <entry colname="3">
13789                       <para>
13790                         Query timeouts.
13791                       </para>
13792                     </entry>
13793                   </row>
13794                   <row rowsep="0">
13795                     <entry colname="1">
13796                       <para><command>GlueFetchv4</command></para>
13797                     </entry>
13798                     <entry colname="2">
13799                       <para><command>SSysQ</command></para>
13800                     </entry>
13801                     <entry colname="3">
13802                       <para>
13803                         IPv4 NS address fetches invoked.
13804                       </para>
13805                     </entry>
13806                   </row>
13807                   <row rowsep="0">
13808                     <entry colname="1">
13809                       <para><command>GlueFetchv6</command></para>
13810                     </entry>
13811                     <entry colname="2">
13812                       <para><command>SSysQ</command></para>
13813                     </entry>
13814                     <entry colname="3">
13815                       <para>
13816                         IPv6 NS address fetches invoked.
13817                       </para>
13818                     </entry>
13819                   </row>
13820                   <row rowsep="0">
13821                     <entry colname="1">
13822                       <para><command>GlueFetchv4Fail</command></para>
13823                     </entry>
13824                     <entry colname="2">
13825                       <para><command></command></para>
13826                     </entry>
13827                     <entry colname="3">
13828                       <para>
13829                         IPv4 NS address fetch failed.
13830                       </para>
13831                     </entry>
13832                   </row>
13833                   <row rowsep="0">
13834                     <entry colname="1">
13835                       <para><command>GlueFetchv6Fail</command></para>
13836                     </entry>
13837                     <entry colname="2">
13838                       <para><command></command></para>
13839                     </entry>
13840                     <entry colname="3">
13841                       <para>
13842                         IPv6 NS address fetch failed.
13843                       </para>
13844                     </entry>
13845                   </row>
13846                   <row rowsep="0">
13847                     <entry colname="1">
13848                       <para><command>ValAttempt</command></para>
13849                     </entry>
13850                     <entry colname="2">
13851                       <para><command></command></para>
13852                     </entry>
13853                     <entry colname="3">
13854                       <para>
13855                         DNSSEC validation attempted.
13856                       </para>
13857                     </entry>
13858                   </row>
13859                   <row rowsep="0">
13860                     <entry colname="1">
13861                       <para><command>ValOk</command></para>
13862                     </entry>
13863                     <entry colname="2">
13864                       <para><command></command></para>
13865                     </entry>
13866                     <entry colname="3">
13867                       <para>
13868                         DNSSEC validation succeeded.
13869                       </para>
13870                     </entry>
13871                   </row>
13872                   <row rowsep="0">
13873                     <entry colname="1">
13874                       <para><command>ValNegOk</command></para>
13875                     </entry>
13876                     <entry colname="2">
13877                       <para><command></command></para>
13878                     </entry>
13879                     <entry colname="3">
13880                       <para>
13881                         DNSSEC validation on negative information succeeded.
13882                       </para>
13883                     </entry>
13884                   </row>
13885                   <row rowsep="0">
13886                     <entry colname="1">
13887                       <para><command>ValFail</command></para>
13888                     </entry>
13889                     <entry colname="2">
13890                       <para><command></command></para>
13891                     </entry>
13892                     <entry colname="3">
13893                       <para>
13894                         DNSSEC validation failed.
13895                       </para>
13896                     </entry>
13897                   </row>
13898                   <row rowsep="0">
13899                     <entry colname="1">
13900                       <para><command>QryRTTnn</command></para>
13901                     </entry>
13902                     <entry colname="2">
13903                       <para><command></command></para>
13904                     </entry>
13905                     <entry colname="3">
13906                       <para>
13907                         Frequency table on round trip times (RTTs) of
13908                         queries.
13909                         Each <command>nn</command> specifies the corresponding
13910                         frequency.
13911                         In the sequence of
13912                         <command>nn_1</command>,
13913                         <command>nn_2</command>,
13914                         ...,
13915                         <command>nn_m</command>,
13916                         the value of <command>nn_i</command> is the
13917                         number of queries whose RTTs are between
13918                         <command>nn_(i-1)</command> (inclusive) and
13919                         <command>nn_i</command> (exclusive) milliseconds.
13920                         For the sake of convenience we define
13921                         <command>nn_0</command> to be 0.
13922                         The last entry should be represented as
13923                         <command>nn_m+</command>, which means the
13924                         number of queries whose RTTs are equal to or over
13925                         <command>nn_m</command> milliseconds.
13926                       </para>
13927                     </entry>
13928                   </row>
13929                 </tbody>
13930               </tgroup>
13931             </informaltable>
13932
13933           </sect3>
13934
13935           <sect3>
13936             <title>Socket I/O Statistics Counters</title>
13937
13938             <para>
13939               Socket I/O statistics counters are defined per socket
13940               types, which are
13941               <command>UDP4</command> (UDP/IPv4),
13942               <command>UDP6</command> (UDP/IPv6),
13943               <command>TCP4</command> (TCP/IPv4),
13944               <command>TCP6</command> (TCP/IPv6),
13945               <command>Unix</command> (Unix Domain), and
13946               <command>FDwatch</command> (sockets opened outside the
13947               socket module).
13948               In the following table <command>&lt;TYPE&gt;</command>
13949               represents a socket type.
13950               Not all counters are available for all socket types;
13951               exceptions are noted in the description field.
13952             </para>
13953
13954             <informaltable colsep="0" rowsep="0">
13955               <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
13956                 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
13957                 <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
13958                 <tbody>
13959                   <row>
13960                     <entry colname="1">
13961                       <para>
13962                         <emphasis>Symbol</emphasis>
13963                       </para>
13964                     </entry>
13965                     <entry colname="2">
13966                       <para>
13967                         <emphasis>Description</emphasis>
13968                       </para>
13969                     </entry>
13970                   </row>
13971
13972                   <row rowsep="0">
13973                     <entry colname="1">
13974                       <para><command>&lt;TYPE&gt;Open</command></para>
13975                     </entry>
13976                     <entry colname="2">
13977                       <para>
13978                         Sockets opened successfully.
13979                         This counter is not applicable to the
13980                         <command>FDwatch</command> type.
13981                       </para>
13982                     </entry>
13983                   </row>
13984                   <row rowsep="0">
13985                     <entry colname="1">
13986                       <para><command>&lt;TYPE&gt;OpenFail</command></para>
13987                     </entry>
13988                     <entry colname="2">
13989                       <para>
13990                         Failures of opening sockets.
13991                         This counter is not applicable to the
13992                         <command>FDwatch</command> type.
13993                       </para>
13994                     </entry>
13995                   </row>
13996                   <row rowsep="0">
13997                     <entry colname="1">
13998                       <para><command>&lt;TYPE&gt;Close</command></para>
13999                     </entry>
14000                     <entry colname="2">
14001                       <para>
14002                         Sockets closed.
14003                       </para>
14004                     </entry>
14005                   </row>
14006                   <row rowsep="0">
14007                     <entry colname="1">
14008                       <para><command>&lt;TYPE&gt;BindFail</command></para>
14009                     </entry>
14010                     <entry colname="2">
14011                       <para>
14012                         Failures of binding sockets.
14013                       </para>
14014                     </entry>
14015                   </row>
14016                   <row rowsep="0">
14017                     <entry colname="1">
14018                       <para><command>&lt;TYPE&gt;ConnFail</command></para>
14019                     </entry>
14020                     <entry colname="2">
14021                       <para>
14022                         Failures of connecting sockets.
14023                       </para>
14024                     </entry>
14025                   </row>
14026                   <row rowsep="0">
14027                     <entry colname="1">
14028                       <para><command>&lt;TYPE&gt;Conn</command></para>
14029                     </entry>
14030                     <entry colname="2">
14031                       <para>
14032                         Connections established successfully.
14033                       </para>
14034                     </entry>
14035                   </row>
14036                   <row rowsep="0">
14037                     <entry colname="1">
14038                       <para><command>&lt;TYPE&gt;AcceptFail</command></para>
14039                     </entry>
14040                     <entry colname="2">
14041                       <para>
14042                         Failures of accepting incoming connection requests.
14043                         This counter is not applicable to the
14044                         <command>UDP</command> and
14045                         <command>FDwatch</command> types.
14046                       </para>
14047                     </entry>
14048                   </row>
14049                   <row rowsep="0">
14050                     <entry colname="1">
14051                       <para><command>&lt;TYPE&gt;Accept</command></para>
14052                     </entry>
14053                     <entry colname="2">
14054                       <para>
14055                         Incoming connections successfully accepted.
14056                         This counter is not applicable to the
14057                         <command>UDP</command> and
14058                         <command>FDwatch</command> types.
14059                       </para>
14060                     </entry>
14061                   </row>
14062                   <row rowsep="0">
14063                     <entry colname="1">
14064                       <para><command>&lt;TYPE&gt;SendErr</command></para>
14065                     </entry>
14066                     <entry colname="2">
14067                       <para>
14068                         Errors in socket send operations.
14069                         This counter corresponds
14070                         to <command>SErr</command> counter of
14071                         <command>BIND</command> 8.
14072                       </para>
14073                     </entry>
14074                   </row>
14075                   <row rowsep="0">
14076                     <entry colname="1">
14077                       <para><command>&lt;TYPE&gt;RecvErr</command></para>
14078                     </entry>
14079                     <entry colname="2">
14080                       <para>
14081                         Errors in socket receive operations.
14082                         This includes errors of send operations on a
14083                         connected UDP socket notified by an ICMP error
14084                         message.
14085                       </para>
14086                     </entry>
14087                   </row>
14088                 </tbody>
14089               </tgroup>
14090             </informaltable>
14091           </sect3>
14092           <sect3>
14093             <title>Compatibility with <emphasis>BIND</emphasis> 8 Counters</title>
14094             <para>
14095               Most statistics counters that were available
14096               in <command>BIND</command> 8 are also supported in
14097               <command>BIND</command> 9 as shown in the above tables.
14098               Here are notes about other counters that do not appear
14099               in these tables.
14100             </para>
14101
14102             <variablelist>
14103               <varlistentry>
14104                 <term><command>RFwdR,SFwdR</command></term>
14105                 <listitem>
14106                   <para>
14107                     These counters are not supported
14108                     because <command>BIND</command> 9 does not adopt
14109                     the notion of <emphasis>forwarding</emphasis>
14110                     as <command>BIND</command> 8 did.
14111                   </para>
14112                 </listitem>
14113               </varlistentry>
14114
14115               <varlistentry>
14116                 <term><command>RAXFR</command></term>
14117                 <listitem>
14118                   <para>
14119                     This counter is accessible in the Incoming Queries section.
14120                   </para>
14121                 </listitem>
14122               </varlistentry>
14123
14124               <varlistentry>
14125                 <term><command>RIQ</command></term>
14126                 <listitem>
14127                   <para>
14128                     This counter is accessible in the Incoming Requests section.
14129                   </para>
14130                 </listitem>
14131               </varlistentry>
14132
14133               <varlistentry>
14134                 <term><command>ROpts</command></term>
14135                 <listitem>
14136                   <para>
14137                     This counter is not supported
14138                     because <command>BIND</command> 9 does not care
14139                     about IP options in the first place.
14140                   </para>
14141                 </listitem>
14142               </varlistentry>
14143             </variablelist>
14144           </sect3>
14145         </sect2>
14146       </sect1>
14147
14148     </chapter>
14149     <chapter id="Bv9ARM.ch07">
14150       <title><acronym>BIND</acronym> 9 Security Considerations</title>
14151       <sect1 id="Access_Control_Lists">
14152         <title>Access Control Lists</title>
14153         <para>
14154           Access Control Lists (ACLs) are address match lists that
14155           you can set up and nickname for future use in <command>allow-notify</command>,
14156           <command>allow-query</command>, <command>allow-query-on</command>,
14157           <command>allow-recursion</command>, <command>allow-recursion-on</command>,
14158           <command>blackhole</command>, <command>allow-transfer</command>,
14159           etc.
14160         </para>
14161         <para>
14162           Using ACLs allows you to have finer control over who can access
14163           your name server, without cluttering up your config files with huge
14164           lists of IP addresses.
14165         </para>
14166         <para>
14167           It is a <emphasis>good idea</emphasis> to use ACLs, and to
14168           control access to your server. Limiting access to your server by
14169           outside parties can help prevent spoofing and denial of service (DoS) attacks against
14170           your server.
14171         </para>
14172         <para>
14173           Here is an example of how to properly apply ACLs:
14174         </para>
14175
14176 <programlisting>
14177 // Set up an ACL named "bogusnets" that will block
14178 // RFC1918 space and some reserved space, which is
14179 // commonly used in spoofing attacks.
14180 acl bogusnets {
14181         0.0.0.0/8; 1.0.0.0/8; 2.0.0.0/8; 192.0.2.0/24;
14182         224.0.0.0/3; 10.0.0.0/8; 172.16.0.0/12;
14183         192.168.0.0/16;
14184 };
14185
14186 // Set up an ACL called our-nets. Replace this with the
14187 // real IP numbers.
14188 acl our-nets { x.x.x.x/24; x.x.x.x/21; };
14189 options {
14190   ...
14191   ...
14192   allow-query { our-nets; };
14193   allow-recursion { our-nets; };
14194   ...
14195   blackhole { bogusnets; };
14196   ...
14197 };
14198
14199 zone "example.com" {
14200   type master;
14201   file "m/example.com";
14202   allow-query { any; };
14203 };
14204 </programlisting>
14205
14206         <para>
14207           This allows recursive queries of the server from the outside
14208           unless recursion has been previously disabled.
14209         </para>
14210         <para>
14211           For more information on how to use ACLs to protect your server,
14212           see the <emphasis>AUSCERT</emphasis> advisory at:
14213         </para>
14214         <para>
14215           <ulink url="ftp://ftp.auscert.org.au/pub/auscert/advisory/AL-1999.004.dns_dos"
14216                      >ftp://ftp.auscert.org.au/pub/auscert/advisory/AL-1999.004.dns_dos</ulink>
14217         </para>
14218       </sect1>
14219       <sect1>
14220         <title><command>Chroot</command> and <command>Setuid</command></title>
14221         <para>
14222           On UNIX servers, it is possible to run <acronym>BIND</acronym>
14223           in a <emphasis>chrooted</emphasis> environment (using
14224           the <command>chroot()</command> function) by specifying
14225           the "<option>-t</option>" option for <command>named</command>.
14226           This can help improve system security by placing
14227           <acronym>BIND</acronym> in a "sandbox", which will limit
14228           the damage done if a server is compromised.
14229         </para>
14230         <para>
14231           Another useful feature in the UNIX version of <acronym>BIND</acronym> is the
14232           ability to run the daemon as an unprivileged user ( <option>-u</option> <replaceable>user</replaceable> ).
14233           We suggest running as an unprivileged user when using the <command>chroot</command> feature.
14234         </para>
14235         <para>
14236           Here is an example command line to load <acronym>BIND</acronym> in a <command>chroot</command> sandbox,
14237           <command>/var/named</command>, and to run <command>named</command> <command>setuid</command> to
14238           user 202:
14239         </para>
14240         <para>
14241           <userinput>/usr/local/sbin/named -u 202 -t /var/named</userinput>
14242         </para>
14243
14244         <sect2>
14245           <title>The <command>chroot</command> Environment</title>
14246
14247           <para>
14248             In order for a <command>chroot</command> environment
14249             to
14250             work properly in a particular directory
14251             (for example, <filename>/var/named</filename>),
14252             you will need to set up an environment that includes everything
14253             <acronym>BIND</acronym> needs to run.
14254             From <acronym>BIND</acronym>'s point of view, <filename>/var/named</filename> is
14255             the root of the filesystem.  You will need to adjust the values of
14256             options like
14257             like <command>directory</command> and <command>pid-file</command> to account
14258             for this.
14259           </para>
14260           <para>
14261             Unlike with earlier versions of BIND, you typically will
14262             <emphasis>not</emphasis> need to compile <command>named</command>
14263             statically nor install shared libraries under the new root.
14264             However, depending on your operating system, you may need
14265             to set up things like
14266             <filename>/dev/zero</filename>,
14267             <filename>/dev/random</filename>,
14268             <filename>/dev/log</filename>, and
14269             <filename>/etc/localtime</filename>.
14270           </para>
14271         </sect2>
14272
14273         <sect2>
14274           <title>Using the <command>setuid</command> Function</title>
14275
14276           <para>
14277             Prior to running the <command>named</command> daemon,
14278             use
14279             the <command>touch</command> utility (to change file
14280             access and
14281             modification times) or the <command>chown</command>
14282             utility (to
14283             set the user id and/or group id) on files
14284             to which you want <acronym>BIND</acronym>
14285             to write.
14286           </para>
14287           <note>
14288             Note that if the <command>named</command> daemon is running as an
14289             unprivileged user, it will not be able to bind to new restricted
14290             ports if the server is reloaded.
14291           </note>
14292         </sect2>
14293       </sect1>
14294
14295       <sect1 id="dynamic_update_security">
14296         <title>Dynamic Update Security</title>
14297
14298         <para>
14299           Access to the dynamic
14300           update facility should be strictly limited.  In earlier versions of
14301           <acronym>BIND</acronym>, the only way to do this was
14302           based on the IP
14303           address of the host requesting the update, by listing an IP address
14304           or
14305           network prefix in the <command>allow-update</command>
14306           zone option.
14307           This method is insecure since the source address of the update UDP
14308           packet
14309           is easily forged.  Also note that if the IP addresses allowed by the
14310           <command>allow-update</command> option include the
14311           address of a slave
14312           server which performs forwarding of dynamic updates, the master can
14313           be
14314           trivially attacked by sending the update to the slave, which will
14315           forward it to the master with its own source IP address causing the
14316           master to approve it without question.
14317         </para>
14318
14319         <para>
14320           For these reasons, we strongly recommend that updates be
14321           cryptographically authenticated by means of transaction signatures
14322           (TSIG).  That is, the <command>allow-update</command>
14323           option should
14324           list only TSIG key names, not IP addresses or network
14325           prefixes. Alternatively, the new <command>update-policy</command>
14326           option can be used.
14327         </para>
14328
14329         <para>
14330           Some sites choose to keep all dynamically-updated DNS data
14331           in a subdomain and delegate that subdomain to a separate zone. This
14332           way, the top-level zone containing critical data such as the IP
14333           addresses
14334           of public web and mail servers need not allow dynamic update at
14335           all.
14336         </para>
14337
14338       </sect1>
14339     </chapter>
14340
14341     <chapter id="Bv9ARM.ch08">
14342       <title>Troubleshooting</title>
14343       <sect1>
14344         <title>Common Problems</title>
14345         <sect2>
14346           <title>It's not working; how can I figure out what's wrong?</title>
14347
14348           <para>
14349             The best solution to solving installation and
14350             configuration issues is to take preventative measures by setting
14351             up logging files beforehand. The log files provide a
14352             source of hints and information that can be used to figure out
14353             what went wrong and how to fix the problem.
14354           </para>
14355
14356         </sect2>
14357       </sect1>
14358       <sect1>
14359         <title>Incrementing and Changing the Serial Number</title>
14360
14361         <para>
14362           Zone serial numbers are just numbers &mdash; they aren't
14363           date related.  A lot of people set them to a number that
14364           represents a date, usually of the form YYYYMMDDRR.
14365           Occasionally they will make a mistake and set them to a
14366           "date in the future" then try to correct them by setting
14367           them to the "current date".  This causes problems because
14368           serial numbers are used to indicate that a zone has been
14369           updated.  If the serial number on the slave server is
14370           lower than the serial number on the master, the slave
14371           server will attempt to update its copy of the zone.
14372         </para>
14373
14374         <para>
14375           Setting the serial number to a lower number on the master
14376           server than the slave server means that the slave will not perform
14377           updates to its copy of the zone.
14378         </para>
14379
14380         <para>
14381           The solution to this is to add 2147483647 (2^31-1) to the
14382           number, reload the zone and make sure all slaves have updated to
14383           the new zone serial number, then reset the number to what you want
14384           it to be, and reload the zone again.
14385         </para>
14386
14387       </sect1>
14388       <sect1>
14389         <title>Where Can I Get Help?</title>
14390
14391         <para>
14392           The Internet Systems Consortium
14393           (<acronym>ISC</acronym>) offers a wide range
14394           of support and service agreements for <acronym>BIND</acronym> and <acronym>DHCP</acronym> servers. Four
14395           levels of premium support are available and each level includes
14396           support for all <acronym>ISC</acronym> programs,
14397           significant discounts on products
14398           and training, and a recognized priority on bug fixes and
14399           non-funded feature requests. In addition, <acronym>ISC</acronym> offers a standard
14400           support agreement package which includes services ranging from bug
14401           fix announcements to remote support. It also includes training in
14402           <acronym>BIND</acronym> and <acronym>DHCP</acronym>.
14403         </para>
14404
14405         <para>
14406           To discuss arrangements for support, contact
14407           <ulink url="mailto:info@isc.org">info@isc.org</ulink> or visit the
14408           <acronym>ISC</acronym> web page at
14409           <ulink url="http://www.isc.org/services/support/"
14410                      >http://www.isc.org/services/support/</ulink>
14411           to read more.
14412         </para>
14413       </sect1>
14414     </chapter>
14415     <appendix id="Bv9ARM.ch09">
14416       <title>Appendices</title>
14417       <sect1>
14418         <title>Acknowledgments</title>
14419         <sect2 id="historical_dns_information">
14420           <title>A Brief History of the <acronym>DNS</acronym> and <acronym>BIND</acronym></title>
14421
14422           <para>
14423             Although the "official" beginning of the Domain Name
14424             System occurred in 1984 with the publication of RFC 920, the
14425             core of the new system was described in 1983 in RFCs 882 and
14426             883. From 1984 to 1987, the ARPAnet (the precursor to today's
14427             Internet) became a testbed of experimentation for developing the
14428             new naming/addressing scheme in a rapidly expanding,
14429             operational network environment.  New RFCs were written and
14430             published in 1987 that modified the original documents to
14431             incorporate improvements based on the working model. RFC 1034,
14432             "Domain Names-Concepts and Facilities", and RFC 1035, "Domain
14433             Names-Implementation and Specification" were published and
14434             became the standards upon which all <acronym>DNS</acronym> implementations are
14435             built.
14436           </para>
14437
14438           <para>
14439             The first working domain name server, called "Jeeves", was
14440             written in 1983-84 by Paul Mockapetris for operation on DEC
14441             Tops-20
14442             machines located at the University of Southern California's
14443             Information
14444             Sciences Institute (USC-ISI) and SRI International's Network
14445             Information
14446             Center (SRI-NIC). A <acronym>DNS</acronym> server for
14447             Unix machines, the Berkeley Internet
14448             Name Domain (<acronym>BIND</acronym>) package, was
14449             written soon after by a group of
14450             graduate students at the University of California at Berkeley
14451             under
14452             a grant from the US Defense Advanced Research Projects
14453             Administration
14454             (DARPA).
14455           </para>
14456           <para>
14457             Versions of <acronym>BIND</acronym> through
14458             4.8.3 were maintained by the Computer
14459             Systems Research Group (CSRG) at UC Berkeley. Douglas Terry, Mark
14460             Painter, David Riggle and Songnian Zhou made up the initial <acronym>BIND</acronym>
14461             project team. After that, additional work on the software package
14462             was done by Ralph Campbell. Kevin Dunlap, a Digital Equipment
14463             Corporation
14464             employee on loan to the CSRG, worked on <acronym>BIND</acronym> for 2 years, from 1985
14465             to 1987. Many other people also contributed to <acronym>BIND</acronym> development
14466             during that time: Doug Kingston, Craig Partridge, Smoot
14467             Carl-Mitchell,
14468             Mike Muuss, Jim Bloom and Mike Schwartz. <acronym>BIND</acronym> maintenance was subsequently
14469             handled by Mike Karels and &#216;ivind Kure.
14470           </para>
14471           <para>
14472             <acronym>BIND</acronym> versions 4.9 and 4.9.1 were
14473             released by Digital Equipment
14474             Corporation (now Compaq Computer Corporation). Paul Vixie, then
14475             a DEC employee, became <acronym>BIND</acronym>'s
14476             primary caretaker. He was assisted
14477             by Phil Almquist, Robert Elz, Alan Barrett, Paul Albitz, Bryan
14478             Beecher, Andrew
14479             Partan, Andy Cherenson, Tom Limoncelli, Berthold Paffrath, Fuat
14480             Baran, Anant Kumar, Art Harkin, Win Treese, Don Lewis, Christophe
14481             Wolfhugel, and others.
14482           </para>
14483           <para>
14484             In 1994, <acronym>BIND</acronym> version 4.9.2 was sponsored by
14485             Vixie Enterprises. Paul
14486             Vixie became <acronym>BIND</acronym>'s principal
14487             architect/programmer.
14488           </para>
14489           <para>
14490             <acronym>BIND</acronym> versions from 4.9.3 onward
14491             have been developed and maintained
14492             by the Internet Systems Consortium and its predecessor,
14493             the Internet Software Consortium,  with support being provided
14494             by ISC's sponsors.
14495           </para>
14496           <para>
14497             As co-architects/programmers, Bob Halley and
14498             Paul Vixie released the first production-ready version of
14499             <acronym>BIND</acronym> version 8 in May 1997.
14500           </para>
14501           <para>
14502             BIND version 9 was released in September 2000 and is a
14503             major rewrite of nearly all aspects of the underlying
14504             BIND architecture.
14505           </para>
14506           <para>
14507             BIND versions 4 and 8 are officially deprecated.
14508             No additional development is done
14509             on BIND version 4 or BIND version 8.
14510           </para>
14511           <para>
14512             <acronym>BIND</acronym> development work is made
14513             possible today by the sponsorship
14514             of several corporations, and by the tireless work efforts of
14515             numerous individuals.
14516           </para>
14517         </sect2>
14518       </sect1>
14519       <sect1>
14520         <title>General <acronym>DNS</acronym> Reference Information</title>
14521         <sect2 id="ipv6addresses">
14522           <title>IPv6 addresses (AAAA)</title>
14523           <para>
14524             IPv6 addresses are 128-bit identifiers for interfaces and
14525             sets of interfaces which were introduced in the <acronym>DNS</acronym> to facilitate
14526             scalable Internet routing. There are three types of addresses: <emphasis>Unicast</emphasis>,
14527             an identifier for a single interface;
14528             <emphasis>Anycast</emphasis>,
14529             an identifier for a set of interfaces; and <emphasis>Multicast</emphasis>,
14530             an identifier for a set of interfaces. Here we describe the global
14531             Unicast address scheme. For more information, see RFC 3587,
14532             "Global Unicast Address Format."
14533           </para>
14534           <para>
14535             IPv6 unicast addresses consist of a
14536             <emphasis>global routing prefix</emphasis>, a
14537             <emphasis>subnet identifier</emphasis>, and an
14538             <emphasis>interface identifier</emphasis>.
14539           </para>
14540           <para>
14541             The global routing prefix is provided by the
14542             upstream provider or ISP, and (roughly) corresponds to the
14543             IPv4 <emphasis>network</emphasis> section
14544             of the address range.
14545
14546             The subnet identifier is for local subnetting, much the
14547             same as subnetting an
14548             IPv4 /16 network into /24 subnets.
14549
14550             The interface identifier is the address of an individual
14551             interface on a given network; in IPv6, addresses belong to
14552             interfaces rather than to machines.
14553           </para>
14554           <para>
14555             The subnetting capability of IPv6 is much more flexible than
14556             that of IPv4: subnetting can be carried out on bit boundaries,
14557             in much the same way as Classless InterDomain Routing
14558             (CIDR), and the DNS PTR representation ("nibble" format)
14559             makes setting up reverse zones easier.
14560           </para>
14561           <para>
14562             The Interface Identifier must be unique on the local link,
14563             and is usually generated automatically by the IPv6
14564             implementation, although it is usually possible to
14565             override the default setting if necessary.  A typical IPv6
14566             address might look like:
14567             <command>2001:db8:201:9:a00:20ff:fe81:2b32</command>
14568           </para>
14569           <para>
14570             IPv6 address specifications often contain long strings
14571             of zeros, so the architects have included a shorthand for
14572             specifying
14573             them. The double colon (`::') indicates the longest possible
14574             string
14575             of zeros that can fit, and can be used only once in an address.
14576           </para>
14577         </sect2>
14578       </sect1>
14579       <sect1 id="bibliography">
14580         <title>Bibliography (and Suggested Reading)</title>
14581         <sect2 id="rfcs">
14582           <title>Request for Comments (RFCs)</title>
14583           <para>
14584             Specification documents for the Internet protocol suite, including
14585             the <acronym>DNS</acronym>, are published as part of
14586             the Request for Comments (RFCs)
14587             series of technical notes. The standards themselves are defined
14588             by the Internet Engineering Task Force (IETF) and the Internet
14589             Engineering Steering Group (IESG). RFCs can be obtained online via FTP at:
14590           </para>
14591           <para>
14592             <ulink url="ftp://www.isi.edu/in-notes/">
14593               ftp://www.isi.edu/in-notes/RFC<replaceable>xxxx</replaceable>.txt
14594             </ulink>
14595           </para>
14596           <para>
14597             (where <replaceable>xxxx</replaceable> is
14598             the number of the RFC). RFCs are also available via the Web at:
14599           </para>
14600           <para>
14601             <ulink url="http://www.ietf.org/rfc/"
14602                        >http://www.ietf.org/rfc/</ulink>.
14603           </para>
14604           <bibliography>
14605             <bibliodiv>
14606               <!-- one of (BIBLIOENTRY BIBLIOMIXED) -->
14607               <title>Standards</title>
14608               <biblioentry>
14609                 <abbrev>RFC974</abbrev>
14610                 <author>
14611                   <surname>Partridge</surname>
14612                   <firstname>C.</firstname>
14613                 </author>
14614                 <title>Mail Routing and the Domain System</title>
14615                 <pubdate>January 1986</pubdate>
14616               </biblioentry>
14617               <biblioentry>
14618                 <abbrev>RFC1034</abbrev>
14619                 <author>
14620                   <surname>Mockapetris</surname>
14621                   <firstname>P.V.</firstname>
14622                 </author>
14623                 <title>Domain Names &mdash; Concepts and Facilities</title>
14624                 <pubdate>November 1987</pubdate>
14625               </biblioentry>
14626               <biblioentry>
14627                 <abbrev>RFC1035</abbrev>
14628                 <author>
14629                   <surname>Mockapetris</surname>
14630                   <firstname>P. V.</firstname>
14631                   </author> <title>Domain Names &mdash; Implementation and
14632                   Specification</title>
14633                 <pubdate>November 1987</pubdate>
14634               </biblioentry>
14635             </bibliodiv>
14636             <bibliodiv id="proposed_standards" xreflabel="Proposed Standards">
14637
14638               <title>Proposed Standards</title>
14639               <!-- one of (BIBLIOENTRY BIBLIOMIXED) -->
14640               <biblioentry>
14641                 <abbrev>RFC2181</abbrev>
14642                 <author>
14643                   <surname>Elz</surname>
14644                   <firstname>R., R. Bush</firstname>
14645                 </author>
14646                 <title>Clarifications to the <acronym>DNS</acronym>
14647                   Specification</title>
14648                 <pubdate>July 1997</pubdate>
14649               </biblioentry>
14650               <biblioentry>
14651                 <abbrev>RFC2308</abbrev>
14652                 <author>
14653                   <surname>Andrews</surname>
14654                   <firstname>M.</firstname>
14655                 </author>
14656                 <title>Negative Caching of <acronym>DNS</acronym>
14657                   Queries</title>
14658                 <pubdate>March 1998</pubdate>
14659               </biblioentry>
14660               <biblioentry>
14661                 <abbrev>RFC1995</abbrev>
14662                 <author>
14663                   <surname>Ohta</surname>
14664                   <firstname>M.</firstname>
14665                 </author>
14666                 <title>Incremental Zone Transfer in <acronym>DNS</acronym></title>
14667                 <pubdate>August 1996</pubdate>
14668               </biblioentry>
14669               <biblioentry>
14670                 <abbrev>RFC1996</abbrev>
14671                 <author>
14672                   <surname>Vixie</surname>
14673                   <firstname>P.</firstname>
14674                 </author>
14675                 <title>A Mechanism for Prompt Notification of Zone Changes</title>
14676                 <pubdate>August 1996</pubdate>
14677               </biblioentry>
14678               <biblioentry>
14679                 <abbrev>RFC2136</abbrev>
14680                 <authorgroup>
14681                   <author>
14682                     <surname>Vixie</surname>
14683                     <firstname>P.</firstname>
14684                   </author>
14685                   <author>
14686                     <firstname>S.</firstname>
14687                     <surname>Thomson</surname>
14688                   </author>
14689                   <author>
14690                     <firstname>Y.</firstname>
14691                     <surname>Rekhter</surname>
14692                   </author>
14693                   <author>
14694                     <firstname>J.</firstname>
14695                     <surname>Bound</surname>
14696                   </author>
14697                 </authorgroup>
14698                 <title>Dynamic Updates in the Domain Name System</title>
14699                 <pubdate>April 1997</pubdate>
14700               </biblioentry>
14701               <biblioentry>
14702                 <abbrev>RFC2671</abbrev>
14703                 <authorgroup>
14704                   <author>
14705                     <firstname>P.</firstname>
14706                     <surname>Vixie</surname>
14707                   </author>
14708                 </authorgroup>
14709                 <title>Extension Mechanisms for DNS (EDNS0)</title>
14710                 <pubdate>August 1997</pubdate>
14711               </biblioentry>
14712               <biblioentry>
14713                 <abbrev>RFC2672</abbrev>
14714                 <authorgroup>
14715                   <author>
14716                     <firstname>M.</firstname>
14717                     <surname>Crawford</surname>
14718                   </author>
14719                 </authorgroup>
14720                 <title>Non-Terminal DNS Name Redirection</title>
14721                 <pubdate>August 1999</pubdate>
14722               </biblioentry>
14723               <biblioentry>
14724                 <abbrev>RFC2845</abbrev>
14725                 <authorgroup>
14726                   <author>
14727                     <surname>Vixie</surname>
14728                     <firstname>P.</firstname>
14729                   </author>
14730                   <author>
14731                     <firstname>O.</firstname>
14732                     <surname>Gudmundsson</surname>
14733                   </author>
14734                   <author>
14735                     <firstname>D.</firstname>
14736                     <surname>Eastlake</surname>
14737                     <lineage>3rd</lineage>
14738                   </author>
14739                   <author>
14740                     <firstname>B.</firstname>
14741                     <surname>Wellington</surname>
14742                   </author>
14743                 </authorgroup>
14744                 <title>Secret Key Transaction Authentication for <acronym>DNS</acronym> (TSIG)</title>
14745                 <pubdate>May 2000</pubdate>
14746               </biblioentry>
14747               <biblioentry>
14748                 <abbrev>RFC2930</abbrev>
14749                 <authorgroup>
14750                   <author>
14751                     <firstname>D.</firstname>
14752                     <surname>Eastlake</surname>
14753                     <lineage>3rd</lineage>
14754                   </author>
14755                 </authorgroup>
14756                 <title>Secret Key Establishment for DNS (TKEY RR)</title>
14757                 <pubdate>September 2000</pubdate>
14758               </biblioentry>
14759               <biblioentry>
14760                 <abbrev>RFC2931</abbrev>
14761                 <authorgroup>
14762                   <author>
14763                     <firstname>D.</firstname>
14764                     <surname>Eastlake</surname>
14765                     <lineage>3rd</lineage>
14766                   </author>
14767                 </authorgroup>
14768                 <title>DNS Request and Transaction Signatures (SIG(0)s)</title>
14769                 <pubdate>September 2000</pubdate>
14770               </biblioentry>
14771               <biblioentry>
14772                 <abbrev>RFC3007</abbrev>
14773                 <authorgroup>
14774                   <author>
14775                     <firstname>B.</firstname>
14776                     <surname>Wellington</surname>
14777                   </author>
14778                 </authorgroup>
14779                 <title>Secure Domain Name System (DNS) Dynamic Update</title>
14780                 <pubdate>November 2000</pubdate>
14781               </biblioentry>
14782               <biblioentry>
14783                 <abbrev>RFC3645</abbrev>
14784                 <authorgroup>
14785                   <author>
14786                     <firstname>S.</firstname>
14787                     <surname>Kwan</surname>
14788                   </author>
14789                   <author>
14790                     <firstname>P.</firstname>
14791                     <surname>Garg</surname>
14792                   </author>
14793                   <author>
14794                     <firstname>J.</firstname>
14795                     <surname>Gilroy</surname>
14796                   </author>
14797                   <author>
14798                     <firstname>L.</firstname>
14799                     <surname>Esibov</surname>
14800                   </author>
14801                   <author>
14802                     <firstname>J.</firstname>
14803                     <surname>Westhead</surname>
14804                   </author>
14805                   <author>
14806                     <firstname>R.</firstname>
14807                     <surname>Hall</surname>
14808                   </author>
14809                 </authorgroup>
14810                 <title>Generic Security Service Algorithm for Secret
14811                        Key Transaction Authentication for DNS
14812                        (GSS-TSIG)</title>
14813                 <pubdate>October 2003</pubdate>
14814               </biblioentry>
14815             </bibliodiv>
14816             <bibliodiv>
14817               <title><acronym>DNS</acronym> Security Proposed Standards</title>
14818               <biblioentry>
14819                 <abbrev>RFC3225</abbrev>
14820                 <authorgroup>
14821                   <author>
14822                     <firstname>D.</firstname>
14823                     <surname>Conrad</surname>
14824                   </author>
14825                 </authorgroup>
14826                 <title>Indicating Resolver Support of DNSSEC</title>
14827                 <pubdate>December 2001</pubdate>
14828               </biblioentry>
14829               <biblioentry>
14830                 <abbrev>RFC3833</abbrev>
14831                 <authorgroup>
14832                   <author>
14833                     <firstname>D.</firstname>
14834                     <surname>Atkins</surname>
14835                   </author>
14836                   <author>
14837                     <firstname>R.</firstname>
14838                     <surname>Austein</surname>
14839                   </author>
14840                 </authorgroup>
14841                 <title>Threat Analysis of the Domain Name System (DNS)</title>
14842                 <pubdate>August 2004</pubdate>
14843               </biblioentry>
14844               <biblioentry>
14845                 <abbrev>RFC4033</abbrev>
14846                 <authorgroup>
14847                   <author>
14848                     <firstname>R.</firstname>
14849                     <surname>Arends</surname>
14850                   </author>
14851                   <author>
14852                     <firstname>R.</firstname>
14853                     <surname>Austein</surname>
14854                   </author>
14855                   <author>
14856                     <firstname>M.</firstname>
14857                     <surname>Larson</surname>
14858                   </author>
14859                   <author>
14860                     <firstname>D.</firstname>
14861                     <surname>Massey</surname>
14862                   </author>
14863                   <author>
14864                     <firstname>S.</firstname>
14865                     <surname>Rose</surname>
14866                   </author>
14867                 </authorgroup>
14868                 <title>DNS Security Introduction and Requirements</title>
14869                 <pubdate>March 2005</pubdate>
14870               </biblioentry>
14871               <biblioentry>
14872                 <abbrev>RFC4034</abbrev>
14873                 <authorgroup>
14874                   <author>
14875                     <firstname>R.</firstname>
14876                     <surname>Arends</surname>
14877                   </author>
14878                   <author>
14879                     <firstname>R.</firstname>
14880                     <surname>Austein</surname>
14881                   </author>
14882                   <author>
14883                     <firstname>M.</firstname>
14884                     <surname>Larson</surname>
14885                   </author>
14886                   <author>
14887                     <firstname>D.</firstname>
14888                     <surname>Massey</surname>
14889                   </author>
14890                   <author>
14891                     <firstname>S.</firstname>
14892                     <surname>Rose</surname>
14893                   </author>
14894                 </authorgroup>
14895                 <title>Resource Records for the DNS Security Extensions</title>
14896                 <pubdate>March 2005</pubdate>
14897               </biblioentry>
14898               <biblioentry>
14899                 <abbrev>RFC4035</abbrev>
14900                 <authorgroup>
14901                   <author>
14902                     <firstname>R.</firstname>
14903                     <surname>Arends</surname>
14904                   </author>
14905                   <author>
14906                     <firstname>R.</firstname>
14907                     <surname>Austein</surname>
14908                   </author>
14909                   <author>
14910                     <firstname>M.</firstname>
14911                     <surname>Larson</surname>
14912                   </author>
14913                   <author>
14914                     <firstname>D.</firstname>
14915                     <surname>Massey</surname>
14916                   </author>
14917                   <author>
14918                     <firstname>S.</firstname>
14919                     <surname>Rose</surname>
14920                   </author>
14921                 </authorgroup>
14922                 <title>Protocol Modifications for the DNS
14923                        Security Extensions</title>
14924                 <pubdate>March 2005</pubdate>
14925               </biblioentry>
14926             </bibliodiv>
14927             <bibliodiv>
14928               <title>Other Important RFCs About <acronym>DNS</acronym>
14929                 Implementation</title>
14930               <biblioentry>
14931                 <abbrev>RFC1535</abbrev>
14932                 <author>
14933                   <surname>Gavron</surname>
14934                   <firstname>E.</firstname>
14935                 </author>
14936                 <title>A Security Problem and Proposed Correction With Widely
14937                   Deployed <acronym>DNS</acronym> Software.</title>
14938                 <pubdate>October 1993</pubdate>
14939               </biblioentry>
14940               <biblioentry>
14941                 <abbrev>RFC1536</abbrev>
14942                 <authorgroup>
14943                   <author>
14944                     <surname>Kumar</surname>
14945                     <firstname>A.</firstname>
14946                   </author>
14947                   <author>
14948                     <firstname>J.</firstname>
14949                     <surname>Postel</surname>
14950                   </author>
14951                   <author>
14952                     <firstname>C.</firstname>
14953                     <surname>Neuman</surname>
14954                   </author>
14955                   <author>
14956                     <firstname>P.</firstname>
14957                     <surname>Danzig</surname>
14958                   </author>
14959                   <author>
14960                     <firstname>S.</firstname>
14961                     <surname>Miller</surname>
14962                   </author>
14963                 </authorgroup>
14964                 <title>Common <acronym>DNS</acronym> Implementation
14965                   Errors and Suggested Fixes</title>
14966                 <pubdate>October 1993</pubdate>
14967               </biblioentry>
14968               <biblioentry>
14969                 <abbrev>RFC1982</abbrev>
14970                 <authorgroup>
14971                   <author>
14972                     <surname>Elz</surname>
14973                     <firstname>R.</firstname>
14974                   </author>
14975                   <author>
14976                     <firstname>R.</firstname>
14977                     <surname>Bush</surname>
14978                   </author>
14979                 </authorgroup>
14980                 <title>Serial Number Arithmetic</title>
14981                 <pubdate>August 1996</pubdate>
14982               </biblioentry>
14983               <biblioentry>
14984                 <abbrev>RFC4074</abbrev>
14985                 <authorgroup>
14986                   <author>
14987                     <surname>Morishita</surname>
14988                     <firstname>Y.</firstname>
14989                   </author>
14990                   <author>
14991                     <firstname>T.</firstname>
14992                     <surname>Jinmei</surname>
14993                   </author>
14994                 </authorgroup>
14995                 <title>Common Misbehaviour Against <acronym>DNS</acronym>
14996                 Queries for IPv6 Addresses</title>
14997                 <pubdate>May 2005</pubdate>
14998               </biblioentry>
14999             </bibliodiv>
15000             <bibliodiv>
15001               <title>Resource Record Types</title>
15002               <biblioentry>
15003                 <abbrev>RFC1183</abbrev>
15004                 <authorgroup>
15005                   <author>
15006                     <surname>Everhart</surname>
15007                     <firstname>C.F.</firstname>
15008                   </author>
15009                   <author>
15010                     <firstname>L. A.</firstname>
15011                     <surname>Mamakos</surname>
15012                   </author>
15013                   <author>
15014                     <firstname>R.</firstname>
15015                     <surname>Ullmann</surname>
15016                   </author>
15017                   <author>
15018                     <firstname>P.</firstname>
15019                     <surname>Mockapetris</surname>
15020                   </author>
15021                 </authorgroup>
15022                 <title>New <acronym>DNS</acronym> RR Definitions</title>
15023                 <pubdate>October 1990</pubdate>
15024               </biblioentry>
15025               <biblioentry>
15026                 <abbrev>RFC1706</abbrev>
15027                 <authorgroup>
15028                   <author>
15029                     <surname>Manning</surname>
15030                     <firstname>B.</firstname>
15031                   </author>
15032                   <author>
15033                     <firstname>R.</firstname>
15034                     <surname>Colella</surname>
15035                   </author>
15036                 </authorgroup>
15037                 <title><acronym>DNS</acronym> NSAP Resource Records</title>
15038                 <pubdate>October 1994</pubdate>
15039               </biblioentry>
15040               <biblioentry>
15041                 <abbrev>RFC2168</abbrev>
15042                 <authorgroup>
15043                   <author>
15044                     <surname>Daniel</surname>
15045                     <firstname>R.</firstname>
15046                   </author>
15047                   <author>
15048                     <firstname>M.</firstname>
15049                     <surname>Mealling</surname>
15050                   </author>
15051                 </authorgroup>
15052                 <title>Resolution of Uniform Resource Identifiers using
15053                   the Domain Name System</title>
15054                 <pubdate>June 1997</pubdate>
15055               </biblioentry>
15056               <biblioentry>
15057                 <abbrev>RFC1876</abbrev>
15058                 <authorgroup>
15059                   <author>
15060                     <surname>Davis</surname>
15061                     <firstname>C.</firstname>
15062                   </author>
15063                   <author>
15064                     <firstname>P.</firstname>
15065                     <surname>Vixie</surname>
15066                   </author>
15067                   <author>
15068                     <firstname>T.</firstname>
15069                     <firstname>Goodwin</firstname>
15070                   </author>
15071                   <author>
15072                     <firstname>I.</firstname>
15073                     <surname>Dickinson</surname>
15074                   </author>
15075                 </authorgroup>
15076                 <title>A Means for Expressing Location Information in the
15077                   Domain
15078                   Name System</title>
15079                 <pubdate>January 1996</pubdate>
15080               </biblioentry>
15081               <biblioentry>
15082                 <abbrev>RFC2052</abbrev>
15083                 <authorgroup>
15084                   <author>
15085                     <surname>Gulbrandsen</surname>
15086                     <firstname>A.</firstname>
15087                   </author>
15088                   <author>
15089                     <firstname>P.</firstname>
15090                     <surname>Vixie</surname>
15091                   </author>
15092                 </authorgroup>
15093                 <title>A <acronym>DNS</acronym> RR for Specifying the
15094                   Location of
15095                   Services.</title>
15096                 <pubdate>October 1996</pubdate>
15097               </biblioentry>
15098               <biblioentry>
15099                 <abbrev>RFC2163</abbrev>
15100                 <author>
15101                   <surname>Allocchio</surname>
15102                   <firstname>A.</firstname>
15103                 </author>
15104                 <title>Using the Internet <acronym>DNS</acronym> to
15105                   Distribute MIXER
15106                   Conformant Global Address Mapping</title>
15107                 <pubdate>January 1998</pubdate>
15108               </biblioentry>
15109               <biblioentry>
15110                 <abbrev>RFC2230</abbrev>
15111                 <author>
15112                   <surname>Atkinson</surname>
15113                   <firstname>R.</firstname>
15114                 </author>
15115                 <title>Key Exchange Delegation Record for the <acronym>DNS</acronym></title>
15116                 <pubdate>October 1997</pubdate>
15117               </biblioentry>
15118               <biblioentry>
15119                 <abbrev>RFC2536</abbrev>
15120                 <author>
15121                   <surname>Eastlake</surname>
15122                   <firstname>D.</firstname>
15123                   <lineage>3rd</lineage>
15124                 </author>
15125                 <title>DSA KEYs and SIGs in the Domain Name System (DNS)</title>
15126                 <pubdate>March 1999</pubdate>
15127               </biblioentry>
15128               <biblioentry>
15129                 <abbrev>RFC2537</abbrev>
15130                 <author>
15131                   <surname>Eastlake</surname>
15132                   <firstname>D.</firstname>
15133                   <lineage>3rd</lineage>
15134                 </author>
15135                 <title>RSA/MD5 KEYs and SIGs in the Domain Name System (DNS)</title>
15136                 <pubdate>March 1999</pubdate>
15137               </biblioentry>
15138               <biblioentry>
15139                 <abbrev>RFC2538</abbrev>
15140                 <authorgroup>
15141                   <author>
15142                     <surname>Eastlake</surname>
15143                     <firstname>D.</firstname>
15144                     <lineage>3rd</lineage>
15145                   </author>
15146                   <author>
15147                     <surname>Gudmundsson</surname>
15148                     <firstname>O.</firstname>
15149                   </author>
15150                 </authorgroup>
15151                 <title>Storing Certificates in the Domain Name System (DNS)</title>
15152                 <pubdate>March 1999</pubdate>
15153               </biblioentry>
15154               <biblioentry>
15155                 <abbrev>RFC2539</abbrev>
15156                 <authorgroup>
15157                   <author>
15158                     <surname>Eastlake</surname>
15159                     <firstname>D.</firstname>
15160                     <lineage>3rd</lineage>
15161                   </author>
15162                 </authorgroup>
15163                 <title>Storage of Diffie-Hellman Keys in the Domain Name System (DNS)</title>
15164                 <pubdate>March 1999</pubdate>
15165               </biblioentry>
15166               <biblioentry>
15167                 <abbrev>RFC2540</abbrev>
15168                 <authorgroup>
15169                   <author>
15170                     <surname>Eastlake</surname>
15171                     <firstname>D.</firstname>
15172                     <lineage>3rd</lineage>
15173                   </author>
15174                 </authorgroup>
15175                 <title>Detached Domain Name System (DNS) Information</title>
15176                 <pubdate>March 1999</pubdate>
15177               </biblioentry>
15178               <biblioentry>
15179                 <abbrev>RFC2782</abbrev>
15180                 <author>
15181                   <surname>Gulbrandsen</surname>
15182                   <firstname>A.</firstname>
15183                 </author>
15184                 <author>
15185                   <surname>Vixie</surname>
15186                   <firstname>P.</firstname>
15187                 </author>
15188                 <author>
15189                   <surname>Esibov</surname>
15190                   <firstname>L.</firstname>
15191                 </author>
15192                 <title>A DNS RR for specifying the location of services (DNS SRV)</title>
15193                 <pubdate>February 2000</pubdate>
15194               </biblioentry>
15195               <biblioentry>
15196                 <abbrev>RFC2915</abbrev>
15197                 <author>
15198                   <surname>Mealling</surname>
15199                   <firstname>M.</firstname>
15200                 </author>
15201                 <author>
15202                   <surname>Daniel</surname>
15203                   <firstname>R.</firstname>
15204                 </author>
15205                 <title>The Naming Authority Pointer (NAPTR) DNS Resource Record</title>
15206                 <pubdate>September 2000</pubdate>
15207               </biblioentry>
15208               <biblioentry>
15209                 <abbrev>RFC3110</abbrev>
15210                 <author>
15211                     <surname>Eastlake</surname>
15212                     <firstname>D.</firstname>
15213                     <lineage>3rd</lineage>
15214                 </author>
15215                 <title>RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS)</title>
15216                 <pubdate>May 2001</pubdate>
15217               </biblioentry>
15218               <biblioentry>
15219                 <abbrev>RFC3123</abbrev>
15220                 <author>
15221                   <surname>Koch</surname>
15222                   <firstname>P.</firstname>
15223                 </author>
15224                 <title>A DNS RR Type for Lists of Address Prefixes (APL RR)</title>
15225                 <pubdate>June 2001</pubdate>
15226               </biblioentry>
15227               <biblioentry>
15228                 <abbrev>RFC3596</abbrev>
15229                 <authorgroup>
15230                   <author>
15231                     <surname>Thomson</surname>
15232                     <firstname>S.</firstname>
15233                   </author>
15234                   <author>
15235                     <firstname>C.</firstname>
15236                     <surname>Huitema</surname>
15237                   </author>
15238                   <author>
15239                     <firstname>V.</firstname>
15240                     <surname>Ksinant</surname>
15241                   </author>
15242                   <author>
15243                     <firstname>M.</firstname>
15244                     <surname>Souissi</surname>
15245                   </author>
15246                 </authorgroup>
15247                 <title><acronym>DNS</acronym> Extensions to support IP
15248                   version 6</title>
15249                 <pubdate>October 2003</pubdate>
15250               </biblioentry>
15251               <biblioentry>
15252                 <abbrev>RFC3597</abbrev>
15253                 <author>
15254                   <surname>Gustafsson</surname>
15255                   <firstname>A.</firstname>
15256                 </author>
15257                 <title>Handling of Unknown DNS Resource Record (RR) Types</title>
15258                 <pubdate>September 2003</pubdate>
15259               </biblioentry>
15260             </bibliodiv>
15261             <bibliodiv>
15262               <title><acronym>DNS</acronym> and the Internet</title>
15263               <biblioentry>
15264                 <abbrev>RFC1101</abbrev>
15265                 <author>
15266                   <surname>Mockapetris</surname>
15267                   <firstname>P. V.</firstname>
15268                 </author>
15269                 <title><acronym>DNS</acronym> Encoding of Network Names
15270                   and Other Types</title>
15271                 <pubdate>April 1989</pubdate>
15272               </biblioentry>
15273               <biblioentry>
15274                 <abbrev>RFC1123</abbrev>
15275                 <author>
15276                   <surname>Braden</surname>
15277                   <surname>R.</surname>
15278                 </author>
15279                 <title>Requirements for Internet Hosts - Application and
15280                   Support</title>
15281                 <pubdate>October 1989</pubdate>
15282               </biblioentry>
15283               <biblioentry>
15284                 <abbrev>RFC1591</abbrev>
15285                 <author>
15286                   <surname>Postel</surname>
15287                   <firstname>J.</firstname>
15288                 </author>
15289                 <title>Domain Name System Structure and Delegation</title>
15290                 <pubdate>March 1994</pubdate>
15291               </biblioentry>
15292               <biblioentry>
15293                 <abbrev>RFC2317</abbrev>
15294                 <authorgroup>
15295                   <author>
15296                     <surname>Eidnes</surname>
15297                     <firstname>H.</firstname>
15298                   </author>
15299                   <author>
15300                     <firstname>G.</firstname>
15301                     <surname>de Groot</surname>
15302                   </author>
15303                   <author>
15304                     <firstname>P.</firstname>
15305                     <surname>Vixie</surname>
15306                   </author>
15307                 </authorgroup>
15308                 <title>Classless IN-ADDR.ARPA Delegation</title>
15309                 <pubdate>March 1998</pubdate>
15310               </biblioentry>
15311               <biblioentry>
15312                 <abbrev>RFC2826</abbrev>
15313                 <authorgroup>
15314                   <author>
15315                     <surname>Internet Architecture Board</surname>
15316                   </author>
15317                 </authorgroup>
15318                 <title>IAB Technical Comment on the Unique DNS Root</title>
15319                 <pubdate>May 2000</pubdate>
15320               </biblioentry>
15321               <biblioentry>
15322                 <abbrev>RFC2929</abbrev>
15323                 <authorgroup>
15324                   <author>
15325                     <surname>Eastlake</surname>
15326                     <firstname>D.</firstname>
15327                     <lineage>3rd</lineage>
15328                   </author>
15329                   <author>
15330                     <surname>Brunner-Williams</surname>
15331                     <firstname>E.</firstname>
15332                   </author>
15333                   <author>
15334                     <surname>Manning</surname>
15335                     <firstname>B.</firstname>
15336                   </author>
15337                 </authorgroup>
15338                 <title>Domain Name System (DNS) IANA Considerations</title>
15339                 <pubdate>September 2000</pubdate>
15340               </biblioentry>
15341             </bibliodiv>
15342             <bibliodiv>
15343               <title><acronym>DNS</acronym> Operations</title>
15344               <biblioentry>
15345                 <abbrev>RFC1033</abbrev>
15346                 <author>
15347                   <surname>Lottor</surname>
15348                   <firstname>M.</firstname>
15349                 </author>
15350                 <title>Domain administrators operations guide.</title>
15351                 <pubdate>November 1987</pubdate>
15352               </biblioentry>
15353               <biblioentry>
15354                 <abbrev>RFC1537</abbrev>
15355                 <author>
15356                   <surname>Beertema</surname>
15357                   <firstname>P.</firstname>
15358                 </author>
15359                 <title>Common <acronym>DNS</acronym> Data File
15360                   Configuration Errors</title>
15361                 <pubdate>October 1993</pubdate>
15362               </biblioentry>
15363               <biblioentry>
15364                 <abbrev>RFC1912</abbrev>
15365                 <author>
15366                   <surname>Barr</surname>
15367                   <firstname>D.</firstname>
15368                 </author>
15369                 <title>Common <acronym>DNS</acronym> Operational and
15370                   Configuration Errors</title>
15371                 <pubdate>February 1996</pubdate>
15372               </biblioentry>
15373               <biblioentry>
15374                 <abbrev>RFC2010</abbrev>
15375                 <authorgroup>
15376                   <author>
15377                     <surname>Manning</surname>
15378                     <firstname>B.</firstname>
15379                   </author>
15380                   <author>
15381                     <firstname>P.</firstname>
15382                     <surname>Vixie</surname>
15383                   </author>
15384                 </authorgroup>
15385                 <title>Operational Criteria for Root Name Servers.</title>
15386                 <pubdate>October 1996</pubdate>
15387               </biblioentry>
15388               <biblioentry>
15389                 <abbrev>RFC2219</abbrev>
15390                 <authorgroup>
15391                   <author>
15392                     <surname>Hamilton</surname>
15393                     <firstname>M.</firstname>
15394                   </author>
15395                   <author>
15396                     <firstname>R.</firstname>
15397                     <surname>Wright</surname>
15398                   </author>
15399                 </authorgroup>
15400                 <title>Use of <acronym>DNS</acronym> Aliases for
15401                   Network Services.</title>
15402                 <pubdate>October 1997</pubdate>
15403               </biblioentry>
15404             </bibliodiv>
15405             <bibliodiv>
15406               <title>Internationalized Domain Names</title>
15407               <biblioentry>
15408                 <abbrev>RFC2825</abbrev>
15409                 <authorgroup>
15410                   <author>
15411                     <surname>IAB</surname>
15412                   </author>
15413                   <author>
15414                     <surname>Daigle</surname>
15415                     <firstname>R.</firstname>
15416                   </author>
15417                 </authorgroup>
15418                 <title>A Tangled Web: Issues of I18N, Domain Names,
15419                        and the Other Internet protocols</title>
15420                 <pubdate>May 2000</pubdate>
15421               </biblioentry>
15422               <biblioentry>
15423                 <abbrev>RFC3490</abbrev>
15424                 <authorgroup>
15425                   <author>
15426                     <surname>Faltstrom</surname>
15427                     <firstname>P.</firstname>
15428                   </author>
15429                   <author>
15430                     <surname>Hoffman</surname>
15431                     <firstname>P.</firstname>
15432                   </author>
15433                   <author>
15434                     <surname>Costello</surname>
15435                     <firstname>A.</firstname>
15436                   </author>
15437                 </authorgroup>
15438                 <title>Internationalizing Domain Names in Applications (IDNA)</title>
15439                 <pubdate>March 2003</pubdate>
15440               </biblioentry>
15441               <biblioentry>
15442                 <abbrev>RFC3491</abbrev>
15443                 <authorgroup>
15444                   <author>
15445                     <surname>Hoffman</surname>
15446                     <firstname>P.</firstname>
15447                   </author>
15448                   <author>
15449                     <surname>Blanchet</surname>
15450                     <firstname>M.</firstname>
15451                   </author>
15452                 </authorgroup>
15453                 <title>Nameprep: A Stringprep Profile for Internationalized Domain Names</title>
15454                 <pubdate>March 2003</pubdate>
15455               </biblioentry>
15456               <biblioentry>
15457                 <abbrev>RFC3492</abbrev>
15458                 <authorgroup>
15459                   <author>
15460                     <surname>Costello</surname>
15461                     <firstname>A.</firstname>
15462                   </author>
15463                 </authorgroup>
15464                 <title>Punycode: A Bootstring encoding of Unicode
15465                        for Internationalized Domain Names in
15466                        Applications (IDNA)</title>
15467                 <pubdate>March 2003</pubdate>
15468               </biblioentry>
15469             </bibliodiv>
15470             <bibliodiv>
15471               <title>Other <acronym>DNS</acronym>-related RFCs</title>
15472               <note>
15473                 <para>
15474                   Note: the following list of RFCs, although
15475                   <acronym>DNS</acronym>-related, are not
15476                   concerned with implementing software.
15477                 </para>
15478               </note>
15479               <biblioentry>
15480                 <abbrev>RFC1464</abbrev>
15481                 <author>
15482                   <surname>Rosenbaum</surname>
15483                   <firstname>R.</firstname>
15484                 </author>
15485                 <title>Using the Domain Name System To Store Arbitrary String
15486                   Attributes</title>
15487                 <pubdate>May 1993</pubdate>
15488               </biblioentry>
15489               <biblioentry>
15490                 <abbrev>RFC1713</abbrev>
15491                 <author>
15492                   <surname>Romao</surname>
15493                   <firstname>A.</firstname>
15494                 </author>
15495                 <title>Tools for <acronym>DNS</acronym> Debugging</title>
15496                 <pubdate>November 1994</pubdate>
15497               </biblioentry>
15498               <biblioentry>
15499                 <abbrev>RFC1794</abbrev>
15500                 <author>
15501                   <surname>Brisco</surname>
15502                   <firstname>T.</firstname>
15503                 </author>
15504                 <title><acronym>DNS</acronym> Support for Load
15505                   Balancing</title>
15506                 <pubdate>April 1995</pubdate>
15507               </biblioentry>
15508               <biblioentry>
15509                 <abbrev>RFC2240</abbrev>
15510                 <author>
15511                   <surname>Vaughan</surname>
15512                   <firstname>O.</firstname>
15513                 </author>
15514                 <title>A Legal Basis for Domain Name Allocation</title>
15515                 <pubdate>November 1997</pubdate>
15516               </biblioentry>
15517               <biblioentry>
15518                 <abbrev>RFC2345</abbrev>
15519                 <authorgroup>
15520                   <author>
15521                     <surname>Klensin</surname>
15522                     <firstname>J.</firstname>
15523                   </author>
15524                   <author>
15525                     <firstname>T.</firstname>
15526                     <surname>Wolf</surname>
15527                   </author>
15528                   <author>
15529                     <firstname>G.</firstname>
15530                     <surname>Oglesby</surname>
15531                   </author>
15532                 </authorgroup>
15533                 <title>Domain Names and Company Name Retrieval</title>
15534                 <pubdate>May 1998</pubdate>
15535               </biblioentry>
15536               <biblioentry>
15537                 <abbrev>RFC2352</abbrev>
15538                 <author>
15539                   <surname>Vaughan</surname>
15540                   <firstname>O.</firstname>
15541                 </author>
15542                 <title>A Convention For Using Legal Names as Domain Names</title>
15543                 <pubdate>May 1998</pubdate>
15544               </biblioentry>
15545               <biblioentry>
15546                 <abbrev>RFC3071</abbrev>
15547                 <authorgroup>
15548                   <author>
15549                     <surname>Klensin</surname>
15550                     <firstname>J.</firstname>
15551                   </author>
15552                 </authorgroup>
15553                 <title>Reflections on the DNS, RFC 1591, and Categories of Domains</title>
15554                 <pubdate>February 2001</pubdate>
15555               </biblioentry>
15556               <biblioentry>
15557                 <abbrev>RFC3258</abbrev>
15558                 <authorgroup>
15559                   <author>
15560                     <surname>Hardie</surname>
15561                     <firstname>T.</firstname>
15562                   </author>
15563                 </authorgroup>
15564                 <title>Distributing Authoritative Name Servers via
15565                        Shared Unicast Addresses</title>
15566                 <pubdate>April 2002</pubdate>
15567               </biblioentry>
15568               <biblioentry>
15569                 <abbrev>RFC3901</abbrev>
15570                 <authorgroup>
15571                   <author>
15572                     <surname>Durand</surname>
15573                     <firstname>A.</firstname>
15574                   </author>
15575                   <author>
15576                     <firstname>J.</firstname>
15577                     <surname>Ihren</surname>
15578                   </author>
15579                 </authorgroup>
15580                 <title>DNS IPv6 Transport Operational Guidelines</title>
15581                 <pubdate>September 2004</pubdate>
15582               </biblioentry>
15583             </bibliodiv>
15584             <bibliodiv>
15585               <title>Obsolete and Unimplemented Experimental RFC</title>
15586               <biblioentry>
15587                 <abbrev>RFC1712</abbrev>
15588                 <authorgroup>
15589                   <author>
15590                     <surname>Farrell</surname>
15591                     <firstname>C.</firstname>
15592                   </author>
15593                   <author>
15594                     <firstname>M.</firstname>
15595                     <surname>Schulze</surname>
15596                   </author>
15597                   <author>
15598                     <firstname>S.</firstname>
15599                     <surname>Pleitner</surname>
15600                   </author>
15601                   <author>
15602                     <firstname>D.</firstname>
15603                     <surname>Baldoni</surname>
15604                   </author>
15605                 </authorgroup>
15606                 <title><acronym>DNS</acronym> Encoding of Geographical
15607                   Location</title>
15608                 <pubdate>November 1994</pubdate>
15609               </biblioentry>
15610               <biblioentry>
15611                 <abbrev>RFC2673</abbrev>
15612                 <authorgroup>
15613                   <author>
15614                     <surname>Crawford</surname>
15615                     <firstname>M.</firstname>
15616                   </author>
15617                 </authorgroup>
15618                 <title>Binary Labels in the Domain Name System</title>
15619                 <pubdate>August 1999</pubdate>
15620               </biblioentry>
15621               <biblioentry>
15622                 <abbrev>RFC2874</abbrev>
15623                 <authorgroup>
15624                   <author>
15625                     <surname>Crawford</surname>
15626                     <firstname>M.</firstname>
15627                   </author>
15628                   <author>
15629                     <surname>Huitema</surname>
15630                     <firstname>C.</firstname>
15631                   </author>
15632                 </authorgroup>
15633                 <title>DNS Extensions to Support IPv6 Address Aggregation
15634                        and Renumbering</title>
15635                 <pubdate>July 2000</pubdate>
15636               </biblioentry>
15637             </bibliodiv>
15638             <bibliodiv>
15639               <title>Obsoleted DNS Security RFCs</title>
15640               <note>
15641                 <para>
15642                   Most of these have been consolidated into RFC4033,
15643                   RFC4034 and RFC4035 which collectively describe DNSSECbis.
15644                 </para>
15645               </note>
15646               <biblioentry>
15647                 <abbrev>RFC2065</abbrev>
15648                 <authorgroup>
15649                   <author>
15650                     <surname>Eastlake</surname>
15651                     <lineage>3rd</lineage>
15652                     <firstname>D.</firstname>
15653                   </author>
15654                   <author>
15655                     <firstname>C.</firstname>
15656                     <surname>Kaufman</surname>
15657                   </author>
15658                 </authorgroup>
15659                 <title>Domain Name System Security Extensions</title>
15660                 <pubdate>January 1997</pubdate>
15661               </biblioentry>
15662               <biblioentry>
15663                 <abbrev>RFC2137</abbrev>
15664                 <author>
15665                   <surname>Eastlake</surname>
15666                   <lineage>3rd</lineage>
15667                   <firstname>D.</firstname>
15668                 </author>
15669                 <title>Secure Domain Name System Dynamic Update</title>
15670                 <pubdate>April 1997</pubdate>
15671               </biblioentry>
15672               <biblioentry>
15673                 <abbrev>RFC2535</abbrev>
15674                 <authorgroup>
15675                   <author>
15676                     <surname>Eastlake</surname>
15677                     <lineage>3rd</lineage>
15678                     <firstname>D.</firstname>
15679                   </author>
15680                 </authorgroup>
15681                 <title>Domain Name System Security Extensions</title>
15682                 <pubdate>March 1999</pubdate>
15683               </biblioentry>
15684               <biblioentry>
15685                 <abbrev>RFC3008</abbrev>
15686                 <authorgroup>
15687                   <author>
15688                     <surname>Wellington</surname>
15689                     <firstname>B.</firstname>
15690                   </author>
15691                 </authorgroup>
15692                 <title>Domain Name System Security (DNSSEC)
15693                        Signing Authority</title>
15694                 <pubdate>November 2000</pubdate>
15695               </biblioentry>
15696               <biblioentry>
15697                 <abbrev>RFC3090</abbrev>
15698                 <authorgroup>
15699                   <author>
15700                     <surname>Lewis</surname>
15701                     <firstname>E.</firstname>
15702                   </author>
15703                 </authorgroup>
15704                 <title>DNS Security Extension Clarification on Zone Status</title>
15705                 <pubdate>March 2001</pubdate>
15706               </biblioentry>
15707               <biblioentry>
15708                 <abbrev>RFC3445</abbrev>
15709                 <authorgroup>
15710                   <author>
15711                     <surname>Massey</surname>
15712                     <firstname>D.</firstname>
15713                   </author>
15714                   <author>
15715                     <surname>Rose</surname>
15716                     <firstname>S.</firstname>
15717                   </author>
15718                 </authorgroup>
15719                 <title>Limiting the Scope of the KEY Resource Record (RR)</title>
15720                 <pubdate>December 2002</pubdate>
15721               </biblioentry>
15722               <biblioentry>
15723                 <abbrev>RFC3655</abbrev>
15724                 <authorgroup>
15725                   <author>
15726                     <surname>Wellington</surname>
15727                     <firstname>B.</firstname>
15728                   </author>
15729                   <author>
15730                     <surname>Gudmundsson</surname>
15731                     <firstname>O.</firstname>
15732                   </author>
15733                 </authorgroup>
15734                 <title>Redefinition of DNS Authenticated Data (AD) bit</title>
15735                 <pubdate>November 2003</pubdate>
15736               </biblioentry>
15737               <biblioentry>
15738                 <abbrev>RFC3658</abbrev>
15739                 <authorgroup>
15740                   <author>
15741                     <surname>Gudmundsson</surname>
15742                     <firstname>O.</firstname>
15743                   </author>
15744                 </authorgroup>
15745                 <title>Delegation Signer (DS) Resource Record (RR)</title>
15746                 <pubdate>December 2003</pubdate>
15747               </biblioentry>
15748               <biblioentry>
15749                 <abbrev>RFC3755</abbrev>
15750                 <authorgroup>
15751                   <author>
15752                     <surname>Weiler</surname>
15753                     <firstname>S.</firstname>
15754                   </author>
15755                 </authorgroup>
15756                 <title>Legacy Resolver Compatibility for Delegation Signer (DS)</title>
15757                 <pubdate>May 2004</pubdate>
15758               </biblioentry>
15759               <biblioentry>
15760                 <abbrev>RFC3757</abbrev>
15761                 <authorgroup>
15762                   <author>
15763                     <surname>Kolkman</surname>
15764                     <firstname>O.</firstname>
15765                   </author>
15766                   <author>
15767                     <surname>Schlyter</surname>
15768                     <firstname>J.</firstname>
15769                   </author>
15770                   <author>
15771                     <surname>Lewis</surname>
15772                     <firstname>E.</firstname>
15773                   </author>
15774                 </authorgroup>
15775                 <title>Domain Name System KEY (DNSKEY) Resource Record
15776                       (RR) Secure Entry Point (SEP) Flag</title>
15777                 <pubdate>April 2004</pubdate>
15778               </biblioentry>
15779               <biblioentry>
15780                 <abbrev>RFC3845</abbrev>
15781                 <authorgroup>
15782                   <author>
15783                     <surname>Schlyter</surname>
15784                     <firstname>J.</firstname>
15785                   </author>
15786                 </authorgroup>
15787                 <title>DNS Security (DNSSEC) NextSECure (NSEC) RDATA Format</title>
15788                 <pubdate>August 2004</pubdate>
15789               </biblioentry>
15790             </bibliodiv>
15791           </bibliography>
15792         </sect2>
15793         <sect2 id="internet_drafts">
15794           <title>Internet Drafts</title>
15795           <para>
15796             Internet Drafts (IDs) are rough-draft working documents of
15797             the Internet Engineering Task Force. They are, in essence, RFCs
15798             in the preliminary stages of development. Implementors are
15799             cautioned not
15800             to regard IDs as archival, and they should not be quoted or cited
15801             in any formal documents unless accompanied by the disclaimer that
15802             they are "works in progress." IDs have a lifespan of six months
15803             after which they are deleted unless updated by their authors.
15804           </para>
15805         </sect2>
15806         <sect2>
15807           <title>Other Documents About <acronym>BIND</acronym></title>
15808           <para/>
15809           <bibliography>
15810             <biblioentry>
15811               <authorgroup>
15812                 <author>
15813                   <surname>Albitz</surname>
15814                   <firstname>Paul</firstname>
15815                 </author>
15816                 <author>
15817                   <firstname>Cricket</firstname>
15818                   <surname>Liu</surname>
15819                 </author>
15820               </authorgroup>
15821               <title><acronym>DNS</acronym> and <acronym>BIND</acronym></title>
15822               <copyright>
15823                 <year>1998</year>
15824                 <holder>Sebastopol, CA: O'Reilly and Associates</holder>
15825               </copyright>
15826             </biblioentry>
15827           </bibliography>
15828         </sect2>
15829       </sect1>
15830
15831       <xi:include href="libdns.xml"/>
15832
15833     </appendix>
15834
15835
15836     <reference id="Bv9ARM.ch10">
15837       <title>Manual pages</title>
15838       <xi:include href="../../bin/dig/dig.docbook"/>
15839       <xi:include href="../../bin/dig/host.docbook"/>
15840       <xi:include href="../../bin/dnssec/dnssec-dsfromkey.docbook"/>
15841       <xi:include href="../../bin/dnssec/dnssec-keyfromlabel.docbook"/>
15842       <xi:include href="../../bin/dnssec/dnssec-keygen.docbook"/>
15843       <xi:include href="../../bin/dnssec/dnssec-revoke.docbook"/>
15844       <xi:include href="../../bin/dnssec/dnssec-settime.docbook"/>
15845       <xi:include href="../../bin/dnssec/dnssec-signzone.docbook"/>
15846       <xi:include href="../../bin/check/named-checkconf.docbook"/>
15847       <xi:include href="../../bin/check/named-checkzone.docbook"/>
15848       <xi:include href="../../bin/named/named.docbook"/>
15849       <xi:include href="../../bin/tools/named-journalprint.docbook"/>
15850       <!-- named.conf.docbook and others? -->
15851       <xi:include href="../../bin/nsupdate/nsupdate.docbook"/>
15852       <xi:include href="../../bin/rndc/rndc.docbook"/>
15853       <xi:include href="../../bin/rndc/rndc.conf.docbook"/>
15854       <xi:include href="../../bin/confgen/rndc-confgen.docbook"/>
15855       <xi:include href="../../bin/confgen/ddns-confgen.docbook"/>
15856       <xi:include href="../../bin/tools/arpaname.docbook"/>
15857       <xi:include href="../../bin/tools/genrandom.docbook"/>
15858       <xi:include href="../../bin/tools/isc-hmac-fixup.docbook"/>
15859       <xi:include href="../../bin/tools/nsec3hash.docbook"/>
15860     </reference>
15861
15862   </book>
15863
15864 <!--
15865   - Local variables:
15866   - mode: sgml
15867   - End:
15868  -->