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 "—">]>
5 - Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC")
6 - Copyright (C) 2000-2003 Internet Software Consortium.
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.
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.
21 <book xmlns:xi="http://www.w3.org/2001/XInclude">
22 <title>BIND 9 Administrator Reference Manual</title>
38 <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
45 <holder>Internet Software Consortium.</holder>
47 <xi:include href="releaseinfo.xml"/>
50 <chapter id="Bv9ARM.ch01">
51 <title>Introduction</title>
53 The Internet Domain Name System (<acronym>DNS</acronym>)
54 consists of the syntax
55 to specify the names of entities in the Internet in a hierarchical
56 manner, the rules used for delegating authority over names, and the
57 system implementation that actually maps names to Internet
58 addresses. <acronym>DNS</acronym> data is maintained in a
60 hierarchical databases.
64 <title>Scope of Document</title>
67 The Berkeley Internet Name Domain
68 (<acronym>BIND</acronym>) implements a
69 domain name server for a number of operating systems. This
70 document provides basic information about the installation and
71 care of the Internet Systems Consortium (<acronym>ISC</acronym>)
72 <acronym>BIND</acronym> version 9 software package for
73 system administrators.
75 <xi:include href="pkgversion.xml"/>
79 <title>Organization of This Document</title>
81 In this document, <emphasis>Chapter 1</emphasis> introduces
82 the basic <acronym>DNS</acronym> and <acronym>BIND</acronym> concepts. <emphasis>Chapter 2</emphasis>
83 describes resource requirements for running <acronym>BIND</acronym> in various
84 environments. Information in <emphasis>Chapter 3</emphasis> is
85 <emphasis>task-oriented</emphasis> in its presentation and is
86 organized functionally, to aid in the process of installing the
87 <acronym>BIND</acronym> 9 software. The task-oriented
88 section is followed by
89 <emphasis>Chapter 4</emphasis>, which contains more advanced
90 concepts that the system administrator may need for implementing
91 certain options. <emphasis>Chapter 5</emphasis>
92 describes the <acronym>BIND</acronym> 9 lightweight
93 resolver. The contents of <emphasis>Chapter 6</emphasis> are
94 organized as in a reference manual to aid in the ongoing
95 maintenance of the software. <emphasis>Chapter 7</emphasis> addresses
96 security considerations, and
97 <emphasis>Chapter 8</emphasis> contains troubleshooting help. The
98 main body of the document is followed by several
99 <emphasis>appendices</emphasis> which contain useful reference
100 information, such as a <emphasis>bibliography</emphasis> and
101 historic information related to <acronym>BIND</acronym>
107 <title>Conventions Used in This Document</title>
110 In this document, we use the following general typographic
116 <colspec colname="1" colnum="1" colwidth="3.000in"/>
117 <colspec colname="2" colnum="2" colwidth="2.625in"/>
122 <emphasis>To describe:</emphasis>
127 <emphasis>We use the style:</emphasis>
134 a pathname, filename, URL, hostname,
135 mailing list name, or new term or concept
140 <filename>Fixed width</filename>
153 <userinput>Fixed Width Bold</userinput>
165 <computeroutput>Fixed Width</computeroutput>
174 The following conventions are used in descriptions of the
175 <acronym>BIND</acronym> configuration file:<informaltable colsep="0" frame="all" rowsep="0">
176 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
177 <colspec colname="1" colnum="1" colsep="0" colwidth="3.000in"/>
178 <colspec colname="2" colnum="2" colsep="0" colwidth="2.625in"/>
181 <entry colname="1" colsep="1" rowsep="1">
183 <emphasis>To describe:</emphasis>
186 <entry colname="2" rowsep="1">
188 <emphasis>We use the style:</emphasis>
193 <entry colname="1" colsep="1" rowsep="1">
198 <entry colname="2" rowsep="1">
200 <literal>Fixed Width</literal>
205 <entry colname="1" colsep="1" rowsep="1">
210 <entry colname="2" rowsep="1">
212 <varname>Fixed Width</varname>
217 <entry colname="1" colsep="1">
224 <optional>Text is enclosed in square brackets</optional>
234 <title>The Domain Name System (<acronym>DNS</acronym>)</title>
236 The purpose of this document is to explain the installation
237 and upkeep of the <acronym>BIND</acronym> (Berkeley Internet
238 Name Domain) software package, and we
239 begin by reviewing the fundamentals of the Domain Name System
240 (<acronym>DNS</acronym>) as they relate to <acronym>BIND</acronym>.
244 <title>DNS Fundamentals</title>
247 The Domain Name System (DNS) is a hierarchical, distributed
248 database. It stores information for mapping Internet host names to
250 addresses and vice versa, mail routing information, and other data
251 used by Internet applications.
255 Clients look up information in the DNS by calling a
256 <emphasis>resolver</emphasis> library, which sends queries to one or
257 more <emphasis>name servers</emphasis> and interprets the responses.
258 The <acronym>BIND</acronym> 9 software distribution
260 name server, <command>named</command>, and a resolver
261 library, <command>liblwres</command>. The older
262 <command>libbind</command> resolver library is also available
263 from ISC as a separate download.
267 <title>Domains and Domain Names</title>
270 The data stored in the DNS is identified by <emphasis>domain names</emphasis> that are organized as a tree according to
271 organizational or administrative boundaries. Each node of the tree,
272 called a <emphasis>domain</emphasis>, is given a label. The domain
274 node is the concatenation of all the labels on the path from the
275 node to the <emphasis>root</emphasis> node. This is represented
276 in written form as a string of labels listed from right to left and
277 separated by dots. A label need only be unique within its parent
282 For example, a domain name for a host at the
283 company <emphasis>Example, Inc.</emphasis> could be
284 <literal>ourhost.example.com</literal>,
285 where <literal>com</literal> is the
286 top level domain to which
287 <literal>ourhost.example.com</literal> belongs,
288 <literal>example</literal> is
289 a subdomain of <literal>com</literal>, and
290 <literal>ourhost</literal> is the
295 For administrative purposes, the name space is partitioned into
296 areas called <emphasis>zones</emphasis>, each starting at a node and
297 extending down to the leaf nodes or to nodes where other zones
299 The data for each zone is stored in a <emphasis>name server</emphasis>, which answers queries about the zone using the
300 <emphasis>DNS protocol</emphasis>.
304 The data associated with each domain name is stored in the
305 form of <emphasis>resource records</emphasis> (<acronym>RR</acronym>s).
306 Some of the supported resource record types are described in
307 <xref linkend="types_of_resource_records_and_when_to_use_them"/>.
311 For more detailed information about the design of the DNS and
312 the DNS protocol, please refer to the standards documents listed in
313 <xref linkend="rfcs"/>.
320 To properly operate a name server, it is important to understand
321 the difference between a <emphasis>zone</emphasis>
322 and a <emphasis>domain</emphasis>.
326 As stated previously, a zone is a point of delegation in
327 the <acronym>DNS</acronym> tree. A zone consists of
328 those contiguous parts of the domain
329 tree for which a name server has complete information and over which
330 it has authority. It contains all domain names from a certain point
331 downward in the domain tree except those which are delegated to
332 other zones. A delegation point is marked by one or more
333 <emphasis>NS records</emphasis> in the
334 parent zone, which should be matched by equivalent NS records at
335 the root of the delegated zone.
339 For instance, consider the <literal>example.com</literal>
340 domain which includes names
341 such as <literal>host.aaa.example.com</literal> and
342 <literal>host.bbb.example.com</literal> even though
343 the <literal>example.com</literal> zone includes
344 only delegations for the <literal>aaa.example.com</literal> and
345 <literal>bbb.example.com</literal> zones. A zone can
347 exactly to a single domain, but could also include only part of a
348 domain, the rest of which could be delegated to other
349 name servers. Every name in the <acronym>DNS</acronym>
351 <emphasis>domain</emphasis>, even if it is
352 <emphasis>terminal</emphasis>, that is, has no
353 <emphasis>subdomains</emphasis>. Every subdomain is a domain and
354 every domain except the root is also a subdomain. The terminology is
355 not intuitive and we suggest that you read RFCs 1033, 1034 and 1035
357 gain a complete understanding of this difficult and subtle
362 Though <acronym>BIND</acronym> is called a "domain name
364 it deals primarily in terms of zones. The master and slave
365 declarations in the <filename>named.conf</filename> file
367 zones, not domains. When you ask some other site if it is willing to
368 be a slave server for your <emphasis>domain</emphasis>, you are
369 actually asking for slave service for some collection of zones.
374 <title>Authoritative Name Servers</title>
377 Each zone is served by at least
378 one <emphasis>authoritative name server</emphasis>,
379 which contains the complete data for the zone.
380 To make the DNS tolerant of server and network failures,
381 most zones have two or more authoritative servers, on
386 Responses from authoritative servers have the "authoritative
387 answer" (AA) bit set in the response packets. This makes them
388 easy to identify when debugging DNS configurations using tools like
389 <command>dig</command> (<xref linkend="diagnostic_tools"/>).
393 <title>The Primary Master</title>
396 The authoritative server where the master copy of the zone
397 data is maintained is called the
398 <emphasis>primary master</emphasis> server, or simply the
399 <emphasis>primary</emphasis>. Typically it loads the zone
400 contents from some local file edited by humans or perhaps
401 generated mechanically from some other local file which is
402 edited by humans. This file is called the
403 <emphasis>zone file</emphasis> or
404 <emphasis>master file</emphasis>.
408 In some cases, however, the master file may not be edited
409 by humans at all, but may instead be the result of
410 <emphasis>dynamic update</emphasis> operations.
415 <title>Slave Servers</title>
417 The other authoritative servers, the <emphasis>slave</emphasis>
418 servers (also known as <emphasis>secondary</emphasis> servers)
420 the zone contents from another server using a replication process
421 known as a <emphasis>zone transfer</emphasis>. Typically the data
423 transferred directly from the primary master, but it is also
425 to transfer it from another slave. In other words, a slave server
426 may itself act as a master to a subordinate slave server.
431 <title>Stealth Servers</title>
434 Usually all of the zone's authoritative servers are listed in
435 NS records in the parent zone. These NS records constitute
436 a <emphasis>delegation</emphasis> of the zone from the parent.
437 The authoritative servers are also listed in the zone file itself,
438 at the <emphasis>top level</emphasis> or <emphasis>apex</emphasis>
439 of the zone. You can list servers in the zone's top-level NS
440 records that are not in the parent's NS delegation, but you cannot
441 list servers in the parent's delegation that are not present at
442 the zone's top level.
446 A <emphasis>stealth server</emphasis> is a server that is
447 authoritative for a zone but is not listed in that zone's NS
448 records. Stealth servers can be used for keeping a local copy of
450 zone to speed up access to the zone's records or to make sure that
452 zone is available even if all the "official" servers for the zone
458 A configuration where the primary master server itself is a
459 stealth server is often referred to as a "hidden primary"
460 configuration. One use for this configuration is when the primary
462 is behind a firewall and therefore unable to communicate directly
463 with the outside world.
471 <title>Caching Name Servers</title>
474 - Terminology here is inconsistent. Probably ought to
475 - convert to using "recursive name server" everywhere
476 - with just a note about "caching" terminology.
480 The resolver libraries provided by most operating systems are
481 <emphasis>stub resolvers</emphasis>, meaning that they are not
483 performing the full DNS resolution process by themselves by talking
484 directly to the authoritative servers. Instead, they rely on a
486 name server to perform the resolution on their behalf. Such a
488 is called a <emphasis>recursive</emphasis> name server; it performs
489 <emphasis>recursive lookups</emphasis> for local clients.
493 To improve performance, recursive servers cache the results of
494 the lookups they perform. Since the processes of recursion and
495 caching are intimately connected, the terms
496 <emphasis>recursive server</emphasis> and
497 <emphasis>caching server</emphasis> are often used synonymously.
501 The length of time for which a record may be retained in
502 the cache of a caching name server is controlled by the
503 Time To Live (TTL) field associated with each resource record.
507 <title>Forwarding</title>
510 Even a caching name server does not necessarily perform
511 the complete recursive lookup itself. Instead, it can
512 <emphasis>forward</emphasis> some or all of the queries
513 that it cannot satisfy from its cache to another caching name
515 commonly referred to as a <emphasis>forwarder</emphasis>.
519 There may be one or more forwarders,
520 and they are queried in turn until the list is exhausted or an
522 is found. Forwarders are typically used when you do not
523 wish all the servers at a given site to interact directly with the
525 the Internet servers. A typical scenario would involve a number
526 of internal <acronym>DNS</acronym> servers and an
527 Internet firewall. Servers unable
528 to pass packets through the firewall would forward to the server
529 that can do it, and that server would query the Internet <acronym>DNS</acronym> servers
530 on the internal server's behalf.
537 <title>Name Servers in Multiple Roles</title>
540 The <acronym>BIND</acronym> name server can
541 simultaneously act as
542 a master for some zones, a slave for other zones, and as a caching
543 (recursive) server for a set of local clients.
547 However, since the functions of authoritative name service
548 and caching/recursive name service are logically separate, it is
549 often advantageous to run them on separate server machines.
551 A server that only provides authoritative name service
552 (an <emphasis>authoritative-only</emphasis> server) can run with
553 recursion disabled, improving reliability and security.
555 A server that is not authoritative for any zones and only provides
556 recursive service to local
557 clients (a <emphasis>caching-only</emphasis> server)
558 does not need to be reachable from the Internet at large and can
559 be placed inside a firewall.
567 <chapter id="Bv9ARM.ch02">
568 <title><acronym>BIND</acronym> Resource Requirements</title>
571 <title>Hardware requirements</title>
574 <acronym>DNS</acronym> hardware requirements have
575 traditionally been quite modest.
576 For many installations, servers that have been pensioned off from
577 active duty have performed admirably as <acronym>DNS</acronym> servers.
580 The DNSSEC features of <acronym>BIND</acronym> 9
581 may prove to be quite
582 CPU intensive however, so organizations that make heavy use of these
583 features may wish to consider larger systems for these applications.
584 <acronym>BIND</acronym> 9 is fully multithreaded, allowing
586 multiprocessor systems for installations that need it.
590 <title>CPU Requirements</title>
592 CPU requirements for <acronym>BIND</acronym> 9 range from
594 for serving of static zones without caching, to enterprise-class
595 machines if you intend to process many dynamic updates and DNSSEC
596 signed zones, serving many thousands of queries per second.
601 <title>Memory Requirements</title>
603 The memory of the server has to be large enough to fit the
604 cache and zones loaded off disk. The <command>max-cache-size</command>
605 option can be used to limit the amount of memory used by the cache,
606 at the expense of reducing cache hit rates and causing more <acronym>DNS</acronym>
608 Additionally, if additional section caching
609 (<xref linkend="acache"/>) is enabled,
610 the <command>max-acache-size</command> option can be used to
612 of memory used by the mechanism.
613 It is still good practice to have enough memory to load
614 all zone and cache data into memory — unfortunately, the best
616 to determine this for a given installation is to watch the name server
617 in operation. After a few weeks the server process should reach
618 a relatively stable size where entries are expiring from the cache as
619 fast as they are being inserted.
622 - Add something here about leaving overhead for attacks?
623 - How much overhead? Percentage?
628 <title>Name Server Intensive Environment Issues</title>
630 For name server intensive environments, there are two alternative
631 configurations that may be used. The first is where clients and
632 any second-level internal name servers query a main name server, which
633 has enough memory to build a large cache. This approach minimizes
634 the bandwidth used by external name lookups. The second alternative
635 is to set up second-level internal name servers to make queries
637 In this configuration, none of the individual machines needs to
638 have as much memory or CPU power as in the first alternative, but
639 this has the disadvantage of making many more external queries,
640 as none of the name servers share their cached data.
645 <title>Supported Operating Systems</title>
647 ISC <acronym>BIND</acronym> 9 compiles and runs on a large
649 of Unix-like operating systems and on
650 Microsoft Windows Server 2003 and 2008, and Windows XP and Vista.
652 list of supported systems, see the README file in the top level
654 of the BIND 9 source distribution.
659 <chapter id="Bv9ARM.ch03">
660 <title>Name Server Configuration</title>
662 In this chapter we provide some suggested configurations along
663 with guidelines for their use. We suggest reasonable values for
664 certain option settings.
667 <sect1 id="sample_configuration">
668 <title>Sample Configurations</title>
670 <title>A Caching-only Name Server</title>
672 The following sample configuration is appropriate for a caching-only
673 name server for use by clients internal to a corporation. All
675 from outside clients are refused using the <command>allow-query</command>
676 option. Alternatively, the same effect could be achieved using
682 // Two corporate subnets we wish to allow queries from.
683 acl corpnets { 192.168.4.0/24; 192.168.7.0/24; };
686 directory "/etc/namedb";
688 allow-query { corpnets; };
690 // Provide a reverse mapping for the loopback
692 zone "0.0.127.in-addr.arpa" {
694 file "localhost.rev";
702 <title>An Authoritative-only Name Server</title>
704 This sample configuration is for an authoritative-only server
705 that is the master server for "<filename>example.com</filename>"
706 and a slave for the subdomain "<filename>eng.example.com</filename>".
712 directory "/etc/namedb";
713 // Do not allow access to cache
714 allow-query-cache { none; };
715 // This is the default
716 allow-query { any; };
717 // Do not provide recursive service
721 // Provide a reverse mapping for the loopback
723 zone "0.0.127.in-addr.arpa" {
725 file "localhost.rev";
728 // We are the master server for example.com
731 file "example.com.db";
732 // IP addresses of slave servers allowed to
733 // transfer example.com
739 // We are a slave server for eng.example.com
740 zone "eng.example.com" {
742 file "eng.example.com.bk";
743 // IP address of eng.example.com master server
744 masters { 192.168.4.12; };
752 <title>Load Balancing</title>
754 - Add explanation of why load balancing is fragile at best
755 - and completely pointless in the general case.
759 A primitive form of load balancing can be achieved in
760 the <acronym>DNS</acronym> by using multiple records
761 (such as multiple A records) for one name.
765 For example, if you have three WWW servers with network addresses
766 of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
767 following means that clients will connect to each machine one third
771 <informaltable colsep="0" rowsep="0">
772 <tgroup cols="5" colsep="0" rowsep="0" tgroupstyle="2Level-table">
773 <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
774 <colspec colname="2" colnum="2" colsep="0" colwidth="0.500in"/>
775 <colspec colname="3" colnum="3" colsep="0" colwidth="0.750in"/>
776 <colspec colname="4" colnum="4" colsep="0" colwidth="0.750in"/>
777 <colspec colname="5" colnum="5" colsep="0" colwidth="2.028in"/>
802 Resource Record (RR) Data
809 <literal>www</literal>
814 <literal>600</literal>
819 <literal>IN</literal>
829 <literal>10.0.0.1</literal>
839 <literal>600</literal>
844 <literal>IN</literal>
854 <literal>10.0.0.2</literal>
864 <literal>600</literal>
869 <literal>IN</literal>
879 <literal>10.0.0.3</literal>
887 When a resolver queries for these records, <acronym>BIND</acronym> will rotate
888 them and respond to the query with the records in a different
889 order. In the example above, clients will randomly receive
890 records in the order 1, 2, 3; 2, 3, 1; and 3, 1, 2. Most clients
891 will use the first record returned and discard the rest.
894 For more detail on ordering responses, check the
895 <command>rrset-order</command> sub-statement in the
896 <command>options</command> statement, see
897 <xref endterm="rrset_ordering_title" linkend="rrset_ordering"/>.
903 <title>Name Server Operations</title>
906 <title>Tools for Use With the Name Server Daemon</title>
908 This section describes several indispensable diagnostic,
909 administrative and monitoring tools available to the system
910 administrator for controlling and debugging the name server
913 <sect3 id="diagnostic_tools">
914 <title>Diagnostic Tools</title>
916 The <command>dig</command>, <command>host</command>, and
917 <command>nslookup</command> programs are all command
919 for manually querying name servers. They differ in style and
925 <term id="dig"><command>dig</command></term>
928 The domain information groper (<command>dig</command>)
929 is the most versatile and complete of these lookup tools.
930 It has two modes: simple interactive
931 mode for a single query, and batch mode which executes a
933 each in a list of several query lines. All query options are
935 from the command line.
937 <cmdsynopsis label="Usage">
938 <command>dig</command>
939 <arg>@<replaceable>server</replaceable></arg>
940 <arg choice="plain"><replaceable>domain</replaceable></arg>
941 <arg><replaceable>query-type</replaceable></arg>
942 <arg><replaceable>query-class</replaceable></arg>
943 <arg>+<replaceable>query-option</replaceable></arg>
944 <arg>-<replaceable>dig-option</replaceable></arg>
945 <arg>%<replaceable>comment</replaceable></arg>
948 The usual simple use of <command>dig</command> will take the form
951 <command>dig @server domain query-type query-class</command>
954 For more information and a list of available commands and
955 options, see the <command>dig</command> man
962 <term><command>host</command></term>
965 The <command>host</command> utility emphasizes
967 and ease of use. By default, it converts
968 between host names and Internet addresses, but its
970 can be extended with the use of options.
972 <cmdsynopsis label="Usage">
973 <command>host</command>
974 <arg>-aCdlnrsTwv</arg>
975 <arg>-c <replaceable>class</replaceable></arg>
976 <arg>-N <replaceable>ndots</replaceable></arg>
977 <arg>-t <replaceable>type</replaceable></arg>
978 <arg>-W <replaceable>timeout</replaceable></arg>
979 <arg>-R <replaceable>retries</replaceable></arg>
980 <arg>-m <replaceable>flag</replaceable></arg>
983 <arg choice="plain"><replaceable>hostname</replaceable></arg>
984 <arg><replaceable>server</replaceable></arg>
987 For more information and a list of available commands and
988 options, see the <command>host</command> man
995 <term><command>nslookup</command></term>
997 <para><command>nslookup</command>
998 has two modes: interactive and
999 non-interactive. Interactive mode allows the user to
1000 query name servers for information about various
1001 hosts and domains or to print a list of hosts in a
1002 domain. Non-interactive mode is used to print just
1003 the name and requested information for a host or
1006 <cmdsynopsis label="Usage">
1007 <command>nslookup</command>
1008 <arg rep="repeat">-option</arg>
1010 <arg><replaceable>host-to-find</replaceable></arg>
1011 <arg>- <arg>server</arg></arg>
1015 Interactive mode is entered when no arguments are given (the
1016 default name server will be used) or when the first argument
1018 hyphen (`-') and the second argument is the host name or
1023 Non-interactive mode is used when the name or Internet
1025 of the host to be looked up is given as the first argument.
1027 optional second argument specifies the host name or address
1031 Due to its arcane user interface and frequently inconsistent
1032 behavior, we do not recommend the use of <command>nslookup</command>.
1033 Use <command>dig</command> instead.
1041 <sect3 id="admin_tools">
1042 <title>Administrative Tools</title>
1044 Administrative tools play an integral part in the management
1048 <varlistentry id="named-checkconf" xreflabel="Named Configuration Checking application">
1050 <term><command>named-checkconf</command></term>
1053 The <command>named-checkconf</command> program
1054 checks the syntax of a <filename>named.conf</filename> file.
1056 <cmdsynopsis label="Usage">
1057 <command>named-checkconf</command>
1059 <arg>-t <replaceable>directory</replaceable></arg>
1060 <arg><replaceable>filename</replaceable></arg>
1064 <varlistentry id="named-checkzone" xreflabel="Zone Checking application">
1066 <term><command>named-checkzone</command></term>
1069 The <command>named-checkzone</command> program
1070 checks a master file for
1071 syntax and consistency.
1073 <cmdsynopsis label="Usage">
1074 <command>named-checkzone</command>
1076 <arg>-c <replaceable>class</replaceable></arg>
1077 <arg>-o <replaceable>output</replaceable></arg>
1078 <arg>-t <replaceable>directory</replaceable></arg>
1079 <arg>-w <replaceable>directory</replaceable></arg>
1080 <arg>-k <replaceable>(ignore|warn|fail)</replaceable></arg>
1081 <arg>-n <replaceable>(ignore|warn|fail)</replaceable></arg>
1082 <arg>-W <replaceable>(ignore|warn)</replaceable></arg>
1083 <arg choice="plain"><replaceable>zone</replaceable></arg>
1084 <arg><replaceable>filename</replaceable></arg>
1088 <varlistentry id="named-compilezone" xreflabel="Zone Compilation application">
1089 <term><command>named-compilezone</command></term>
1092 Similar to <command>named-checkzone,</command> but
1093 it always dumps the zone content to a specified file
1094 (typically in a different format).
1098 <varlistentry id="rndc" xreflabel="Remote Name Daemon Control application">
1100 <term><command>rndc</command></term>
1103 The remote name daemon control
1104 (<command>rndc</command>) program allows the
1106 administrator to control the operation of a name server.
1107 Since <acronym>BIND</acronym> 9.2, <command>rndc</command>
1108 supports all the commands of the BIND 8 <command>ndc</command>
1109 utility except <command>ndc start</command> and
1110 <command>ndc restart</command>, which were also
1111 not supported in <command>ndc</command>'s
1113 If you run <command>rndc</command> without any
1115 it will display a usage message as follows:
1117 <cmdsynopsis label="Usage">
1118 <command>rndc</command>
1119 <arg>-c <replaceable>config</replaceable></arg>
1120 <arg>-s <replaceable>server</replaceable></arg>
1121 <arg>-p <replaceable>port</replaceable></arg>
1122 <arg>-y <replaceable>key</replaceable></arg>
1123 <arg choice="plain"><replaceable>command</replaceable></arg>
1124 <arg rep="repeat"><replaceable>command</replaceable></arg>
1127 <para>See <xref linkend="man.rndc"/> for details of
1128 the available <command>rndc</command> commands.
1132 <command>rndc</command> requires a configuration file,
1134 communication with the server is authenticated with
1135 digital signatures that rely on a shared secret, and
1136 there is no way to provide that secret other than with a
1137 configuration file. The default location for the
1138 <command>rndc</command> configuration file is
1139 <filename>/etc/rndc.conf</filename>, but an
1141 location can be specified with the <option>-c</option>
1142 option. If the configuration file is not found,
1143 <command>rndc</command> will also look in
1144 <filename>/etc/rndc.key</filename> (or whatever
1145 <varname>sysconfdir</varname> was defined when
1146 the <acronym>BIND</acronym> build was
1148 The <filename>rndc.key</filename> file is
1150 running <command>rndc-confgen -a</command> as
1152 <xref linkend="controls_statement_definition_and_usage"/>.
1156 The format of the configuration file is similar to
1157 that of <filename>named.conf</filename>, but
1159 only four statements, the <command>options</command>,
1160 <command>key</command>, <command>server</command> and
1161 <command>include</command>
1162 statements. These statements are what associate the
1163 secret keys to the servers with which they are meant to
1164 be shared. The order of statements is not
1169 The <command>options</command> statement has
1171 <command>default-server</command>, <command>default-key</command>,
1172 and <command>default-port</command>.
1173 <command>default-server</command> takes a
1174 host name or address argument and represents the server
1176 be contacted if no <option>-s</option>
1177 option is provided on the command line.
1178 <command>default-key</command> takes
1179 the name of a key as its argument, as defined by a <command>key</command> statement.
1180 <command>default-port</command> specifies the
1182 <command>rndc</command> should connect if no
1183 port is given on the command line or in a
1184 <command>server</command> statement.
1188 The <command>key</command> statement defines a
1190 by <command>rndc</command> when authenticating
1192 <command>named</command>. Its syntax is
1194 <command>key</command> statement in <filename>named.conf</filename>.
1195 The keyword <userinput>key</userinput> is
1196 followed by a key name, which must be a valid
1197 domain name, though it need not actually be hierarchical;
1199 a string like "<userinput>rndc_key</userinput>" is a valid
1201 The <command>key</command> statement has two
1203 <command>algorithm</command> and <command>secret</command>.
1204 While the configuration parser will accept any string as the
1206 to algorithm, currently only the strings
1207 "<userinput>hmac-md5</userinput>",
1208 "<userinput>hmac-sha1</userinput>",
1209 "<userinput>hmac-sha224</userinput>",
1210 "<userinput>hmac-sha256</userinput>",
1211 "<userinput>hmac-sha384</userinput>"
1212 and "<userinput>hmac-sha512</userinput>"
1213 have any meaning. The secret is a base-64 encoded string
1214 as specified in RFC 3548.
1218 The <command>server</command> statement
1220 defined using the <command>key</command>
1221 statement with a server.
1222 The keyword <userinput>server</userinput> is followed by a
1223 host name or address. The <command>server</command> statement
1224 has two clauses: <command>key</command> and <command>port</command>.
1225 The <command>key</command> clause specifies the
1227 to be used when communicating with this server, and the
1228 <command>port</command> clause can be used to
1229 specify the port <command>rndc</command> should
1235 A sample minimal configuration file is as follows:
1240 algorithm "hmac-sha256";
1242 "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
1245 default-server 127.0.0.1;
1246 default-key rndc_key;
1251 This file, if installed as <filename>/etc/rndc.conf</filename>,
1252 would allow the command:
1256 <prompt>$ </prompt><userinput>rndc reload</userinput>
1260 to connect to 127.0.0.1 port 953 and cause the name server
1261 to reload, if a name server on the local machine were
1263 following controls statements:
1269 allow { localhost; } keys { rndc_key; };
1274 and it had an identical key statement for
1275 <literal>rndc_key</literal>.
1279 Running the <command>rndc-confgen</command>
1281 conveniently create a <filename>rndc.conf</filename>
1282 file for you, and also display the
1283 corresponding <command>controls</command>
1284 statement that you need to
1285 add to <filename>named.conf</filename>.
1287 you can run <command>rndc-confgen -a</command>
1289 a <filename>rndc.key</filename> file and not
1291 <filename>named.conf</filename> at all.
1302 <title>Signals</title>
1304 Certain UNIX signals cause the name server to take specific
1305 actions, as described in the following table. These signals can
1306 be sent using the <command>kill</command> command.
1308 <informaltable frame="all">
1310 <colspec colname="1" colnum="1" colsep="0" colwidth="1.125in"/>
1311 <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
1315 <para><command>SIGHUP</command></para>
1319 Causes the server to read <filename>named.conf</filename> and
1320 reload the database.
1326 <para><command>SIGTERM</command></para>
1330 Causes the server to clean up and exit.
1336 <para><command>SIGINT</command></para>
1340 Causes the server to clean up and exit.
1351 <chapter id="Bv9ARM.ch04">
1352 <title>Advanced DNS Features</title>
1356 <title>Notify</title>
1358 <acronym>DNS</acronym> NOTIFY is a mechanism that allows master
1359 servers to notify their slave servers of changes to a zone's data. In
1360 response to a <command>NOTIFY</command> from a master server, the
1361 slave will check to see that its version of the zone is the
1362 current version and, if not, initiate a zone transfer.
1366 For more information about <acronym>DNS</acronym>
1367 <command>NOTIFY</command>, see the description of the
1368 <command>notify</command> option in <xref linkend="boolean_options"/> and
1369 the description of the zone option <command>also-notify</command> in
1370 <xref linkend="zone_transfers"/>. The <command>NOTIFY</command>
1371 protocol is specified in RFC 1996.
1375 As a slave zone can also be a master to other slaves, <command>named</command>,
1376 by default, sends <command>NOTIFY</command> messages for every zone
1377 it loads. Specifying <command>notify master-only;</command> will
1378 cause <command>named</command> to only send <command>NOTIFY</command> for master
1379 zones that it loads.
1384 <sect1 id="dynamic_update">
1385 <title>Dynamic Update</title>
1388 Dynamic Update is a method for adding, replacing or deleting
1389 records in a master server by sending it a special form of DNS
1390 messages. The format and meaning of these messages is specified
1395 Dynamic update is enabled by including an
1396 <command>allow-update</command> or an <command>update-policy</command>
1397 clause in the <command>zone</command> statement.
1401 If the zone's <command>update-policy</command> is set to
1402 <userinput>local</userinput>, updates to the zone
1403 will be permitted for the key <varname>local-ddns</varname>,
1404 which will be generated by <command>named</command> at startup.
1405 See <xref linkend="dynamic_update_policies"/> for more details.
1409 Dynamic updates using Kerberos signed requests can be made
1410 using the TKEY/GSS protocol by setting either the
1411 <command>tkey-gssapi-keytab</command> option, or alternatively
1412 by setting both the <command>tkey-gssapi-credential</command>
1413 and <command>tkey-domain</command> options. Once enabled,
1414 Kerberos signed requests will be matched against the update
1415 policies for the zone, using the Kerberos principal as the
1416 signer for the request.
1420 Updating of secure zones (zones using DNSSEC) follows RFC
1421 3007: RRSIG, NSEC and NSEC3 records affected by updates are
1422 automatically regenerated by the server using an online
1423 zone key. Update authorization is based on transaction
1424 signatures and an explicit server policy.
1427 <sect2 id="journal">
1428 <title>The journal file</title>
1431 All changes made to a zone using dynamic update are stored
1432 in the zone's journal file. This file is automatically created
1433 by the server when the first dynamic update takes place.
1434 The name of the journal file is formed by appending the extension
1435 <filename>.jnl</filename> to the name of the
1437 file unless specifically overridden. The journal file is in a
1438 binary format and should not be edited manually.
1442 The server will also occasionally write ("dump")
1443 the complete contents of the updated zone to its zone file.
1444 This is not done immediately after
1445 each dynamic update, because that would be too slow when a large
1446 zone is updated frequently. Instead, the dump is delayed by
1447 up to 15 minutes, allowing additional updates to take place.
1448 During the dump process, transient files will be created
1449 with the extensions <filename>.jnw</filename> and
1450 <filename>.jbk</filename>; under ordinary circumstances, these
1451 will be removed when the dump is complete, and can be safely
1456 When a server is restarted after a shutdown or crash, it will replay
1457 the journal file to incorporate into the zone any updates that
1459 place after the last zone dump.
1463 Changes that result from incoming incremental zone transfers are
1465 journalled in a similar way.
1469 The zone files of dynamic zones cannot normally be edited by
1470 hand because they are not guaranteed to contain the most recent
1471 dynamic changes — those are only in the journal file.
1472 The only way to ensure that the zone file of a dynamic zone
1473 is up to date is to run <command>rndc stop</command>.
1477 If you have to make changes to a dynamic zone
1478 manually, the following procedure will work:
1479 Disable dynamic updates to the zone using
1480 <command>rndc freeze <replaceable>zone</replaceable></command>.
1481 This will update the zone's master file with the changes
1482 stored in its <filename>.jnl</filename> file.
1483 Edit the zone file. Run
1484 <command>rndc thaw <replaceable>zone</replaceable></command>
1485 to reload the changed zone and re-enable dynamic updates.
1489 <command>rndc sync <replaceable>zone</replaceable></command>
1490 will update the zone file with changes from the journal file
1491 without stopping dynamic updates; this may be useful for viewing
1492 the current zone state. To remove the <filename>.jnl</filename>
1493 file after updating the zone file, use
1494 <command>rndc sync -clean</command>.
1501 <sect1 id="incremental_zone_transfers">
1502 <title>Incremental Zone Transfers (IXFR)</title>
1505 The incremental zone transfer (IXFR) protocol is a way for
1506 slave servers to transfer only changed data, instead of having to
1507 transfer the entire zone. The IXFR protocol is specified in RFC
1508 1995. See <xref linkend="proposed_standards"/>.
1512 When acting as a master, <acronym>BIND</acronym> 9
1513 supports IXFR for those zones
1514 where the necessary change history information is available. These
1515 include master zones maintained by dynamic update and slave zones
1516 whose data was obtained by IXFR. For manually maintained master
1517 zones, and for slave zones obtained by performing a full zone
1518 transfer (AXFR), IXFR is supported only if the option
1519 <command>ixfr-from-differences</command> is set
1520 to <userinput>yes</userinput>.
1524 When acting as a slave, <acronym>BIND</acronym> 9 will
1525 attempt to use IXFR unless
1526 it is explicitly disabled. For more information about disabling
1527 IXFR, see the description of the <command>request-ixfr</command> clause
1528 of the <command>server</command> statement.
1533 <title>Split DNS</title>
1535 Setting up different views, or visibility, of the DNS space to
1536 internal and external resolvers is usually referred to as a
1537 <emphasis>Split DNS</emphasis> setup. There are several
1538 reasons an organization would want to set up its DNS this way.
1541 One common reason for setting up a DNS system this way is
1542 to hide "internal" DNS information from "external" clients on the
1543 Internet. There is some debate as to whether or not this is actually
1545 Internal DNS information leaks out in many ways (via email headers,
1546 for example) and most savvy "attackers" can find the information
1547 they need using other means.
1548 However, since listing addresses of internal servers that
1549 external clients cannot possibly reach can result in
1550 connection delays and other annoyances, an organization may
1551 choose to use a Split DNS to present a consistent view of itself
1552 to the outside world.
1555 Another common reason for setting up a Split DNS system is
1556 to allow internal networks that are behind filters or in RFC 1918
1557 space (reserved IP space, as documented in RFC 1918) to resolve DNS
1558 on the Internet. Split DNS can also be used to allow mail from outside
1559 back in to the internal network.
1562 <title>Example split DNS setup</title>
1564 Let's say a company named <emphasis>Example, Inc.</emphasis>
1565 (<literal>example.com</literal>)
1566 has several corporate sites that have an internal network with
1568 Internet Protocol (IP) space and an external demilitarized zone (DMZ),
1569 or "outside" section of a network, that is available to the public.
1572 <emphasis>Example, Inc.</emphasis> wants its internal clients
1573 to be able to resolve external hostnames and to exchange mail with
1574 people on the outside. The company also wants its internal resolvers
1575 to have access to certain internal-only zones that are not available
1576 at all outside of the internal network.
1579 In order to accomplish this, the company will set up two sets
1580 of name servers. One set will be on the inside network (in the
1582 IP space) and the other set will be on bastion hosts, which are
1584 hosts that can talk to both sides of its network, in the DMZ.
1587 The internal servers will be configured to forward all queries,
1588 except queries for <filename>site1.internal</filename>, <filename>site2.internal</filename>, <filename>site1.example.com</filename>,
1589 and <filename>site2.example.com</filename>, to the servers
1591 DMZ. These internal servers will have complete sets of information
1592 for <filename>site1.example.com</filename>, <filename>site2.example.com</filename>, <filename>site1.internal</filename>,
1593 and <filename>site2.internal</filename>.
1596 To protect the <filename>site1.internal</filename> and <filename>site2.internal</filename> domains,
1597 the internal name servers must be configured to disallow all queries
1598 to these domains from any external hosts, including the bastion
1602 The external servers, which are on the bastion hosts, will
1603 be configured to serve the "public" version of the <filename>site1</filename> and <filename>site2.example.com</filename> zones.
1604 This could include things such as the host records for public servers
1605 (<filename>www.example.com</filename> and <filename>ftp.example.com</filename>),
1606 and mail exchange (MX) records (<filename>a.mx.example.com</filename> and <filename>b.mx.example.com</filename>).
1609 In addition, the public <filename>site1</filename> and <filename>site2.example.com</filename> zones
1610 should have special MX records that contain wildcard (`*') records
1611 pointing to the bastion hosts. This is needed because external mail
1612 servers do not have any other way of looking up how to deliver mail
1613 to those internal hosts. With the wildcard records, the mail will
1614 be delivered to the bastion host, which can then forward it on to
1618 Here's an example of a wildcard MX record:
1620 <programlisting>* IN MX 10 external1.example.com.</programlisting>
1622 Now that they accept mail on behalf of anything in the internal
1623 network, the bastion hosts will need to know how to deliver mail
1624 to internal hosts. In order for this to work properly, the resolvers
1626 the bastion hosts will need to be configured to point to the internal
1627 name servers for DNS resolution.
1630 Queries for internal hostnames will be answered by the internal
1631 servers, and queries for external hostnames will be forwarded back
1632 out to the DNS servers on the bastion hosts.
1635 In order for all this to work properly, internal clients will
1636 need to be configured to query <emphasis>only</emphasis> the internal
1637 name servers for DNS queries. This could also be enforced via
1639 filtering on the network.
1642 If everything has been set properly, <emphasis>Example, Inc.</emphasis>'s
1643 internal clients will now be able to:
1648 Look up any hostnames in the <literal>site1</literal>
1650 <literal>site2.example.com</literal> zones.
1655 Look up any hostnames in the <literal>site1.internal</literal> and
1656 <literal>site2.internal</literal> domains.
1660 <simpara>Look up any hostnames on the Internet.</simpara>
1663 <simpara>Exchange mail with both internal and external people.</simpara>
1667 Hosts on the Internet will be able to:
1672 Look up any hostnames in the <literal>site1</literal>
1674 <literal>site2.example.com</literal> zones.
1679 Exchange mail with anyone in the <literal>site1</literal> and
1680 <literal>site2.example.com</literal> zones.
1686 Here is an example configuration for the setup we just
1687 described above. Note that this is only configuration information;
1688 for information on how to configure your zone files, see <xref linkend="sample_configuration"/>.
1692 Internal DNS server config:
1697 acl internals { 172.16.72.0/24; 192.168.1.0/24; };
1699 acl externals { <varname>bastion-ips-go-here</varname>; };
1705 // forward to external servers
1707 <varname>bastion-ips-go-here</varname>;
1709 // sample allow-transfer (no one)
1710 allow-transfer { none; };
1711 // restrict query access
1712 allow-query { internals; externals; };
1713 // restrict recursion
1714 allow-recursion { internals; };
1719 // sample master zone
1720 zone "site1.example.com" {
1722 file "m/site1.example.com";
1723 // do normal iterative resolution (do not forward)
1725 allow-query { internals; externals; };
1726 allow-transfer { internals; };
1729 // sample slave zone
1730 zone "site2.example.com" {
1732 file "s/site2.example.com";
1733 masters { 172.16.72.3; };
1735 allow-query { internals; externals; };
1736 allow-transfer { internals; };
1739 zone "site1.internal" {
1741 file "m/site1.internal";
1743 allow-query { internals; };
1744 allow-transfer { internals; }
1747 zone "site2.internal" {
1749 file "s/site2.internal";
1750 masters { 172.16.72.3; };
1752 allow-query { internals };
1753 allow-transfer { internals; }
1758 External (bastion host) DNS server config:
1762 acl internals { 172.16.72.0/24; 192.168.1.0/24; };
1764 acl externals { bastion-ips-go-here; };
1769 // sample allow-transfer (no one)
1770 allow-transfer { none; };
1771 // default query access
1772 allow-query { any; };
1773 // restrict cache access
1774 allow-query-cache { internals; externals; };
1775 // restrict recursion
1776 allow-recursion { internals; externals; };
1781 // sample slave zone
1782 zone "site1.example.com" {
1784 file "m/site1.foo.com";
1785 allow-transfer { internals; externals; };
1788 zone "site2.example.com" {
1790 file "s/site2.foo.com";
1791 masters { another_bastion_host_maybe; };
1792 allow-transfer { internals; externals; }
1797 In the <filename>resolv.conf</filename> (or equivalent) on
1798 the bastion host(s):
1803 nameserver 172.16.72.2
1804 nameserver 172.16.72.3
1805 nameserver 172.16.72.4
1813 This is a short guide to setting up Transaction SIGnatures
1814 (TSIG) based transaction security in <acronym>BIND</acronym>. It describes changes
1815 to the configuration file as well as what changes are required for
1816 different features, including the process of creating transaction
1817 keys and using transaction signatures with <acronym>BIND</acronym>.
1820 <acronym>BIND</acronym> primarily supports TSIG for server
1821 to server communication.
1822 This includes zone transfer, notify, and recursive query messages.
1823 Resolvers based on newer versions of <acronym>BIND</acronym> 8 have limited support
1828 TSIG can also be useful for dynamic update. A primary
1829 server for a dynamic zone should control access to the dynamic
1830 update service, but IP-based access control is insufficient.
1831 The cryptographic access control provided by TSIG
1832 is far superior. The <command>nsupdate</command>
1833 program supports TSIG via the <option>-k</option> and
1834 <option>-y</option> command line options or inline by use
1835 of the <command>key</command>.
1839 <title>Generate Shared Keys for Each Pair of Hosts</title>
1841 A shared secret is generated to be shared between <emphasis>host1</emphasis> and <emphasis>host2</emphasis>.
1842 An arbitrary key name is chosen: "host1-host2.". The key name must
1843 be the same on both hosts.
1846 <title>Automatic Generation</title>
1848 The following command will generate a 128-bit (16 byte) HMAC-SHA256
1849 key as described above. Longer keys are better, but shorter keys
1850 are easier to read. Note that the maximum key length is the digest
1851 length, here 256 bits.
1854 <userinput>dnssec-keygen -a hmac-sha256 -b 128 -n HOST host1-host2.</userinput>
1857 The key is in the file <filename>Khost1-host2.+163+00000.private</filename>.
1858 Nothing directly uses this file, but the base-64 encoded string
1859 following "<literal>Key:</literal>"
1860 can be extracted from the file and used as a shared secret:
1862 <programlisting>Key: La/E5CjG9O+os1jq0a2jdA==</programlisting>
1864 The string "<literal>La/E5CjG9O+os1jq0a2jdA==</literal>" can
1865 be used as the shared secret.
1869 <title>Manual Generation</title>
1871 The shared secret is simply a random sequence of bits, encoded
1872 in base-64. Most ASCII strings are valid base-64 strings (assuming
1873 the length is a multiple of 4 and only valid characters are used),
1874 so the shared secret can be manually generated.
1877 Also, a known string can be run through <command>mmencode</command> or
1878 a similar program to generate base-64 encoded data.
1883 <title>Copying the Shared Secret to Both Machines</title>
1885 This is beyond the scope of DNS. A secure transport mechanism
1886 should be used. This could be secure FTP, ssh, telephone, etc.
1890 <title>Informing the Servers of the Key's Existence</title>
1892 Imagine <emphasis>host1</emphasis> and <emphasis>host 2</emphasis>
1894 both servers. The following is added to each server's <filename>named.conf</filename> file:
1899 algorithm hmac-sha256;
1900 secret "La/E5CjG9O+os1jq0a2jdA==";
1905 The secret is the one generated above. Since this is a secret, it
1906 is recommended that either <filename>named.conf</filename> be
1907 non-world readable, or the key directive be added to a non-world
1908 readable file that is included by <filename>named.conf</filename>.
1911 At this point, the key is recognized. This means that if the
1912 server receives a message signed by this key, it can verify the
1913 signature. If the signature is successfully verified, the
1914 response is signed by the same key.
1919 <title>Instructing the Server to Use the Key</title>
1921 Since keys are shared between two hosts only, the server must
1922 be told when keys are to be used. The following is added to the <filename>named.conf</filename> file
1923 for <emphasis>host1</emphasis>, if the IP address of <emphasis>host2</emphasis> is
1929 keys { host1-host2. ;};
1934 Multiple keys may be present, but only the first is used.
1935 This directive does not contain any secrets, so it may be in a
1940 If <emphasis>host1</emphasis> sends a message that is a request
1941 to that address, the message will be signed with the specified key. <emphasis>host1</emphasis> will
1942 expect any responses to signed messages to be signed with the same
1946 A similar statement must be present in <emphasis>host2</emphasis>'s
1947 configuration file (with <emphasis>host1</emphasis>'s address) for <emphasis>host2</emphasis> to
1948 sign request messages to <emphasis>host1</emphasis>.
1952 <title>TSIG Key Based Access Control</title>
1954 <acronym>BIND</acronym> allows IP addresses and ranges
1955 to be specified in ACL
1957 <command>allow-{ query | transfer | update }</command>
1959 This has been extended to allow TSIG keys also. The above key would
1960 be denoted <command>key host1-host2.</command>
1963 An example of an <command>allow-update</command> directive would be:
1967 allow-update { key host1-host2. ;};
1971 This allows dynamic updates to succeed only if the request
1972 was signed by a key named "<command>host1-host2.</command>".
1976 See <xref linkend="dynamic_update_policies"/> for a discussion of
1977 the more flexible <command>update-policy</command> statement.
1982 <title>Errors</title>
1985 The processing of TSIG signed messages can result in
1986 several errors. If a signed message is sent to a non-TSIG aware
1987 server, a FORMERR (format error) will be returned, since the server will not
1988 understand the record. This is a result of misconfiguration,
1989 since the server must be explicitly configured to send a TSIG
1990 signed message to a specific server.
1994 If a TSIG aware server receives a message signed by an
1995 unknown key, the response will be unsigned with the TSIG
1996 extended error code set to BADKEY. If a TSIG aware server
1997 receives a message with a signature that does not validate, the
1998 response will be unsigned with the TSIG extended error code set
1999 to BADSIG. If a TSIG aware server receives a message with a time
2000 outside of the allowed range, the response will be signed with
2001 the TSIG extended error code set to BADTIME, and the time values
2002 will be adjusted so that the response can be successfully
2003 verified. In any of these cases, the message's rcode (response code) is set to
2004 NOTAUTH (not authenticated).
2012 <para><command>TKEY</command>
2013 is a mechanism for automatically generating a shared secret
2014 between two hosts. There are several "modes" of
2015 <command>TKEY</command> that specify how the key is generated
2016 or assigned. <acronym>BIND</acronym> 9 implements only one of
2017 these modes, the Diffie-Hellman key exchange. Both hosts are
2018 required to have a Diffie-Hellman KEY record (although this
2019 record is not required to be present in a zone). The
2020 <command>TKEY</command> process must use signed messages,
2021 signed either by TSIG or SIG(0). The result of
2022 <command>TKEY</command> is a shared secret that can be used to
2023 sign messages with TSIG. <command>TKEY</command> can also be
2024 used to delete shared secrets that it had previously
2029 The <command>TKEY</command> process is initiated by a
2031 or server by sending a signed <command>TKEY</command>
2033 (including any appropriate KEYs) to a TKEY-aware server. The
2034 server response, if it indicates success, will contain a
2035 <command>TKEY</command> record and any appropriate keys.
2037 this exchange, both participants have enough information to
2038 determine the shared secret; the exact process depends on the
2039 <command>TKEY</command> mode. When using the
2041 <command>TKEY</command> mode, Diffie-Hellman keys are
2043 and the shared secret is derived by both participants.
2048 <title>SIG(0)</title>
2051 <acronym>BIND</acronym> 9 partially supports DNSSEC SIG(0)
2052 transaction signatures as specified in RFC 2535 and RFC 2931.
2054 uses public/private keys to authenticate messages. Access control
2055 is performed in the same manner as TSIG keys; privileges can be
2056 granted or denied based on the key name.
2060 When a SIG(0) signed message is received, it will only be
2061 verified if the key is known and trusted by the server; the server
2062 will not attempt to locate and/or validate the key.
2066 SIG(0) signing of multiple-message TCP streams is not
2071 The only tool shipped with <acronym>BIND</acronym> 9 that
2072 generates SIG(0) signed messages is <command>nsupdate</command>.
2077 <title>DNSSEC</title>
2080 Cryptographic authentication of DNS information is possible
2081 through the DNS Security (<emphasis>DNSSEC-bis</emphasis>) extensions,
2082 defined in RFC 4033, RFC 4034, and RFC 4035.
2083 This section describes the creation and use of DNSSEC signed zones.
2087 In order to set up a DNSSEC secure zone, there are a series
2088 of steps which must be followed. <acronym>BIND</acronym>
2091 that are used in this process, which are explained in more detail
2092 below. In all cases, the <option>-h</option> option prints a
2093 full list of parameters. Note that the DNSSEC tools require the
2094 keyset files to be in the working directory or the
2095 directory specified by the <option>-d</option> option, and
2096 that the tools shipped with BIND 9.2.x and earlier are not compatible
2097 with the current ones.
2101 There must also be communication with the administrators of
2102 the parent and/or child zone to transmit keys. A zone's security
2103 status must be indicated by the parent zone for a DNSSEC capable
2104 resolver to trust its data. This is done through the presence
2105 or absence of a <literal>DS</literal> record at the
2111 For other servers to trust data in this zone, they must
2112 either be statically configured with this zone's zone key or the
2113 zone key of another zone above this one in the DNS tree.
2117 <title>Generating Keys</title>
2120 The <command>dnssec-keygen</command> program is used to
2125 A secure zone must contain one or more zone keys. The
2126 zone keys will sign all other records in the zone, as well as
2127 the zone keys of any secure delegated zones. Zone keys must
2128 have the same name as the zone, a name type of
2129 <command>ZONE</command>, and must be usable for
2131 It is recommended that zone keys use a cryptographic algorithm
2132 designated as "mandatory to implement" by the IETF; currently
2133 the only one is RSASHA1.
2137 The following command will generate a 768-bit RSASHA1 key for
2138 the <filename>child.example</filename> zone:
2142 <userinput>dnssec-keygen -a RSASHA1 -b 768 -n ZONE child.example.</userinput>
2146 Two output files will be produced:
2147 <filename>Kchild.example.+005+12345.key</filename> and
2148 <filename>Kchild.example.+005+12345.private</filename>
2150 12345 is an example of a key tag). The key filenames contain
2151 the key name (<filename>child.example.</filename>),
2153 is DSA, 1 is RSAMD5, 5 is RSASHA1, etc.), and the key tag (12345 in
2155 The private key (in the <filename>.private</filename>
2157 used to generate signatures, and the public key (in the
2158 <filename>.key</filename> file) is used for signature
2163 To generate another key with the same properties (but with
2164 a different key tag), repeat the above command.
2168 The <command>dnssec-keyfromlabel</command> program is used
2169 to get a key pair from a crypto hardware and build the key
2170 files. Its usage is similar to <command>dnssec-keygen</command>.
2174 The public keys should be inserted into the zone file by
2175 including the <filename>.key</filename> files using
2176 <command>$INCLUDE</command> statements.
2181 <title>Signing the Zone</title>
2184 The <command>dnssec-signzone</command> program is used
2189 Any <filename>keyset</filename> files corresponding to
2190 secure subzones should be present. The zone signer will
2191 generate <literal>NSEC</literal>, <literal>NSEC3</literal>
2192 and <literal>RRSIG</literal> records for the zone, as
2193 well as <literal>DS</literal> for the child zones if
2194 <literal>'-g'</literal> is specified. If <literal>'-g'</literal>
2195 is not specified, then DS RRsets for the secure child
2196 zones need to be added manually.
2200 The following command signs the zone, assuming it is in a
2201 file called <filename>zone.child.example</filename>. By
2202 default, all zone keys which have an available private key are
2203 used to generate signatures.
2207 <userinput>dnssec-signzone -o child.example zone.child.example</userinput>
2211 One output file is produced:
2212 <filename>zone.child.example.signed</filename>. This
2214 should be referenced by <filename>named.conf</filename>
2216 input file for the zone.
2219 <para><command>dnssec-signzone</command>
2220 will also produce a keyset and dsset files and optionally a
2221 dlvset file. These are used to provide the parent zone
2222 administrators with the <literal>DNSKEYs</literal> (or their
2223 corresponding <literal>DS</literal> records) that are the
2224 secure entry point to the zone.
2230 <title>Configuring Servers</title>
2233 To enable <command>named</command> to respond appropriately
2234 to DNS requests from DNSSEC aware clients,
2235 <command>dnssec-enable</command> must be set to yes.
2236 (This is the default setting.)
2240 To enable <command>named</command> to validate answers from
2241 other servers, the <command>dnssec-enable</command> option
2242 must be set to <userinput>yes</userinput>, and the
2243 <command>dnssec-validation</command> options must be set to
2244 <userinput>yes</userinput> or <userinput>auto</userinput>.
2248 If <command>dnssec-validation</command> is set to
2249 <userinput>auto</userinput>, then a default
2250 trust anchor for the DNS root zone will be used.
2251 If it is set to <userinput>yes</userinput>, however,
2252 then at least one trust anchor must be configured
2253 with a <command>trusted-keys</command> or
2254 <command>managed-keys</command> statement in
2255 <filename>named.conf</filename>, or DNSSEC validation
2256 will not occur. The default setting is
2257 <userinput>yes</userinput>.
2261 <command>trusted-keys</command> are copies of DNSKEY RRs
2262 for zones that are used to form the first link in the
2263 cryptographic chain of trust. All keys listed in
2264 <command>trusted-keys</command> (and corresponding zones)
2265 are deemed to exist and only the listed keys will be used
2266 to validated the DNSKEY RRset that they are from.
2270 <command>managed-keys</command> are trusted keys which are
2271 automatically kept up to date via RFC 5011 trust anchor
2276 <command>trusted-keys</command> and
2277 <command>managed-keys</command> are described in more detail
2278 later in this document.
2282 Unlike <acronym>BIND</acronym> 8, <acronym>BIND</acronym>
2283 9 does not verify signatures on load, so zone keys for
2284 authoritative zones do not need to be specified in the
2289 After DNSSEC gets established, a typical DNSSEC configuration
2290 will look something like the following. It has one or
2291 more public keys for the root. This allows answers from
2292 outside the organization to be validated. It will also
2293 have several keys for parts of the namespace the organization
2294 controls. These are here to ensure that <command>named</command>
2295 is immune to compromises in the DNSSEC components of the security
2302 "." initial-key 257 3 3 "BNY4wrWM1nCfJ+CXd0rVXyYmobt7sEEfK3clRbGaTwS
2303 JxrGkxJWoZu6I7PzJu/E9gx4UC1zGAHlXKdE4zYIpRh
2304 aBKnvcC2U9mZhkdUpd1Vso/HAdjNe8LmMlnzY3zy2Xy
2305 4klWOADTPzSv9eamj8V18PHGjBLaVtYvk/ln5ZApjYg
2306 hf+6fElrmLkdaz MQ2OCnACR817DF4BBa7UR/beDHyp
2307 5iWTXWSi6XmoJLbG9Scqc7l70KDqlvXR3M/lUUVRbke
2308 g1IPJSidmK3ZyCllh4XSKbje/45SKucHgnwU5jefMtq
2309 66gKodQj+MiA21AfUVe7u99WzTLzY3qlxDhxYQQ20FQ
2310 97S+LKUTpQcq27R7AT3/V5hRQxScINqwcz4jYqZD2fQ
2311 dgxbcDTClU0CRBdiieyLMNzXG3";
2315 /* Key for our organization's forward zone */
2316 example.com. 257 3 5 "AwEAAaxPMcR2x0HbQV4WeZB6oEDX+r0QM6
2317 5KbhTjrW1ZaARmPhEZZe3Y9ifgEuq7vZ/z
2318 GZUdEGNWy+JZzus0lUptwgjGwhUS1558Hb
2319 4JKUbbOTcM8pwXlj0EiX3oDFVmjHO444gL
2320 kBOUKUf/mC7HvfwYH/Be22GnClrinKJp1O
2321 g4ywzO9WglMk7jbfW33gUKvirTHr25GL7S
2322 TQUzBb5Usxt8lgnyTUHs1t3JwCY5hKZ6Cq
2323 FxmAVZP20igTixin/1LcrgX/KMEGd/biuv
2324 F4qJCyduieHukuY3H4XMAcR+xia2nIUPvm
2325 /oyWR8BW/hWdzOvnSCThlHf3xiYleDbt/o
2328 /* Key for our reverse zone. */
2329 2.0.192.IN-ADDRPA.NET. 257 3 5 "AQOnS4xn/IgOUpBPJ3bogzwc
2330 xOdNax071L18QqZnQQQAVVr+i
2331 LhGTnNGp3HoWQLUIzKrJVZ3zg
2332 gy3WwNT6kZo6c0tszYqbtvchm
2333 gQC8CzKojM/W16i6MG/eafGU3
2334 siaOdS0yOI6BgPsw+YZdzlYMa
2335 IJGf4M4dyoKIhzdZyQ2bYQrjy
2336 Q4LB0lC7aOnsMyYKHHYeRvPxj
2337 IQXmdqgOJGq+vsevG06zW+1xg
2338 YJh9rCIfnm1GX/KMgxLPG2vXT
2339 D/RnLX+D3T3UL7HJYHJhAZD5L
2340 59VvjSPsZJHeDCUyWYrvPZesZ
2341 DIRvhDD52SKvbheeTJUm6Ehkz
2342 ytNN2SN96QRk8j/iI8ib";
2348 dnssec-validation yes;
2353 None of the keys listed in this example are valid. In particular,
2354 the root key is not valid.
2358 When DNSSEC validation is enabled and properly configured,
2359 the resolver will reject any answers from signed, secure zones
2360 which fail to validate, and will return SERVFAIL to the client.
2364 Responses may fail to validate for any of several reasons,
2365 including missing, expired, or invalid signatures, a key which
2366 does not match the DS RRset in the parent zone, or an insecure
2367 response from a zone which, according to its parent, should have
2373 When the validator receives a response from an unsigned zone
2374 that has a signed parent, it must confirm with the parent
2375 that the zone was intentionally left unsigned. It does
2376 this by verifying, via signed and validated NSEC/NSEC3 records,
2377 that the parent zone contains no DS records for the child.
2380 If the validator <emphasis>can</emphasis> prove that the zone
2381 is insecure, then the response is accepted. However, if it
2382 cannot, then it must assume an insecure response to be a
2383 forgery; it rejects the response and logs an error.
2386 The logged error reads "insecurity proof failed" and
2387 "got insecure response; parent indicates it should be secure".
2388 (Prior to BIND 9.7, the logged error was "not insecure".
2389 This referred to the zone, not the response.)
2396 <xi:include href="dnssec.xml"/>
2398 <xi:include href="managed-keys.xml"/>
2400 <xi:include href="pkcs11.xml"/>
2402 <xi:include href="dlz.xml"/>
2405 <title>IPv6 Support in <acronym>BIND</acronym> 9</title>
2408 <acronym>BIND</acronym> 9 fully supports all currently
2409 defined forms of IPv6 name to address and address to name
2410 lookups. It will also use IPv6 addresses to make queries when
2411 running on an IPv6 capable system.
2415 For forward lookups, <acronym>BIND</acronym> 9 supports
2416 only AAAA records. RFC 3363 deprecated the use of A6 records,
2417 and client-side support for A6 records was accordingly removed
2418 from <acronym>BIND</acronym> 9.
2419 However, authoritative <acronym>BIND</acronym> 9 name servers still
2420 load zone files containing A6 records correctly, answer queries
2421 for A6 records, and accept zone transfer for a zone containing A6
2426 For IPv6 reverse lookups, <acronym>BIND</acronym> 9 supports
2427 the traditional "nibble" format used in the
2428 <emphasis>ip6.arpa</emphasis> domain, as well as the older, deprecated
2429 <emphasis>ip6.int</emphasis> domain.
2430 Older versions of <acronym>BIND</acronym> 9
2431 supported the "binary label" (also known as "bitstring") format,
2432 but support of binary labels has been completely removed per
2434 Many applications in <acronym>BIND</acronym> 9 do not understand
2435 the binary label format at all any more, and will return an
2437 In particular, an authoritative <acronym>BIND</acronym> 9
2438 name server will not load a zone file containing binary labels.
2442 For an overview of the format and structure of IPv6 addresses,
2443 see <xref linkend="ipv6addresses"/>.
2447 <title>Address Lookups Using AAAA Records</title>
2450 The IPv6 AAAA record is a parallel to the IPv4 A record,
2451 and, unlike the deprecated A6 record, specifies the entire
2452 IPv6 address in a single record. For example,
2456 $ORIGIN example.com.
2457 host 3600 IN AAAA 2001:db8::1
2461 Use of IPv4-in-IPv6 mapped addresses is not recommended.
2462 If a host has an IPv4 address, use an A record, not
2463 a AAAA, with <literal>::ffff:192.168.42.1</literal> as
2468 <title>Address to Name Lookups Using Nibble Format</title>
2471 When looking up an address in nibble format, the address
2472 components are simply reversed, just as in IPv4, and
2473 <literal>ip6.arpa.</literal> is appended to the
2475 For example, the following would provide reverse name lookup for
2477 <literal>2001:db8::1</literal>.
2481 $ORIGIN 0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.
2482 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 14400 IN PTR (
2490 <chapter id="Bv9ARM.ch05">
2491 <title>The <acronym>BIND</acronym> 9 Lightweight Resolver</title>
2493 <title>The Lightweight Resolver Library</title>
2495 Traditionally applications have been linked with a stub resolver
2496 library that sends recursive DNS queries to a local caching name
2500 IPv6 once introduced new complexity into the resolution process,
2501 such as following A6 chains and DNAME records, and simultaneous
2502 lookup of IPv4 and IPv6 addresses. Though most of the complexity was
2503 then removed, these are hard or impossible
2504 to implement in a traditional stub resolver.
2507 <acronym>BIND</acronym> 9 therefore can also provide resolution
2508 services to local clients
2509 using a combination of a lightweight resolver library and a resolver
2510 daemon process running on the local host. These communicate using
2511 a simple UDP-based protocol, the "lightweight resolver protocol"
2512 that is distinct from and simpler than the full DNS protocol.
2516 <title>Running a Resolver Daemon</title>
2519 To use the lightweight resolver interface, the system must
2520 run the resolver daemon <command>lwresd</command> or a
2522 name server configured with a <command>lwres</command>
2527 By default, applications using the lightweight resolver library will
2529 UDP requests to the IPv4 loopback address (127.0.0.1) on port 921.
2531 address can be overridden by <command>lwserver</command>
2533 <filename>/etc/resolv.conf</filename>.
2537 The daemon currently only looks in the DNS, but in the future
2538 it may use other sources such as <filename>/etc/hosts</filename>,
2543 The <command>lwresd</command> daemon is essentially a
2544 caching-only name server that responds to requests using the
2546 resolver protocol rather than the DNS protocol. Because it needs
2547 to run on each host, it is designed to require no or minimal
2549 Unless configured otherwise, it uses the name servers listed on
2550 <command>nameserver</command> lines in <filename>/etc/resolv.conf</filename>
2551 as forwarders, but is also capable of doing the resolution
2556 The <command>lwresd</command> daemon may also be
2558 <filename>named.conf</filename> style configuration file,
2560 <filename>/etc/lwresd.conf</filename> by default. A name
2562 be configured to act as a lightweight resolver daemon using the
2563 <command>lwres</command> statement in <filename>named.conf</filename>.
2568 <chapter id="Bv9ARM.ch06">
2569 <title><acronym>BIND</acronym> 9 Configuration Reference</title>
2572 <acronym>BIND</acronym> 9 configuration is broadly similar
2573 to <acronym>BIND</acronym> 8; however, there are a few new
2575 of configuration, such as views. <acronym>BIND</acronym>
2576 8 configuration files should work with few alterations in <acronym>BIND</acronym>
2577 9, although more complex configurations should be reviewed to check
2578 if they can be more efficiently implemented using the new features
2579 found in <acronym>BIND</acronym> 9.
2583 <acronym>BIND</acronym> 4 configuration files can be
2584 converted to the new format
2585 using the shell script
2586 <filename>contrib/named-bootconf/named-bootconf.sh</filename>.
2588 <sect1 id="configuration_file_elements">
2589 <title>Configuration File Elements</title>
2591 Following is a list of elements used throughout the <acronym>BIND</acronym> configuration
2594 <informaltable colsep="0" rowsep="0">
2595 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
2596 <colspec colname="1" colnum="1" colsep="0" colwidth="1.855in"/>
2597 <colspec colname="2" colnum="2" colsep="0" colwidth="3.770in"/>
2602 <varname>acl_name</varname>
2607 The name of an <varname>address_match_list</varname> as
2608 defined by the <command>acl</command> statement.
2615 <varname>address_match_list</varname>
2620 A list of one or more
2621 <varname>ip_addr</varname>,
2622 <varname>ip_prefix</varname>, <varname>key_id</varname>,
2623 or <varname>acl_name</varname> elements, see
2624 <xref linkend="address_match_lists"/>.
2631 <varname>masters_list</varname>
2636 A named list of one or more <varname>ip_addr</varname>
2637 with optional <varname>key_id</varname> and/or
2638 <varname>ip_port</varname>.
2639 A <varname>masters_list</varname> may include other
2640 <varname>masters_lists</varname>.
2647 <varname>domain_name</varname>
2652 A quoted string which will be used as
2653 a DNS name, for example "<literal>my.test.domain</literal>".
2660 <varname>namelist</varname>
2665 A list of one or more <varname>domain_name</varname>
2673 <varname>dotted_decimal</varname>
2678 One to four integers valued 0 through
2679 255 separated by dots (`.'), such as <command>123</command>,
2680 <command>45.67</command> or <command>89.123.45.67</command>.
2687 <varname>ip4_addr</varname>
2692 An IPv4 address with exactly four elements
2693 in <varname>dotted_decimal</varname> notation.
2700 <varname>ip6_addr</varname>
2705 An IPv6 address, such as <command>2001:db8::1234</command>.
2706 IPv6 scoped addresses that have ambiguity on their
2707 scope zones must be disambiguated by an appropriate
2708 zone ID with the percent character (`%') as
2709 delimiter. It is strongly recommended to use
2710 string zone names rather than numeric identifiers,
2711 in order to be robust against system configuration
2712 changes. However, since there is no standard
2713 mapping for such names and identifier values,
2714 currently only interface names as link identifiers
2715 are supported, assuming one-to-one mapping between
2716 interfaces and links. For example, a link-local
2717 address <command>fe80::1</command> on the link
2718 attached to the interface <command>ne0</command>
2719 can be specified as <command>fe80::1%ne0</command>.
2720 Note that on most systems link-local addresses
2721 always have the ambiguity, and need to be
2729 <varname>ip_addr</varname>
2734 An <varname>ip4_addr</varname> or <varname>ip6_addr</varname>.
2741 <varname>ip_dscp</varname>
2746 A <varname>number</varname> between 0 and 63, used
2747 to select a differentiated services code point (DSCP)
2748 value for use with outgoing traffic on operating systems
2756 <varname>ip_port</varname>
2761 An IP port <varname>number</varname>.
2762 The <varname>number</varname> is limited to 0
2763 through 65535, with values
2764 below 1024 typically restricted to use by processes running
2766 In some cases, an asterisk (`*') character can be used as a
2768 select a random high-numbered port.
2775 <varname>ip_prefix</varname>
2780 An IP network specified as an <varname>ip_addr</varname>,
2781 followed by a slash (`/') and then the number of bits in the
2783 Trailing zeros in a <varname>ip_addr</varname>
2785 For example, <command>127/8</command> is the
2786 network <command>127.0.0.0</command> with
2787 netmask <command>255.0.0.0</command> and <command>1.2.3.0/28</command> is
2788 network <command>1.2.3.0</command> with netmask <command>255.255.255.240</command>.
2791 When specifying a prefix involving a IPv6 scoped address
2792 the scope may be omitted. In that case the prefix will
2793 match packets from any scope.
2800 <varname>key_id</varname>
2805 A <varname>domain_name</varname> representing
2806 the name of a shared key, to be used for transaction
2814 <varname>key_list</varname>
2819 A list of one or more
2820 <varname>key_id</varname>s,
2821 separated by semicolons and ending with a semicolon.
2828 <varname>number</varname>
2833 A non-negative 32-bit integer
2834 (i.e., a number between 0 and 4294967295, inclusive).
2835 Its acceptable value might further
2836 be limited by the context in which it is used.
2843 <varname>path_name</varname>
2848 A quoted string which will be used as
2849 a pathname, such as <filename>zones/master/my.test.domain</filename>.
2856 <varname>port_list</varname>
2861 A list of an <varname>ip_port</varname> or a port
2863 A port range is specified in the form of
2864 <userinput>range</userinput> followed by
2865 two <varname>ip_port</varname>s,
2866 <varname>port_low</varname> and
2867 <varname>port_high</varname>, which represents
2868 port numbers from <varname>port_low</varname> through
2869 <varname>port_high</varname>, inclusive.
2870 <varname>port_low</varname> must not be larger than
2871 <varname>port_high</varname>.
2873 <userinput>range 1024 65535</userinput> represents
2874 ports from 1024 through 65535.
2875 In either case an asterisk (`*') character is not
2876 allowed as a valid <varname>ip_port</varname>.
2883 <varname>size_spec</varname>
2888 A 64-bit unsigned integer, or the keywords
2889 <userinput>unlimited</userinput> or
2890 <userinput>default</userinput>.
2893 Integers may take values
2894 0 <= value <= 18446744073709551615, though
2896 (such as <command>max-journal-size</command>) may
2897 use a more limited range within these extremes.
2898 In most cases, setting a value to 0 does not
2899 literally mean zero; it means "undefined" or
2900 "as big as possible", depending on the context.
2901 See the explanations of particular parameters
2902 that use <varname>size_spec</varname>
2903 for details on how they interpret its use.
2906 Numeric values can optionally be followed by a
2908 <userinput>K</userinput> or <userinput>k</userinput>
2910 <userinput>M</userinput> or <userinput>m</userinput>
2912 <userinput>G</userinput> or <userinput>g</userinput>
2913 for gigabytes, which scale by 1024, 1024*1024, and
2914 1024*1024*1024 respectively.
2917 <varname>unlimited</varname> generally means
2918 "as big as possible", and is usually the best
2919 way to safely set a very large number.
2922 <varname>default</varname>
2923 uses the limit that was in force when the server was started.
2930 <varname>yes_or_no</varname>
2935 Either <userinput>yes</userinput> or <userinput>no</userinput>.
2936 The words <userinput>true</userinput> and <userinput>false</userinput> are
2937 also accepted, as are the numbers <userinput>1</userinput>
2938 and <userinput>0</userinput>.
2945 <varname>dialup_option</varname>
2950 One of <userinput>yes</userinput>,
2951 <userinput>no</userinput>, <userinput>notify</userinput>,
2952 <userinput>notify-passive</userinput>, <userinput>refresh</userinput> or
2953 <userinput>passive</userinput>.
2954 When used in a zone, <userinput>notify-passive</userinput>,
2955 <userinput>refresh</userinput>, and <userinput>passive</userinput>
2956 are restricted to slave and stub zones.
2963 <sect2 id="address_match_lists">
2964 <title>Address Match Lists</title>
2966 <title>Syntax</title>
2968 <programlisting><varname>address_match_list</varname> = address_match_list_element ;
2969 <optional> address_match_list_element; ... </optional>
2970 <varname>address_match_list_element</varname> = <optional> ! </optional> (ip_address <optional>/length</optional> |
2971 key key_id | acl_name | { address_match_list } )
2976 <title>Definition and Usage</title>
2978 Address match lists are primarily used to determine access
2979 control for various server operations. They are also used in
2980 the <command>listen-on</command> and <command>sortlist</command>
2981 statements. The elements which constitute an address match
2982 list can be any of the following:
2986 <simpara>an IP address (IPv4 or IPv6)</simpara>
2989 <simpara>an IP prefix (in `/' notation)</simpara>
2993 a key ID, as defined by the <command>key</command>
2998 <simpara>the name of an address match list defined with
2999 the <command>acl</command> statement
3003 <simpara>a nested address match list enclosed in braces</simpara>
3008 Elements can be negated with a leading exclamation mark (`!'),
3009 and the match list names "any", "none", "localhost", and
3010 "localnets" are predefined. More information on those names
3011 can be found in the description of the acl statement.
3015 The addition of the key clause made the name of this syntactic
3016 element something of a misnomer, since security keys can be used
3017 to validate access without regard to a host or network address.
3018 Nonetheless, the term "address match list" is still used
3019 throughout the documentation.
3023 When a given IP address or prefix is compared to an address
3024 match list, the comparison takes place in approximately O(1)
3025 time. However, key comparisons require that the list of keys
3026 be traversed until a matching key is found, and therefore may
3031 The interpretation of a match depends on whether the list is being
3032 used for access control, defining <command>listen-on</command> ports, or in a
3033 <command>sortlist</command>, and whether the element was negated.
3037 When used as an access control list, a non-negated match
3038 allows access and a negated match denies access. If
3039 there is no match, access is denied. The clauses
3040 <command>allow-notify</command>,
3041 <command>allow-recursion</command>,
3042 <command>allow-recursion-on</command>,
3043 <command>allow-query</command>,
3044 <command>allow-query-on</command>,
3045 <command>allow-query-cache</command>,
3046 <command>allow-query-cache-on</command>,
3047 <command>allow-transfer</command>,
3048 <command>allow-update</command>,
3049 <command>allow-update-forwarding</command>, and
3050 <command>blackhole</command> all use address match
3051 lists. Similarly, the <command>listen-on</command> option will cause the
3052 server to refuse queries on any of the machine's
3053 addresses which do not match the list.
3057 Order of insertion is significant. If more than one element
3058 in an ACL is found to match a given IP address or prefix,
3059 preference will be given to the one that came
3060 <emphasis>first</emphasis> in the ACL definition.
3061 Because of this first-match behavior, an element that
3062 defines a subset of another element in the list should
3063 come before the broader element, regardless of whether
3064 either is negated. For example, in
3065 <command>1.2.3/24; ! 1.2.3.13;</command>
3066 the 1.2.3.13 element is completely useless because the
3067 algorithm will match any lookup for 1.2.3.13 to the 1.2.3/24
3068 element. Using <command>! 1.2.3.13; 1.2.3/24</command> fixes
3069 that problem by having 1.2.3.13 blocked by the negation, but
3070 all other 1.2.3.* hosts fall through.
3076 <title>Comment Syntax</title>
3079 The <acronym>BIND</acronym> 9 comment syntax allows for
3081 anywhere that whitespace may appear in a <acronym>BIND</acronym> configuration
3082 file. To appeal to programmers of all kinds, they can be written
3083 in the C, C++, or shell/perl style.
3087 <title>Syntax</title>
3090 <programlisting>/* This is a <acronym>BIND</acronym> comment as in C */</programlisting>
3091 <programlisting>// This is a <acronym>BIND</acronym> comment as in C++</programlisting>
3092 <programlisting># This is a <acronym>BIND</acronym> comment as in common UNIX shells
3093 # and perl</programlisting>
3097 <title>Definition and Usage</title>
3099 Comments may appear anywhere that whitespace may appear in
3100 a <acronym>BIND</acronym> configuration file.
3103 C-style comments start with the two characters /* (slash,
3104 star) and end with */ (star, slash). Because they are completely
3105 delimited with these characters, they can be used to comment only
3106 a portion of a line or to span multiple lines.
3109 C-style comments cannot be nested. For example, the following
3110 is not valid because the entire comment ends with the first */:
3114 <programlisting>/* This is the start of a comment.
3115 This is still part of the comment.
3116 /* This is an incorrect attempt at nesting a comment. */
3117 This is no longer in any comment. */
3123 C++-style comments start with the two characters // (slash,
3124 slash) and continue to the end of the physical line. They cannot
3125 be continued across multiple physical lines; to have one logical
3126 comment span multiple lines, each line must use the // pair.
3131 <programlisting>// This is the start of a comment. The next line
3132 // is a new comment, even though it is logically
3133 // part of the previous comment.
3138 Shell-style (or perl-style, if you prefer) comments start
3139 with the character <literal>#</literal> (number sign)
3140 and continue to the end of the
3141 physical line, as in C++ comments.
3147 <programlisting># This is the start of a comment. The next line
3148 # is a new comment, even though it is logically
3149 # part of the previous comment.
3156 You cannot use the semicolon (`;') character
3157 to start a comment such as you would in a zone file. The
3158 semicolon indicates the end of a configuration
3166 <sect1 id="Configuration_File_Grammar">
3167 <title>Configuration File Grammar</title>
3170 A <acronym>BIND</acronym> 9 configuration consists of
3171 statements and comments.
3172 Statements end with a semicolon. Statements and comments are the
3173 only elements that can appear without enclosing braces. Many
3174 statements contain a block of sub-statements, which are also
3175 terminated with a semicolon.
3179 The following statements are supported:
3182 <informaltable colsep="0" rowsep="0">
3183 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="2Level-table">
3184 <colspec colname="1" colnum="1" colsep="0" colwidth="1.336in"/>
3185 <colspec colname="2" colnum="2" colsep="0" colwidth="3.778in"/>
3189 <para><command>acl</command></para>
3193 defines a named IP address
3194 matching list, for access control and other uses.
3200 <para><command>controls</command></para>
3204 declares control channels to be used
3205 by the <command>rndc</command> utility.
3211 <para><command>include</command></para>
3221 <para><command>key</command></para>
3225 specifies key information for use in
3226 authentication and authorization using TSIG.
3232 <para><command>logging</command></para>
3236 specifies what the server logs, and where
3237 the log messages are sent.
3243 <para><command>lwres</command></para>
3247 configures <command>named</command> to
3248 also act as a light-weight resolver daemon (<command>lwresd</command>).
3254 <para><command>masters</command></para>
3258 defines a named masters list for
3259 inclusion in stub and slave zones'
3260 <command>masters</command> or
3261 <command>also-notify</command> lists.
3267 <para><command>options</command></para>
3271 controls global server configuration
3272 options and sets defaults for other statements.
3278 <para><command>server</command></para>
3282 sets certain configuration options on
3289 <para><command>statistics-channels</command></para>
3293 declares communication channels to get access to
3294 <command>named</command> statistics.
3300 <para><command>trusted-keys</command></para>
3304 defines trusted DNSSEC keys.
3310 <para><command>managed-keys</command></para>
3314 lists DNSSEC keys to be kept up to date
3315 using RFC 5011 trust anchor maintenance.
3321 <para><command>view</command></para>
3331 <para><command>zone</command></para>
3344 The <command>logging</command> and
3345 <command>options</command> statements may only occur once
3351 <title><command>acl</command> Statement Grammar</title>
3353 <programlisting><command>acl</command> acl-name {
3360 <title><command>acl</command> Statement Definition and
3364 The <command>acl</command> statement assigns a symbolic
3365 name to an address match list. It gets its name from a primary
3366 use of address match lists: Access Control Lists (ACLs).
3370 The following ACLs are built-in:
3373 <informaltable colsep="0" rowsep="0">
3374 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
3375 <colspec colname="1" colnum="1" colsep="0" colwidth="1.130in"/>
3376 <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
3380 <para><command>any</command></para>
3390 <para><command>none</command></para>
3400 <para><command>localhost</command></para>
3404 Matches the IPv4 and IPv6 addresses of all network
3405 interfaces on the system. When addresses are
3406 added or removed, the <command>localhost</command>
3407 ACL element is updated to reflect the changes.
3413 <para><command>localnets</command></para>
3417 Matches any host on an IPv4 or IPv6 network
3418 for which the system has an interface.
3419 When addresses are added or removed,
3420 the <command>localnets</command>
3421 ACL element is updated to reflect the changes.
3422 Some systems do not provide a way to determine the prefix
3424 local IPv6 addresses.
3425 In such a case, <command>localnets</command>
3426 only matches the local
3427 IPv6 addresses, just like <command>localhost</command>.
3436 When <acronym>BIND</acronym> 9 is built with GeoIP support,
3437 ACLs can also be used for geographic access restrictions.
3438 This is done by specifying an ACL element of the form:
3439 <command>geoip <optional>db <replaceable>database</replaceable></optional> <replaceable>field</replaceable> <replaceable>value</replaceable></command>
3442 The <replaceable>field</replaceable> indicates which field
3443 to search for a match. Available fields are "country",
3444 "region", "city", "continent", "postal" (postal code),
3445 "metro" (metro code), "area" (area code), "tz" (timezone),
3446 "isp", "org", "asnum", "domain" and "netspeed".
3449 <replaceable>value</replaceable> is the value to search
3450 for within the database. A string may be quoted if it
3451 contains spaces or other special characters. If this is
3452 an "asnum" search, then the leading "ASNNNN" string can be
3453 used, otherwise the full description must be used (e.g.
3454 "ASNNNN Example Company Name"). If this is a "country"
3455 search and the string is two characters long, then it must
3456 be a standard ISO-3166-1 two-letter country code, and if it
3457 is three characters long then it must be an ISO-3166-1
3458 three-letter country code; otherwise it is the full name
3459 of the country. Similarly, if this is a "region" search
3460 and the string is two characters long, then it must be a
3461 standard two-letter state or province abbreviation;
3462 otherwise it is the full name of the state or province.
3465 The <replaceable>database</replaceable> field indicates which
3466 GeoIP database to search for a match. In most cases this is
3467 unnecessary, because most search fields can only be found in
3468 a single database. However, searches for country can be
3469 answered from the "city", "region", or "country" databases,
3470 and searches for region (i.e., state or province) can be
3471 answered from the "city" or "region" databases. For these
3472 search types, specifying a <replaceable>database</replaceable>
3473 will force the query to be answered from that database and no
3474 other. If <replaceable>database</replaceable> is not
3475 specified, then these queries will be answered from the "city",
3476 database if it is installed, or the "region" database if it is
3477 installed, or the "country" database, in that order.
3480 Some example GeoIP ACLs:
3482 <programlisting>geoip country US;
3484 geoip db country country Canada;
3485 geoip db region region WA;
3486 geoip city "San Francisco";
3487 geoip region Oklahoma;
3489 geoip tz "America/Los_Angeles";
3490 geoip org "Internet Systems Consortium";
3496 <title><command>controls</command> Statement Grammar</title>
3498 <programlisting><command>controls</command> {
3499 [ inet ( ip_addr | * ) [ port ip_port ]
3500 allow { <replaceable> address_match_list </replaceable> }
3501 keys { <replaceable>key_list</replaceable> }; ]
3503 [ unix <replaceable>path</replaceable> perm <replaceable>number</replaceable> owner <replaceable>number</replaceable> group <replaceable>number</replaceable>
3504 keys { <replaceable>key_list</replaceable> }; ]
3511 <sect2 id="controls_statement_definition_and_usage">
3512 <title><command>controls</command> Statement Definition and
3516 The <command>controls</command> statement declares control
3517 channels to be used by system administrators to control the
3518 operation of the name server. These control channels are
3519 used by the <command>rndc</command> utility to send
3520 commands to and retrieve non-DNS results from a name server.
3524 An <command>inet</command> control channel is a TCP socket
3525 listening at the specified <command>ip_port</command> on the
3526 specified <command>ip_addr</command>, which can be an IPv4 or IPv6
3527 address. An <command>ip_addr</command> of <literal>*</literal> (asterisk) is
3528 interpreted as the IPv4 wildcard address; connections will be
3529 accepted on any of the system's IPv4 addresses.
3530 To listen on the IPv6 wildcard address,
3531 use an <command>ip_addr</command> of <literal>::</literal>.
3532 If you will only use <command>rndc</command> on the local host,
3533 using the loopback address (<literal>127.0.0.1</literal>
3534 or <literal>::1</literal>) is recommended for maximum security.
3538 If no port is specified, port 953 is used. The asterisk
3539 "<literal>*</literal>" cannot be used for <command>ip_port</command>.
3543 The ability to issue commands over the control channel is
3544 restricted by the <command>allow</command> and
3545 <command>keys</command> clauses.
3546 Connections to the control channel are permitted based on the
3547 <command>address_match_list</command>. This is for simple
3548 IP address based filtering only; any <command>key_id</command>
3549 elements of the <command>address_match_list</command>
3554 A <command>unix</command> control channel is a UNIX domain
3555 socket listening at the specified path in the file system.
3556 Access to the socket is specified by the <command>perm</command>,
3557 <command>owner</command> and <command>group</command> clauses.
3558 Note on some platforms (SunOS and Solaris) the permissions
3559 (<command>perm</command>) are applied to the parent directory
3560 as the permissions on the socket itself are ignored.
3564 The primary authorization mechanism of the command
3565 channel is the <command>key_list</command>, which
3566 contains a list of <command>key_id</command>s.
3567 Each <command>key_id</command> in the <command>key_list</command>
3568 is authorized to execute commands over the control channel.
3569 See <xref linkend="rndc"/> in <xref linkend="admin_tools"/>)
3570 for information about configuring keys in <command>rndc</command>.
3574 If no <command>controls</command> statement is present,
3575 <command>named</command> will set up a default
3576 control channel listening on the loopback address 127.0.0.1
3577 and its IPv6 counterpart ::1.
3578 In this case, and also when the <command>controls</command> statement
3579 is present but does not have a <command>keys</command> clause,
3580 <command>named</command> will attempt to load the command channel key
3581 from the file <filename>rndc.key</filename> in
3582 <filename>/etc</filename> (or whatever <varname>sysconfdir</varname>
3583 was specified as when <acronym>BIND</acronym> was built).
3584 To create a <filename>rndc.key</filename> file, run
3585 <userinput>rndc-confgen -a</userinput>.
3589 The <filename>rndc.key</filename> feature was created to
3590 ease the transition of systems from <acronym>BIND</acronym> 8,
3591 which did not have digital signatures on its command channel
3592 messages and thus did not have a <command>keys</command> clause.
3594 It makes it possible to use an existing <acronym>BIND</acronym> 8
3595 configuration file in <acronym>BIND</acronym> 9 unchanged,
3596 and still have <command>rndc</command> work the same way
3597 <command>ndc</command> worked in BIND 8, simply by executing the
3598 command <userinput>rndc-confgen -a</userinput> after BIND 9 is
3603 Since the <filename>rndc.key</filename> feature
3604 is only intended to allow the backward-compatible usage of
3605 <acronym>BIND</acronym> 8 configuration files, this
3607 have a high degree of configurability. You cannot easily change
3608 the key name or the size of the secret, so you should make a
3609 <filename>rndc.conf</filename> with your own key if you
3611 those things. The <filename>rndc.key</filename> file
3613 permissions set such that only the owner of the file (the user that
3614 <command>named</command> is running as) can access it.
3616 desire greater flexibility in allowing other users to access
3617 <command>rndc</command> commands, then you need to create
3619 <filename>rndc.conf</filename> file and make it group
3621 that contains the users who should have access.
3625 To disable the command channel, use an empty
3626 <command>controls</command> statement:
3627 <command>controls { };</command>.
3632 <title><command>include</command> Statement Grammar</title>
3633 <programlisting><command>include</command> <replaceable>filename</replaceable>;</programlisting>
3636 <title><command>include</command> Statement Definition and
3640 The <command>include</command> statement inserts the
3641 specified file at the point where the <command>include</command>
3642 statement is encountered. The <command>include</command>
3643 statement facilitates the administration of configuration
3645 by permitting the reading or writing of some things but not
3646 others. For example, the statement could include private keys
3647 that are readable only by the name server.
3652 <title><command>key</command> Statement Grammar</title>
3654 <programlisting><command>key</command> <replaceable>key_id</replaceable> {
3655 algorithm <replaceable>string</replaceable>;
3656 secret <replaceable>string</replaceable>;
3663 <title><command>key</command> Statement Definition and Usage</title>
3666 The <command>key</command> statement defines a shared
3667 secret key for use with TSIG (see <xref linkend="tsig"/>)
3668 or the command channel
3669 (see <xref linkend="controls_statement_definition_and_usage"/>).
3673 The <command>key</command> statement can occur at the
3675 of the configuration file or inside a <command>view</command>
3676 statement. Keys defined in top-level <command>key</command>
3677 statements can be used in all views. Keys intended for use in
3678 a <command>controls</command> statement
3679 (see <xref linkend="controls_statement_definition_and_usage"/>)
3680 must be defined at the top level.
3684 The <replaceable>key_id</replaceable>, also known as the
3685 key name, is a domain name uniquely identifying the key. It can
3686 be used in a <command>server</command>
3687 statement to cause requests sent to that
3688 server to be signed with this key, or in address match lists to
3689 verify that incoming requests have been signed with a key
3690 matching this name, algorithm, and secret.
3694 The <replaceable>algorithm_id</replaceable> is a string
3695 that specifies a security/authentication algorithm. Named
3696 supports <literal>hmac-md5</literal>,
3697 <literal>hmac-sha1</literal>, <literal>hmac-sha224</literal>,
3698 <literal>hmac-sha256</literal>, <literal>hmac-sha384</literal>
3699 and <literal>hmac-sha512</literal> TSIG authentication.
3700 Truncated hashes are supported by appending the minimum
3701 number of required bits preceded by a dash, e.g.
3702 <literal>hmac-sha1-80</literal>. The
3703 <replaceable>secret_string</replaceable> is the secret
3704 to be used by the algorithm, and is treated as a base-64
3710 <title><command>logging</command> Statement Grammar</title>
3712 <programlisting><command>logging</command> {
3713 [ <command>channel</command> <replaceable>channel_name</replaceable> {
3714 ( <command>file</command> <replaceable>path_name</replaceable>
3715 [ <command>versions</command> ( <replaceable>number</replaceable> | <command>unlimited</command> ) ]
3716 [ <command>size</command> <replaceable>size_spec</replaceable> ]
3717 | <command>syslog</command> <replaceable>syslog_facility</replaceable>
3718 | <command>stderr</command>
3719 | <command>null</command> );
3720 [ <command>severity</command> (<option>critical</option> | <option>error</option> | <option>warning</option> | <option>notice</option> |
3721 <option>info</option> | <option>debug</option> [ <replaceable>level</replaceable> ] | <option>dynamic</option> ); ]
3722 [ <command>print-category</command> <option>yes</option> or <option>no</option>; ]
3723 [ <command>print-severity</command> <option>yes</option> or <option>no</option>; ]
3724 [ <command>print-time</command> <option>yes</option> or <option>no</option>; ]
3726 [ <command>category</command> <replaceable>category_name</replaceable> {
3727 <replaceable>channel_name</replaceable> ; [ <replaceable>channel_name</replaceable> ; ... ]
3736 <title><command>logging</command> Statement Definition and
3740 The <command>logging</command> statement configures a
3742 variety of logging options for the name server. Its <command>channel</command> phrase
3743 associates output methods, format options and severity levels with
3744 a name that can then be used with the <command>category</command> phrase
3745 to select how various classes of messages are logged.
3748 Only one <command>logging</command> statement is used to
3750 as many channels and categories as are wanted. If there is no <command>logging</command> statement,
3751 the logging configuration will be:
3754 <programlisting>logging {
3755 category default { default_syslog; default_debug; };
3756 category unmatched { null; };
3761 In <acronym>BIND</acronym> 9, the logging configuration
3762 is only established when
3763 the entire configuration file has been parsed. In <acronym>BIND</acronym> 8, it was
3764 established as soon as the <command>logging</command>
3766 was parsed. When the server is starting up, all logging messages
3767 regarding syntax errors in the configuration file go to the default
3768 channels, or to standard error if the "<option>-g</option>" option
3773 <title>The <command>channel</command> Phrase</title>
3776 All log output goes to one or more <emphasis>channels</emphasis>;
3777 you can make as many of them as you want.
3781 Every channel definition must include a destination clause that
3782 says whether messages selected for the channel go to a file, to a
3783 particular syslog facility, to the standard error stream, or are
3784 discarded. It can optionally also limit the message severity level
3785 that will be accepted by the channel (the default is
3786 <command>info</command>), and whether to include a
3787 <command>named</command>-generated time stamp, the
3789 and/or severity level (the default is not to include any).
3793 The <command>null</command> destination clause
3794 causes all messages sent to the channel to be discarded;
3795 in that case, other options for the channel are meaningless.
3799 The <command>file</command> destination clause directs
3801 to a disk file. It can include limitations
3802 both on how large the file is allowed to become, and how many
3804 of the file will be saved each time the file is opened.
3808 If you use the <command>versions</command> log file
3810 <command>named</command> will retain that many backup
3811 versions of the file by
3812 renaming them when opening. For example, if you choose to keep
3814 of the file <filename>lamers.log</filename>, then just
3816 <filename>lamers.log.1</filename> is renamed to
3817 <filename>lamers.log.2</filename>, <filename>lamers.log.0</filename> is renamed
3818 to <filename>lamers.log.1</filename>, and <filename>lamers.log</filename> is
3819 renamed to <filename>lamers.log.0</filename>.
3820 You can say <command>versions unlimited</command> to
3822 the number of versions.
3823 If a <command>size</command> option is associated with
3825 then renaming is only done when the file being opened exceeds the
3826 indicated size. No backup versions are kept by default; any
3828 log file is simply appended.
3832 The <command>size</command> option for files is used
3834 growth. If the file ever exceeds the size, then <command>named</command> will
3835 stop writing to the file unless it has a <command>versions</command> option
3836 associated with it. If backup versions are kept, the files are
3838 described above and a new one begun. If there is no
3839 <command>versions</command> option, no more data will
3840 be written to the log
3841 until some out-of-band mechanism removes or truncates the log to
3843 maximum size. The default behavior is not to limit the size of
3849 Example usage of the <command>size</command> and
3850 <command>versions</command> options:
3853 <programlisting>channel an_example_channel {
3854 file "example.log" versions 3 size 20m;
3861 The <command>syslog</command> destination clause
3863 channel to the system log. Its argument is a
3864 syslog facility as described in the <command>syslog</command> man
3865 page. Known facilities are <command>kern</command>, <command>user</command>,
3866 <command>mail</command>, <command>daemon</command>, <command>auth</command>,
3867 <command>syslog</command>, <command>lpr</command>, <command>news</command>,
3868 <command>uucp</command>, <command>cron</command>, <command>authpriv</command>,
3869 <command>ftp</command>, <command>local0</command>, <command>local1</command>,
3870 <command>local2</command>, <command>local3</command>, <command>local4</command>,
3871 <command>local5</command>, <command>local6</command> and
3872 <command>local7</command>, however not all facilities
3874 all operating systems.
3875 How <command>syslog</command> will handle messages
3877 this facility is described in the <command>syslog.conf</command> man
3878 page. If you have a system which uses a very old version of <command>syslog</command> that
3879 only uses two arguments to the <command>openlog()</command> function,
3880 then this clause is silently ignored.
3883 On Windows machines syslog messages are directed to the EventViewer.
3886 The <command>severity</command> clause works like <command>syslog</command>'s
3887 "priorities", except that they can also be used if you are writing
3888 straight to a file rather than using <command>syslog</command>.
3889 Messages which are not at least of the severity level given will
3890 not be selected for the channel; messages of higher severity
3895 If you are using <command>syslog</command>, then the <command>syslog.conf</command> priorities
3896 will also determine what eventually passes through. For example,
3897 defining a channel facility and severity as <command>daemon</command> and <command>debug</command> but
3898 only logging <command>daemon.warning</command> via <command>syslog.conf</command> will
3899 cause messages of severity <command>info</command> and
3900 <command>notice</command> to
3901 be dropped. If the situation were reversed, with <command>named</command> writing
3902 messages of only <command>warning</command> or higher,
3903 then <command>syslogd</command> would
3904 print all messages it received from the channel.
3908 The <command>stderr</command> destination clause
3910 channel to the server's standard error stream. This is intended
3912 use when the server is running as a foreground process, for
3914 when debugging a configuration.
3918 The server can supply extensive debugging information when
3919 it is in debugging mode. If the server's global debug level is
3921 than zero, then debugging mode will be active. The global debug
3922 level is set either by starting the <command>named</command> server
3923 with the <option>-d</option> flag followed by a positive integer,
3924 or by running <command>rndc trace</command>.
3925 The global debug level
3926 can be set to zero, and debugging mode turned off, by running <command>rndc
3927 notrace</command>. All debugging messages in the server have a debug
3928 level, and higher debug levels give more detailed output. Channels
3929 that specify a specific debug severity, for example:
3932 <programlisting>channel specific_debug_level {
3939 will get debugging output of level 3 or less any time the
3940 server is in debugging mode, regardless of the global debugging
3941 level. Channels with <command>dynamic</command>
3943 server's global debug level to determine what messages to print.
3946 If <command>print-time</command> has been turned on,
3948 the date and time will be logged. <command>print-time</command> may
3949 be specified for a <command>syslog</command> channel,
3951 pointless since <command>syslog</command> also logs
3953 time. If <command>print-category</command> is
3955 category of the message will be logged as well. Finally, if <command>print-severity</command> is
3956 on, then the severity level of the message will be logged. The <command>print-</command> options may
3957 be used in any combination, and will always be printed in the
3959 order: time, category, severity. Here is an example where all
3960 three <command>print-</command> options
3965 <computeroutput>28-Feb-2000 15:05:32.863 general: notice: running</computeroutput>
3969 There are four predefined channels that are used for
3970 <command>named</command>'s default logging as follows.
3972 used is described in <xref linkend="the_category_phrase"/>.
3975 <programlisting>channel default_syslog {
3976 // send to syslog's daemon facility
3978 // only send priority info and higher
3981 channel default_debug {
3982 // write to named.run in the working directory
3983 // Note: stderr is used instead of "named.run" if
3984 // the server is started with the '-f' option.
3986 // log at the server's current debug level
3990 channel default_stderr {
3993 // only send priority info and higher
3998 // toss anything sent to this channel
4004 The <command>default_debug</command> channel has the
4006 property that it only produces output when the server's debug
4008 nonzero. It normally writes to a file called <filename>named.run</filename>
4009 in the server's working directory.
4013 For security reasons, when the "<option>-u</option>"
4014 command line option is used, the <filename>named.run</filename> file
4015 is created only after <command>named</command> has
4017 new UID, and any debug output generated while <command>named</command> is
4018 starting up and still running as root is discarded. If you need
4019 to capture this output, you must run the server with the "<option>-g</option>"
4020 option and redirect standard error to a file.
4024 Once a channel is defined, it cannot be redefined. Thus you
4025 cannot alter the built-in channels directly, but you can modify
4026 the default logging by pointing categories at channels you have
4031 <sect3 id="the_category_phrase">
4032 <title>The <command>category</command> Phrase</title>
4035 There are many categories, so you can send the logs you want
4036 to see wherever you want, without seeing logs you don't want. If
4037 you don't specify a list of channels for a category, then log
4039 in that category will be sent to the <command>default</command> category
4040 instead. If you don't specify a default category, the following
4041 "default default" is used:
4044 <programlisting>category default { default_syslog; default_debug; };
4048 As an example, let's say you want to log security events to
4049 a file, but you also want keep the default logging behavior. You'd
4050 specify the following:
4053 <programlisting>channel my_security_channel {
4054 file "my_security_file";
4058 my_security_channel;
4064 To discard all messages in a category, specify the <command>null</command> channel:
4067 <programlisting>category xfer-out { null; };
4068 category notify { null; };
4072 Following are the available categories and brief descriptions
4073 of the types of log information they contain. More
4074 categories may be added in future <acronym>BIND</acronym> releases.
4076 <informaltable colsep="0" rowsep="0">
4077 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
4078 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
4079 <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
4083 <para><command>default</command></para>
4087 The default category defines the logging
4088 options for those categories where no specific
4089 configuration has been
4096 <para><command>general</command></para>
4100 The catch-all. Many things still aren't
4101 classified into categories, and they all end up here.
4107 <para><command>database</command></para>
4111 Messages relating to the databases used
4112 internally by the name server to store zone and cache
4119 <para><command>security</command></para>
4123 Approval and denial of requests.
4129 <para><command>config</command></para>
4133 Configuration file parsing and processing.
4139 <para><command>resolver</command></para>
4143 DNS resolution, such as the recursive
4144 lookups performed on behalf of clients by a caching name
4151 <para><command>xfer-in</command></para>
4155 Zone transfers the server is receiving.
4161 <para><command>xfer-out</command></para>
4165 Zone transfers the server is sending.
4171 <para><command>notify</command></para>
4175 The NOTIFY protocol.
4181 <para><command>client</command></para>
4185 Processing of client requests.
4191 <para><command>unmatched</command></para>
4195 Messages that <command>named</command> was unable to determine the
4196 class of or for which there was no matching <command>view</command>.
4197 A one line summary is also logged to the <command>client</command> category.
4198 This category is best sent to a file or stderr, by
4199 default it is sent to
4200 the <command>null</command> channel.
4206 <para><command>network</command></para>
4216 <para><command>update</command></para>
4226 <para><command>update-security</command></para>
4230 Approval and denial of update requests.
4236 <para><command>queries</command></para>
4240 Specify where queries should be logged to.
4243 At startup, specifying the category <command>queries</command> will also
4244 enable query logging unless <command>querylog</command> option has been
4249 The query log entry reports the client's IP
4250 address and port number, and the query name,
4251 class and type. Next it reports whether the
4252 Recursion Desired flag was set (+ if set, -
4253 if not set), if the query was signed (S),
4254 EDNS was in use (E), if TCP was used (T), if
4255 DO (DNSSEC Ok) was set (D), or if CD (Checking
4256 Disabled) was set (C). After this the
4257 destination address the query was sent to is
4262 <computeroutput>client 127.0.0.1#62536 (www.example.com): query: www.example.com IN AAAA +SE</computeroutput>
4265 <computeroutput>client ::1#62537 (www.example.net): query: www.example.net IN AAAA -SE</computeroutput>
4268 (The first part of this log message, showing the
4269 client address/port number and query name, is
4270 repeated in all subsequent log messages related
4277 <para><command>query-errors</command></para>
4281 Information about queries that resulted in some
4288 <para><command>dispatch</command></para>
4292 Dispatching of incoming packets to the
4293 server modules where they are to be processed.
4299 <para><command>dnssec</command></para>
4303 DNSSEC and TSIG protocol processing.
4309 <para><command>lame-servers</command></para>
4313 Lame servers. These are misconfigurations
4314 in remote servers, discovered by BIND 9 when trying to
4315 query those servers during resolution.
4321 <para><command>delegation-only</command></para>
4325 Delegation only. Logs queries that have been
4326 forced to NXDOMAIN as the result of a
4327 delegation-only zone or a
4328 <command>delegation-only</command> in a
4329 forward, hint or stub zone declaration.
4335 <para><command>edns-disabled</command></para>
4339 Log queries that have been forced to use plain
4340 DNS due to timeouts. This is often due to
4341 the remote servers not being RFC 1034 compliant
4342 (not always returning FORMERR or similar to
4343 EDNS queries and other extensions to the DNS
4344 when they are not understood). In other words, this is
4345 targeted at servers that fail to respond to
4346 DNS queries that they don't understand.
4349 Note: the log message can also be due to
4350 packet loss. Before reporting servers for
4351 non-RFC 1034 compliance they should be re-tested
4352 to determine the nature of the non-compliance.
4353 This testing should prevent or reduce the
4354 number of false-positive reports.
4357 Note: eventually <command>named</command> will have to stop
4358 treating such timeouts as due to RFC 1034 non
4359 compliance and start treating it as plain
4360 packet loss. Falsely classifying packet
4361 loss as due to RFC 1034 non compliance impacts
4362 on DNSSEC validation which requires EDNS for
4363 the DNSSEC records to be returned.
4369 <para><command>RPZ</command></para>
4373 Information about errors in response policy zone files,
4374 rewritten responses, and at the highest
4375 <command>debug</command> levels, mere rewriting
4382 <para><command>rate-limit</command></para>
4386 The start, periodic, and final notices of the
4387 rate limiting of a stream of responses are logged at
4388 <command>info</command> severity in this category.
4389 These messages include a hash value of the domain name
4390 of the response and the name itself,
4391 except when there is insufficient memory to record
4392 the name for the final notice
4393 The final notice is normally delayed until about one
4394 minute after rate limit stops.
4395 A lack of memory can hurry the final notice,
4396 in which case it starts with an asterisk (*).
4397 Various internal events are logged at debug 1 level
4401 Rate limiting of individual requests
4402 is logged in the <command>query-errors</command> category.
4408 <para><command>cname</command></para>
4412 Logs nameservers that are skipped due to them being
4413 a CNAME rather than A / AAAA records.
4422 <title>The <command>query-errors</command> Category</title>
4424 The <command>query-errors</command> category is
4425 specifically intended for debugging purposes: To identify
4426 why and how specific queries result in responses which
4428 Messages of this category are therefore only logged
4429 with <command>debug</command> levels.
4433 At the debug levels of 1 or higher, each response with the
4434 rcode of SERVFAIL is logged as follows:
4437 <computeroutput>client 127.0.0.1#61502: query failed (SERVFAIL) for www.example.com/IN/AAAA at query.c:3880</computeroutput>
4440 This means an error resulting in SERVFAIL was
4441 detected at line 3880 of source file
4442 <filename>query.c</filename>.
4443 Log messages of this level will particularly
4444 help identify the cause of SERVFAIL for an
4445 authoritative server.
4448 At the debug levels of 2 or higher, detailed context
4449 information of recursive resolutions that resulted in
4451 The log message will look like as follows:
4454 <!-- NOTE: newlines and some spaces added so this would fit on page -->
4456 fetch completed at resolver.c:2970 for www.example.com/A
4457 in 30.000183: timed out/success [domain:example.com,
4458 referral:2,restart:7,qrysent:8,timeout:5,lame:0,neterr:0,
4459 badresp:1,adberr:0,findfail:0,valfail:0]
4463 The first part before the colon shows that a recursive
4464 resolution for AAAA records of www.example.com completed
4465 in 30.000183 seconds and the final result that led to the
4466 SERVFAIL was determined at line 2970 of source file
4467 <filename>resolver.c</filename>.
4470 The following part shows the detected final result and the
4471 latest result of DNSSEC validation.
4472 The latter is always success when no validation attempt
4474 In this example, this query resulted in SERVFAIL probably
4475 because all name servers are down or unreachable, leading
4476 to a timeout in 30 seconds.
4477 DNSSEC validation was probably not attempted.
4480 The last part enclosed in square brackets shows statistics
4481 information collected for this particular resolution
4483 The <varname>domain</varname> field shows the deepest zone
4484 that the resolver reached;
4485 it is the zone where the error was finally detected.
4486 The meaning of the other fields is summarized in the
4490 <informaltable colsep="0" rowsep="0">
4491 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
4492 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
4493 <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
4497 <para><varname>referral</varname></para>
4501 The number of referrals the resolver received
4502 throughout the resolution process.
4503 In the above example this is 2, which are most
4504 likely com and example.com.
4510 <para><varname>restart</varname></para>
4514 The number of cycles that the resolver tried
4515 remote servers at the <varname>domain</varname>
4517 In each cycle the resolver sends one query
4518 (possibly resending it, depending on the response)
4519 to each known name server of
4520 the <varname>domain</varname> zone.
4526 <para><varname>qrysent</varname></para>
4530 The number of queries the resolver sent at the
4531 <varname>domain</varname> zone.
4537 <para><varname>timeout</varname></para>
4541 The number of timeouts since the resolver
4542 received the last response.
4548 <para><varname>lame</varname></para>
4552 The number of lame servers the resolver detected
4553 at the <varname>domain</varname> zone.
4554 A server is detected to be lame either by an
4555 invalid response or as a result of lookup in
4556 BIND9's address database (ADB), where lame
4563 <para><varname>neterr</varname></para>
4567 The number of erroneous results that the
4568 resolver encountered in sending queries
4569 at the <varname>domain</varname> zone.
4570 One common case is the remote server is
4571 unreachable and the resolver receives an ICMP
4572 unreachable error message.
4578 <para><varname>badresp</varname></para>
4582 The number of unexpected responses (other than
4583 <varname>lame</varname>) to queries sent by the
4584 resolver at the <varname>domain</varname> zone.
4590 <para><varname>adberr</varname></para>
4594 Failures in finding remote server addresses
4595 of the <varname>domain</varname> zone in the ADB.
4596 One common case of this is that the remote
4597 server's name does not have any address records.
4603 <para><varname>findfail</varname></para>
4607 Failures of resolving remote server addresses.
4608 This is a total number of failures throughout
4609 the resolution process.
4615 <para><varname>valfail</varname></para>
4619 Failures of DNSSEC validation.
4620 Validation failures are counted throughout
4621 the resolution process (not limited to
4622 the <varname>domain</varname> zone), but should
4623 only happen in <varname>domain</varname>.
4631 At the debug levels of 3 or higher, the same messages
4632 as those at the debug 1 level are logged for other errors
4634 Note that negative responses such as NXDOMAIN are not
4635 regarded as errors here.
4638 At the debug levels of 4 or higher, the same messages
4639 as those at the debug 2 level are logged for other errors
4641 Unlike the above case of level 3, messages are logged for
4643 This is because any unexpected results can be difficult to
4644 debug in the recursion case.
4650 <title><command>lwres</command> Statement Grammar</title>
4653 This is the grammar of the <command>lwres</command>
4654 statement in the <filename>named.conf</filename> file:
4657 <programlisting><command>lwres</command> {
4658 <optional> listen-on { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ;
4659 <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; ... </optional> }; </optional>
4660 <optional> view <replaceable>view_name</replaceable>; </optional>
4661 <optional> search { <replaceable>domain_name</replaceable> ; <optional> <replaceable>domain_name</replaceable> ; ... </optional> }; </optional>
4662 <optional> ndots <replaceable>number</replaceable>; </optional>
4668 <title><command>lwres</command> Statement Definition and Usage</title>
4671 The <command>lwres</command> statement configures the
4673 server to also act as a lightweight resolver server. (See
4674 <xref linkend="lwresd"/>.) There may be multiple
4675 <command>lwres</command> statements configuring
4676 lightweight resolver servers with different properties.
4680 The <command>listen-on</command> statement specifies a
4682 IPv4 addresses (and ports) that this instance of a lightweight
4684 should accept requests on. If no port is specified, port 921 is
4686 If this statement is omitted, requests will be accepted on
4692 The <command>view</command> statement binds this
4694 lightweight resolver daemon to a view in the DNS namespace, so that
4696 response will be constructed in the same manner as a normal DNS
4698 matching this view. If this statement is omitted, the default view
4700 used, and if there is no default view, an error is triggered.
4704 The <command>search</command> statement is equivalent to
4706 <command>search</command> statement in
4707 <filename>/etc/resolv.conf</filename>. It provides a
4709 which are appended to relative names in queries.
4713 The <command>ndots</command> statement is equivalent to
4715 <command>ndots</command> statement in
4716 <filename>/etc/resolv.conf</filename>. It indicates the
4718 number of dots in a relative domain name that should result in an
4719 exact match lookup before search path elements are appended.
4723 <title><command>masters</command> Statement Grammar</title>
4726 <command>masters</command> <replaceable>name</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> { ( <replaceable>masters_list</replaceable> |
4727 <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> };
4733 <title><command>masters</command> Statement Definition and
4735 <para><command>masters</command>
4736 lists allow for a common set of masters to be easily used by
4737 multiple stub and slave zones in their <command>masters</command>
4738 or <command>also-notify</command> lists.
4743 <title><command>options</command> Statement Grammar</title>
4746 This is the grammar of the <command>options</command>
4747 statement in the <filename>named.conf</filename> file:
4750 <programlisting><command>options</command> {
4751 <optional> attach-cache <replaceable>cache_name</replaceable>; </optional>
4752 <optional> version <replaceable>version_string</replaceable>; </optional>
4753 <optional> hostname <replaceable>hostname_string</replaceable>; </optional>
4754 <optional> server-id <replaceable>server_id_string</replaceable>; </optional>
4755 <optional> directory <replaceable>path_name</replaceable>; </optional>
4756 <optional> geoip-directory <replaceable>path_name</replaceable>; </optional>
4757 <optional> key-directory <replaceable>path_name</replaceable>; </optional>
4758 <optional> managed-keys-directory <replaceable>path_name</replaceable>; </optional>
4759 <optional> named-xfer <replaceable>path_name</replaceable>; </optional>
4760 <optional> tkey-gssapi-keytab <replaceable>path_name</replaceable>; </optional>
4761 <optional> tkey-gssapi-credential <replaceable>principal</replaceable>; </optional>
4762 <optional> tkey-domain <replaceable>domainname</replaceable>; </optional>
4763 <optional> tkey-dhkey <replaceable>key_name</replaceable> <replaceable>key_tag</replaceable>; </optional>
4764 <optional> cache-file <replaceable>path_name</replaceable>; </optional>
4765 <optional> dump-file <replaceable>path_name</replaceable>; </optional>
4766 <optional> bindkeys-file <replaceable>path_name</replaceable>; </optional>
4767 <optional> secroots-file <replaceable>path_name</replaceable>; </optional>
4768 <optional> session-keyfile <replaceable>path_name</replaceable>; </optional>
4769 <optional> session-keyname <replaceable>key_name</replaceable>; </optional>
4770 <optional> session-keyalg <replaceable>algorithm_id</replaceable>; </optional>
4771 <optional> memstatistics <replaceable>yes_or_no</replaceable>; </optional>
4772 <optional> memstatistics-file <replaceable>path_name</replaceable>; </optional>
4773 <optional> pid-file <replaceable>path_name</replaceable>; </optional>
4774 <optional> recursing-file <replaceable>path_name</replaceable>; </optional>
4775 <optional> statistics-file <replaceable>path_name</replaceable>; </optional>
4776 <optional> zone-statistics <replaceable>full</replaceable> | <replaceable>terse</replaceable> | <replaceable>none</replaceable>; </optional>
4777 <optional> auth-nxdomain <replaceable>yes_or_no</replaceable>; </optional>
4778 <optional> deallocate-on-exit <replaceable>yes_or_no</replaceable>; </optional>
4779 <optional> dialup <replaceable>dialup_option</replaceable>; </optional>
4780 <optional> fake-iquery <replaceable>yes_or_no</replaceable>; </optional>
4781 <optional> fetch-glue <replaceable>yes_or_no</replaceable>; </optional>
4782 <optional> flush-zones-on-shutdown <replaceable>yes_or_no</replaceable>; </optional>
4783 <optional> has-old-clients <replaceable>yes_or_no</replaceable>; </optional>
4784 <optional> host-statistics <replaceable>yes_or_no</replaceable>; </optional>
4785 <optional> host-statistics-max <replaceable>number</replaceable>; </optional>
4786 <optional> minimal-responses <replaceable>yes_or_no</replaceable>; </optional>
4787 <optional> multiple-cnames <replaceable>yes_or_no</replaceable>; </optional>
4788 <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable>; </optional>
4789 <optional> recursion <replaceable>yes_or_no</replaceable>; </optional>
4790 <optional> request-sit <replaceable>yes_or_no</replaceable>; </optional>
4791 <optional> request-nsid <replaceable>yes_or_no</replaceable>; </optional>
4792 <optional> rfc2308-type1 <replaceable>yes_or_no</replaceable>; </optional>
4793 <optional> use-id-pool <replaceable>yes_or_no</replaceable>; </optional>
4794 <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable>; </optional>
4795 <optional> ixfr-from-differences (<replaceable>yes_or_no</replaceable> | <constant>master</constant> | <constant>slave</constant>); </optional>
4796 <optional> dnssec-enable <replaceable>yes_or_no</replaceable>; </optional>
4797 <optional> dnssec-validation (<replaceable>yes_or_no</replaceable> | <constant>auto</constant>); </optional>
4798 <optional> dnssec-lookaside ( <replaceable>auto</replaceable> |
4799 <replaceable>no</replaceable> |
4800 <replaceable>domain</replaceable> trust-anchor <replaceable>domain</replaceable> ); </optional>
4801 <optional> dnssec-must-be-secure <replaceable>domain yes_or_no</replaceable>; </optional>
4802 <optional> dnssec-accept-expired <replaceable>yes_or_no</replaceable>; </optional>
4803 <optional> forward ( <replaceable>only</replaceable> | <replaceable>first</replaceable> ); </optional>
4804 <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; ... </optional> }; </optional>
4805 <optional> dual-stack-servers <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> {
4806 ( <replaceable>domain_name</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> |
4807 <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional>) ;
4809 <optional> check-names ( <replaceable>master</replaceable> | <replaceable>slave</replaceable> | <replaceable>response</replaceable> )
4810 ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
4811 <optional> check-dup-records ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
4812 <optional> check-mx ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
4813 <optional> check-wildcard <replaceable>yes_or_no</replaceable>; </optional>
4814 <optional> check-integrity <replaceable>yes_or_no</replaceable>; </optional>
4815 <optional> check-mx-cname ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
4816 <optional> check-srv-cname ( <replaceable>warn</replaceable> | <replaceable>fail</replaceable> | <replaceable>ignore</replaceable> ); </optional>
4817 <optional> check-sibling <replaceable>yes_or_no</replaceable>; </optional>
4818 <optional> check-spf ( <replaceable>warn</replaceable> | <replaceable>ignore</replaceable> ); </optional>
4819 <optional> allow-new-zones { <replaceable>yes_or_no</replaceable> }; </optional>
4820 <optional> allow-notify { <replaceable>address_match_list</replaceable> }; </optional>
4821 <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
4822 <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
4823 <optional> allow-query-cache { <replaceable>address_match_list</replaceable> }; </optional>
4824 <optional> allow-query-cache-on { <replaceable>address_match_list</replaceable> }; </optional>
4825 <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
4826 <optional> allow-recursion { <replaceable>address_match_list</replaceable> }; </optional>
4827 <optional> allow-recursion-on { <replaceable>address_match_list</replaceable> }; </optional>
4828 <optional> allow-update { <replaceable>address_match_list</replaceable> }; </optional>
4829 <optional> allow-update-forwarding { <replaceable>address_match_list</replaceable> }; </optional>
4830 <optional> update-check-ksk <replaceable>yes_or_no</replaceable>; </optional>
4831 <optional> dnssec-update-mode ( <replaceable>maintain</replaceable> | <replaceable>no-resign</replaceable> ); </optional>
4832 <optional> dnssec-dnskey-kskonly <replaceable>yes_or_no</replaceable>; </optional>
4833 <optional> dnssec-loadkeys-interval <replaceable>number</replaceable>; </optional>
4834 <optional> dnssec-secure-to-insecure <replaceable>yes_or_no</replaceable> ;</optional>
4835 <optional> try-tcp-refresh <replaceable>yes_or_no</replaceable>; </optional>
4836 <optional> allow-v6-synthesis { <replaceable>address_match_list</replaceable> }; </optional>
4837 <optional> blackhole { <replaceable>address_match_list</replaceable> }; </optional>
4838 <optional> no-case-compress { <replaceable>address_match_list</replaceable> }; </optional>
4839 <optional> use-v4-udp-ports { <replaceable>port_list</replaceable> }; </optional>
4840 <optional> avoid-v4-udp-ports { <replaceable>port_list</replaceable> }; </optional>
4841 <optional> use-v6-udp-ports { <replaceable>port_list</replaceable> }; </optional>
4842 <optional> avoid-v6-udp-ports { <replaceable>port_list</replaceable> }; </optional>
4843 <optional> listen-on <optional> port <replaceable>ip_port</replaceable> </optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> { <replaceable>address_match_list</replaceable> }; </optional>
4844 <optional> listen-on-v6 <optional> port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional>
4845 { <replaceable>address_match_list</replaceable> }; </optional>
4846 <optional> query-source ( ( <replaceable>ip4_addr</replaceable> | <replaceable>*</replaceable> )
4847 <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional>
4848 <optional> dscp <replaceable>ip_dscp</replaceable></optional> |
4849 <optional> address ( <replaceable>ip4_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
4850 <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> )
4851 <optional> dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
4852 <optional> query-source-v6 ( ( <replaceable>ip6_addr</replaceable> | <replaceable>*</replaceable> )
4853 <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional>
4854 <optional> dscp <replaceable>ip_dscp</replaceable></optional> |
4855 <optional> address ( <replaceable>ip6_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
4856 <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> )
4857 <optional> dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
4858 <optional> use-queryport-pool <replaceable>yes_or_no</replaceable>; </optional>
4859 <optional> queryport-pool-ports <replaceable>number</replaceable>; </optional>
4860 <optional> queryport-pool-updateinterval <replaceable>number</replaceable>; </optional>
4861 <optional> max-transfer-time-in <replaceable>number</replaceable>; </optional>
4862 <optional> max-transfer-time-out <replaceable>number</replaceable>; </optional>
4863 <optional> max-transfer-idle-in <replaceable>number</replaceable>; </optional>
4864 <optional> max-transfer-idle-out <replaceable>number</replaceable>; </optional>
4865 <optional> tcp-clients <replaceable>number</replaceable>; </optional>
4866 <optional> reserved-sockets <replaceable>number</replaceable>; </optional>
4867 <optional> recursive-clients <replaceable>number</replaceable>; </optional>
4868 <optional> serial-query-rate <replaceable>number</replaceable>; </optional>
4869 <optional> serial-queries <replaceable>number</replaceable>; </optional>
4870 <optional> tcp-listen-queue <replaceable>number</replaceable>; </optional>
4871 <optional> transfer-format <replaceable>( one-answer | many-answers )</replaceable>; </optional>
4872 <optional> transfers-in <replaceable>number</replaceable>; </optional>
4873 <optional> transfers-out <replaceable>number</replaceable>; </optional>
4874 <optional> transfers-per-ns <replaceable>number</replaceable>; </optional>
4875 <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
4876 <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
4877 <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
4878 <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
4879 <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
4880 <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
4881 <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
4882 <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
4883 <optional> notify-to-soa <replaceable>yes_or_no</replaceable> ; </optional>
4884 <optional> also-notify { <replaceable>ip_addr</replaceable>
4885 <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> <optional>key <replaceable>keyname</replaceable></optional> ;
4886 <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> <optional>key <replaceable>keyname</replaceable></optional> ; ... </optional> }; </optional>
4887 <optional> max-ixfr-log-size <replaceable>number</replaceable>; </optional>
4888 <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
4889 <optional> coresize <replaceable>size_spec</replaceable> ; </optional>
4890 <optional> datasize <replaceable>size_spec</replaceable> ; </optional>
4891 <optional> files <replaceable>size_spec</replaceable> ; </optional>
4892 <optional> stacksize <replaceable>size_spec</replaceable> ; </optional>
4893 <optional> cleaning-interval <replaceable>number</replaceable>; </optional>
4894 <optional> heartbeat-interval <replaceable>number</replaceable>; </optional>
4895 <optional> interface-interval <replaceable>number</replaceable>; </optional>
4896 <optional> statistics-interval <replaceable>number</replaceable>; </optional>
4897 <optional> topology { <replaceable>address_match_list</replaceable> }</optional>;
4898 <optional> sortlist { <replaceable>address_match_list</replaceable> }</optional>;
4899 <optional> rrset-order { <replaceable>order_spec</replaceable> ; <optional> <replaceable>order_spec</replaceable> ; ... </optional> </optional> };
4900 <optional> lame-ttl <replaceable>number</replaceable>; </optional>
4901 <optional> max-ncache-ttl <replaceable>number</replaceable>; </optional>
4902 <optional> max-cache-ttl <replaceable>number</replaceable>; </optional>
4903 <optional> max-zone-ttl <replaceable>number</replaceable> ; </optional>
4904 <optional> sig-validity-interval <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
4905 <optional> sig-signing-nodes <replaceable>number</replaceable> ; </optional>
4906 <optional> sig-signing-signatures <replaceable>number</replaceable> ; </optional>
4907 <optional> sig-signing-type <replaceable>number</replaceable> ; </optional>
4908 <optional> min-roots <replaceable>number</replaceable>; </optional>
4909 <optional> use-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
4910 <optional> provide-ixfr <replaceable>yes_or_no</replaceable>; </optional>
4911 <optional> request-ixfr <replaceable>yes_or_no</replaceable>; </optional>
4912 <optional> treat-cr-as-space <replaceable>yes_or_no</replaceable> ; </optional>
4913 <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
4914 <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
4915 <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
4916 <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
4917 <optional> port <replaceable>ip_port</replaceable>; </optional>
4918 <optional> dscp <replaceable>ip_dscp</replaceable></optional> ;
4919 <optional> additional-from-auth <replaceable>yes_or_no</replaceable> ; </optional>
4920 <optional> additional-from-cache <replaceable>yes_or_no</replaceable> ; </optional>
4921 <optional> random-device <replaceable>path_name</replaceable> ; </optional>
4922 <optional> max-cache-size <replaceable>size_spec</replaceable> ; </optional>
4923 <optional> match-mapped-addresses <replaceable>yes_or_no</replaceable>; </optional>
4924 <optional> filter-aaaa-on-v4 ( <replaceable>yes_or_no</replaceable> | <replaceable>break-dnssec</replaceable> ); </optional>
4925 <optional> filter-aaaa-on-v6 ( <replaceable>yes_or_no</replaceable> | <replaceable>break-dnssec</replaceable> ); </optional>
4926 <optional> filter-aaaa { <replaceable>address_match_list</replaceable> }; </optional>
4927 <optional> dns64 <replaceable>ipv6-prefix</replaceable> {
4928 <optional> clients { <replaceable>address_match_list</replaceable> }; </optional>
4929 <optional> mapped { <replaceable>address_match_list</replaceable> }; </optional>
4930 <optional> exclude { <replaceable>address_match_list</replaceable> }; </optional>
4931 <optional> suffix IPv6-address; </optional>
4932 <optional> recursive-only <replaceable>yes_or_no</replaceable>; </optional>
4933 <optional> break-dnssec <replaceable>yes_or_no</replaceable>; </optional>
4935 <optional> dns64-server <replaceable>name</replaceable> </optional>
4936 <optional> dns64-contact <replaceable>name</replaceable> </optional>
4937 <optional> preferred-glue ( <replaceable>A</replaceable> | <replaceable>AAAA</replaceable> | <replaceable>NONE</replaceable> ); </optional>
4938 <optional> edns-udp-size <replaceable>number</replaceable>; </optional>
4939 <optional> max-udp-size <replaceable>number</replaceable>; </optional>
4940 <optional> max-rsa-exponent-size <replaceable>number</replaceable>; </optional>
4941 <optional> root-delegation-only <optional> exclude { <replaceable>namelist</replaceable> } </optional> ; </optional>
4942 <optional> querylog <replaceable>yes_or_no</replaceable> ; </optional>
4943 <optional> disable-algorithms <replaceable>domain</replaceable> { <replaceable>algorithm</replaceable>;
4944 <optional> <replaceable>algorithm</replaceable>; </optional> }; </optional>
4945 <optional> disable-ds-digests <replaceable>domain</replaceable> { <replaceable>digest_type</replaceable>;
4946 <optional> <replaceable>digest_type</replaceable>; </optional> }; </optional>
4947 <optional> acache-enable <replaceable>yes_or_no</replaceable> ; </optional>
4948 <optional> acache-cleaning-interval <replaceable>number</replaceable>; </optional>
4949 <optional> max-acache-size <replaceable>size_spec</replaceable> ; </optional>
4950 <optional> clients-per-query <replaceable>number</replaceable> ; </optional>
4951 <optional> max-clients-per-query <replaceable>number</replaceable> ; </optional>
4952 <optional> max-recursion-depth <replaceable>number</replaceable> ; </optional>
4953 <optional> max-recursion-queries <replaceable>number</replaceable> ; </optional>
4954 <optional> masterfile-format
4955 (<constant>text</constant>|<constant>raw</constant>|<constant>map</constant>) ; </optional>
4956 <optional> empty-server <replaceable>name</replaceable> ; </optional>
4957 <optional> empty-contact <replaceable>name</replaceable> ; </optional>
4958 <optional> empty-zones-enable <replaceable>yes_or_no</replaceable> ; </optional>
4959 <optional> disable-empty-zone <replaceable>zone_name</replaceable> ; </optional>
4960 <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
4961 <optional> zero-no-soa-ttl-cache <replaceable>yes_or_no</replaceable> ; </optional>
4962 <optional> resolver-query-timeout <replaceable>number</replaceable> ; </optional>
4963 <optional> deny-answer-addresses { <replaceable>address_match_list</replaceable> } <optional> except-from { <replaceable>namelist</replaceable> } </optional>;</optional>
4964 <optional> deny-answer-aliases { <replaceable>namelist</replaceable> } <optional> except-from { <replaceable>namelist</replaceable> } </optional>;</optional>
4965 <optional> prefetch <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
4967 <optional> rate-limit {
4968 <optional> responses-per-second <replaceable>number</replaceable> ; </optional>
4969 <optional> referrals-per-second <replaceable>number</replaceable> ; </optional>
4970 <optional> nodata-per-second <replaceable>number</replaceable> ; </optional>
4971 <optional> nxdomains-per-second <replaceable>number</replaceable> ; </optional>
4972 <optional> errors-per-second <replaceable>number</replaceable> ; </optional>
4973 <optional> all-per-second <replaceable>number</replaceable> ; </optional>
4974 <optional> window <replaceable>number</replaceable> ; </optional>
4975 <optional> log-only <replaceable>yes_or_no</replaceable> ; </optional>
4976 <optional> qps-scale <replaceable>number</replaceable> ; </optional>
4977 <optional> ipv4-prefix-length <replaceable>number</replaceable> ; </optional>
4978 <optional> ipv6-prefix-length <replaceable>number</replaceable> ; </optional>
4979 <optional> slip <replaceable>number</replaceable> ; </optional>
4980 <optional> exempt-clients { <replaceable>address_match_list</replaceable> } ; </optional>
4981 <optional> max-table-size <replaceable>number</replaceable> ; </optional>
4982 <optional> min-table-size <replaceable>number</replaceable> ; </optional>
4984 <optional> response-policy {
4985 zone <replaceable>zone_name</replaceable>
4986 <optional> policy <replaceable>(given | disabled | passthru | drop |
4987 nxdomain | nodata | cname domain</replaceable>) </optional>
4988 <optional> recursive-only <replaceable>yes_or_no</replaceable> </optional>
4989 <optional> max-policy-ttl <replaceable>number</replaceable> </optional>
4990 ; <optional>...</optional>
4991 } <optional> recursive-only <replaceable>yes_or_no</replaceable> </optional>
4992 <optional> max-policy-ttl <replaceable>number</replaceable> </optional>
4993 <optional> break-dnssec <replaceable>yes_or_no</replaceable> </optional>
4994 <optional> min-ns-dots <replaceable>number</replaceable> </optional>
4995 <optional> qname-wait-recurse <replaceable>yes_or_no</replaceable> </optional>
5002 <sect2 id="options">
5003 <title><command>options</command> Statement Definition and
5007 The <command>options</command> statement sets up global
5009 to be used by <acronym>BIND</acronym>. This statement
5011 once in a configuration file. If there is no <command>options</command>
5012 statement, an options block with each option set to its default will
5019 <term><command>attach-cache</command></term>
5022 Allows multiple views to share a single cache
5024 Each view has its own cache database by default, but
5025 if multiple views have the same operational policy
5026 for name resolution and caching, those views can
5027 share a single cache to save memory and possibly
5028 improve resolution efficiency by using this option.
5032 The <command>attach-cache</command> option
5033 may also be specified in <command>view</command>
5034 statements, in which case it overrides the
5035 global <command>attach-cache</command> option.
5039 The <replaceable>cache_name</replaceable> specifies
5040 the cache to be shared.
5041 When the <command>named</command> server configures
5042 views which are supposed to share a cache, it
5043 creates a cache with the specified name for the
5044 first view of these sharing views.
5045 The rest of the views will simply refer to the
5046 already created cache.
5050 One common configuration to share a cache would be to
5051 allow all views to share a single cache.
5052 This can be done by specifying
5053 the <command>attach-cache</command> as a global
5054 option with an arbitrary name.
5058 Another possible operation is to allow a subset of
5059 all views to share a cache while the others to
5060 retain their own caches.
5061 For example, if there are three views A, B, and C,
5062 and only A and B should share a cache, specify the
5063 <command>attach-cache</command> option as a view A (or
5064 B)'s option, referring to the other view name:
5069 // this view has its own cache
5073 // this view refers to A's cache
5077 // this view has its own cache
5083 Views that share a cache must have the same policy
5084 on configurable parameters that may affect caching.
5085 The current implementation requires the following
5086 configurable options be consistent among these
5088 <command>check-names</command>,
5089 <command>cleaning-interval</command>,
5090 <command>dnssec-accept-expired</command>,
5091 <command>dnssec-validation</command>,
5092 <command>max-cache-ttl</command>,
5093 <command>max-ncache-ttl</command>,
5094 <command>max-cache-size</command>, and
5095 <command>zero-no-soa-ttl</command>.
5099 Note that there may be other parameters that may
5100 cause confusion if they are inconsistent for
5101 different views that share a single cache.
5102 For example, if these views define different sets of
5103 forwarders that can return different answers for the
5104 same question, sharing the answer does not make
5105 sense or could even be harmful.
5106 It is administrator's responsibility to ensure
5107 configuration differences in different views do
5108 not cause disruption with a shared cache.
5115 <term><command>directory</command></term>
5118 The working directory of the server.
5119 Any non-absolute pathnames in the configuration file will be
5121 as relative to this directory. The default location for most
5123 output files (e.g. <filename>named.run</filename>)
5125 If a directory is not specified, the working directory
5126 defaults to `<filename>.</filename>', the directory from
5128 was started. The directory specified should be an absolute
5135 <term><command>geoip-directory</command></term>
5138 Specifies the directory containing GeoIP
5139 <filename>.dat</filename> database files for GeoIP
5140 initialization. By default, this option is unset
5141 and the GeoIP support will use libGeoIP's
5143 (For details, see <xref linkend="acl"/> about the
5144 <command>geoip</command> ACL.)
5150 <term><command>key-directory</command></term>
5153 When performing dynamic update of secure zones, the
5154 directory where the public and private DNSSEC key files
5155 should be found, if different than the current working
5156 directory. (Note that this option has no effect on the
5157 paths for files containing non-DNSSEC keys such as
5158 <filename>bind.keys</filename>,
5159 <filename>rndc.key</filename> or
5160 <filename>session.key</filename>.)
5166 <term><command>managed-keys-directory</command></term>
5169 Specifies the directory in which to store the files that
5170 track managed DNSSEC keys. By default, this is the working
5174 If <command>named</command> is not configured to use views,
5175 then managed keys for the server will be tracked in a single
5176 file called <filename>managed-keys.bind</filename>.
5177 Otherwise, managed keys will be tracked in separate files,
5178 one file per view; each file name will be the SHA256 hash
5179 of the view name, followed by the extension
5180 <filename>.mkeys</filename>.
5186 <term><command>named-xfer</command></term>
5189 <emphasis>This option is obsolete.</emphasis> It
5190 was used in <acronym>BIND</acronym> 8 to specify
5191 the pathname to the <command>named-xfer</command>
5192 program. In <acronym>BIND</acronym> 9, no separate
5193 <command>named-xfer</command> program is needed;
5194 its functionality is built into the name server.
5200 <term><command>tkey-gssapi-keytab</command></term>
5203 The KRB5 keytab file to use for GSS-TSIG updates. If
5204 this option is set and tkey-gssapi-credential is not
5205 set, then updates will be allowed with any key
5206 matching a principal in the specified keytab.
5212 <term><command>tkey-gssapi-credential</command></term>
5215 The security credential with which the server should
5216 authenticate keys requested by the GSS-TSIG protocol.
5217 Currently only Kerberos 5 authentication is available
5218 and the credential is a Kerberos principal which the
5219 server can acquire through the default system key
5220 file, normally <filename>/etc/krb5.keytab</filename>.
5221 The location keytab file can be overridden using the
5222 tkey-gssapi-keytab option. Normally this principal is
5223 of the form "<userinput>DNS/</userinput><varname>server.domain</varname>".
5224 To use GSS-TSIG, <command>tkey-domain</command> must
5225 also be set if a specific keytab is not set with
5232 <term><command>tkey-domain</command></term>
5235 The domain appended to the names of all shared keys
5236 generated with <command>TKEY</command>. When a
5237 client requests a <command>TKEY</command> exchange,
5238 it may or may not specify the desired name for the
5239 key. If present, the name of the shared key will
5240 be <varname>client specified part</varname> +
5241 <varname>tkey-domain</varname>. Otherwise, the
5242 name of the shared key will be <varname>random hex
5243 digits</varname> + <varname>tkey-domain</varname>.
5244 In most cases, the <command>domainname</command>
5245 should be the server's domain name, or an otherwise
5246 non-existent subdomain like
5247 "_tkey.<varname>domainname</varname>". If you are
5248 using GSS-TSIG, this variable must be defined, unless
5249 you specify a specific keytab using tkey-gssapi-keytab.
5255 <term><command>tkey-dhkey</command></term>
5258 The Diffie-Hellman key used by the server
5259 to generate shared keys with clients using the Diffie-Hellman
5261 of <command>TKEY</command>. The server must be
5263 public and private keys from files in the working directory.
5265 most cases, the keyname should be the server's host name.
5271 <term><command>cache-file</command></term>
5274 This is for testing only. Do not use.
5280 <term><command>dump-file</command></term>
5283 The pathname of the file the server dumps
5284 the database to when instructed to do so with
5285 <command>rndc dumpdb</command>.
5286 If not specified, the default is <filename>named_dump.db</filename>.
5292 <term><command>memstatistics-file</command></term>
5295 The pathname of the file the server writes memory
5296 usage statistics to on exit. If not specified,
5297 the default is <filename>named.memstats</filename>.
5303 <term><command>pid-file</command></term>
5306 The pathname of the file the server writes its process ID
5307 in. If not specified, the default is
5308 <filename>/var/run/named/named.pid</filename>.
5309 The PID file is used by programs that want to send signals to
5311 name server. Specifying <command>pid-file none</command> disables the
5312 use of a PID file — no file will be written and any
5313 existing one will be removed. Note that <command>none</command>
5314 is a keyword, not a filename, and therefore is not enclosed
5322 <term><command>recursing-file</command></term>
5325 The pathname of the file the server dumps
5326 the queries that are currently recursing when instructed
5327 to do so with <command>rndc recursing</command>.
5328 If not specified, the default is <filename>named.recursing</filename>.
5334 <term><command>statistics-file</command></term>
5337 The pathname of the file the server appends statistics
5338 to when instructed to do so using <command>rndc stats</command>.
5339 If not specified, the default is <filename>named.stats</filename> in the
5340 server's current directory. The format of the file is
5342 in <xref linkend="statsfile"/>.
5348 <term><command>bindkeys-file</command></term>
5351 The pathname of a file to override the built-in trusted
5352 keys provided by <command>named</command>.
5353 See the discussion of <command>dnssec-lookaside</command>
5354 and <command>dnssec-validation</command> for details.
5355 If not specified, the default is
5356 <filename>/etc/bind.keys</filename>.
5362 <term><command>secroots-file</command></term>
5365 The pathname of the file the server dumps
5366 security roots to when instructed to do so with
5367 <command>rndc secroots</command>.
5368 If not specified, the default is
5369 <filename>named.secroots</filename>.
5375 <term><command>session-keyfile</command></term>
5378 The pathname of the file into which to write a TSIG
5379 session key generated by <command>named</command> for use by
5380 <command>nsupdate -l</command>. If not specified, the
5381 default is <filename>/var/run/named/session.key</filename>.
5382 (See <xref linkend="dynamic_update_policies"/>, and in
5383 particular the discussion of the
5384 <command>update-policy</command> statement's
5385 <userinput>local</userinput> option for more
5386 information about this feature.)
5392 <term><command>session-keyname</command></term>
5395 The key name to use for the TSIG session key.
5396 If not specified, the default is "local-ddns".
5402 <term><command>session-keyalg</command></term>
5405 The algorithm to use for the TSIG session key.
5406 Valid values are hmac-sha1, hmac-sha224, hmac-sha256,
5407 hmac-sha384, hmac-sha512 and hmac-md5. If not
5408 specified, the default is hmac-sha256.
5414 <term><command>port</command></term>
5417 The UDP/TCP port number the server uses for
5418 receiving and sending DNS protocol traffic.
5419 The default is 53. This option is mainly intended for server
5421 a server using a port other than 53 will not be able to
5429 <term><command>dscp</command></term>
5432 The global Differentiated Services Code Point (DSCP)
5433 value to classify outgoing DNS traffic on operating
5434 systems that support DSCP. Valid values are 0 through 63.
5435 It is not configured by default.
5441 <term><command>random-device</command></term>
5444 The source of entropy to be used by the server. Entropy is
5446 for DNSSEC operations, such as TKEY transactions and dynamic
5448 zones. This options specifies the device (or file) from which
5450 entropy. If this is a file, operations requiring entropy will
5452 file has been exhausted. If not specified, the default value
5454 <filename>/dev/random</filename>
5455 (or equivalent) when present, and none otherwise. The
5456 <command>random-device</command> option takes
5458 the initial configuration load at server startup time and
5459 is ignored on subsequent reloads.
5465 <term><command>preferred-glue</command></term>
5468 If specified, the listed type (A or AAAA) will be emitted
5470 in the additional section of a query response.
5471 The default is not to prefer any type (NONE).
5476 <varlistentry id="root_delegation_only">
5477 <term><command>root-delegation-only</command></term>
5480 Turn on enforcement of delegation-only in TLDs
5481 (top level domains) and root zones with an optional
5485 DS queries are expected to be made to and be answered by
5486 delegation only zones. Such queries and responses are
5487 treated as an exception to delegation-only processing
5488 and are not converted to NXDOMAIN responses provided
5489 a CNAME is not discovered at the query name.
5492 If a delegation only zone server also serves a child
5493 zone it is not always possible to determine whether
5494 an answer comes from the delegation only zone or the
5495 child zone. SOA NS and DNSKEY records are apex
5496 only records and a matching response that contains
5497 these records or DS is treated as coming from a
5498 child zone. RRSIG records are also examined to see
5499 if they are signed by a child zone or not. The
5500 authority section is also examined to see if there
5501 is evidence that the answer is from the child zone.
5502 Answers that are determined to be from a child zone
5503 are not converted to NXDOMAIN responses. Despite
5504 all these checks there is still a possibility of
5505 false negatives when a child zone is being served.
5508 Similarly false positives can arise from empty nodes
5509 (no records at the name) in the delegation only zone
5510 when the query type is not ANY.
5513 Note some TLDs are not delegation only (e.g. "DE", "LV",
5514 "US" and "MUSEUM"). This list is not exhaustive.
5519 root-delegation-only exclude { "de"; "lv"; "us"; "museum"; };
5527 <term><command>disable-algorithms</command></term>
5530 Disable the specified DNSSEC algorithms at and below the
5532 Multiple <command>disable-algorithms</command>
5533 statements are allowed.
5534 Only the best match <command>disable-algorithms</command>
5535 clause will be used to determine which algorithms are used.
5538 If all supported algorithms are disabled, the zones covered
5539 by the <command>disable-algorithms</command> will be treated
5546 <term><command>disable-ds-digests</command></term>
5549 Disable the specified DS/DLV digest types at and below the
5551 Multiple <command>disable-ds-digests</command>
5552 statements are allowed.
5553 Only the best match <command>disable-ds-digests</command>
5554 clause will be used to determine which digest types are used.
5557 If all supported digest types are disabled, the zones covered
5558 by the <command>disable-ds-digests</command> will be treated
5565 <term><command>dnssec-lookaside</command></term>
5568 When set, <command>dnssec-lookaside</command> provides the
5569 validator with an alternate method to validate DNSKEY
5570 records at the top of a zone. When a DNSKEY is at or
5571 below a domain specified by the deepest
5572 <command>dnssec-lookaside</command>, and the normal DNSSEC
5573 validation has left the key untrusted, the trust-anchor
5574 will be appended to the key name and a DLV record will be
5575 looked up to see if it can validate the key. If the DLV
5576 record validates a DNSKEY (similarly to the way a DS
5577 record does) the DNSKEY RRset is deemed to be trusted.
5580 If <command>dnssec-lookaside</command> is set to
5581 <userinput>auto</userinput>, then built-in default
5582 values for the DLV domain and trust anchor will be
5583 used, along with a built-in key for validation.
5586 If <command>dnssec-lookaside</command> is set to
5587 <userinput>no</userinput>, then dnssec-lookaside
5591 The default DLV key is stored in the file
5592 <filename>bind.keys</filename>;
5593 <command>named</command> will load that key at
5594 startup if <command>dnssec-lookaside</command> is set to
5595 <constant>auto</constant>. A copy of the file is
5596 installed along with <acronym>BIND</acronym> 9, and is
5597 current as of the release date. If the DLV key expires, a
5598 new copy of <filename>bind.keys</filename> can be downloaded
5599 from <ulink url="https://www.isc.org/solutions/dlv/"
5600 >https://www.isc.org/solutions/dlv/</ulink>.
5603 (To prevent problems if <filename>bind.keys</filename> is
5604 not found, the current key is also compiled in to
5605 <command>named</command>. Relying on this is not
5606 recommended, however, as it requires <command>named</command>
5607 to be recompiled with a new key when the DLV key expires.)
5610 NOTE: <command>named</command> only loads certain specific
5611 keys from <filename>bind.keys</filename>: those for the
5612 DLV zone and for the DNS root zone. The file cannot be
5613 used to store keys for other zones.
5619 <term><command>dnssec-must-be-secure</command></term>
5622 Specify hierarchies which must be or may not be secure
5623 (signed and validated). If <userinput>yes</userinput>,
5624 then <command>named</command> will only accept answers if
5625 they are secure. If <userinput>no</userinput>, then normal
5626 DNSSEC validation applies allowing for insecure answers to
5627 be accepted. The specified domain must be under a
5628 <command>trusted-keys</command> or
5629 <command>managed-keys</command> statement, or
5630 <command>dnssec-lookaside</command> must be active.
5636 <term><command>dns64</command></term>
5639 This directive instructs <command>named</command> to
5640 return mapped IPv4 addresses to AAAA queries when
5641 there are no AAAA records. It is intended to be
5642 used in conjunction with a NAT64. Each
5643 <command>dns64</command> defines one DNS64 prefix.
5644 Multiple DNS64 prefixes can be defined.
5647 Compatible IPv6 prefixes have lengths of 32, 40, 48, 56,
5648 64 and 96 as per RFC 6052.
5651 Additionally a reverse IP6.ARPA zone will be created for
5652 the prefix to provide a mapping from the IP6.ARPA names
5653 to the corresponding IN-ADDR.ARPA names using synthesized
5654 CNAMEs. <command>dns64-server</command> and
5655 <command>dns64-contact</command> can be used to specify
5656 the name of the server and contact for the zones. These
5657 are settable at the view / options level. These are
5658 not settable on a per-prefix basis.
5661 Each <command>dns64</command> supports an optional
5662 <command>clients</command> ACL that determines which
5663 clients are affected by this directive. If not defined,
5664 it defaults to <userinput>any;</userinput>.
5667 Each <command>dns64</command> supports an optional
5668 <command>mapped</command> ACL that selects which
5669 IPv4 addresses are to be mapped in the corresponding
5670 A RRset. If not defined it defaults to
5671 <userinput>any;</userinput>.
5674 Normally, DNS64 won't apply to a domain name that
5675 owns one or more AAAA records; these records will
5676 simply be returned. The optional
5677 <command>exclude</command> ACL allows specification
5678 of a list of IPv6 addresses that will be ignored
5679 if they appear in a domain name's AAAA records, and
5680 DNS64 will be applied to any A records the domain
5681 name owns. If not defined, <command>exclude</command>
5685 A optional <command>suffix</command> can also
5686 be defined to set the bits trailing the mapped
5687 IPv4 address bits. By default these bits are
5688 set to <userinput>::</userinput>. The bits
5689 matching the prefix and mapped IPv4 address
5693 If <command>recursive-only</command> is set to
5694 <command>yes</command> the DNS64 synthesis will
5695 only happen for recursive queries. The default
5696 is <command>no</command>.
5699 If <command>break-dnssec</command> is set to
5700 <command>yes</command> the DNS64 synthesis will
5701 happen even if the result, if validated, would
5702 cause a DNSSEC validation failure. If this option
5703 is set to <command>no</command> (the default), the DO
5704 is set on the incoming query, and there are RRSIGs on
5705 the applicable records, then synthesis will not happen.
5708 acl rfc1918 { 10/8; 192.168/16; 172.16/12; };
5710 dns64 64:FF9B::/96 {
5712 mapped { !rfc1918; any; };
5713 exclude { 64:FF9B::/96; ::ffff:0000:0000/96; };
5721 <term><command>dnssec-update-mode</command></term>
5724 If this option is set to its default value of
5725 <literal>maintain</literal> in a zone of type
5726 <literal>master</literal> which is DNSSEC-signed
5727 and configured to allow dynamic updates (see
5728 <xref linkend="dynamic_update_policies"/>), and
5729 if <command>named</command> has access to the
5730 private signing key(s) for the zone, then
5731 <command>named</command> will automatically sign all new
5732 or changed records and maintain signatures for the zone
5733 by regenerating RRSIG records whenever they approach
5734 their expiration date.
5737 If the option is changed to <literal>no-resign</literal>,
5738 then <command>named</command> will sign all new or
5739 changed records, but scheduled maintenance of
5740 signatures is disabled.
5743 With either of these settings, <command>named</command>
5744 will reject updates to a DNSSEC-signed zone when the
5745 signing keys are inactive or unavailable to
5746 <command>named</command>. (A planned third option,
5747 <literal>external</literal>, will disable all automatic
5748 signing and allow DNSSEC data to be submitted into a zone
5749 via dynamic update; this is not yet implemented.)
5755 <term><command>max-zone-ttl</command></term>
5758 Specifies a maximum permissible TTL value.
5759 When loading a zone file using a
5760 <option>masterfile-format</option> of
5761 <constant>text</constant> or <constant>raw</constant>,
5762 any record encountered with a TTL higher than
5763 <option>max-zone-ttl</option> will cause the zone to
5767 This is useful in DNSSEC-signed zones because when
5768 rolling to a new DNSKEY, the old key needs to remain
5769 available until RRSIG records have expired from
5770 caches. The<option>max-zone-ttl</option> option guarantees
5771 that the largest TTL in the zone will be no higher
5775 (NOTE: Because <constant>map</constant>-format files
5776 load directly into memory, this option cannot be
5783 <term><command>zone-statistics</command></term>
5786 If <userinput>full</userinput>, the server will collect
5787 statistical data on all zones (unless specifically
5788 turned off on a per-zone basis by specifying
5789 <command>zone-statistics terse</command> or
5790 <command>zone-statistics none</command>
5791 in the <command>zone</command> statement).
5792 The default is <userinput>terse</userinput>, providing
5793 minimal statistics on zones (including name and
5794 current serial number, but not query type
5798 These statistics may be accessed via the
5799 <command>statistics-channel</command> or
5800 using <command>rndc stats</command>, which
5801 will dump them to the file listed
5802 in the <command>statistics-file</command>. See
5803 also <xref linkend="statsfile"/>.
5806 For backward compatibility with earlier versions
5807 of BIND 9, the <command>zone-statistics</command>
5808 option can also accept <userinput>yes</userinput>
5809 or <userinput>no</userinput>; <userinput>yes</userinput>
5810 has the same meaning as <userinput>full</userinput>.
5811 As of <acronym>BIND</acronym> 9.10,
5812 <userinput>no</userinput> has the same meaning
5813 as <userinput>none</userinput>; previously, it
5814 was the same as <userinput>terse</userinput>.
5820 <sect3 id="boolean_options">
5821 <title>Boolean Options</title>
5826 <term><command>automatic-interface-scan</command></term>
5829 If <userinput>yes</userinput> and supported by the OS,
5830 automatically rescan network interfaces when the interface
5831 addresses are added or removed. The default is
5832 <userinput>yes</userinput>.
5835 Currently the OS needs to support routing sockets for
5836 <command>automatic-interface-scan</command> to be
5843 <term><command>allow-new-zones</command></term>
5846 If <userinput>yes</userinput>, then zones can be
5847 added at runtime via <command>rndc addzone</command>
5848 or deleted via <command>rndc delzone</command>.
5849 The default is <userinput>no</userinput>.
5855 <term><command>auth-nxdomain</command></term>
5858 If <userinput>yes</userinput>, then the <command>AA</command> bit
5859 is always set on NXDOMAIN responses, even if the server is
5861 authoritative. The default is <userinput>no</userinput>;
5863 a change from <acronym>BIND</acronym> 8. If you
5864 are using very old DNS software, you
5865 may need to set it to <userinput>yes</userinput>.
5871 <term><command>deallocate-on-exit</command></term>
5874 This option was used in <acronym>BIND</acronym>
5875 8 to enable checking
5876 for memory leaks on exit. <acronym>BIND</acronym> 9 ignores the option and always performs
5883 <term><command>memstatistics</command></term>
5886 Write memory statistics to the file specified by
5887 <command>memstatistics-file</command> at exit.
5888 The default is <userinput>no</userinput> unless
5889 '-m record' is specified on the command line in
5890 which case it is <userinput>yes</userinput>.
5896 <term><command>dialup</command></term>
5899 If <userinput>yes</userinput>, then the
5900 server treats all zones as if they are doing zone transfers
5902 a dial-on-demand dialup link, which can be brought up by
5904 originating from this server. This has different effects
5906 to zone type and concentrates the zone maintenance so that
5908 happens in a short interval, once every <command>heartbeat-interval</command> and
5909 hopefully during the one call. It also suppresses some of
5911 zone maintenance traffic. The default is <userinput>no</userinput>.
5914 The <command>dialup</command> option
5915 may also be specified in the <command>view</command> and
5916 <command>zone</command> statements,
5917 in which case it overrides the global <command>dialup</command>
5921 If the zone is a master zone, then the server will send out a
5923 request to all the slaves (default). This should trigger the
5925 number check in the slave (providing it supports NOTIFY)
5927 to verify the zone while the connection is active.
5928 The set of servers to which NOTIFY is sent can be controlled
5930 <command>notify</command> and <command>also-notify</command>.
5934 zone is a slave or stub zone, then the server will suppress
5936 "zone up to date" (refresh) queries and only perform them
5938 <command>heartbeat-interval</command> expires in
5943 Finer control can be achieved by using
5944 <userinput>notify</userinput> which only sends NOTIFY
5946 <userinput>notify-passive</userinput> which sends NOTIFY
5948 suppresses the normal refresh queries, <userinput>refresh</userinput>
5949 which suppresses normal refresh processing and sends refresh
5951 when the <command>heartbeat-interval</command>
5953 <userinput>passive</userinput> which just disables normal
5958 <informaltable colsep="0" rowsep="0">
5959 <tgroup cols="4" colsep="0" rowsep="0" tgroupstyle="4Level-table">
5960 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
5961 <colspec colname="2" colnum="2" colsep="0" colwidth="1.150in"/>
5962 <colspec colname="3" colnum="3" colsep="0" colwidth="1.150in"/>
5963 <colspec colname="4" colnum="4" colsep="0" colwidth="1.150in"/>
5989 <para><command>no</command> (default)</para>
6009 <para><command>yes</command></para>
6029 <para><command>notify</command></para>
6049 <para><command>refresh</command></para>
6069 <para><command>passive</command></para>
6089 <para><command>notify-passive</command></para>
6112 Note that normal NOTIFY processing is not affected by
6113 <command>dialup</command>.
6120 <term><command>fake-iquery</command></term>
6123 In <acronym>BIND</acronym> 8, this option
6124 enabled simulating the obsolete DNS query type
6125 IQUERY. <acronym>BIND</acronym> 9 never does
6132 <term><command>fetch-glue</command></term>
6135 This option is obsolete.
6136 In BIND 8, <userinput>fetch-glue yes</userinput>
6137 caused the server to attempt to fetch glue resource records
6139 didn't have when constructing the additional
6140 data section of a response. This is now considered a bad
6142 and BIND 9 never does it.
6148 <term><command>flush-zones-on-shutdown</command></term>
6151 When the nameserver exits due receiving SIGTERM,
6152 flush or do not flush any pending zone writes. The default
6154 <command>flush-zones-on-shutdown</command> <userinput>no</userinput>.
6160 <term><command>has-old-clients</command></term>
6163 This option was incorrectly implemented
6164 in <acronym>BIND</acronym> 8, and is ignored by <acronym>BIND</acronym> 9.
6165 To achieve the intended effect
6167 <command>has-old-clients</command> <userinput>yes</userinput>, specify
6168 the two separate options <command>auth-nxdomain</command> <userinput>yes</userinput>
6169 and <command>rfc2308-type1</command> <userinput>no</userinput> instead.
6175 <term><command>host-statistics</command></term>
6178 In BIND 8, this enables keeping of
6179 statistics for every host that the name server interacts
6181 Not implemented in BIND 9.
6187 <term><command>maintain-ixfr-base</command></term>
6190 <emphasis>This option is obsolete</emphasis>.
6191 It was used in <acronym>BIND</acronym> 8 to
6192 determine whether a transaction log was
6193 kept for Incremental Zone Transfer. <acronym>BIND</acronym> 9 maintains a transaction
6194 log whenever possible. If you need to disable outgoing
6196 transfers, use <command>provide-ixfr</command> <userinput>no</userinput>.
6202 <term><command>minimal-responses</command></term>
6205 If <userinput>yes</userinput>, then when generating
6206 responses the server will only add records to the authority
6207 and additional data sections when they are required (e.g.
6208 delegations, negative responses). This may improve the
6209 performance of the server.
6210 The default is <userinput>no</userinput>.
6216 <term><command>multiple-cnames</command></term>
6219 This option was used in <acronym>BIND</acronym> 8 to allow
6220 a domain name to have multiple CNAME records in violation of
6221 the DNS standards. <acronym>BIND</acronym> 9.2 onwards
6222 always strictly enforces the CNAME rules both in master
6223 files and dynamic updates.
6229 <term><command>notify</command></term>
6232 If <userinput>yes</userinput> (the default),
6233 DNS NOTIFY messages are sent when a zone the server is
6235 changes, see <xref linkend="notify"/>. The messages are
6237 servers listed in the zone's NS records (except the master
6239 in the SOA MNAME field), and to any servers listed in the
6240 <command>also-notify</command> option.
6243 If <userinput>master-only</userinput>, notifies are only
6246 If <userinput>explicit</userinput>, notifies are sent only
6248 servers explicitly listed using <command>also-notify</command>.
6249 If <userinput>no</userinput>, no notifies are sent.
6252 The <command>notify</command> option may also be
6253 specified in the <command>zone</command>
6255 in which case it overrides the <command>options notify</command> statement.
6256 It would only be necessary to turn off this option if it
6264 <term><command>notify-to-soa</command></term>
6267 If <userinput>yes</userinput> do not check the nameservers
6268 in the NS RRset against the SOA MNAME. Normally a NOTIFY
6269 message is not sent to the SOA MNAME (SOA ORIGIN) as it is
6270 supposed to contain the name of the ultimate master.
6271 Sometimes, however, a slave is listed as the SOA MNAME in
6272 hidden master configurations and in that case you would
6273 want the ultimate master to still send NOTIFY messages to
6274 all the nameservers listed in the NS RRset.
6280 <term><command>recursion</command></term>
6283 If <userinput>yes</userinput>, and a
6284 DNS query requests recursion, then the server will attempt
6286 all the work required to answer the query. If recursion is
6288 and the server does not already know the answer, it will
6290 referral response. The default is
6291 <userinput>yes</userinput>.
6292 Note that setting <command>recursion no</command> does not prevent
6293 clients from getting data from the server's cache; it only
6294 prevents new data from being cached as an effect of client
6296 Caching may still occur as an effect the server's internal
6297 operation, such as NOTIFY address lookups.
6298 See also <command>fetch-glue</command> above.
6304 <term><command>request-nsid</command></term>
6307 If <userinput>yes</userinput>, then an empty EDNS(0)
6308 NSID (Name Server Identifier) option is sent with all
6309 queries to authoritative name servers during iterative
6310 resolution. If the authoritative server returns an NSID
6311 option in its response, then its contents are logged in
6312 the <command>resolver</command> category at level
6313 <command>info</command>.
6314 The default is <userinput>no</userinput>.
6320 <term><command>request-sit</command></term>
6323 If <userinput>yes</userinput>, then a SIT (Source
6324 Identity Token) EDNS option is sent along with
6325 the query. If the resolver has previously talked
6326 to the server, the SIT returned in the previous
6327 transaction is sent. This is used by the server
6328 to determine whether the resolver has talked to
6329 it before. A resolver sending the correct SIT is
6330 assumed not to be an off-path attacker sending a
6331 spoofed-source query; the query is therefore
6332 unlikely to be part of a reflection/amplification
6333 attack, so resolvers sending a correct SIT option
6334 are not subject to response rate limiting (RRL).
6335 Resolvers which do not send a correct SIT option
6336 may be limited to receiving smaller responses via
6337 the <command>nosit-udp-size</command> option.
6343 <term><command>sit-secret</command></term>
6346 If set, this is a shared secret used for generating
6347 and verifying Source Identity Token EDNS options
6348 within a anycast cluster. If not set the system
6349 will generate a random secret at startup. The
6350 shared secret is encoded as a hex string and needs
6351 to be 128 bits for AES128, 160 bits for SHA1 and
6352 256 bits for SHA256.
6358 <term><command>rfc2308-type1</command></term>
6361 Setting this to <userinput>yes</userinput> will
6362 cause the server to send NS records along with the SOA
6364 answers. The default is <userinput>no</userinput>.
6368 Not yet implemented in <acronym>BIND</acronym>
6376 <term><command>use-id-pool</command></term>
6379 <emphasis>This option is obsolete</emphasis>.
6380 <acronym>BIND</acronym> 9 always allocates query
6387 <term><command>use-ixfr</command></term>
6390 <emphasis>This option is obsolete</emphasis>.
6391 If you need to disable IXFR to a particular server or
6393 the information on the <command>provide-ixfr</command> option
6394 in <xref linkend="server_statement_definition_and_usage"/>.
6396 <xref linkend="incremental_zone_transfers"/>.
6402 <term><command>provide-ixfr</command></term>
6405 See the description of
6406 <command>provide-ixfr</command> in
6407 <xref linkend="server_statement_definition_and_usage"/>.
6413 <term><command>request-ixfr</command></term>
6416 See the description of
6417 <command>request-ixfr</command> in
6418 <xref linkend="server_statement_definition_and_usage"/>.
6424 <term><command>treat-cr-as-space</command></term>
6427 This option was used in <acronym>BIND</acronym>
6429 the server treat carriage return ("<command>\r</command>") characters the same way
6430 as a space or tab character,
6431 to facilitate loading of zone files on a UNIX system that
6433 on an NT or DOS machine. In <acronym>BIND</acronym> 9, both UNIX "<command>\n</command>"
6434 and NT/DOS "<command>\r\n</command>" newlines
6435 are always accepted,
6436 and the option is ignored.
6442 <term><command>additional-from-auth</command></term>
6443 <term><command>additional-from-cache</command></term>
6447 These options control the behavior of an authoritative
6449 answering queries which have additional data, or when
6455 When both of these options are set to <userinput>yes</userinput>
6457 query is being answered from authoritative data (a zone
6458 configured into the server), the additional data section of
6460 reply will be filled in using data from other authoritative
6462 and from the cache. In some situations this is undesirable,
6464 as when there is concern over the correctness of the cache,
6466 in servers where slave zones may be added and modified by
6467 untrusted third parties. Also, avoiding
6468 the search for this additional data will speed up server
6470 at the possible expense of additional queries to resolve
6472 otherwise be provided in the additional section.
6476 For example, if a query asks for an MX record for host <literal>foo.example.com</literal>,
6477 and the record found is "<literal>MX 10 mail.example.net</literal>", normally the address
6478 records (A and AAAA) for <literal>mail.example.net</literal> will be provided as well,
6479 if known, even though they are not in the example.com zone.
6480 Setting these options to <command>no</command>
6481 disables this behavior and makes
6482 the server only search for additional data in the zone it
6487 These options are intended for use in authoritative-only
6488 servers, or in authoritative-only views. Attempts to set
6489 them to <command>no</command> without also
6491 <command>recursion no</command> will cause the
6493 ignore the options and log a warning message.
6497 Specifying <command>additional-from-cache no</command> actually
6498 disables the use of the cache not only for additional data
6500 but also when looking up the answer. This is usually the
6502 behavior in an authoritative-only server where the
6504 the cached data is an issue.
6508 When a name server is non-recursively queried for a name
6510 below the apex of any served zone, it normally answers with
6512 "upwards referral" to the root servers or the servers of
6514 known parent of the query name. Since the data in an
6516 comes from the cache, the server will not be able to provide
6518 referrals when <command>additional-from-cache no</command>
6519 has been specified. Instead, it will respond to such
6521 with REFUSED. This should not cause any problems since
6522 upwards referrals are not required for the resolution
6530 <term><command>match-mapped-addresses</command></term>
6533 If <userinput>yes</userinput>, then an
6534 IPv4-mapped IPv6 address will match any address match
6535 list entries that match the corresponding IPv4 address.
6538 This option was introduced to work around a kernel quirk
6539 in some operating systems that causes IPv4 TCP
6540 connections, such as zone transfers, to be accepted on an
6541 IPv6 socket using mapped addresses. This caused address
6542 match lists designed for IPv4 to fail to match. However,
6543 <command>named</command> now solves this problem
6544 internally. The use of this option is discouraged.
6550 <term><command>filter-aaaa-on-v4</command></term>
6553 This option is only available when
6554 <acronym>BIND</acronym> 9 is compiled with the
6555 <userinput>--enable-filter-aaaa</userinput> option on the
6556 "configure" command line. It is intended to help the
6557 transition from IPv4 to IPv6 by not giving IPv6 addresses
6558 to DNS clients unless they have connections to the IPv6
6559 Internet. This is not recommended unless absolutely
6560 necessary. The default is <userinput>no</userinput>.
6561 The <command>filter-aaaa-on-v4</command> option
6562 may also be specified in <command>view</command> statements
6563 to override the global <command>filter-aaaa-on-v4</command>
6567 If <userinput>yes</userinput>,
6568 the DNS client is at an IPv4 address, in <command>filter-aaaa</command>,
6569 and if the response does not include DNSSEC signatures,
6570 then all AAAA records are deleted from the response.
6571 This filtering applies to all responses and not only
6572 authoritative responses.
6575 If <userinput>break-dnssec</userinput>,
6576 then AAAA records are deleted even when DNSSEC is enabled.
6577 As suggested by the name, this makes the response not verify,
6578 because the DNSSEC protocol is designed detect deletions.
6581 This mechanism can erroneously cause other servers to
6582 not give AAAA records to their clients.
6583 A recursing server with both IPv6 and IPv4 network connections
6584 that queries an authoritative server using this mechanism
6585 via IPv4 will be denied AAAA records even if its client is
6589 This mechanism is applied to authoritative as well as
6590 non-authoritative records.
6591 A client using IPv4 that is not allowed recursion can
6592 erroneously be given AAAA records because the server is not
6593 allowed to check for A records.
6596 Some AAAA records are given to IPv4 clients in glue records.
6597 IPv4 clients that are servers can then erroneously
6598 answer requests for AAAA records received via IPv4.
6604 <term><command>filter-aaaa-on-v6</command></term>
6607 Identical to <command>filter-aaaa-on-v4</command>,
6608 except it filters AAAA responses to queries from IPv6
6609 clients instead of IPv4 clients. To filter all
6610 responses, set both options to <userinput>yes</userinput>.
6616 <term><command>ixfr-from-differences</command></term>
6619 When <userinput>yes</userinput> and the server loads a new
6620 version of a master zone from its zone file or receives a
6621 new version of a slave file via zone transfer, it will
6622 compare the new version to the previous one and calculate
6623 a set of differences. The differences are then logged in
6624 the zone's journal file such that the changes can be
6625 transmitted to downstream slaves as an incremental zone
6629 By allowing incremental zone transfers to be used for
6630 non-dynamic zones, this option saves bandwidth at the
6631 expense of increased CPU and memory consumption at the
6633 In particular, if the new version of a zone is completely
6634 different from the previous one, the set of differences
6635 will be of a size comparable to the combined size of the
6636 old and new zone version, and the server will need to
6637 temporarily allocate memory to hold this complete
6640 <para><command>ixfr-from-differences</command>
6641 also accepts <command>master</command> and
6642 <command>slave</command> at the view and options
6644 <command>ixfr-from-differences</command> to be enabled for
6645 all <command>master</command> or
6646 <command>slave</command> zones respectively.
6647 It is off by default.
6653 <term><command>multi-master</command></term>
6656 This should be set when you have multiple masters for a zone
6658 addresses refer to different machines. If <userinput>yes</userinput>, <command>named</command> will
6660 when the serial number on the master is less than what <command>named</command>
6662 has. The default is <userinput>no</userinput>.
6668 <term><command>dnssec-enable</command></term>
6671 Enable DNSSEC support in <command>named</command>. Unless set to <userinput>yes</userinput>,
6672 <command>named</command> behaves as if it does not support DNSSEC.
6673 The default is <userinput>yes</userinput>.
6679 <term><command>dnssec-validation</command></term>
6682 Enable DNSSEC validation in <command>named</command>.
6683 Note <command>dnssec-enable</command> also needs to be
6684 set to <userinput>yes</userinput> to be effective.
6685 If set to <userinput>no</userinput>, DNSSEC validation
6686 is disabled. If set to <userinput>auto</userinput>,
6687 DNSSEC validation is enabled, and a default
6688 trust-anchor for the DNS root zone is used. If set to
6689 <userinput>yes</userinput>, DNSSEC validation is enabled,
6690 but a trust anchor must be manually configured using
6691 a <command>trusted-keys</command> or
6692 <command>managed-keys</command> statement. The default
6693 is <userinput>yes</userinput>.
6699 <term><command>dnssec-accept-expired</command></term>
6702 Accept expired signatures when verifying DNSSEC signatures.
6703 The default is <userinput>no</userinput>.
6704 Setting this option to <userinput>yes</userinput>
6705 leaves <command>named</command> vulnerable to
6712 <term><command>querylog</command></term>
6715 Specify whether query logging should be started when <command>named</command>
6717 If <command>querylog</command> is not specified,
6718 then the query logging
6719 is determined by the presence of the logging category <command>queries</command>.
6725 <term><command>check-names</command></term>
6728 This option is used to restrict the character set and syntax
6730 certain domain names in master files and/or DNS responses
6732 from the network. The default varies according to usage
6734 <command>master</command> zones the default is <command>fail</command>.
6735 For <command>slave</command> zones the default
6736 is <command>warn</command>.
6737 For answers received from the network (<command>response</command>)
6738 the default is <command>ignore</command>.
6741 The rules for legal hostnames and mail domains are derived
6742 from RFC 952 and RFC 821 as modified by RFC 1123.
6744 <para><command>check-names</command>
6745 applies to the owner names of A, AAAA and MX records.
6746 It also applies to the domain names in the RDATA of NS, SOA,
6747 MX, and SRV records.
6748 It also applies to the RDATA of PTR records where the owner
6749 name indicated that it is a reverse lookup of a hostname
6750 (the owner name ends in IN-ADDR.ARPA, IP6.ARPA, or IP6.INT).
6756 <term><command>check-dup-records</command></term>
6759 Check master zones for records that are treated as different
6760 by DNSSEC but are semantically equal in plain DNS. The
6761 default is to <command>warn</command>. Other possible
6762 values are <command>fail</command> and
6763 <command>ignore</command>.
6769 <term><command>check-mx</command></term>
6772 Check whether the MX record appears to refer to a IP address.
6773 The default is to <command>warn</command>. Other possible
6774 values are <command>fail</command> and
6775 <command>ignore</command>.
6781 <term><command>check-wildcard</command></term>
6784 This option is used to check for non-terminal wildcards.
6785 The use of non-terminal wildcards is almost always as a
6787 to understand the wildcard matching algorithm (RFC 1034).
6789 affects master zones. The default (<command>yes</command>) is to check
6790 for non-terminal wildcards and issue a warning.
6796 <term><command>check-integrity</command></term>
6799 Perform post load zone integrity checks on master
6800 zones. This checks that MX and SRV records refer
6801 to address (A or AAAA) records and that glue
6802 address records exist for delegated zones. For
6803 MX and SRV records only in-zone hostnames are
6804 checked (for out-of-zone hostnames use
6805 <command>named-checkzone</command>).
6806 For NS records only names below top of zone are
6807 checked (for out-of-zone names and glue consistency
6808 checks use <command>named-checkzone</command>).
6809 The default is <command>yes</command>.
6812 The use of the SPF record for publishing Sender
6813 Policy Framework is deprecated as the migration
6814 from using TXT records to SPF records was abandoned.
6815 Enabling this option also checks that a TXT Sender
6816 Policy Framework record exists (starts with "v=spf1")
6817 if there is an SPF record. Warnings are emitted if the
6818 TXT record does not exist and can be suppressed with
6819 <command>check-spf</command>.
6825 <term><command>check-mx-cname</command></term>
6828 If <command>check-integrity</command> is set then
6829 fail, warn or ignore MX records that refer
6830 to CNAMES. The default is to <command>warn</command>.
6836 <term><command>check-srv-cname</command></term>
6839 If <command>check-integrity</command> is set then
6840 fail, warn or ignore SRV records that refer
6841 to CNAMES. The default is to <command>warn</command>.
6847 <term><command>check-sibling</command></term>
6850 When performing integrity checks, also check that
6851 sibling glue exists. The default is <command>yes</command>.
6857 <term><command>check-spf</command></term>
6860 If <command>check-integrity</command> is set then
6861 check that there is a TXT Sender Policy Framework
6862 record present (starts with "v=spf1") if there is an
6863 SPF record present. The default is
6864 <command>warn</command>.
6870 <term><command>zero-no-soa-ttl</command></term>
6873 When returning authoritative negative responses to
6874 SOA queries set the TTL of the SOA record returned in
6875 the authority section to zero.
6876 The default is <command>yes</command>.
6882 <term><command>zero-no-soa-ttl-cache</command></term>
6885 When caching a negative response to a SOA query
6886 set the TTL to zero.
6887 The default is <command>no</command>.
6893 <term><command>update-check-ksk</command></term>
6896 When set to the default value of <literal>yes</literal>,
6897 check the KSK bit in each key to determine how the key
6898 should be used when generating RRSIGs for a secure zone.
6901 Ordinarily, zone-signing keys (that is, keys without the
6902 KSK bit set) are used to sign the entire zone, while
6903 key-signing keys (keys with the KSK bit set) are only
6904 used to sign the DNSKEY RRset at the zone apex.
6905 However, if this option is set to <literal>no</literal>,
6906 then the KSK bit is ignored; KSKs are treated as if they
6907 were ZSKs and are used to sign the entire zone. This is
6908 similar to the <command>dnssec-signzone -z</command>
6909 command line option.
6912 When this option is set to <literal>yes</literal>, there
6913 must be at least two active keys for every algorithm
6914 represented in the DNSKEY RRset: at least one KSK and one
6915 ZSK per algorithm. If there is any algorithm for which
6916 this requirement is not met, this option will be ignored
6923 <term><command>dnssec-dnskey-kskonly</command></term>
6926 When this option and <command>update-check-ksk</command>
6927 are both set to <literal>yes</literal>, only key-signing
6928 keys (that is, keys with the KSK bit set) will be used
6929 to sign the DNSKEY RRset at the zone apex. Zone-signing
6930 keys (keys without the KSK bit set) will be used to sign
6931 the remainder of the zone, but not the DNSKEY RRset.
6932 This is similar to the
6933 <command>dnssec-signzone -x</command> command line option.
6936 The default is <command>no</command>. If
6937 <command>update-check-ksk</command> is set to
6938 <literal>no</literal>, this option is ignored.
6944 <term><command>dnssec-loadkeys-interval</command></term>
6947 When a zone is configured with <command>auto-dnssec
6948 maintain;</command> its key repository must be checked
6949 periodically to see if any new keys have been added
6950 or any existing keys' timing metadata has been updated
6951 (see <xref linkend="man.dnssec-keygen"/> and
6952 <xref linkend="man.dnssec-settime"/>). The
6953 <command>dnssec-loadkeys-interval</command> option
6954 sets the frequency of automatic repository checks, in
6955 minutes. The default is <literal>60</literal> (1 hour),
6956 the minimum is <literal>1</literal> (1 minute), and the
6957 maximum is <literal>1440</literal> (24 hours); any higher
6958 value is silently reduced.
6964 <term><command>try-tcp-refresh</command></term>
6967 Try to refresh the zone using TCP if UDP queries fail.
6968 For BIND 8 compatibility, the default is
6969 <command>yes</command>.
6975 <term><command>dnssec-secure-to-insecure</command></term>
6978 Allow a dynamic zone to transition from secure to
6979 insecure (i.e., signed to unsigned) by deleting all
6980 of the DNSKEY records. The default is <command>no</command>.
6981 If set to <command>yes</command>, and if the DNSKEY RRset
6982 at the zone apex is deleted, all RRSIG and NSEC records
6983 will be removed from the zone as well.
6986 If the zone uses NSEC3, then it is also necessary to
6987 delete the NSEC3PARAM RRset from the zone apex; this will
6988 cause the removal of all corresponding NSEC3 records.
6989 (It is expected that this requirement will be eliminated
6990 in a future release.)
6993 Note that if a zone has been configured with
6994 <command>auto-dnssec maintain</command> and the
6995 private keys remain accessible in the key repository,
6996 then the zone will be automatically signed again the
6997 next time <command>named</command> is started.
7007 <title>Forwarding</title>
7009 The forwarding facility can be used to create a large site-wide
7010 cache on a few servers, reducing traffic over links to external
7011 name servers. It can also be used to allow queries by servers that
7012 do not have direct access to the Internet, but wish to look up
7014 names anyway. Forwarding occurs only on those queries for which
7015 the server is not authoritative and does not have the answer in
7021 <term><command>forward</command></term>
7024 This option is only meaningful if the
7025 forwarders list is not empty. A value of <varname>first</varname>,
7026 the default, causes the server to query the forwarders
7028 if that doesn't answer the question, the server will then
7030 the answer itself. If <varname>only</varname> is
7032 server will only query the forwarders.
7038 <term><command>forwarders</command></term>
7041 Specifies the IP addresses to be used
7042 for forwarding. The default is the empty list (no
7051 Forwarding can also be configured on a per-domain basis, allowing
7052 for the global forwarding options to be overridden in a variety
7053 of ways. You can set particular domains to use different
7055 or have a different <command>forward only/first</command> behavior,
7056 or not forward at all, see <xref linkend="zone_statement_grammar"/>.
7061 <title>Dual-stack Servers</title>
7063 Dual-stack servers are used as servers of last resort to work
7065 problems in reachability due the lack of support for either IPv4
7067 on the host machine.
7072 <term><command>dual-stack-servers</command></term>
7075 Specifies host names or addresses of machines with access to
7076 both IPv4 and IPv6 transports. If a hostname is used, the
7078 to resolve the name using only the transport it has. If the
7080 stacked, then the <command>dual-stack-servers</command> have no effect unless
7081 access to a transport has been disabled on the command line
7082 (e.g. <command>named -4</command>).
7089 <sect3 id="access_control">
7090 <title>Access Control</title>
7093 Access to the server can be restricted based on the IP address
7094 of the requesting system. See <xref linkend="address_match_lists"/> for
7095 details on how to specify IP address lists.
7101 <term><command>allow-notify</command></term>
7104 Specifies which hosts are allowed to
7105 notify this server, a slave, of zone changes in addition
7106 to the zone masters.
7107 <command>allow-notify</command> may also be
7109 <command>zone</command> statement, in which case
7111 <command>options allow-notify</command>
7112 statement. It is only meaningful
7113 for a slave zone. If not specified, the default is to
7114 process notify messages
7115 only from a zone's master.
7121 <term><command>allow-query</command></term>
7124 Specifies which hosts are allowed to ask ordinary
7125 DNS questions. <command>allow-query</command> may
7126 also be specified in the <command>zone</command>
7127 statement, in which case it overrides the
7128 <command>options allow-query</command> statement.
7129 If not specified, the default is to allow queries
7134 <command>allow-query-cache</command> is now
7135 used to specify access to the cache.
7142 <term><command>allow-query-on</command></term>
7145 Specifies which local addresses can accept ordinary
7146 DNS questions. This makes it possible, for instance,
7147 to allow queries on internal-facing interfaces but
7148 disallow them on external-facing ones, without
7149 necessarily knowing the internal network's addresses.
7152 Note that <command>allow-query-on</command> is only
7153 checked for queries that are permitted by
7154 <command>allow-query</command>. A query must be
7155 allowed by both ACLs, or it will be refused.
7158 <command>allow-query-on</command> may
7159 also be specified in the <command>zone</command>
7160 statement, in which case it overrides the
7161 <command>options allow-query-on</command> statement.
7164 If not specified, the default is to allow queries
7169 <command>allow-query-cache</command> is
7170 used to specify access to the cache.
7177 <term><command>allow-query-cache</command></term>
7180 Specifies which hosts are allowed to get answers
7181 from the cache. If <command>allow-query-cache</command>
7182 is not set then <command>allow-recursion</command>
7183 is used if set, otherwise <command>allow-query</command>
7184 is used if set unless <command>recursion no;</command> is
7185 set in which case <command>none;</command> is used,
7186 otherwise the default (<command>localnets;</command>
7187 <command>localhost;</command>) is used.
7193 <term><command>allow-query-cache-on</command></term>
7196 Specifies which local addresses can give answers
7197 from the cache. If not specified, the default is
7198 to allow cache queries on any address,
7199 <command>localnets</command> and
7200 <command>localhost</command>.
7206 <term><command>allow-recursion</command></term>
7209 Specifies which hosts are allowed to make recursive
7210 queries through this server. If
7211 <command>allow-recursion</command> is not set
7212 then <command>allow-query-cache</command> is
7213 used if set, otherwise <command>allow-query</command>
7214 is used if set, otherwise the default
7215 (<command>localnets;</command>
7216 <command>localhost;</command>) is used.
7222 <term><command>allow-recursion-on</command></term>
7225 Specifies which local addresses can accept recursive
7226 queries. If not specified, the default is to allow
7227 recursive queries on all addresses.
7233 <term><command>allow-update</command></term>
7236 Specifies which hosts are allowed to
7237 submit Dynamic DNS updates for master zones. The default is
7239 updates from all hosts. Note that allowing updates based
7240 on the requestor's IP address is insecure; see
7241 <xref linkend="dynamic_update_security"/> for details.
7247 <term><command>allow-update-forwarding</command></term>
7250 Specifies which hosts are allowed to
7251 submit Dynamic DNS updates to slave zones to be forwarded to
7253 master. The default is <userinput>{ none; }</userinput>,
7255 means that no update forwarding will be performed. To
7257 update forwarding, specify
7258 <userinput>allow-update-forwarding { any; };</userinput>.
7259 Specifying values other than <userinput>{ none; }</userinput> or
7260 <userinput>{ any; }</userinput> is usually
7261 counterproductive, since
7262 the responsibility for update access control should rest
7264 master server, not the slaves.
7267 Note that enabling the update forwarding feature on a slave
7269 may expose master servers relying on insecure IP address
7271 access control to attacks; see <xref linkend="dynamic_update_security"/>
7278 <term><command>allow-v6-synthesis</command></term>
7281 This option was introduced for the smooth transition from
7283 to A6 and from "nibble labels" to binary labels.
7284 However, since both A6 and binary labels were then
7286 this option was also deprecated.
7287 It is now ignored with some warning messages.
7293 <term><command>allow-transfer</command></term>
7296 Specifies which hosts are allowed to
7297 receive zone transfers from the server. <command>allow-transfer</command> may
7298 also be specified in the <command>zone</command>
7300 case it overrides the <command>options allow-transfer</command> statement.
7301 If not specified, the default is to allow transfers to all
7308 <term><command>blackhole</command></term>
7311 Specifies a list of addresses that the
7312 server will not accept queries from or use to resolve a
7314 from these addresses will not be responded to. The default
7315 is <userinput>none</userinput>.
7321 <term><command>filter-aaaa</command></term>
7324 Specifies a list of addresses to which
7325 <command>filter-aaaa-on-v4</command>
7326 is applies. The default is <userinput>any</userinput>.
7332 <term><command>no-case-compress</command></term> <listitem>
7334 Specifies a list of addresses which require responses
7335 to use case-insensitive compression. This ACL can be
7336 used when <command>named</command> needs to work with
7337 clients that do not comply with the requirement in RFC
7338 1034 to use case-insensitive name comparisons when
7339 checking for matching domain names.
7342 If left undefined, the ACL defaults to
7343 <command>none</command>: case-insensitive compression
7344 will be used for all clients. If the ACL is defined and
7345 matches a client, then case will be ignored when
7346 compressing domain names in DNS responses sent to that
7350 This can result in slightly smaller responses: if
7351 a response contains the names "example.com" and
7352 "example.COM", case-insensitive compression would treat
7353 the second one as a duplicate. It also ensures
7354 that the case of the query name exactly matches the
7355 case of the owner names of returned records, rather
7356 than matching the case of the records entered in
7357 the zone file. This allows responses to exactly
7358 match the query, which is required by some clients
7359 due to incorrect use of case-sensitive comparisons.
7362 Case-insensitive compression is <emphasis>always</emphasis>
7363 used in AXFR and IXFR responses, regardless of whether
7364 the client matches this ACL.
7367 There are circumstances in which <command>named</command>
7368 will not preserve the case of owner names of records:
7369 if a zone file defines records of different types with
7370 the same name, but the capitalization of the name is
7371 different (e.g., "www.example.com/A" and
7372 "WWW.EXAMPLE.COM/AAAA"), then all responses for that
7373 name will use the <emphasis>first</emphasis> version
7374 of the name that was used in the zone file. This
7375 limitation may be addressed in a future release. However,
7376 domain names specified in the rdata of resource records
7377 (i.e., records of type NS, MX, CNAME, etc) will always
7378 have their case preserved unless the client matches this
7385 <term><command>resolver-query-timeout</command></term>
7388 The amount of time the resolver will spend attempting
7389 to resolve a recursive query before failing. The default
7390 and minimum is <literal>10</literal> and the maximum is
7391 <literal>30</literal>. Setting it to <literal>0</literal>
7392 will result in the default being used.
7401 <title>Interfaces</title>
7403 The interfaces and ports that the server will answer queries
7404 from may be specified using the <command>listen-on</command> option. <command>listen-on</command> takes
7405 an optional port and an <varname>address_match_list</varname>
7406 of IPv4 addresses. (IPv6 addresses are ignored, with a
7408 The server will listen on all interfaces allowed by the address
7409 match list. If a port is not specified, port 53 will be used.
7412 Multiple <command>listen-on</command> statements are
7417 <programlisting>listen-on { 5.6.7.8; };
7418 listen-on port 1234 { !1.2.3.4; 1.2/16; };
7422 will enable the name server on port 53 for the IP address
7423 5.6.7.8, and on port 1234 of an address on the machine in net
7424 1.2 that is not 1.2.3.4.
7428 If no <command>listen-on</command> is specified, the
7429 server will listen on port 53 on all IPv4 interfaces.
7433 The <command>listen-on-v6</command> option is used to
7434 specify the interfaces and the ports on which the server will
7435 listen for incoming queries sent using IPv6. If not specified,
7436 the server will listen on port 53 on all IPv6 interfaces.
7440 When <programlisting>{ any; }</programlisting> is
7442 as the <varname>address_match_list</varname> for the
7443 <command>listen-on-v6</command> option,
7444 the server does not bind a separate socket to each IPv6 interface
7445 address as it does for IPv4 if the operating system has enough API
7446 support for IPv6 (specifically if it conforms to RFC 3493 and RFC
7448 Instead, it listens on the IPv6 wildcard address.
7449 If the system only has incomplete API support for IPv6, however,
7450 the behavior is the same as that for IPv4.
7454 A list of particular IPv6 addresses can also be specified, in
7456 the server listens on a separate socket for each specified
7458 regardless of whether the desired API is supported by the system.
7459 IPv4 addresses specified in <command>listen-on-v6</command>
7460 will be ignored, with a logged warning.
7464 Multiple <command>listen-on-v6</command> options can
7469 <programlisting>listen-on-v6 { any; };
7470 listen-on-v6 port 1234 { !2001:db8::/32; any; };
7474 will enable the name server on port 53 for any IPv6 addresses
7475 (with a single wildcard socket),
7476 and on port 1234 of IPv6 addresses that is not in the prefix
7477 2001:db8::/32 (with separate sockets for each matched address.)
7481 To make the server not listen on any IPv6 address, use
7484 <programlisting>listen-on-v6 { none; };
7489 <sect3 id="query_address">
7490 <title>Query Address</title>
7492 If the server doesn't know the answer to a question, it will
7493 query other name servers. <command>query-source</command> specifies
7494 the address and port used for such queries. For queries sent over
7495 IPv6, there is a separate <command>query-source-v6</command> option.
7496 If <command>address</command> is <command>*</command> (asterisk) or is omitted,
7497 a wildcard IP address (<command>INADDR_ANY</command>)
7502 If <command>port</command> is <command>*</command> or is omitted,
7503 a random port number from a pre-configured
7504 range is picked up and will be used for each query.
7505 The port range(s) is that specified in
7506 the <command>use-v4-udp-ports</command> (for IPv4)
7507 and <command>use-v6-udp-ports</command> (for IPv6)
7508 options, excluding the ranges specified in
7509 the <command>avoid-v4-udp-ports</command>
7510 and <command>avoid-v6-udp-ports</command> options, respectively.
7514 The defaults of the <command>query-source</command> and
7515 <command>query-source-v6</command> options
7519 <programlisting>query-source address * port *;
7520 query-source-v6 address * port *;
7524 If <command>use-v4-udp-ports</command> or
7525 <command>use-v6-udp-ports</command> is unspecified,
7526 <command>named</command> will check if the operating
7527 system provides a programming interface to retrieve the
7528 system's default range for ephemeral ports.
7529 If such an interface is available,
7530 <command>named</command> will use the corresponding system
7531 default range; otherwise, it will use its own defaults:
7534 <programlisting>use-v4-udp-ports { range 1024 65535; };
7535 use-v6-udp-ports { range 1024 65535; };
7539 Note: make sure the ranges be sufficiently large for
7540 security. A desirable size depends on various parameters,
7541 but we generally recommend it contain at least 16384 ports
7542 (14 bits of entropy).
7543 Note also that the system's default range when used may be
7544 too small for this purpose, and that the range may even be
7545 changed while <command>named</command> is running; the new
7546 range will automatically be applied when <command>named</command>
7549 configure <command>use-v4-udp-ports</command> and
7550 <command>use-v6-udp-ports</command> explicitly so that the
7551 ranges are sufficiently large and are reasonably
7552 independent from the ranges used by other applications.
7556 Note: the operational configuration
7557 where <command>named</command> runs may prohibit the use
7558 of some ports. For example, UNIX systems will not allow
7559 <command>named</command> running without a root privilege
7560 to use ports less than 1024.
7561 If such ports are included in the specified (or detected)
7562 set of query ports, the corresponding query attempts will
7563 fail, resulting in resolution failures or delay.
7564 It is therefore important to configure the set of ports
7565 that can be safely used in the expected operational environment.
7569 The defaults of the <command>avoid-v4-udp-ports</command> and
7570 <command>avoid-v6-udp-ports</command> options
7574 <programlisting>avoid-v4-udp-ports {};
7575 avoid-v6-udp-ports {};
7579 Note: BIND 9.5.0 introduced
7580 the <command>use-queryport-pool</command>
7581 option to support a pool of such random ports, but this
7582 option is now obsolete because reusing the same ports in
7583 the pool may not be sufficiently secure.
7584 For the same reason, it is generally strongly discouraged to
7585 specify a particular port for the
7586 <command>query-source</command> or
7587 <command>query-source-v6</command> options;
7588 it implicitly disables the use of randomized port numbers.
7593 <term><command>use-queryport-pool</command></term>
7596 This option is obsolete.
7602 <term><command>queryport-pool-ports</command></term>
7605 This option is obsolete.
7611 <term><command>queryport-pool-updateinterval</command></term>
7614 This option is obsolete.
7622 The address specified in the <command>query-source</command> option
7623 is used for both UDP and TCP queries, but the port applies only
7624 to UDP queries. TCP queries always use a random
7630 Solaris 2.5.1 and earlier does not support setting the source
7631 address for TCP sockets.
7636 See also <command>transfer-source</command> and
7637 <command>notify-source</command>.
7642 <sect3 id="zone_transfers">
7643 <title>Zone Transfers</title>
7645 <acronym>BIND</acronym> has mechanisms in place to
7646 facilitate zone transfers
7647 and set limits on the amount of load that transfers place on the
7648 system. The following options apply to zone transfers.
7654 <term><command>also-notify</command></term>
7657 Defines a global list of IP addresses of name servers
7658 that are also sent NOTIFY messages whenever a fresh copy of
7660 zone is loaded, in addition to the servers listed in the
7662 This helps to ensure that copies of the zones will
7663 quickly converge on stealth servers.
7664 Optionally, a port may be specified with each
7665 <command>also-notify</command> address to send
7666 the notify messages to a port other than the
7668 An optional TSIG key can also be specified with each
7669 address to cause the notify messages to be signed; this
7670 can be useful when sending notifies to multiple views.
7671 In place of explicit addresses, one or more named
7672 <command>masters</command> lists can be used.
7675 If an <command>also-notify</command> list
7676 is given in a <command>zone</command> statement,
7678 the <command>options also-notify</command>
7679 statement. When a <command>zone notify</command>
7681 is set to <command>no</command>, the IP
7682 addresses in the global <command>also-notify</command> list will
7683 not be sent NOTIFY messages for that zone. The default is
7685 list (no global notification list).
7691 <term><command>max-transfer-time-in</command></term>
7694 Inbound zone transfers running longer than
7695 this many minutes will be terminated. The default is 120
7697 (2 hours). The maximum value is 28 days (40320 minutes).
7703 <term><command>max-transfer-idle-in</command></term>
7706 Inbound zone transfers making no progress
7707 in this many minutes will be terminated. The default is 60
7709 (1 hour). The maximum value is 28 days (40320 minutes).
7715 <term><command>max-transfer-time-out</command></term>
7718 Outbound zone transfers running longer than
7719 this many minutes will be terminated. The default is 120
7721 (2 hours). The maximum value is 28 days (40320 minutes).
7727 <term><command>max-transfer-idle-out</command></term>
7730 Outbound zone transfers making no progress
7731 in this many minutes will be terminated. The default is 60
7733 hour). The maximum value is 28 days (40320 minutes).
7739 <term><command>serial-query-rate</command></term>
7742 Slave servers will periodically query master
7743 servers to find out if zone serial numbers have
7744 changed. Each such query uses a minute amount of
7745 the slave server's network bandwidth. To limit
7746 the amount of bandwidth used, BIND 9 limits the
7747 rate at which queries are sent. The value of the
7748 <command>serial-query-rate</command> option, an
7749 integer, is the maximum number of queries sent
7750 per second. The default is 20 per second.
7751 The lowest possible rate is one per second; when set
7752 to zero, it will be silently raised to one.
7755 In addition to controlling the rate SOA refresh
7756 queries are issued at
7757 <command>serial-query-rate</command> also controls
7758 the rate at which NOTIFY messages are sent from
7759 both master and slave zones.
7765 <term><command>serial-queries</command></term>
7768 In BIND 8, the <command>serial-queries</command>
7770 set the maximum number of concurrent serial number queries
7771 allowed to be outstanding at any given time.
7772 BIND 9 does not limit the number of outstanding
7773 serial queries and ignores the <command>serial-queries</command> option.
7774 Instead, it limits the rate at which the queries are sent
7775 as defined using the <command>serial-query-rate</command> option.
7781 <term><command>transfer-format</command></term>
7785 Zone transfers can be sent using two different formats,
7786 <command>one-answer</command> and
7787 <command>many-answers</command>.
7788 The <command>transfer-format</command> option is used
7789 on the master server to determine which format it sends.
7790 <command>one-answer</command> uses one DNS message per
7791 resource record transferred.
7792 <command>many-answers</command> packs as many resource
7793 records as possible into a message.
7794 <command>many-answers</command> is more efficient, but is
7795 only supported by relatively new slave servers,
7796 such as <acronym>BIND</acronym> 9, <acronym>BIND</acronym>
7797 8.x and <acronym>BIND</acronym> 4.9.5 onwards.
7798 The <command>many-answers</command> format is also supported by
7799 recent Microsoft Windows nameservers.
7800 The default is <command>many-answers</command>.
7801 <command>transfer-format</command> may be overridden on a
7802 per-server basis by using the <command>server</command>
7810 <term><command>transfers-in</command></term>
7813 The maximum number of inbound zone transfers
7814 that can be running concurrently. The default value is <literal>10</literal>.
7815 Increasing <command>transfers-in</command> may
7816 speed up the convergence
7817 of slave zones, but it also may increase the load on the
7824 <term><command>transfers-out</command></term>
7827 The maximum number of outbound zone transfers
7828 that can be running concurrently. Zone transfer requests in
7830 of the limit will be refused. The default value is <literal>10</literal>.
7836 <term><command>transfers-per-ns</command></term>
7839 The maximum number of inbound zone transfers
7840 that can be concurrently transferring from a given remote
7842 The default value is <literal>2</literal>.
7843 Increasing <command>transfers-per-ns</command>
7845 speed up the convergence of slave zones, but it also may
7847 the load on the remote name server. <command>transfers-per-ns</command> may
7848 be overridden on a per-server basis by using the <command>transfers</command> phrase
7849 of the <command>server</command> statement.
7855 <term><command>transfer-source</command></term>
7857 <para><command>transfer-source</command>
7858 determines which local address will be bound to IPv4
7859 TCP connections used to fetch zones transferred
7860 inbound by the server. It also determines the
7861 source IPv4 address, and optionally the UDP port,
7862 used for the refresh queries and forwarded dynamic
7863 updates. If not set, it defaults to a system
7864 controlled value which will usually be the address
7865 of the interface "closest to" the remote end. This
7866 address must appear in the remote end's
7867 <command>allow-transfer</command> option for the
7868 zone being transferred, if one is specified. This
7870 <command>transfer-source</command> for all zones,
7871 but can be overridden on a per-view or per-zone
7872 basis by including a
7873 <command>transfer-source</command> statement within
7874 the <command>view</command> or
7875 <command>zone</command> block in the configuration
7880 Solaris 2.5.1 and earlier does not support setting the
7881 source address for TCP sockets.
7888 <term><command>transfer-source-v6</command></term>
7891 The same as <command>transfer-source</command>,
7892 except zone transfers are performed using IPv6.
7898 <term><command>alt-transfer-source</command></term>
7901 An alternate transfer source if the one listed in
7902 <command>transfer-source</command> fails and
7903 <command>use-alt-transfer-source</command> is
7907 If you do not wish the alternate transfer source
7908 to be used, you should set
7909 <command>use-alt-transfer-source</command>
7910 appropriately and you should not depend upon
7911 getting an answer back to the first refresh
7918 <term><command>alt-transfer-source-v6</command></term>
7921 An alternate transfer source if the one listed in
7922 <command>transfer-source-v6</command> fails and
7923 <command>use-alt-transfer-source</command> is
7930 <term><command>use-alt-transfer-source</command></term>
7933 Use the alternate transfer sources or not. If views are
7934 specified this defaults to <command>no</command>
7935 otherwise it defaults to
7936 <command>yes</command> (for BIND 8
7943 <term><command>notify-source</command></term>
7945 <para><command>notify-source</command>
7946 determines which local source address, and
7947 optionally UDP port, will be used to send NOTIFY
7948 messages. This address must appear in the slave
7949 server's <command>masters</command> zone clause or
7950 in an <command>allow-notify</command> clause. This
7951 statement sets the <command>notify-source</command>
7952 for all zones, but can be overridden on a per-zone or
7953 per-view basis by including a
7954 <command>notify-source</command> statement within
7955 the <command>zone</command> or
7956 <command>view</command> block in the configuration
7961 Solaris 2.5.1 and earlier does not support setting the
7962 source address for TCP sockets.
7969 <term><command>notify-source-v6</command></term>
7972 Like <command>notify-source</command>,
7973 but applies to notify messages sent to IPv6 addresses.
7983 <title>UDP Port Lists</title>
7985 <command>use-v4-udp-ports</command>,
7986 <command>avoid-v4-udp-ports</command>,
7987 <command>use-v6-udp-ports</command>, and
7988 <command>avoid-v6-udp-ports</command>
7989 specify a list of IPv4 and IPv6 UDP ports that will be
7990 used or not used as source ports for UDP messages.
7991 See <xref linkend="query_address"/> about how the
7992 available ports are determined.
7993 For example, with the following configuration
7997 use-v6-udp-ports { range 32768 65535; };
7998 avoid-v6-udp-ports { 40000; range 50000 60000; };
8002 UDP ports of IPv6 messages sent
8003 from <command>named</command> will be in one
8004 of the following ranges: 32768 to 39999, 40001 to 49999,
8009 <command>avoid-v4-udp-ports</command> and
8010 <command>avoid-v6-udp-ports</command> can be used
8011 to prevent <command>named</command> from choosing as its random source port a
8012 port that is blocked by your firewall or a port that is
8013 used by other applications;
8014 if a query went out with a source port blocked by a
8016 answer would not get by the firewall and the name server would
8017 have to query again.
8018 Note: the desired range can also be represented only with
8019 <command>use-v4-udp-ports</command> and
8020 <command>use-v6-udp-ports</command>, and the
8021 <command>avoid-</command> options are redundant in that
8022 sense; they are provided for backward compatibility and
8023 to possibly simplify the port specification.
8028 <title>Operating System Resource Limits</title>
8031 The server's usage of many system resources can be limited.
8032 Scaled values are allowed when specifying resource limits. For
8033 example, <command>1G</command> can be used instead of
8034 <command>1073741824</command> to specify a limit of
8036 gigabyte. <command>unlimited</command> requests
8037 unlimited use, or the
8038 maximum available amount. <command>default</command>
8040 that was in force when the server was started. See the description
8041 of <command>size_spec</command> in <xref linkend="configuration_file_elements"/>.
8045 The following options set operating system resource limits for
8046 the name server process. Some operating systems don't support
8048 any of the limits. On such systems, a warning will be issued if
8050 unsupported limit is used.
8056 <term><command>coresize</command></term>
8059 The maximum size of a core dump. The default
8060 is <literal>default</literal>.
8066 <term><command>datasize</command></term>
8069 The maximum amount of data memory the server
8070 may use. The default is <literal>default</literal>.
8071 This is a hard limit on server memory usage.
8072 If the server attempts to allocate memory in excess of this
8073 limit, the allocation will fail, which may in turn leave
8074 the server unable to perform DNS service. Therefore,
8075 this option is rarely useful as a way of limiting the
8076 amount of memory used by the server, but it can be used
8077 to raise an operating system data size limit that is
8078 too small by default. If you wish to limit the amount
8079 of memory used by the server, use the
8080 <command>max-cache-size</command> and
8081 <command>recursive-clients</command>
8088 <term><command>files</command></term>
8091 The maximum number of files the server
8092 may have open concurrently. The default is <literal>unlimited</literal>.
8098 <term><command>stacksize</command></term>
8101 The maximum amount of stack memory the server
8102 may use. The default is <literal>default</literal>.
8111 <sect3 id="server_resource_limits">
8112 <title>Server Resource Limits</title>
8115 The following options set limits on the server's
8116 resource consumption that are enforced internally by the
8117 server rather than the operating system.
8123 <term><command>max-ixfr-log-size</command></term>
8126 This option is obsolete; it is accepted
8127 and ignored for BIND 8 compatibility. The option
8128 <command>max-journal-size</command> performs a
8129 similar function in BIND 9.
8135 <term><command>max-journal-size</command></term>
8138 Sets a maximum size for each journal file
8139 (see <xref linkend="journal"/>). When the journal file
8141 the specified size, some of the oldest transactions in the
8143 will be automatically removed. The largest permitted
8144 value is 2 gigabytes. The default is
8145 <literal>unlimited</literal>, which also
8147 This may also be set on a per-zone basis.
8153 <term><command>host-statistics-max</command></term>
8156 In BIND 8, specifies the maximum number of host statistics
8158 Not implemented in BIND 9.
8164 <term><command>recursive-clients</command></term>
8167 The maximum number of simultaneous recursive lookups
8168 the server will perform on behalf of clients. The default
8170 <literal>1000</literal>. Because each recursing
8172 bit of memory, on the order of 20 kilobytes, the value of
8174 <command>recursive-clients</command> option may
8175 have to be decreased
8176 on hosts with limited memory.
8182 <term><command>tcp-clients</command></term>
8185 The maximum number of simultaneous client TCP
8186 connections that the server will accept.
8187 The default is <literal>100</literal>.
8193 <term><command>reserved-sockets</command></term>
8196 The number of file descriptors reserved for TCP, stdio,
8197 etc. This needs to be big enough to cover the number of
8198 interfaces <command>named</command> listens on, <command>tcp-clients</command> as well as
8199 to provide room for outgoing TCP queries and incoming zone
8200 transfers. The default is <literal>512</literal>.
8201 The minimum value is <literal>128</literal> and the
8202 maximum value is <literal>128</literal> less than
8203 maxsockets (-S). This option may be removed in the future.
8206 This option has little effect on Windows.
8212 <term><command>max-cache-size</command></term>
8215 The maximum amount of memory to use for the
8216 server's cache, in bytes.
8217 When the amount of data in the cache
8218 reaches this limit, the server will cause records to
8219 expire prematurely based on an LRU based strategy so
8220 that the limit is not exceeded.
8221 The keyword <userinput>unlimited</userinput>,
8222 or the value 0, will place no limit on cache size;
8223 records will be purged from the cache only when their
8225 Any positive values less than 2MB will be ignored
8227 In a server with multiple views, the limit applies
8228 separately to the cache of each view.
8229 The default is <userinput>unlimited</userinput>.
8235 <term><command>tcp-listen-queue</command></term>
8238 The listen queue depth. The default and minimum is 10.
8239 If the kernel supports the accept filter "dataready" this
8241 many TCP connections that will be queued in kernel space
8243 some data before being passed to accept. Nonzero values
8244 less than 10 will be silently raised. A value of 0 may also
8245 be used; on most platforms this sets the listen queue
8246 length to a system-defined default value.
8256 <title>Periodic Task Intervals</title>
8261 <term><command>cleaning-interval</command></term>
8264 This interval is effectively obsolete. Previously,
8265 the server would remove expired resource records
8266 from the cache every <command>cleaning-interval</command> minutes.
8267 <acronym>BIND</acronym> 9 now manages cache
8268 memory in a more sophisticated manner and does not
8269 rely on the periodic cleaning any more.
8270 Specifying this option therefore has no effect on
8271 the server's behavior.
8277 <term><command>heartbeat-interval</command></term>
8280 The server will perform zone maintenance tasks
8281 for all zones marked as <command>dialup</command> whenever this
8282 interval expires. The default is 60 minutes. Reasonable
8284 to 1 day (1440 minutes). The maximum value is 28 days
8286 If set to 0, no zone maintenance for these zones will occur.
8292 <term><command>interface-interval</command></term>
8295 The server will scan the network interface list
8296 every <command>interface-interval</command>
8297 minutes. The default
8298 is 60 minutes. The maximum value is 28 days (40320 minutes).
8299 If set to 0, interface scanning will only occur when
8300 the configuration file is loaded. After the scan, the
8302 begin listening for queries on any newly discovered
8303 interfaces (provided they are allowed by the
8304 <command>listen-on</command> configuration), and
8306 stop listening on interfaces that have gone away.
8312 <term><command>statistics-interval</command></term>
8315 Name server statistics will be logged
8316 every <command>statistics-interval</command>
8317 minutes. The default is
8318 60. The maximum value is 28 days (40320 minutes).
8319 If set to 0, no statistics will be logged.
8322 Not yet implemented in
8323 <acronym>BIND</acronym> 9.
8333 <sect3 id="topology">
8334 <title>Topology</title>
8337 All other things being equal, when the server chooses a name
8339 to query from a list of name servers, it prefers the one that is
8340 topologically closest to itself. The <command>topology</command> statement
8341 takes an <command>address_match_list</command> and
8343 in a special way. Each top-level list element is assigned a
8345 Non-negated elements get a distance based on their position in the
8346 list, where the closer the match is to the start of the list, the
8347 shorter the distance is between it and the server. A negated match
8348 will be assigned the maximum distance from the server. If there
8349 is no match, the address will get a distance which is further than
8350 any non-negated list element, and closer than any negated element.
8354 <programlisting>topology {
8361 will prefer servers on network 10 the most, followed by hosts
8362 on network 1.2.0.0 (netmask 255.255.0.0) and network 3, with the
8363 exception of hosts on network 1.2.3 (netmask 255.255.255.0), which
8364 is preferred least of all.
8367 The default topology is
8370 <programlisting> topology { localhost; localnets; };
8375 The <command>topology</command> option
8376 is not implemented in <acronym>BIND</acronym> 9.
8381 <sect3 id="the_sortlist_statement">
8383 <title>The <command>sortlist</command> Statement</title>
8386 The response to a DNS query may consist of multiple resource
8387 records (RRs) forming a resource records set (RRset).
8388 The name server will normally return the
8389 RRs within the RRset in an indeterminate order
8390 (but see the <command>rrset-order</command>
8391 statement in <xref linkend="rrset_ordering"/>).
8392 The client resolver code should rearrange the RRs as appropriate,
8393 that is, using any addresses on the local net in preference to
8395 However, not all resolvers can do this or are correctly
8397 When a client is using a local server, the sorting can be performed
8398 in the server, based on the client's address. This only requires
8399 configuring the name servers, not all the clients.
8403 The <command>sortlist</command> statement (see below)
8405 an <command>address_match_list</command> and
8407 more specifically than the <command>topology</command>
8409 does (<xref linkend="topology"/>).
8410 Each top level statement in the <command>sortlist</command> must
8411 itself be an explicit <command>address_match_list</command> with
8412 one or two elements. The first element (which may be an IP
8414 an IP prefix, an ACL name or a nested <command>address_match_list</command>)
8415 of each top level list is checked against the source address of
8416 the query until a match is found.
8419 Once the source address of the query has been matched, if
8420 the top level statement contains only one element, the actual
8422 element that matched the source address is used to select the
8424 in the response to move to the beginning of the response. If the
8425 statement is a list of two elements, then the second element is
8426 treated the same as the <command>address_match_list</command> in
8427 a <command>topology</command> statement. Each top
8429 is assigned a distance and the address in the response with the
8431 distance is moved to the beginning of the response.
8434 In the following example, any queries received from any of
8435 the addresses of the host itself will get responses preferring
8437 on any of the locally connected networks. Next most preferred are
8439 on the 192.168.1/24 network, and after that either the
8442 192.168.3/24 network with no preference shown between these two
8443 networks. Queries received from a host on the 192.168.1/24 network
8444 will prefer other addresses on that network to the 192.168.2/24
8446 192.168.3/24 networks. Queries received from a host on the
8448 or the 192.168.5/24 network will only prefer other addresses on
8449 their directly connected networks.
8452 <programlisting>sortlist {
8453 // IF the local host
8454 // THEN first fit on the following nets
8458 { 192.168.2/24; 192.168.3/24; }; }; };
8459 // IF on class C 192.168.1 THEN use .1, or .2 or .3
8462 { 192.168.2/24; 192.168.3/24; }; }; };
8463 // IF on class C 192.168.2 THEN use .2, or .1 or .3
8466 { 192.168.1/24; 192.168.3/24; }; }; };
8467 // IF on class C 192.168.3 THEN use .3, or .1 or .2
8470 { 192.168.1/24; 192.168.2/24; }; }; };
8471 // IF .4 or .5 THEN prefer that net
8472 { { 192.168.4/24; 192.168.5/24; };
8477 The following example will give reasonable behavior for the
8478 local host and hosts on directly connected networks. It is similar
8479 to the behavior of the address sort in <acronym>BIND</acronym> 4.9.x. Responses sent
8480 to queries from the local host will favor any of the directly
8482 networks. Responses sent to queries from any other hosts on a
8484 connected network will prefer addresses on that same network.
8486 to other queries will not be sorted.
8489 <programlisting>sortlist {
8490 { localhost; localnets; };
8496 <sect3 id="rrset_ordering">
8497 <title id="rrset_ordering_title">RRset Ordering</title>
8499 When multiple records are returned in an answer it may be
8500 useful to configure the order of the records placed into the
8502 The <command>rrset-order</command> statement permits
8504 of the ordering of the records in a multiple record response.
8505 See also the <command>sortlist</command> statement,
8506 <xref linkend="the_sortlist_statement"/>.
8510 An <command>order_spec</command> is defined as
8514 <optional>class <replaceable>class_name</replaceable></optional>
8515 <optional>type <replaceable>type_name</replaceable></optional>
8516 <optional>name <replaceable>"domain_name"</replaceable></optional>
8517 order <replaceable>ordering</replaceable>
8520 If no class is specified, the default is <command>ANY</command>.
8521 If no type is specified, the default is <command>ANY</command>.
8522 If no name is specified, the default is "<command>*</command>" (asterisk).
8525 The legal values for <command>ordering</command> are:
8527 <informaltable colsep="0" rowsep="0">
8528 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
8529 <colspec colname="1" colnum="1" colsep="0" colwidth="0.750in"/>
8530 <colspec colname="2" colnum="2" colsep="0" colwidth="3.750in"/>
8534 <para><command>fixed</command></para>
8538 Records are returned in the order they
8539 are defined in the zone file.
8545 <para><command>random</command></para>
8549 Records are returned in some random order.
8555 <para><command>cyclic</command></para>
8559 Records are returned in a cyclic round-robin order.
8562 If <acronym>BIND</acronym> is configured with the
8563 "--enable-fixed-rrset" option at compile time, then
8564 the initial ordering of the RRset will match the
8565 one specified in the zone file.
8576 <programlisting>rrset-order {
8577 class IN type A name "host.example.com" order random;
8583 will cause any responses for type A records in class IN that
8584 have "<literal>host.example.com</literal>" as a
8585 suffix, to always be returned
8586 in random order. All other records are returned in cyclic order.
8589 If multiple <command>rrset-order</command> statements
8590 appear, they are not combined — the last one applies.
8593 By default, all records are returned in random order.
8598 In this release of <acronym>BIND</acronym> 9, the
8599 <command>rrset-order</command> statement does not support
8600 "fixed" ordering by default. Fixed ordering can be enabled
8601 at compile time by specifying "--enable-fixed-rrset" on
8602 the "configure" command line.
8608 <title>Tuning</title>
8613 <term><command>lame-ttl</command></term>
8616 Sets the number of seconds to cache a
8617 lame server indication. 0 disables caching. (This is
8618 <emphasis role="bold">NOT</emphasis> recommended.)
8619 The default is <literal>600</literal> (10 minutes) and the
8621 <literal>1800</literal> (30 minutes).
8625 Lame-ttl also controls the amount of time DNSSEC
8626 validation failures are cached. There is a minimum
8627 of 30 seconds applied to bad cache entries if the
8628 lame-ttl is set to less than 30 seconds.
8635 <term><command>max-ncache-ttl</command></term>
8638 To reduce network traffic and increase performance,
8639 the server stores negative answers. <command>max-ncache-ttl</command> is
8640 used to set a maximum retention time for these answers in
8642 in seconds. The default
8643 <command>max-ncache-ttl</command> is <literal>10800</literal> seconds (3 hours).
8644 <command>max-ncache-ttl</command> cannot exceed
8646 be silently truncated to 7 days if set to a greater value.
8652 <term><command>max-cache-ttl</command></term>
8655 Sets the maximum time for which the server will
8656 cache ordinary (positive) answers. The default is
8658 A value of zero may cause all queries to return
8659 SERVFAIL, because of lost caches of intermediate
8660 RRsets (such as NS and glue AAAA/A records) in the
8667 <term><command>min-roots</command></term>
8670 The minimum number of root servers that
8671 is required for a request for the root servers to be
8672 accepted. The default
8673 is <userinput>2</userinput>.
8677 Not implemented in <acronym>BIND</acronym> 9.
8684 <term><command>sig-validity-interval</command></term>
8687 Specifies the number of days into the future when
8688 DNSSEC signatures automatically generated as a
8689 result of dynamic updates (<xref
8690 linkend="dynamic_update"/>) will expire. There
8691 is an optional second field which specifies how
8692 long before expiry that the signatures will be
8693 regenerated. If not specified, the signatures will
8694 be regenerated at 1/4 of base interval. The second
8695 field is specified in days if the base interval is
8696 greater than 7 days otherwise it is specified in hours.
8697 The default base interval is <literal>30</literal> days
8698 giving a re-signing interval of 7 1/2 days. The maximum
8699 values are 10 years (3660 days).
8702 The signature inception time is unconditionally
8703 set to one hour before the current time to allow
8704 for a limited amount of clock skew.
8707 The <command>sig-validity-interval</command>
8708 should be, at least, several multiples of the SOA
8709 expire interval to allow for reasonable interaction
8710 between the various timer and expiry dates.
8716 <term><command>sig-signing-nodes</command></term>
8719 Specify the maximum number of nodes to be
8720 examined in each quantum when signing a zone with
8721 a new DNSKEY. The default is
8722 <literal>100</literal>.
8728 <term><command>sig-signing-signatures</command></term>
8731 Specify a threshold number of signatures that
8732 will terminate processing a quantum when signing
8733 a zone with a new DNSKEY. The default is
8734 <literal>10</literal>.
8740 <term><command>sig-signing-type</command></term>
8743 Specify a private RDATA type to be used when generating
8744 signing state records. The default is
8745 <literal>65534</literal>.
8748 It is expected that this parameter may be removed
8749 in a future version once there is a standard type.
8752 Signing state records are used to internally by
8753 <command>named</command> to track the current state of
8754 a zone-signing process, i.e., whether it is still active
8755 or has been completed. The records can be inspected
8757 <command>rndc signing -list <replaceable>zone</replaceable></command>.
8758 Once <command>named</command> has finished signing
8759 a zone with a particular key, the signing state
8760 record associated with that key can be removed from
8762 <command>rndc signing -clear <replaceable>keyid/algorithm</replaceable> <replaceable>zone</replaceable></command>.
8763 To clear all of the completed signing state
8764 records for a zone, use
8765 <command>rndc signing -clear all <replaceable>zone</replaceable></command>.
8771 <term><command>min-refresh-time</command></term>
8772 <term><command>max-refresh-time</command></term>
8773 <term><command>min-retry-time</command></term>
8774 <term><command>max-retry-time</command></term>
8777 These options control the server's behavior on refreshing a
8779 (querying for SOA changes) or retrying failed transfers.
8780 Usually the SOA values for the zone are used, but these
8782 are set by the master, giving slave server administrators
8784 control over their contents.
8787 These options allow the administrator to set a minimum and
8789 refresh and retry time either per-zone, per-view, or
8791 These options are valid for slave and stub zones,
8792 and clamp the SOA refresh and retry times to the specified
8796 The following defaults apply.
8797 <command>min-refresh-time</command> 300 seconds,
8798 <command>max-refresh-time</command> 2419200 seconds
8799 (4 weeks), <command>min-retry-time</command> 500 seconds,
8800 and <command>max-retry-time</command> 1209600 seconds
8807 <term><command>edns-udp-size</command></term>
8810 Sets the maximum advertised EDNS UDP buffer size in
8811 bytes, to control the size of packets received from
8812 authoritative servers in response to recursive queries.
8813 Valid values are 512 to 4096 (values outside this range
8814 will be silently adjusted to the nearest value within
8815 it). The default value is 4096.
8818 The usual reason for setting
8819 <command>edns-udp-size</command> to a non-default value
8820 is to get UDP answers to pass through broken firewalls
8821 that block fragmented packets and/or block UDP DNS
8822 packets that are greater than 512 bytes.
8825 When <command>named</command> first queries a remote
8826 server, it will advertise a UDP buffer size of 512, as
8827 this has the greatest chance of success on the first try.
8830 If the initial response times out, <command>named</command>
8831 will try again with plain DNS, and if that is successful,
8832 it will be taken as evidence that the server does not
8833 support EDNS. After enough failures using EDNS and
8834 successes using plain DNS, <command>named</command>
8835 will default to plain DNS for future communications
8836 with that server. (Periodically, <command>named</command>
8837 will send an EDNS query to see if the situation has
8841 However, if the initial query is successful with
8842 EDNS advertising a buffer size of 512, then
8843 <command>named</command> will advertise progressively
8844 larger buffer sizes on successive queries, until
8845 responses begin timing out or
8846 <command>edns-udp-size</command> is reached.
8849 The default buffer sizes used by <command>named</command>
8850 are 512, 1232, 1432, and 4096, but never exceeding
8851 <command>edns-udp-size</command>. (The values 1232 and
8852 1432 are chosen to allow for an IPv4/IPv6 encapsulated
8853 UDP message to be sent without fragmentation at the
8854 minimum MTU sizes for Ethernet and IPv6 networks.)
8860 <term><command>max-udp-size</command></term>
8863 Sets the maximum EDNS UDP message size
8864 <command>named</command> will send in bytes.
8865 Valid values are 512 to 4096 (values outside this
8866 range will be silently adjusted to the nearest
8867 value within it). The default value is 4096.
8870 This value applies to responses sent by a server; to
8871 set the advertised buffer size in queries, see
8872 <command>edns-udp-size</command>.
8875 The usual reason for setting
8876 <command>max-udp-size</command> to a non-default
8877 value is to get UDP answers to pass through broken
8878 firewalls that block fragmented packets and/or
8879 block UDP packets that are greater than 512 bytes.
8880 This is independent of the advertised receive
8881 buffer (<command>edns-udp-size</command>).
8884 Setting this to a low value will encourage additional
8885 TCP traffic to the nameserver.
8891 <term><command>masterfile-format</command></term>
8894 the file format of zone files (see
8895 <xref linkend="zonefile_format"/>).
8896 The default value is <constant>text</constant>, which is the
8897 standard textual representation, except for slave zones,
8898 in which the default value is <constant>raw</constant>.
8899 Files in other formats than <constant>text</constant> are
8900 typically expected to be generated by the
8901 <command>named-compilezone</command> tool, or dumped by
8902 <command>named</command>.
8905 Note that when a zone file in a different format than
8906 <constant>text</constant> is loaded, <command>named</command>
8907 may omit some of the checks which would be performed for a
8908 file in the <constant>text</constant> format. In particular,
8909 <command>check-names</command> checks do not apply
8910 for the <constant>raw</constant> format. This means
8911 a zone file in the <constant>raw</constant> format
8912 must be generated with the same check level as that
8913 specified in the <command>named</command> configuration
8914 file. Also, <constant>map</constant> format files are
8915 loaded directly into memory via memory mapping, with only
8919 This statement sets the
8920 <command>masterfile-format</command> for all zones,
8921 but can be overridden on a per-zone or per-view basis
8922 by including a <command>masterfile-format</command>
8923 statement within the <command>zone</command> or
8924 <command>view</command> block in the configuration
8930 <varlistentry id="clients-per-query">
8931 <term><command>clients-per-query</command></term>
8932 <term><command>max-clients-per-query</command></term>
8935 initial value (minimum) and maximum number of recursive
8936 simultaneous clients for any given query
8937 (<qname,qtype,qclass>) that the server will accept
8938 before dropping additional clients.
8939 <command>named</command> will attempt to
8940 self tune this value and changes will be logged. The
8941 default values are 10 and 100.
8944 This value should reflect how many queries come in for
8945 a given name in the time it takes to resolve that name.
8946 If the number of queries exceed this value, <command>named</command> will
8947 assume that it is dealing with a non-responsive zone
8948 and will drop additional queries. If it gets a response
8949 after dropping queries, it will raise the estimate. The
8950 estimate will then be lowered in 20 minutes if it has
8954 If <command>clients-per-query</command> is set to zero,
8955 then there is no limit on the number of clients per query
8956 and no queries will be dropped.
8959 If <command>max-clients-per-query</command> is set to zero,
8960 then there is no upper bound other than imposed by
8961 <command>recursive-clients</command>.
8966 <varlistentry id="max-recursion-depth">
8967 <term><command>max-recursion-depth</command></term>
8970 Sets the maximum number of levels of recursion
8971 that are permitted at any one time while servicing
8972 a recursive query. Resolving a name may require
8973 looking up a name server address, which in turn
8974 requires resolving another name, etc; if the number
8975 of indirections exceeds this value, the recursive
8976 query is terminated and returns SERVFAIL. The
8982 <varlistentry id="max-recursion-queries">
8983 <term><command>max-recursion-queries</command></term>
8986 Sets the maximum number of iterative queries that
8987 may be sent while servicing a recursive query.
8988 If more queries are sent, the recursive query
8989 is terminated and returns SERVFAIL. Queries to
8990 look up top level comains such as "com" and "net"
8991 and the DNS root zone are exempt from this limitation.
8998 <term><command>notify-delay</command></term>
9001 The delay, in seconds, between sending sets of notify
9002 messages for a zone. The default is five (5) seconds.
9005 The overall rate that NOTIFY messages are sent for all
9006 zones is controlled by <command>serial-query-rate</command>.
9012 <term><command>max-rsa-exponent-size</command></term>
9015 The maximum RSA exponent size, in bits, that will
9016 be accepted when validating. Valid values are 35
9017 to 4096 bits. The default zero (0) is also accepted
9018 and is equivalent to 4096.
9024 <term><command>prefetch</command></term>
9027 When a query is received for cached data which
9028 is to expire shortly, <command>named</command> can
9029 refresh the data from the authoritative server
9030 immediately, ensuring that the cache always has an
9034 The <option>prefetch</option> specifies the
9035 "trigger" TTL value at which prefetch of the current
9036 query will take place: when a cache record with a
9037 lower TTL value is encountered during query processing,
9038 it will be refreshed. Valid trigger TTL values are 1 to
9039 10 seconds. Values larger than 10 seconds will be silently
9041 Setting a trigger TTL to zero (0) causes
9042 prefetch to be disabled.
9043 The default trigger TTL is <literal>2</literal>.
9046 An optional second argument specifies the "eligibility"
9047 TTL: the smallest <emphasis>original</emphasis>
9048 TTL value that will be accepted for a record to be
9049 eligible for prefetching. The eligibility TTL must
9050 be at least six seconds longer than the trigger TTL;
9051 if it isn't, <command>named</command> will silently
9053 The default eligibility TTL is <literal>9</literal>.
9061 <sect3 id="builtin">
9062 <title>Built-in server information zones</title>
9065 The server provides some helpful diagnostic information
9066 through a number of built-in zones under the
9067 pseudo-top-level-domain <literal>bind</literal> in the
9068 <command>CHAOS</command> class. These zones are part
9070 built-in view (see <xref linkend="view_statement_grammar"/>) of
9072 <command>CHAOS</command> which is separate from the
9073 default view of class <command>IN</command>. Most global
9074 configuration options (<command>allow-query</command>,
9075 etc) will apply to this view, but some are locally
9076 overridden: <command>notify</command>,
9077 <command>recursion</command> and
9078 <command>allow-new-zones</command> are
9079 always set to <userinput>no</userinput>, and
9080 <command>rate-limit</command> is set to allow
9081 three responses per second.
9084 If you need to disable these zones, use the options
9085 below, or hide the built-in <command>CHAOS</command>
9087 defining an explicit view of class <command>CHAOS</command>
9088 that matches all clients.
9094 <term><command>version</command></term>
9097 The version the server should report
9098 via a query of the name <literal>version.bind</literal>
9099 with type <command>TXT</command>, class <command>CHAOS</command>.
9100 The default is the real version number of this server.
9101 Specifying <command>version none</command>
9102 disables processing of the queries.
9108 <term><command>hostname</command></term>
9111 The hostname the server should report via a query of
9112 the name <filename>hostname.bind</filename>
9113 with type <command>TXT</command>, class <command>CHAOS</command>.
9114 This defaults to the hostname of the machine hosting the
9116 found by the gethostname() function. The primary purpose of such queries
9118 identify which of a group of anycast servers is actually
9119 answering your queries. Specifying <command>hostname none;</command>
9120 disables processing of the queries.
9126 <term><command>server-id</command></term>
9129 The ID the server should report when receiving a Name
9130 Server Identifier (NSID) query, or a query of the name
9131 <filename>ID.SERVER</filename> with type
9132 <command>TXT</command>, class <command>CHAOS</command>.
9133 The primary purpose of such queries is to
9134 identify which of a group of anycast servers is actually
9135 answering your queries. Specifying <command>server-id none;</command>
9136 disables processing of the queries.
9137 Specifying <command>server-id hostname;</command> will cause <command>named</command> to
9138 use the hostname as found by the gethostname() function.
9139 The default <command>server-id</command> is <command>none</command>.
9149 <title>Built-in Empty Zones</title>
9151 Named has some built-in empty zones (SOA and NS records only).
9152 These are for zones that should normally be answered locally
9153 and which queries should not be sent to the Internet's root
9154 servers. The official servers which cover these namespaces
9155 return NXDOMAIN responses to these queries. In particular,
9156 these cover the reverse namespaces for addresses from
9157 RFC 1918, RFC 4193, RFC 5737 and RFC 6598. They also include the
9158 reverse namespace for IPv6 local address (locally assigned),
9159 IPv6 link local addresses, the IPv6 loopback address and the
9160 IPv6 unknown address.
9163 Named will attempt to determine if a built-in zone already exists
9164 or is active (covered by a forward-only forwarding declaration)
9165 and will not create an empty zone in that case.
9168 The current list of empty zones is:
9170 <listitem>10.IN-ADDR.ARPA</listitem>
9171 <listitem>16.172.IN-ADDR.ARPA</listitem>
9172 <listitem>17.172.IN-ADDR.ARPA</listitem>
9173 <listitem>18.172.IN-ADDR.ARPA</listitem>
9174 <listitem>19.172.IN-ADDR.ARPA</listitem>
9175 <listitem>20.172.IN-ADDR.ARPA</listitem>
9176 <listitem>21.172.IN-ADDR.ARPA</listitem>
9177 <listitem>22.172.IN-ADDR.ARPA</listitem>
9178 <listitem>23.172.IN-ADDR.ARPA</listitem>
9179 <listitem>24.172.IN-ADDR.ARPA</listitem>
9180 <listitem>25.172.IN-ADDR.ARPA</listitem>
9181 <listitem>26.172.IN-ADDR.ARPA</listitem>
9182 <listitem>27.172.IN-ADDR.ARPA</listitem>
9183 <listitem>28.172.IN-ADDR.ARPA</listitem>
9184 <listitem>29.172.IN-ADDR.ARPA</listitem>
9185 <listitem>30.172.IN-ADDR.ARPA</listitem>
9186 <listitem>31.172.IN-ADDR.ARPA</listitem>
9187 <listitem>168.192.IN-ADDR.ARPA</listitem>
9188 <listitem>64.100.IN-ADDR.ARPA</listitem>
9189 <listitem>65.100.IN-ADDR.ARPA</listitem>
9190 <listitem>66.100.IN-ADDR.ARPA</listitem>
9191 <listitem>67.100.IN-ADDR.ARPA</listitem>
9192 <listitem>68.100.IN-ADDR.ARPA</listitem>
9193 <listitem>69.100.IN-ADDR.ARPA</listitem>
9194 <listitem>70.100.IN-ADDR.ARPA</listitem>
9195 <listitem>71.100.IN-ADDR.ARPA</listitem>
9196 <listitem>72.100.IN-ADDR.ARPA</listitem>
9197 <listitem>73.100.IN-ADDR.ARPA</listitem>
9198 <listitem>74.100.IN-ADDR.ARPA</listitem>
9199 <listitem>75.100.IN-ADDR.ARPA</listitem>
9200 <listitem>76.100.IN-ADDR.ARPA</listitem>
9201 <listitem>77.100.IN-ADDR.ARPA</listitem>
9202 <listitem>78.100.IN-ADDR.ARPA</listitem>
9203 <listitem>79.100.IN-ADDR.ARPA</listitem>
9204 <listitem>80.100.IN-ADDR.ARPA</listitem>
9205 <listitem>81.100.IN-ADDR.ARPA</listitem>
9206 <listitem>82.100.IN-ADDR.ARPA</listitem>
9207 <listitem>83.100.IN-ADDR.ARPA</listitem>
9208 <listitem>84.100.IN-ADDR.ARPA</listitem>
9209 <listitem>85.100.IN-ADDR.ARPA</listitem>
9210 <listitem>86.100.IN-ADDR.ARPA</listitem>
9211 <listitem>87.100.IN-ADDR.ARPA</listitem>
9212 <listitem>88.100.IN-ADDR.ARPA</listitem>
9213 <listitem>89.100.IN-ADDR.ARPA</listitem>
9214 <listitem>90.100.IN-ADDR.ARPA</listitem>
9215 <listitem>91.100.IN-ADDR.ARPA</listitem>
9216 <listitem>92.100.IN-ADDR.ARPA</listitem>
9217 <listitem>93.100.IN-ADDR.ARPA</listitem>
9218 <listitem>94.100.IN-ADDR.ARPA</listitem>
9219 <listitem>95.100.IN-ADDR.ARPA</listitem>
9220 <listitem>96.100.IN-ADDR.ARPA</listitem>
9221 <listitem>97.100.IN-ADDR.ARPA</listitem>
9222 <listitem>98.100.IN-ADDR.ARPA</listitem>
9223 <listitem>99.100.IN-ADDR.ARPA</listitem>
9224 <listitem>100.100.IN-ADDR.ARPA</listitem>
9225 <listitem>101.100.IN-ADDR.ARPA</listitem>
9226 <listitem>102.100.IN-ADDR.ARPA</listitem>
9227 <listitem>103.100.IN-ADDR.ARPA</listitem>
9228 <listitem>104.100.IN-ADDR.ARPA</listitem>
9229 <listitem>105.100.IN-ADDR.ARPA</listitem>
9230 <listitem>106.100.IN-ADDR.ARPA</listitem>
9231 <listitem>107.100.IN-ADDR.ARPA</listitem>
9232 <listitem>108.100.IN-ADDR.ARPA</listitem>
9233 <listitem>109.100.IN-ADDR.ARPA</listitem>
9234 <listitem>110.100.IN-ADDR.ARPA</listitem>
9235 <listitem>111.100.IN-ADDR.ARPA</listitem>
9236 <listitem>112.100.IN-ADDR.ARPA</listitem>
9237 <listitem>113.100.IN-ADDR.ARPA</listitem>
9238 <listitem>114.100.IN-ADDR.ARPA</listitem>
9239 <listitem>115.100.IN-ADDR.ARPA</listitem>
9240 <listitem>116.100.IN-ADDR.ARPA</listitem>
9241 <listitem>117.100.IN-ADDR.ARPA</listitem>
9242 <listitem>118.100.IN-ADDR.ARPA</listitem>
9243 <listitem>119.100.IN-ADDR.ARPA</listitem>
9244 <listitem>120.100.IN-ADDR.ARPA</listitem>
9245 <listitem>121.100.IN-ADDR.ARPA</listitem>
9246 <listitem>122.100.IN-ADDR.ARPA</listitem>
9247 <listitem>123.100.IN-ADDR.ARPA</listitem>
9248 <listitem>124.100.IN-ADDR.ARPA</listitem>
9249 <listitem>125.100.IN-ADDR.ARPA</listitem>
9250 <listitem>126.100.IN-ADDR.ARPA</listitem>
9251 <listitem>127.100.IN-ADDR.ARPA</listitem>
9252 <listitem>0.IN-ADDR.ARPA</listitem>
9253 <listitem>127.IN-ADDR.ARPA</listitem>
9254 <listitem>254.169.IN-ADDR.ARPA</listitem>
9255 <listitem>2.0.192.IN-ADDR.ARPA</listitem>
9256 <listitem>100.51.198.IN-ADDR.ARPA</listitem>
9257 <listitem>113.0.203.IN-ADDR.ARPA</listitem>
9258 <listitem>255.255.255.255.IN-ADDR.ARPA</listitem>
9259 <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>
9260 <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>
9261 <listitem>8.B.D.0.1.0.0.2.IP6.ARPA</listitem>
9262 <listitem>D.F.IP6.ARPA</listitem>
9263 <listitem>8.E.F.IP6.ARPA</listitem>
9264 <listitem>9.E.F.IP6.ARPA</listitem>
9265 <listitem>A.E.F.IP6.ARPA</listitem>
9266 <listitem>B.E.F.IP6.ARPA</listitem>
9270 Empty zones are settable at the view level and only apply to
9271 views of class IN. Disabled empty zones are only inherited
9272 from options if there are no disabled empty zones specified
9273 at the view level. To override the options list of disabled
9274 zones, you can disable the root zone at the view level, for example:
9276 disable-empty-zone ".";
9280 If you are using the address ranges covered here, you should
9281 already have reverse zones covering the addresses you use.
9282 In practice this appears to not be the case with many queries
9283 being made to the infrastructure servers for names in these
9284 spaces. So many in fact that sacrificial servers were needed
9285 to be deployed to channel the query load away from the
9286 infrastructure servers.
9289 The real parent servers for these zones should disable all
9290 empty zone under the parent zone they serve. For the real
9291 root servers, this is all built-in empty zones. This will
9292 enable them to return referrals to deeper in the tree.
9296 <term><command>empty-server</command></term>
9299 Specify what server name will appear in the returned
9300 SOA record for empty zones. If none is specified, then
9301 the zone's name will be used.
9307 <term><command>empty-contact</command></term>
9310 Specify what contact name will appear in the returned
9311 SOA record for empty zones. If none is specified, then
9318 <term><command>empty-zones-enable</command></term>
9321 Enable or disable all empty zones. By default, they
9328 <term><command>disable-empty-zone</command></term>
9331 Disable individual empty zones. By default, none are
9332 disabled. This option can be specified multiple times.
9340 <title>Additional Section Caching</title>
9343 The additional section cache, also called <command>acache</command>,
9344 is an internal cache to improve the response performance of BIND 9.
9345 When additional section caching is enabled, BIND 9 will
9346 cache an internal short-cut to the additional section content for
9348 Note that <command>acache</command> is an internal caching
9349 mechanism of BIND 9, and is not related to the DNS caching
9354 Additional section caching does not change the
9355 response content (except the RRsets ordering of the additional
9356 section, see below), but can improve the response performance
9358 It is particularly effective when BIND 9 acts as an authoritative
9359 server for a zone that has many delegations with many glue RRs.
9363 In order to obtain the maximum performance improvement
9364 from additional section caching, setting
9365 <command>additional-from-cache</command>
9366 to <command>no</command> is recommended, since the current
9367 implementation of <command>acache</command>
9368 does not short-cut of additional section information from the
9373 One obvious disadvantage of <command>acache</command> is
9374 that it requires much more
9375 memory for the internal cached data.
9376 Thus, if the response performance does not matter and memory
9377 consumption is much more critical, the
9378 <command>acache</command> mechanism can be
9379 disabled by setting <command>acache-enable</command> to
9380 <command>no</command>.
9381 It is also possible to specify the upper limit of memory
9383 for acache by using <command>max-acache-size</command>.
9387 Additional section caching also has a minor effect on the
9388 RRset ordering in the additional section.
9389 Without <command>acache</command>,
9390 <command>cyclic</command> order is effective for the additional
9391 section as well as the answer and authority sections.
9392 However, additional section caching fixes the ordering when it
9393 first caches an RRset for the additional section, and the same
9394 ordering will be kept in succeeding responses, regardless of the
9395 setting of <command>rrset-order</command>.
9396 The effect of this should be minor, however, since an
9397 RRset in the additional section
9398 typically only contains a small number of RRs (and in many cases
9399 it only contains a single RR), in which case the
9400 ordering does not matter much.
9404 The following is a summary of options related to
9405 <command>acache</command>.
9411 <term><command>acache-enable</command></term>
9414 If <command>yes</command>, additional section caching is
9415 enabled. The default value is <command>no</command>.
9421 <term><command>acache-cleaning-interval</command></term>
9424 The server will remove stale cache entries, based on an LRU
9426 algorithm, every <command>acache-cleaning-interval</command> minutes.
9427 The default is 60 minutes.
9428 If set to 0, no periodic cleaning will occur.
9434 <term><command>max-acache-size</command></term>
9437 The maximum amount of memory in bytes to use for the server's acache.
9438 When the amount of data in the acache reaches this limit,
9440 will clean more aggressively so that the limit is not
9442 In a server with multiple views, the limit applies
9444 acache of each view.
9445 The default is <literal>16M</literal>.
9455 <title>Content Filtering</title>
9457 <acronym>BIND</acronym> 9 provides the ability to filter
9458 out DNS responses from external DNS servers containing
9459 certain types of data in the answer section.
9460 Specifically, it can reject address (A or AAAA) records if
9461 the corresponding IPv4 or IPv6 addresses match the given
9462 <varname>address_match_list</varname> of the
9463 <command>deny-answer-addresses</command> option.
9464 It can also reject CNAME or DNAME records if the "alias"
9465 name (i.e., the CNAME alias or the substituted query name
9466 due to DNAME) matches the
9467 given <varname>namelist</varname> of the
9468 <command>deny-answer-aliases</command> option, where
9469 "match" means the alias name is a subdomain of one of
9470 the <varname>name_list</varname> elements.
9471 If the optional <varname>namelist</varname> is specified
9472 with <command>except-from</command>, records whose query name
9473 matches the list will be accepted regardless of the filter
9475 Likewise, if the alias name is a subdomain of the
9476 corresponding zone, the <command>deny-answer-aliases</command>
9477 filter will not apply;
9478 for example, even if "example.com" is specified for
9479 <command>deny-answer-aliases</command>,
9481 <programlisting>www.example.com. CNAME xxx.example.com.</programlisting>
9484 returned by an "example.com" server will be accepted.
9488 In the <varname>address_match_list</varname> of the
9489 <command>deny-answer-addresses</command> option, only
9490 <varname>ip_addr</varname>
9491 and <varname>ip_prefix</varname>
9493 any <varname>key_id</varname> will be silently ignored.
9497 If a response message is rejected due to the filtering,
9498 the entire message is discarded without being cached, and
9499 a SERVFAIL error will be returned to the client.
9503 This filtering is intended to prevent "DNS rebinding attacks," in
9504 which an attacker, in response to a query for a domain name the
9505 attacker controls, returns an IP address within your own network or
9506 an alias name within your own domain.
9507 A naive web browser or script could then serve as an
9508 unintended proxy, allowing the attacker
9509 to get access to an internal node of your local network
9510 that couldn't be externally accessed otherwise.
9511 See the paper available at
9512 <ulink url="http://portal.acm.org/citation.cfm?id=1315245.1315298">
9513 http://portal.acm.org/citation.cfm?id=1315245.1315298
9515 for more details about the attacks.
9519 For example, if you own a domain named "example.net" and
9520 your internal network uses an IPv4 prefix 192.0.2.0/24,
9521 you might specify the following rules:
9524 <programlisting>deny-answer-addresses { 192.0.2.0/24; } except-from { "example.net"; };
9525 deny-answer-aliases { "example.net"; };
9529 If an external attacker lets a web browser in your local
9530 network look up an IPv4 address of "attacker.example.com",
9531 the attacker's DNS server would return a response like this:
9534 <programlisting>attacker.example.com. A 192.0.2.1</programlisting>
9537 in the answer section.
9538 Since the rdata of this record (the IPv4 address) matches
9539 the specified prefix 192.0.2.0/24, this response will be
9544 On the other hand, if the browser looks up a legitimate
9545 internal web server "www.example.net" and the
9546 following response is returned to
9547 the <acronym>BIND</acronym> 9 server
9550 <programlisting>www.example.net. A 192.0.2.2</programlisting>
9553 it will be accepted since the owner name "www.example.net"
9554 matches the <command>except-from</command> element,
9559 Note that this is not really an attack on the DNS per se.
9560 In fact, there is nothing wrong for an "external" name to
9561 be mapped to your "internal" IP address or domain name
9562 from the DNS point of view.
9563 It might actually be provided for a legitimate purpose,
9564 such as for debugging.
9565 As long as the mapping is provided by the correct owner,
9566 it is not possible or does not make sense to detect
9567 whether the intent of the mapping is legitimate or not
9569 The "rebinding" attack must primarily be protected at the
9570 application that uses the DNS.
9571 For a large site, however, it may be difficult to protect
9572 all possible applications at once.
9573 This filtering feature is provided only to help such an
9574 operational environment;
9575 it is generally discouraged to turn it on unless you are
9576 very sure you have no other choice and the attack is a
9577 real threat for your applications.
9581 Care should be particularly taken if you want to use this
9582 option for addresses within 127.0.0.0/8.
9583 These addresses are obviously "internal", but many
9584 applications conventionally rely on a DNS mapping from
9585 some name to such an address.
9586 Filtering out DNS records containing this address
9587 spuriously can break such applications.
9592 <title>Response Policy Zone (RPZ) Rewriting</title>
9594 <acronym>BIND</acronym> 9 includes a limited
9595 mechanism to modify DNS responses for requests
9596 analogous to email anti-spam DNS blacklists.
9597 Responses can be changed to deny the existence of domains (NXDOMAIN),
9598 deny the existence of IP addresses for domains (NODATA),
9599 or contain other IP addresses or data.
9603 Response policy zones are named in the
9604 <command>response-policy</command> option for the view or among the
9605 global options if there is no response-policy option for the view.
9606 Response policy zones are ordinary DNS zones containing RRsets
9607 that can be queried normally if allowed.
9608 It is usually best to restrict those queries with something like
9609 <command>allow-query { localhost; };</command>.
9613 A <command>response-policy</command> option can support
9614 multiple policy zones. To maximize performance, a radix
9615 tree is used to quickly identify response policy zones
9616 containing triggers that match the current query. This
9617 imposes an upper limit of 32 on the number of policy zones
9618 in a single <command>response-policy</command> option; more
9619 than that is a configuration error.
9623 Five policy triggers can be encoded in RPZ records.
9626 <term><command>RPZ-CLIENT-IP</command></term>
9629 IP records are triggered by the IP address of the
9631 Client IP address triggers are encoded in records that have
9632 owner names that are subdomains of
9633 <command>rpz-client-ip</command> relativized to the
9634 policy zone origin name
9635 and encode an address or address block.
9636 IPv4 addresses are represented as
9637 <userinput>prefixlength.B4.B3.B2.B1.rpz-ip</userinput>.
9638 The IPv4 prefix length must be between 1 and 32.
9639 All four bytes, B4, B3, B2, and B1, must be present.
9640 B4 is the decimal value of the least significant byte of the
9641 IPv4 address as in IN-ADDR.ARPA.
9645 IPv6 addresses are encoded in a format similar
9646 to the standard IPv6 text representation,
9647 <userinput>prefixlength.W8.W7.W6.W5.W4.W3.W2.W1.rpz-ip</userinput>.
9648 Each of W8,...,W1 is a one to four digit hexadecimal number
9649 representing 16 bits of the IPv6 address as in the standard
9650 text representation of IPv6 addresses,
9651 but reversed as in IN-ADDR.ARPA.
9652 All 8 words must be present except when one set of consecutive
9653 zero words is replaced with <userinput>.zz.</userinput>
9654 analogous to double colons (::) in standard IPv6 text
9656 The IPv6 prefix length must be between 64 and 128.
9662 <term><command>QNAME</command></term>
9665 QNAME policy records are triggered by query names of
9666 requests and targets of CNAME records resolved to generate
9668 The owner name of a QNAME policy record is
9669 the query name relativized to the policy zone.
9675 <term><command>RPZ-IP</command></term>
9678 IP triggers are IP addresses in an
9679 A or AAAA record in the ANSWER section of a response.
9680 They are encoded like client-IP triggers except as
9681 subdomains of <command>rpz-ip</command>.
9687 <term><command>RPZ-NSDNAME</command></term>
9690 NSDNAME triggers match names of authoritative servers
9691 for the query name, a parent of the query name, a CNAME for
9692 query name, or a parent of a CNAME.
9693 They are encoded as subdomains of
9694 <command>rpz-nsdname</command> relativized
9695 to the RPZ origin name.
9696 NSIP triggers match IP addresses in A and
9697 AAAA RRsets for domains that can be checked against NSDNAME
9704 <term><command>RPZ-NSIP</command></term>
9707 NSIP triggers are encoded like IP triggers except as
9708 subdomains of <command>rpz-nsip</command>.
9709 NSDNAME and NSIP triggers are checked only for names with at
9710 least <command>min-ns-dots</command> dots.
9711 The default value of <command>min-ns-dots</command> is 1 to
9712 exclude top level domains.
9720 The query response is checked against all response policy zones,
9721 so two or more policy records can be triggered by a response.
9722 Because DNS responses are rewritten according to at most one
9723 policy record, a single record encoding an action (other than
9724 <command>DISABLED</command> actions) must be chosen.
9725 Triggers or the records that encode them are chosen for the
9726 rewriting in the following order:
9728 <listitem>Choose the triggered record in the zone that appears
9729 first in the <command>response-policy</command> option.
9731 <listitem>Prefer CLIENT-IP to QNAME to IP to NSDNAME to NSIP
9732 triggers in a single zone.
9734 <listitem>Among NSDNAME triggers, prefer the
9735 trigger that matches the smallest name under the DNSSEC ordering.
9737 <listitem>Among IP or NSIP triggers, prefer the trigger
9738 with the longest prefix.
9740 <listitem>Among triggers with the same prefix length,
9741 prefer the IP or NSIP trigger that matches
9742 the smallest IP address.
9748 When the processing of a response is restarted to resolve
9749 DNAME or CNAME records and a policy record set has
9751 all response policy zones are again consulted for the
9752 DNAME or CNAME names and addresses.
9756 RPZ record sets are any types of DNS record except
9757 DNAME or DNSSEC that encode actions or responses to
9759 Any of the policies can be used with any of the triggers.
9760 For example, while the <command>TCP-only</command> policy is
9761 commonly used with <command>client-IP</command> triggers,
9762 it cn be used with any type of trigger to force the use of
9763 TCP for responses with owner names in a zone.
9766 <term><command>PASSTHRU</command></term>
9769 The whitelist policy is specified
9770 by a CNAME whose target is <command>rpz-passthru</command>.
9771 It causes the response to not be rewritten
9772 and is most often used to "poke holes" in policies for
9779 <term><command>DROP</command></term>
9782 The blacklist policy is specified
9783 by a CNAME whose target is <command>rpz-drop</command>.
9784 It causes the response to be discarded.
9785 Nothing is sent to the DNS client.
9791 <term><command>TCP-Only</command></term>
9794 The "slip" policy is specified
9795 by a CNAME whose target is <command>rpz-tcp-only</command>.
9796 It changes UDP responses to short, truncated DNS responses
9797 that require the DNS client to try again with TCP.
9798 It is used to mitigate distributed DNS reflection attacks.
9804 <term><command>NXDOMAIN</command></term>
9807 The domain undefined response is encoded
9808 by a CNAME whose target is the root domain (.)
9814 <term><command>NODATA</command></term>
9817 The empty set of resource records is specified by
9818 CNAME whose target is the wildcard top-level
9820 It rewrites the response to NODATA or ANCOUNT=1.
9826 <term><command>Local Data</command></term>
9829 A set of ordinary DNS records can be used to answer queries.
9830 Queries for record types not the set are answered with
9835 A special form of local data is a CNAME whose target is a
9836 wildcard such as *.example.com.
9837 It is used as if were an ordinary CNAME after the astrisk (*)
9838 has been replaced with the query name.
9839 The purpose for this special form is query logging in the
9840 walled garden's authority DNS server.
9848 All of the actions specified in all of the individual records
9850 can be overridden with a <command>policy</command> clause in the
9851 <command>response-policy</command> option.
9852 An organization using a policy zone provided by another
9853 organization might use this mechanism to redirect domains
9854 to its own walled garden.
9857 <term><command>GIVEN</command></term>
9859 <para>The placeholder policy says "do not override but
9860 perform the action specified in the zone."
9866 <term><command>DISABLED</command></term>
9869 The testing override policy causes policy zone records to do
9870 nothing but log what they would have done if the
9871 policy zone were not disabled.
9872 The response to the DNS query will be written (or not)
9873 according to any triggered policy records that are not
9875 Disabled policy zones should appear first,
9876 because they will often not be logged
9877 if a higher precedence trigger is found first.
9883 <term><command>PASSTHRU</command></term>,
9884 <term><command>DROP</command></term>,
9885 <term><command>TCP-Only</command></term>,
9886 <term><command>NXDOMAIN</command></term>,
9888 <term><command>NODATA</command></term>
9891 override with the corresponding per-record policy.
9897 <term><command>CNAME domain</command></term>
9900 causes all RPZ policy records to act as if they were
9901 "cname domain" records.
9909 By default, the actions encoded in a response policy zone
9910 are applied only to queries that ask for recursion (RD=1).
9911 That default can be changed for a single policy zone or
9912 all response policy zones in a view
9913 with a <command>recursive-only no</command> clause.
9914 This feature is useful for serving the same zone files
9915 both inside and outside an RFC 1918 cloud and using RPZ to
9916 delete answers that would otherwise contain RFC 1918 values
9917 on the externally visible name server or view.
9921 Also by default, RPZ actions are applied only to DNS requests
9922 that either do not request DNSSEC metadata (DO=0) or when no
9923 DNSSEC records are available for request name in the original
9924 zone (not the response policy zone). This default can be
9925 changed for all response policy zones in a view with a
9926 <command>break-dnssec yes</command> clause. In that case, RPZ
9927 actions are applied regardless of DNSSEC. The name of the
9928 clause option reflects the fact that results rewritten by RPZ
9929 actions cannot verify.
9933 No DNS records are needed for a QNAME or Client-IP trigger.
9934 The name or IP address itself is sufficient,
9935 so in principle the query name need not be recursively resolved.
9936 However, not resolving the requested
9937 name can leak the fact that response policy rewriting is in use
9938 and that the name is listed in a policy zone to operators of
9939 servers for listed names. To prevent that information leak, by
9940 default any recursion needed for a request is done before any
9941 policy triggers are considered. Because listed domains often
9942 have slow authoritative servers, this default behavior can cost
9944 The <command>qname-wait-recurse no</command> option
9945 overrides that default behavior when recursion cannot
9946 change a non-error response.
9947 The option does not affect QNAME or client-IP triggers
9948 in policy zones listed
9949 after other zones containing IP, NSIP and NSDNAME triggers, because
9950 those may depend on the A, AAAA, and NS records that would be
9951 found during recursive resolution. It also does not affect
9952 DNSSEC requests (DO=1) unless <command>break-dnssec yes</command>
9953 is in use, because the response would depend on whether or not
9954 RRSIG records were found during resolution.
9955 Using this option can cause error responses such as SERVFAIL to
9956 appear to be rewritten, since no recursion is being done to
9957 discover problems at the authoritative server.
9961 The TTL of a record modified by RPZ policies is set from the
9962 TTL of the relevant record in policy zone. It is then limited
9964 The <command>max-policy-ttl</command> clause changes that
9965 maximum from its default of 5.
9969 For example, you might use this option statement
9971 <programlisting> response-policy { zone "badlist"; };</programlisting>
9973 and this zone statement
9975 <programlisting> zone "badlist" {type master; file "master/badlist"; allow-query {none;}; };</programlisting>
9979 <programlisting>$TTL 1H
9980 @ SOA LOCALHOST. named-mgr.example.com (1 1h 15m 30d 2h)
9983 ; QNAME policy records. There are no periods (.) after the owner names.
9984 nxdomain.domain.com CNAME . ; NXDOMAIN policy
9985 *.nxdomain.domain.com CNAME . ; NXDOMAIN policy
9986 nodata.domain.com CNAME *. ; NODATA policy
9987 *.nodata.domain.com CNAME *. ; NODATA policy
9988 bad.domain.com A 10.0.0.1 ; redirect to a walled garden
9990 bzone.domain.com CNAME garden.example.com.
9992 ; do not rewrite (PASSTHRU) OK.DOMAIN.COM
9993 ok.domain.com CNAME rpz-passthru.
9995 ; redirect x.bzone.domain.com to x.bzone.domain.com.garden.example.com
9996 *.bzone.domain.com CNAME *.garden.example.com.
9999 ; IP policy records that rewrite all responses containing A records in 127/8
10001 8.0.0.0.127.rpz-ip CNAME .
10002 32.1.0.0.127.rpz-ip CNAME rpz-passthru.
10004 ; NSDNAME and NSIP policy records
10005 ns.domain.com.rpz-nsdname CNAME .
10006 48.zz.2.2001.rpz-nsip CNAME .
10008 ; blacklist and whitelist some DNS clients
10009 112.zz.2001.rpz-client-ip CNAME rpz-drop.
10010 8.0.0.0.127.rpz-client-ip CNAME rpz-drop.
10012 ; force some DNS clients and responses in the example.com zone to TCP
10013 16.0.0.1.10.rpz-client-ip CNAME rpz-tcp-only.
10014 example.com CNAME rpz-tcp-only.
10015 *.example.com CNAME rpz-tcp-only.
10019 RPZ can affect server performance.
10020 Each configured response policy zone requires the server to
10021 perform one to four additional database lookups before a
10022 query can be answered.
10023 For example, a DNS server with four policy zones, each with all
10024 four kinds of response triggers, QNAME, IP, NSIP, and
10025 NSDNAME, requires a total of 17 times as many database
10026 lookups as a similar DNS server with no response policy zones.
10027 A <acronym>BIND9</acronym> server with adequate memory and one
10028 response policy zone with QNAME and IP triggers might achieve a
10029 maximum queries-per-second rate about 20% lower.
10030 A server with four response policy zones with QNAME and IP
10031 triggers might have a maximum QPS rate about 50% lower.
10035 Responses rewritten by RPZ are counted in the
10036 <command>RPZRewrites</command> statistics.
10041 <title>Response Rate Limiting</title>
10043 Excessive almost identical UDP <emphasis>responses</emphasis>
10044 can be controlled by configuring a
10045 <command>rate-limit</command> clause in an
10046 <command>options</command> or <command>view</command> statement.
10047 This mechanism keeps authoritative BIND 9 from being used
10048 in amplifying reflection denial of service (DoS) attacks.
10049 Short truncated (TC=1) responses can be sent to provide
10050 rate-limited responses to legitimate clients within
10051 a range of forged, attacked IP addresses.
10052 Legitimate clients react to dropped or truncated response
10053 by retrying with UDP or with TCP respectively.
10057 This mechanism is intended for authoritative DNS servers.
10058 It can be used on recursive servers but can slow
10059 applications such as SMTP servers (mail receivers) and
10060 HTTP clients (web browsers) that repeatedly request the
10062 When possible, closing "open" recursive servers is better.
10066 Response rate limiting uses a "credit" or "token bucket" scheme.
10067 Each combination of identical response and client
10068 has a conceptual account that earns a specified number
10069 of credits every second.
10070 A prospective response debits its account by one.
10071 Responses are dropped or truncated
10072 while the account is negative.
10073 Responses are tracked within a rolling window of time
10074 which defaults to 15 seconds, but can be configured with
10075 the <command>window</command> option to any value from
10076 1 to 3600 seconds (1 hour).
10077 The account cannot become more positive than
10078 the per-second limit
10079 or more negative than <command>window</command>
10080 times the per-second limit.
10081 When the specified number of credits for a class of
10082 responses is set to 0, those responses are not rate limited.
10086 The notions of "identical response" and "DNS client"
10087 for rate limiting are not simplistic.
10088 All responses to an address block are counted as if to a
10090 The prefix lengths of addresses blocks are
10091 specified with <command>ipv4-prefix-length</command> (default 24)
10092 and <command>ipv6-prefix-length</command> (default 56).
10096 All non-empty responses for a valid domain name (qname)
10097 and record type (qtype) are identical and have a limit specified
10098 with <command>responses-per-second</command>
10099 (default 0 or no limit).
10100 All empty (NODATA) responses for a valid domain,
10101 regardless of query type, are identical.
10102 Responses in the NODATA class are limited by
10103 <command>nodata-per-second</command>
10104 (default <command>responses-per-second</command>).
10105 Requests for any and all undefined subdomains of a given
10106 valid domain result in NXDOMAIN errors, and are identical
10107 regardless of query type.
10108 They are limited by <command>nxdomains-per-second</command>
10109 (default base <command>responses-per-second</command>).
10110 This controls some attacks using random names, but
10111 can be relaxed or turned off (set to 0)
10112 on servers that expect many legitimate
10113 NXDOMAIN responses, such as from anti-spam blacklists.
10114 Referrals or delegations to the server of a given
10115 domain are identical and are limited by
10116 <command>referrals-per-second</command>
10117 (default <command>responses-per-second</command>).
10121 Responses generated from local wildcards are counted and limited
10122 as if they were for the parent domain name.
10123 This controls flooding using random.wild.example.com.
10127 All requests that result in DNS errors other
10128 than NXDOMAIN, such as SERVFAIL and FORMERR, are identical
10129 regardless of requested name (qname) or record type (qtype).
10130 This controls attacks using invalid requests or distant,
10131 broken authoritative servers.
10132 By default the limit on errors is the same as the
10133 <command>responses-per-second</command> value,
10134 but it can be set separately with
10135 <command>errors-per-second</command>.
10139 Many attacks using DNS involve UDP requests with forged source
10141 Rate limiting prevents the use of BIND 9 to flood a network
10142 with responses to requests with forged source addresses,
10143 but could let a third party block responses to legitimate requests.
10144 There is a mechanism that can answer some legitimate
10145 requests from a client whose address is being forged in a flood.
10146 Setting <command>slip</command> to 2 (its default) causes every
10147 other UDP request to be answered with a small truncated (TC=1)
10149 The small size and reduced frequency, and so lack of
10150 amplification, of "slipped" responses make them unattractive
10151 for reflection DoS attacks.
10152 <command>slip</command> must be between 0 and 10.
10153 A value of 0 does not "slip":
10154 no truncated responses are sent due to rate limiting,
10155 all responses are dropped.
10156 A value of 1 causes every response to slip;
10157 values between 2 and 10 cause every n'th response to slip.
10158 Some error responses including REFUSED and SERVFAIL
10159 cannot be replaced with truncated responses and are instead
10160 leaked at the <command>slip</command> rate.
10164 (NOTE: Dropped responses from an authoritative server may
10165 reduce the difficulty of a third party successfully forging
10166 a response to a recursive resolver. The best security
10167 against forged responses is for authoritative operators
10168 to sign their zones using DNSSEC and for resolver operators
10169 to validate the responses. When this is not an option,
10170 operators who are more concerned with response integrity
10171 than with flood mitigation may consider setting
10172 <command>slip</command> to 1, causing all rate-limited
10173 responses to be truncated rather than dropped. This reduces
10174 the effectiveness of rate-limiting against reflection attacks.)
10178 When the approximate query per second rate exceeds
10179 the <command>qps-scale</command> value,
10180 then the <command>responses-per-second</command>,
10181 <command>errors-per-second</command>,
10182 <command>nxdomains-per-second</command> and
10183 <command>all-per-second</command> values are reduced by the
10184 ratio of the current rate to the <command>qps-scale</command> value.
10185 This feature can tighten defenses during attacks.
10187 <command>qps-scale 250; responses-per-second 20;</command> and
10188 a total query rate of 1000 queries/second for all queries from
10189 all DNS clients including via TCP,
10190 then the effective responses/second limit changes to
10191 (250/1000)*20 or 5.
10192 Responses sent via TCP are not limited
10193 but are counted to compute the query per second rate.
10197 Communities of DNS clients can be given their own parameters or no
10198 rate limiting by putting
10199 <command>rate-limit</command> statements in <command>view</command>
10200 statements instead of the global <command>option</command>
10202 A <command>rate-limit</command> statement in a view replaces,
10203 rather than supplementing, a <command>rate-limit</command>
10204 statement among the main options.
10205 DNS clients within a view can be exempted from rate limits
10206 with the <command>exempt-clients</command> clause.
10210 UDP responses of all kinds can be limited with the
10211 <command>all-per-second</command> phrase.
10212 This rate limiting is unlike the rate limiting provided by
10213 <command>responses-per-second</command>,
10214 <command>errors-per-second</command>, and
10215 <command>nxdomains-per-second</command> on a DNS server
10216 which are often invisible to the victim of a DNS reflection attack.
10217 Unless the forged requests of the attack are the same as the
10218 legitimate requests of the victim, the victim's requests are
10220 Responses affected by an <command>all-per-second</command> limit
10221 are always dropped; the <command>slip</command> value has no
10223 An <command>all-per-second</command> limit should be
10224 at least 4 times as large as the other limits,
10225 because single DNS clients often send bursts of legitimate
10227 For example, the receipt of a single mail message can prompt
10228 requests from an SMTP server for NS, PTR, A, and AAAA records
10229 as the incoming SMTP/TCP/IP connection is considered.
10230 The SMTP server can need additional NS, A, AAAA, MX, TXT, and SPF
10231 records as it considers the STMP <command>Mail From</command>
10233 Web browsers often repeatedly resolve the same names that
10234 are repeated in HTML <IMG> tags in a page.
10235 <command>All-per-second</command> is similar to the
10236 rate limiting offered by firewalls but often inferior.
10237 Attacks that justify ignoring the
10238 contents of DNS responses are likely to be attacks on the
10240 They usually should be discarded before the DNS server
10241 spends resources making TCP connections or parsing DNS requests,
10242 but that rate limiting must be done before the
10243 DNS server sees the requests.
10247 The maximum size of the table used to track requests and
10248 rate limit responses is set with <command>max-table-size</command>.
10249 Each entry in the table is between 40 and 80 bytes.
10250 The table needs approximately as many entries as the number
10251 of requests received per second.
10252 The default is 20,000.
10253 To reduce the cold start of growing the table,
10254 <command>min-table-size</command> (default 500)
10255 can set the minimum table size.
10256 Enable <command>rate-limit</command> category logging to monitor
10257 expansions of the table and inform
10258 choices for the initial and maximum table size.
10262 Use <command>log-only yes</command> to test rate limiting parameters
10263 without actually dropping any requests.
10267 Responses dropped by rate limits are included in the
10268 <command>RateDropped</command> and <command>QryDropped</command>
10270 Responses that truncated by rate limits are included in
10271 <command>RateSlipped</command> and <command>RespTruncated</command>.
10276 <sect2 id="server_statement_grammar">
10277 <title><command>server</command> Statement Grammar</title>
10279 <programlisting><command>server</command> <replaceable>ip_addr[/prefixlen]</replaceable> {
10280 <optional> bogus <replaceable>yes_or_no</replaceable> ; </optional>
10281 <optional> provide-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
10282 <optional> request-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
10283 <optional> request-nsid <replaceable>yes_or_no</replaceable> ; </optional>
10284 <optional> request-sit <replaceable>yes_or_no</replaceable> ; </optional>
10285 <optional> edns <replaceable>yes_or_no</replaceable> ; </optional>
10286 <optional> edns-udp-size <replaceable>number</replaceable> ; </optional>
10287 <optional> nosit-udp-size <replaceable>number</replaceable> ; </optional>
10288 <optional> max-udp-size <replaceable>number</replaceable> ; </optional>
10289 <optional> transfers <replaceable>number</replaceable> ; </optional>
10290 <optional> transfer-format <replaceable>( one-answer | many-answers )</replaceable> ; ]</optional>
10291 <optional> keys <replaceable>{ string ; <optional> string ; <optional>...</optional></optional> }</replaceable> ; </optional>
10292 <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
10293 <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
10294 <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
10295 <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
10296 <optional> query-source <optional> address ( <replaceable>ip_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
10297 <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
10298 <optional> query-source-v6 <optional> address ( <replaceable>ip_addr</replaceable> | <replaceable>*</replaceable> ) </optional>
10299 <optional> port ( <replaceable>ip_port</replaceable> | <replaceable>*</replaceable> ) </optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
10300 <optional> use-queryport-pool <replaceable>yes_or_no</replaceable>; </optional>
10301 <optional> queryport-pool-ports <replaceable>number</replaceable>; </optional>
10302 <optional> queryport-pool-updateinterval <replaceable>number</replaceable>; </optional>
10308 <sect2 id="server_statement_definition_and_usage">
10309 <title><command>server</command> Statement Definition and
10313 The <command>server</command> statement defines
10315 to be associated with a remote name server. If a prefix length is
10316 specified, then a range of servers is covered. Only the most
10318 server clause applies regardless of the order in
10319 <filename>named.conf</filename>.
10323 The <command>server</command> statement can occur at
10324 the top level of the
10325 configuration file or inside a <command>view</command>
10327 If a <command>view</command> statement contains
10328 one or more <command>server</command> statements, only
10330 apply to the view and any top-level ones are ignored.
10331 If a view contains no <command>server</command>
10333 any top-level <command>server</command> statements are
10339 If you discover that a remote server is giving out bad data,
10340 marking it as bogus will prevent further queries to it. The
10342 value of <command>bogus</command> is <command>no</command>.
10345 The <command>provide-ixfr</command> clause determines
10347 the local server, acting as master, will respond with an
10349 zone transfer when the given remote server, a slave, requests it.
10350 If set to <command>yes</command>, incremental transfer
10352 whenever possible. If set to <command>no</command>,
10354 to the remote server will be non-incremental. If not set, the
10356 of the <command>provide-ixfr</command> option in the
10358 global options block is used as a default.
10362 The <command>request-ixfr</command> clause determines
10364 the local server, acting as a slave, will request incremental zone
10365 transfers from the given remote server, a master. If not set, the
10366 value of the <command>request-ixfr</command> option in
10367 the view or global options block is used as a default. It may
10368 also be set in the zone block and, if set there, it will
10369 override the global or view setting for that zone.
10373 IXFR requests to servers that do not support IXFR will
10375 fall back to AXFR. Therefore, there is no need to manually list
10376 which servers support IXFR and which ones do not; the global
10378 of <command>yes</command> should always work.
10379 The purpose of the <command>provide-ixfr</command> and
10380 <command>request-ixfr</command> clauses is
10381 to make it possible to disable the use of IXFR even when both
10383 and slave claim to support it, for example if one of the servers
10384 is buggy and crashes or corrupts data when IXFR is used.
10388 The <command>edns</command> clause determines whether
10389 the local server will attempt to use EDNS when communicating
10390 with the remote server. The default is <command>yes</command>.
10394 The <command>edns-udp-size</command> option sets the
10395 EDNS UDP size that is advertised by <command>named</command>
10396 when querying the remote server. Valid values are 512
10397 to 4096 bytes (values outside this range will be silently
10398 adjusted to the nearest value within it). This option
10399 is useful when you wish to advertise a different value
10400 to this server than the value you advertise globally,
10401 for example, when there is a firewall at the remote
10402 site that is blocking large replies. (Note: Currently,
10403 this sets a single UDP size for all packets sent to the
10404 server; <command>named</command> will not deviate from
10405 this value. This differs from the behavior of
10406 <command>edns-udp-size</command> in <command>options</command>
10407 or <command>view</command> statements, where it specifies
10408 a maximum value. The <command>server</command> statement
10409 behavior may be brought into conformance with the
10410 <command>options/view</command> behavior in future releases.)
10414 The <command>max-udp-size</command> option sets the
10415 maximum EDNS UDP message size <command>named</command> will send. Valid
10416 values are 512 to 4096 bytes (values outside this range will
10417 be silently adjusted). This option is useful when you
10418 know that there is a firewall that is blocking large
10419 replies from <command>named</command>.
10423 The <command>nosit-udp-size</command> option sets the
10424 maximum size of UDP responses that will be sent to
10425 queries without a valid source identity token. The command
10426 <command>max-udp-size</command> option may further limit
10431 The server supports two zone transfer methods. The first, <command>one-answer</command>,
10432 uses one DNS message per resource record transferred. <command>many-answers</command> packs
10433 as many resource records as possible into a message. <command>many-answers</command> is
10434 more efficient, but is only known to be understood by <acronym>BIND</acronym> 9, <acronym>BIND</acronym>
10435 8.x, and patched versions of <acronym>BIND</acronym>
10436 4.9.5. You can specify which method
10437 to use for a server with the <command>transfer-format</command> option.
10438 If <command>transfer-format</command> is not
10439 specified, the <command>transfer-format</command>
10441 by the <command>options</command> statement will be
10445 <para><command>transfers</command>
10446 is used to limit the number of concurrent inbound zone
10447 transfers from the specified server. If no
10448 <command>transfers</command> clause is specified, the
10449 limit is set according to the
10450 <command>transfers-per-ns</command> option.
10454 The <command>keys</command> clause identifies a
10455 <command>key_id</command> defined by the <command>key</command> statement,
10456 to be used for transaction security (TSIG, <xref linkend="tsig"/>)
10457 when talking to the remote server.
10458 When a request is sent to the remote server, a request signature
10459 will be generated using the key specified here and appended to the
10460 message. A request originating from the remote server is not
10462 to be signed by this key.
10466 Although the grammar of the <command>keys</command>
10468 allows for multiple keys, only a single key per server is
10474 The <command>transfer-source</command> and
10475 <command>transfer-source-v6</command> clauses specify
10476 the IPv4 and IPv6 source
10477 address to be used for zone transfer with the remote server,
10479 For an IPv4 remote server, only <command>transfer-source</command> can
10481 Similarly, for an IPv6 remote server, only
10482 <command>transfer-source-v6</command> can be
10484 For more details, see the description of
10485 <command>transfer-source</command> and
10486 <command>transfer-source-v6</command> in
10487 <xref linkend="zone_transfers"/>.
10491 The <command>notify-source</command> and
10492 <command>notify-source-v6</command> clauses specify the
10493 IPv4 and IPv6 source address to be used for notify
10494 messages sent to remote servers, respectively. For an
10495 IPv4 remote server, only <command>notify-source</command>
10496 can be specified. Similarly, for an IPv6 remote server,
10497 only <command>notify-source-v6</command> can be specified.
10501 The <command>query-source</command> and
10502 <command>query-source-v6</command> clauses specify the
10503 IPv4 and IPv6 source address to be used for queries
10504 sent to remote servers, respectively. For an IPv4
10505 remote server, only <command>query-source</command> can
10506 be specified. Similarly, for an IPv6 remote server,
10507 only <command>query-source-v6</command> can be specified.
10511 The <command>request-nsid</command> clause determines
10512 whether the local server will add a NSID EDNS option
10513 to requests sent to the server. This overrides
10514 <command>request-nsid</command> set at the view or
10519 The <command>request-sit</command> clause determines
10520 whether the local server will add a SIT EDNS option
10521 to requests sent to the server. This overrides
10522 <command>request-sit</command> set at the view or
10523 option level. Named may determine that SIT is not
10524 supported by the remote server and not add a SIT
10525 EDNS option to requests.
10529 <sect2 id="statschannels">
10530 <title><command>statistics-channels</command> Statement Grammar</title>
10532 <programlisting><command>statistics-channels</command> {
10533 [ inet ( ip_addr | * ) [ port ip_port ]
10534 [ allow { <replaceable> address_match_list </replaceable> } ]; ]
10541 <title><command>statistics-channels</command> Statement Definition and
10545 The <command>statistics-channels</command> statement
10546 declares communication channels to be used by system
10547 administrators to get access to statistics information of
10552 This statement intends to be flexible to support multiple
10553 communication protocols in the future, but currently only
10554 HTTP access is supported.
10555 It requires that BIND 9 be compiled with libxml2 and/or
10556 json-c (also known as libjson0); the
10557 <command>statistics-channels</command> statement is
10558 still accepted even if it is built without the library,
10559 but any HTTP access will fail with an error.
10563 An <command>inet</command> control channel is a TCP socket
10564 listening at the specified <command>ip_port</command> on the
10565 specified <command>ip_addr</command>, which can be an IPv4 or IPv6
10566 address. An <command>ip_addr</command> of <literal>*</literal>
10568 interpreted as the IPv4 wildcard address; connections will be
10569 accepted on any of the system's IPv4 addresses.
10570 To listen on the IPv6 wildcard address,
10571 use an <command>ip_addr</command> of <literal>::</literal>.
10575 If no port is specified, port 80 is used for HTTP channels.
10576 The asterisk "<literal>*</literal>" cannot be used for
10577 <command>ip_port</command>.
10581 The attempt of opening a statistics channel is
10582 restricted by the optional <command>allow</command> clause.
10583 Connections to the statistics channel are permitted based on the
10584 <command>address_match_list</command>.
10585 If no <command>allow</command> clause is present,
10586 <command>named</command> accepts connection
10587 attempts from any address; since the statistics may
10588 contain sensitive internal information, it is highly
10589 recommended to restrict the source of connection requests
10594 If no <command>statistics-channels</command> statement is present,
10595 <command>named</command> will not open any communication channels.
10599 The statistics are available in various formats and views
10600 depending on the URI used to access them. For example, if
10601 the statistics channel is configured to listen on 127.0.0.1
10602 port 8888, then the statistics are accessible in XML format at
10603 <ulink url="http://127.0.0.1:8888/"
10604 >http://127.0.0.1:8888/</ulink> or
10605 <ulink url="http://127.0.0.1:8888/xml"
10606 >http://127.0.0.1:8888/xml</ulink>. A CSS file is
10607 included which can format the XML statistics into tables
10608 when viewed with a stylesheet-capable browser, and into
10609 charts and graphs using the Google Charts API when using a
10610 javascript-capable browser.
10614 Applications that depend on a particular XML schema
10616 <ulink url="http://127.0.0.1:8888/xml/v2"
10617 >http://127.0.0.1:8888/xml/v2</ulink> for version 2
10618 of the statistics XML schema or
10619 <ulink url="http://127.0.0.1:8888/xml/v3"
10620 >http://127.0.0.1:8888/xml/v3</ulink> for version 3.
10621 If the requested schema is supported by the server, then
10622 it will respond; if not, it will return a "page not found"
10627 Broken-out subsets of the statistics can be viewed at
10628 <ulink url="http://127.0.0.1:8888/xml/v3/status"
10629 >http://127.0.0.1:8888/xml/v3/status</ulink>
10630 (server uptime and last reconfiguration time),
10631 <ulink url="http://127.0.0.1:8888/xml/v3/server"
10632 >http://127.0.0.1:8888/xml/v3/server</ulink>
10633 (server and resolver statistics),
10634 <ulink url="http://127.0.0.1:8888/xml/v3/zones"
10635 >http://127.0.0.1:8888/xml/v3/zones</ulink>
10637 <ulink url="http://127.0.0.1:8888/xml/v3/net"
10638 >http://127.0.0.1:8888/xml/v3/net</ulink>
10639 (network status and socket statistics),
10640 <ulink url="http://127.0.0.1:8888/xml/v3/mem"
10641 >http://127.0.0.1:8888/xml/v3/mem</ulink>
10642 (memory manager statistics),
10643 <ulink url="http://127.0.0.1:8888/xml/v3/tasks"
10644 >http://127.0.0.1:8888/xml/v3/tasks</ulink>
10645 (task manager statistics).
10649 The full set of statistics can also be read in JSON format at
10650 <ulink url="http://127.0.0.1:8888/json"
10651 >http://127.0.0.1:8888/json</ulink>,
10652 with the broken-out subsets at
10653 <ulink url="http://127.0.0.1:8888/json/v1/status"
10654 >http://127.0.0.1:8888/json/v1/status</ulink>
10655 (server uptime and last reconfiguration time),
10656 <ulink url="http://127.0.0.1:8888/json/v1/server"
10657 >http://127.0.0.1:8888/json/v1/server</ulink>
10658 (server and resolver statistics),
10659 <ulink url="http://127.0.0.1:8888/json/v1/zones"
10660 >http://127.0.0.1:8888/json/v1/zones</ulink>
10662 <ulink url="http://127.0.0.1:8888/json/v1/net"
10663 >http://127.0.0.1:8888/json/v1/net</ulink>
10664 (network status and socket statistics),
10665 <ulink url="http://127.0.0.1:8888/json/v1/mem"
10666 >http://127.0.0.1:8888/json/v1/mem</ulink>
10667 (memory manager statistics),
10668 <ulink url="http://127.0.0.1:8888/json/v1/tasks"
10669 >http://127.0.0.1:8888/json/v1/tasks</ulink>
10670 (task manager statistics).
10674 <sect2 id="trusted-keys">
10675 <title><command>trusted-keys</command> Statement Grammar</title>
10677 <programlisting><command>trusted-keys</command> {
10678 <replaceable>string</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ;
10679 <optional> <replaceable>string</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; <optional>...</optional></optional>
10685 <title><command>trusted-keys</command> Statement Definition
10688 The <command>trusted-keys</command> statement defines
10689 DNSSEC security roots. DNSSEC is described in <xref
10690 linkend="DNSSEC"/>. A security root is defined when the
10691 public key for a non-authoritative zone is known, but
10692 cannot be securely obtained through DNS, either because
10693 it is the DNS root zone or because its parent zone is
10694 unsigned. Once a key has been configured as a trusted
10695 key, it is treated as if it had been validated and
10696 proven secure. The resolver attempts DNSSEC validation
10697 on all DNS data in subdomains of a security root.
10700 All keys (and corresponding zones) listed in
10701 <command>trusted-keys</command> are deemed to exist regardless
10702 of what parent zones say. Similarly for all keys listed in
10703 <command>trusted-keys</command> only those keys are
10704 used to validate the DNSKEY RRset. The parent's DS RRset
10708 The <command>trusted-keys</command> statement can contain
10709 multiple key entries, each consisting of the key's
10710 domain name, flags, protocol, algorithm, and the Base-64
10711 representation of the key data.
10712 Spaces, tabs, newlines and carriage returns are ignored
10713 in the key data, so the configuration may be split up into
10717 <command>trusted-keys</command> may be set at the top level
10718 of <filename>named.conf</filename> or within a view. If it is
10719 set in both places, they are additive: keys defined at the top
10720 level are inherited by all views, but keys defined in a view
10721 are only used within that view.
10726 <title><command>managed-keys</command> Statement Grammar</title>
10728 <programlisting><command>managed-keys</command> {
10729 <replaceable>name</replaceable> initial-key <replaceable>flags</replaceable> <replaceable>protocol</replaceable> <replaceable>algorithm</replaceable> <replaceable>key-data</replaceable> ;
10730 <optional> <replaceable>name</replaceable> initial-key <replaceable>flags</replaceable> <replaceable>protocol</replaceable> <replaceable>algorithm</replaceable> <replaceable>key-data</replaceable> ; <optional>...</optional></optional>
10735 <sect2 id="managed-keys">
10736 <title><command>managed-keys</command> Statement Definition
10739 The <command>managed-keys</command> statement, like
10740 <command>trusted-keys</command>, defines DNSSEC
10741 security roots. The difference is that
10742 <command>managed-keys</command> can be kept up to date
10743 automatically, without intervention from the resolver
10747 Suppose, for example, that a zone's key-signing
10748 key was compromised, and the zone owner had to revoke and
10749 replace the key. A resolver which had the old key in a
10750 <command>trusted-keys</command> statement would be
10751 unable to validate this zone any longer; it would
10752 reply with a SERVFAIL response code. This would
10753 continue until the resolver operator had updated the
10754 <command>trusted-keys</command> statement with the new key.
10757 If, however, the zone were listed in a
10758 <command>managed-keys</command> statement instead, then the
10759 zone owner could add a "stand-by" key to the zone in advance.
10760 <command>named</command> would store the stand-by key, and
10761 when the original key was revoked, <command>named</command>
10762 would be able to transition smoothly to the new key. It would
10763 also recognize that the old key had been revoked, and cease
10764 using that key to validate answers, minimizing the damage that
10765 the compromised key could do.
10768 A <command>managed-keys</command> statement contains a list of
10769 the keys to be managed, along with information about how the
10770 keys are to be initialized for the first time. The only
10771 initialization method currently supported (as of
10772 <acronym>BIND</acronym> 9.7.0) is <literal>initial-key</literal>.
10773 This means the <command>managed-keys</command> statement must
10774 contain a copy of the initializing key. (Future releases may
10775 allow keys to be initialized by other methods, eliminating this
10779 Consequently, a <command>managed-keys</command> statement
10780 appears similar to a <command>trusted-keys</command>, differing
10781 in the presence of the second field, containing the keyword
10782 <literal>initial-key</literal>. The difference is, whereas the
10783 keys listed in a <command>trusted-keys</command> continue to be
10784 trusted until they are removed from
10785 <filename>named.conf</filename>, an initializing key listed
10786 in a <command>managed-keys</command> statement is only trusted
10787 <emphasis>once</emphasis>: for as long as it takes to load the
10788 managed key database and start the RFC 5011 key maintenance
10792 The first time <command>named</command> runs with a managed key
10793 configured in <filename>named.conf</filename>, it fetches the
10794 DNSKEY RRset directly from the zone apex, and validates it
10795 using the key specified in the <command>managed-keys</command>
10796 statement. If the DNSKEY RRset is validly signed, then it is
10797 used as the basis for a new managed keys database.
10800 From that point on, whenever <command>named</command> runs, it
10801 sees the <command>managed-keys</command> statement, checks to
10802 make sure RFC 5011 key maintenance has already been initialized
10803 for the specified domain, and if so, it simply moves on. The
10804 key specified in the <command>managed-keys</command> is not
10805 used to validate answers; it has been superseded by the key or
10806 keys stored in the managed keys database.
10809 The next time <command>named</command> runs after a name
10810 has been <emphasis>removed</emphasis> from the
10811 <command>managed-keys</command> statement, the corresponding
10812 zone will be removed from the managed keys database,
10813 and RFC 5011 key maintenance will no longer be used for that
10817 <command>named</command> only maintains a single managed keys
10818 database; consequently, unlike <command>trusted-keys</command>,
10819 <command>managed-keys</command> may only be set at the top
10820 level of <filename>named.conf</filename>, not within a view.
10823 In the current implementation, the managed keys database is
10824 stored as a master-format zone file called
10825 <filename>managed-keys.bind</filename>. When the key database
10826 is changed, the zone is updated. As with any other dynamic
10827 zone, changes will be written into a journal file,
10828 <filename>managed-keys.bind.jnl</filename>. They are committed
10829 to the master file as soon as possible afterward; in the case
10830 of the managed key database, this will usually occur within 30
10831 seconds. So, whenever <command>named</command> is using
10832 automatic key maintenance, those two files can be expected to
10833 exist in the working directory. (For this reason among others,
10834 the working directory should be always be writable by
10835 <command>named</command>.)
10838 If the <command>dnssec-validation</command> option is
10839 set to <userinput>auto</userinput>, <command>named</command>
10840 will automatically initialize a managed key for the
10841 root zone. Similarly, if the <command>dnssec-lookaside</command>
10842 option is set to <userinput>auto</userinput>,
10843 <command>named</command> will automatically initialize
10844 a managed key for the zone <literal>dlv.isc.org</literal>.
10845 In both cases, the key that is used to initialize the key
10846 maintenance process is built into <command>named</command>,
10847 and can be overridden from <command>bindkeys-file</command>.
10851 <sect2 id="view_statement_grammar">
10852 <title><command>view</command> Statement Grammar</title>
10854 <programlisting><command>view</command> <replaceable>view_name</replaceable>
10855 <optional><replaceable>class</replaceable></optional> {
10856 match-clients { <replaceable>address_match_list</replaceable> };
10857 match-destinations { <replaceable>address_match_list</replaceable> };
10858 match-recursive-only <replaceable>yes_or_no</replaceable> ;
10859 <optional> <replaceable>view_option</replaceable>; ...</optional>
10860 <optional> <replaceable>zone_statement</replaceable>; ...</optional>
10866 <title><command>view</command> Statement Definition and Usage</title>
10869 The <command>view</command> statement is a powerful
10871 of <acronym>BIND</acronym> 9 that lets a name server
10872 answer a DNS query differently
10873 depending on who is asking. It is particularly useful for
10875 split DNS setups without having to run multiple servers.
10879 Each <command>view</command> statement defines a view
10881 DNS namespace that will be seen by a subset of clients. A client
10883 a view if its source IP address matches the
10884 <varname>address_match_list</varname> of the view's
10885 <command>match-clients</command> clause and its
10886 destination IP address matches
10887 the <varname>address_match_list</varname> of the
10889 <command>match-destinations</command> clause. If not
10891 <command>match-clients</command> and <command>match-destinations</command>
10892 default to matching all addresses. In addition to checking IP
10894 <command>match-clients</command> and <command>match-destinations</command>
10895 can also take <command>keys</command> which provide an
10897 client to select the view. A view can also be specified
10898 as <command>match-recursive-only</command>, which
10899 means that only recursive
10900 requests from matching clients will match that view.
10901 The order of the <command>view</command> statements is
10902 significant —
10903 a client request will be resolved in the context of the first
10904 <command>view</command> that it matches.
10908 Zones defined within a <command>view</command>
10910 only be accessible to clients that match the <command>view</command>.
10911 By defining a zone of the same name in multiple views, different
10912 zone data can be given to different clients, for example,
10914 and "external" clients in a split DNS setup.
10918 Many of the options given in the <command>options</command> statement
10919 can also be used within a <command>view</command>
10920 statement, and then
10921 apply only when resolving queries with that view. When no
10923 value is given, the value in the <command>options</command> statement
10924 is used as a default. Also, zone options can have default values
10926 in the <command>view</command> statement; these
10927 view-specific defaults
10928 take precedence over those in the <command>options</command> statement.
10932 Views are class specific. If no class is given, class IN
10933 is assumed. Note that all non-IN views must contain a hint zone,
10934 since only the IN class has compiled-in default hints.
10938 If there are no <command>view</command> statements in
10940 file, a default view that matches any client is automatically
10942 in class IN. Any <command>zone</command> statements
10944 the top level of the configuration file are considered to be part
10946 this default view, and the <command>options</command>
10948 apply to the default view. If any explicit <command>view</command>
10949 statements are present, all <command>zone</command>
10951 occur inside <command>view</command> statements.
10955 Here is an example of a typical split DNS setup implemented
10956 using <command>view</command> statements:
10959 <programlisting>view "internal" {
10960 // This should match our internal networks.
10961 match-clients { 10.0.0.0/8; };
10963 // Provide recursive service to internal
10967 // Provide a complete view of the example.com
10968 // zone including addresses of internal hosts.
10969 zone "example.com" {
10971 file "example-internal.db";
10976 // Match all clients not matched by the
10978 match-clients { any; };
10980 // Refuse recursive service to external clients.
10983 // Provide a restricted view of the example.com
10984 // zone containing only publicly accessible hosts.
10985 zone "example.com" {
10987 file "example-external.db";
10993 <sect2 id="zone_statement_grammar">
10994 <title><command>zone</command>
10995 Statement Grammar</title>
10997 <programlisting><command>zone</command> <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
10999 <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
11000 <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
11001 <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
11002 <optional> allow-update { <replaceable>address_match_list</replaceable> }; </optional>
11003 <optional> update-check-ksk <replaceable>yes_or_no</replaceable>; </optional>
11004 <optional> dnssec-dnskey-kskonly <replaceable>yes_or_no</replaceable>; </optional>
11005 <optional> dnssec-loadkeys-interval <replaceable>number</replaceable>; </optional>
11006 <optional> update-policy <replaceable>local</replaceable> | { <replaceable>update_policy_rule</replaceable> <optional>...</optional> }; </optional>
11007 <optional> also-notify { <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ;
11008 <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; ... </optional> }; </optional>
11009 <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
11010 <optional> check-mx (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
11011 <optional> check-wildcard <replaceable>yes_or_no</replaceable>; </optional>
11012 <optional> check-spf ( <replaceable>warn</replaceable> | <replaceable>ignore</replaceable> ); </optional>
11013 <optional> check-integrity <replaceable>yes_or_no</replaceable> ; </optional>
11014 <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
11015 <optional> file <replaceable>string</replaceable> ; </optional>
11016 <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>|<constant>map</constant>) ; </optional>
11017 <optional> journal <replaceable>string</replaceable> ; </optional>
11018 <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
11019 <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
11020 <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; ... </optional> }; </optional>
11021 <optional> ixfr-base <replaceable>string</replaceable> ; </optional>
11022 <optional> ixfr-from-differences <replaceable>yes_or_no</replaceable>; </optional>
11023 <optional> ixfr-tmp-file <replaceable>string</replaceable> ; </optional>
11024 <optional> request-ixfr <replaceable>yes_or_no</replaceable> ; </optional>
11025 <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable> ; </optional>
11026 <optional> max-ixfr-log-size <replaceable>number</replaceable> ; </optional>
11027 <optional> max-transfer-idle-out <replaceable>number</replaceable> ; </optional>
11028 <optional> max-transfer-time-out <replaceable>number</replaceable> ; </optional>
11029 <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable> ; </optional>
11030 <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
11031 <optional> notify-to-soa <replaceable>yes_or_no</replaceable>; </optional>
11032 <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
11033 <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
11034 <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
11035 <optional> zone-statistics <replaceable>full</replaceable> | <replaceable>terse</replaceable> | <replaceable>none</replaceable>; </optional>
11036 <optional> sig-validity-interval <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
11037 <optional> sig-signing-nodes <replaceable>number</replaceable> ; </optional>
11038 <optional> sig-signing-signatures <replaceable>number</replaceable> ; </optional>
11039 <optional> sig-signing-type <replaceable>number</replaceable> ; </optional>
11040 <optional> database <replaceable>string</replaceable> ; </optional>
11041 <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
11042 <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
11043 <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
11044 <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
11045 <optional> key-directory <replaceable>path_name</replaceable>; </optional>
11046 <optional> auto-dnssec <constant>allow</constant>|<constant>maintain</constant>|<constant>off</constant>; </optional>
11047 <optional> inline-signing <replaceable>yes_or_no</replaceable>; </optional>
11048 <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
11049 <optional> serial-update-method <constant>increment</constant>|<constant>unixtime</constant>; </optional>
11050 <optional> max-zone-ttl <replaceable>number</replaceable> ; </optional>
11053 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
11055 <optional> allow-notify { <replaceable>address_match_list</replaceable> }; </optional>
11056 <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
11057 <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
11058 <optional> allow-transfer { <replaceable>address_match_list</replaceable> }; </optional>
11059 <optional> allow-update-forwarding { <replaceable>address_match_list</replaceable> }; </optional>
11060 <optional> dnssec-update-mode ( <replaceable>maintain</replaceable> | <replaceable>no-resign</replaceable> ); </optional>
11061 <optional> update-check-ksk <replaceable>yes_or_no</replaceable>; </optional>
11062 <optional> dnssec-dnskey-kskonly <replaceable>yes_or_no</replaceable>; </optional>
11063 <optional> dnssec-loadkeys-interval <replaceable>number</replaceable>; </optional>
11064 <optional> dnssec-secure-to-insecure <replaceable>yes_or_no</replaceable> ; </optional>
11065 <optional> try-tcp-refresh <replaceable>yes_or_no</replaceable>; </optional>
11066 <optional> also-notify <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> { ( <replaceable>masters_list</replaceable> | <replaceable>ip_addr</replaceable>
11067 <optional>port <replaceable>ip_port</replaceable></optional>
11068 <optional>dscp <replaceable>ip_dscp</replaceable></optional>
11069 <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> }; </optional>
11070 <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
11071 <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
11072 <optional> file <replaceable>string</replaceable> ; </optional>
11073 <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>|<constant>map</constant>) ; </optional>
11074 <optional> journal <replaceable>string</replaceable> ; </optional>
11075 <optional> max-journal-size <replaceable>size_spec</replaceable>; </optional>
11076 <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
11077 <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; ... </optional> }; </optional>
11078 <optional> ixfr-base <replaceable>string</replaceable> ; </optional>
11079 <optional> ixfr-from-differences <replaceable>yes_or_no</replaceable>; </optional>
11080 <optional> ixfr-tmp-file <replaceable>string</replaceable> ; </optional>
11081 <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable> ; </optional>
11082 <optional> masters <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> { ( <replaceable>masters_list</replaceable> | <replaceable>ip_addr</replaceable>
11083 <optional>port <replaceable>ip_port</replaceable></optional>
11084 <optional>dscp <replaceable>ip_dscp</replaceable></optional>
11085 <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> }; </optional>
11086 <optional> max-ixfr-log-size <replaceable>number</replaceable> ; </optional>
11087 <optional> max-transfer-idle-in <replaceable>number</replaceable> ; </optional>
11088 <optional> max-transfer-idle-out <replaceable>number</replaceable> ; </optional>
11089 <optional> max-transfer-time-in <replaceable>number</replaceable> ; </optional>
11090 <optional> max-transfer-time-out <replaceable>number</replaceable> ; </optional>
11091 <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable> ; </optional>
11092 <optional> notify-delay <replaceable>seconds</replaceable> ; </optional>
11093 <optional> notify-to-soa <replaceable>yes_or_no</replaceable>; </optional>
11094 <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
11095 <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
11096 <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
11097 <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
11098 <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
11099 <optional>port <replaceable>ip_port</replaceable></optional>
11100 <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
11101 <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
11102 <optional> notify-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
11103 <optional> notify-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
11104 <optional> zone-statistics <replaceable>full</replaceable> | <replaceable>terse</replaceable> | <replaceable>none</replaceable>; </optional>
11105 <optional> sig-validity-interval <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
11106 <optional> sig-signing-nodes <replaceable>number</replaceable> ; </optional>
11107 <optional> sig-signing-signatures <replaceable>number</replaceable> ; </optional>
11108 <optional> sig-signing-type <replaceable>number</replaceable> ; </optional>
11109 <optional> database <replaceable>string</replaceable> ; </optional>
11110 <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
11111 <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
11112 <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
11113 <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
11114 <optional> key-directory <replaceable>path_name</replaceable>; </optional>
11115 <optional> auto-dnssec <constant>allow</constant>|<constant>maintain</constant>|<constant>off</constant>; </optional>
11116 <optional> inline-signing <replaceable>yes_or_no</replaceable>; </optional>
11117 <optional> multi-master <replaceable>yes_or_no</replaceable> ; </optional>
11118 <optional> zero-no-soa-ttl <replaceable>yes_or_no</replaceable> ; </optional>
11121 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
11123 file <replaceable>string</replaceable> ;
11124 <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
11125 <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional> // Not Implemented.
11128 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
11130 <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
11131 <optional> allow-query-on { <replaceable>address_match_list</replaceable> }; </optional>
11132 <optional> check-names (<constant>warn</constant>|<constant>fail</constant>|<constant>ignore</constant>) ; </optional>
11133 <optional> dialup <replaceable>dialup_option</replaceable> ; </optional>
11134 <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
11135 <optional> file <replaceable>string</replaceable> ; </optional>
11136 <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>|<constant>map</constant>) ; </optional>
11137 <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
11138 <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; ... </optional> }; </optional>
11139 <optional> masters <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> { ( <replaceable>masters_list</replaceable> | <replaceable>ip_addr</replaceable>
11140 <optional>port <replaceable>ip_port</replaceable></optional>
11141 <optional>dscp <replaceable>ip_dscp</replaceable></optional>
11142 <optional>key <replaceable>key</replaceable></optional> ) ; <optional>...</optional> }; </optional>
11143 <optional> max-transfer-idle-in <replaceable>number</replaceable> ; </optional>
11144 <optional> max-transfer-time-in <replaceable>number</replaceable> ; </optional>
11145 <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
11146 <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
11147 <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
11148 <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
11149 <optional> alt-transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
11150 <optional> alt-transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>)
11151 <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; </optional>
11152 <optional> use-alt-transfer-source <replaceable>yes_or_no</replaceable>; </optional>
11153 <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
11154 <optional> database <replaceable>string</replaceable> ; </optional>
11155 <optional> min-refresh-time <replaceable>number</replaceable> ; </optional>
11156 <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
11157 <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
11158 <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
11159 <optional> multi-master <replaceable>yes_or_no</replaceable> ; </optional>
11162 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
11164 <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
11165 <optional> server-addresses { <optional> <replaceable>ip_addr</replaceable> ; ... </optional> }; </optional>
11166 <optional> server-names { <optional> <replaceable>namelist</replaceable> </optional> }; </optional>
11167 <optional> zone-statistics <replaceable>yes_or_no</replaceable> ; </optional>
11170 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
11172 <optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
11173 <optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; ... </optional> }; </optional>
11174 <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
11177 zone <replaceable>"."</replaceable> <optional><replaceable>class</replaceable></optional> {
11179 file <replaceable>string</replaceable> ;
11180 <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>|<constant>map</constant>) ; </optional>
11181 <optional> allow-query { <replaceable>address_match_list</replaceable> }; </optional>
11182 <optional> max-zone-ttl <replaceable>number</replaceable> ; </optional>
11185 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
11186 type delegation-only;
11189 zone <replaceable>zone_name</replaceable> <optional><replaceable>class</replaceable></optional> {
11190 <optional> in-view <replaceable>string</replaceable> ; </optional>
11197 <title><command>zone</command> Statement Definition and Usage</title>
11199 <title>Zone Types</title>
11200 <informaltable colsep="0" rowsep="0">
11201 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
11202 <!--colspec colname="1" colnum="1" colsep="0" colwidth="1.108in"/-->
11203 <!--colspec colname="2" colnum="2" colsep="0" colwidth="4.017in"/-->
11204 <colspec colname="1" colnum="1" colsep="0"/>
11205 <colspec colname="2" colnum="2" colsep="0" colwidth="4.017in"/>
11208 <entry colname="1">
11210 <varname>master</varname>
11213 <entry colname="2">
11215 The server has a master copy of the data
11216 for the zone and will be able to provide authoritative
11223 <entry colname="1">
11225 <varname>slave</varname>
11228 <entry colname="2">
11230 A slave zone is a replica of a master
11231 zone. The <command>masters</command> list
11232 specifies one or more IP addresses
11233 of master servers that the slave contacts to update
11234 its copy of the zone.
11235 Masters list elements can also be names of other
11237 By default, transfers are made from port 53 on the
11239 be changed for all servers by specifying a port number
11241 list of IP addresses, or on a per-server basis after
11243 Authentication to the master can also be done with
11244 per-server TSIG keys.
11245 If a file is specified, then the
11246 replica will be written to this file whenever the zone
11248 and reloaded from this file on a server restart. Use
11250 recommended, since it often speeds server startup and
11252 a needless waste of bandwidth. Note that for large
11254 tens or hundreds of thousands) of zones per server, it
11256 use a two-level naming scheme for zone filenames. For
11258 a slave server for the zone <literal>example.com</literal> might place
11259 the zone contents into a file called
11260 <filename>ex/example.com</filename> where <filename>ex/</filename> is
11261 just the first two letters of the zone name. (Most
11263 behave very slowly if you put 100000 files into
11264 a single directory.)
11269 <entry colname="1">
11271 <varname>stub</varname>
11274 <entry colname="2">
11276 A stub zone is similar to a slave zone,
11277 except that it replicates only the NS records of a
11278 master zone instead
11279 of the entire zone. Stub zones are not a standard part
11281 they are a feature specific to the <acronym>BIND</acronym> implementation.
11285 Stub zones can be used to eliminate the need for glue
11287 in a parent zone at the expense of maintaining a stub
11289 a set of name server addresses in <filename>named.conf</filename>.
11290 This usage is not recommended for new configurations,
11292 supports it only in a limited way.
11293 In <acronym>BIND</acronym> 4/8, zone
11294 transfers of a parent zone
11295 included the NS records from stub children of that
11297 that, in some cases, users could get away with
11298 configuring child stubs
11299 only in the master server for the parent zone. <acronym>BIND</acronym>
11300 9 never mixes together zone data from different zones
11302 way. Therefore, if a <acronym>BIND</acronym> 9 master serving a parent
11303 zone has child stub zones configured, all the slave
11305 parent zone also need to have the same child stub
11311 Stub zones can also be used as a way of forcing the
11313 of a given domain to use a particular set of
11314 authoritative servers.
11315 For example, the caching name servers on a private
11317 RFC1918 addressing may be configured with stub zones
11319 <literal>10.in-addr.arpa</literal>
11320 to use a set of internal name servers as the
11322 servers for that domain.
11327 <entry colname="1">
11329 <varname>static-stub</varname>
11332 <entry colname="2">
11334 A static-stub zone is similar to a stub zone
11335 with the following exceptions:
11336 the zone data is statically configured, rather
11337 than transferred from a master server;
11338 when recursion is necessary for a query that
11339 matches a static-stub zone, the locally
11340 configured data (nameserver names and glue addresses)
11341 is always used even if different authoritative
11342 information is cached.
11345 Zone data is configured via the
11346 <command>server-addresses</command> and
11347 <command>server-names</command> zone options.
11350 The zone data is maintained in the form of NS
11351 and (if necessary) glue A or AAAA RRs
11352 internally, which can be seen by dumping zone
11353 databases by <command>rndc dumpdb -all</command>.
11354 The configured RRs are considered local configuration
11355 parameters rather than public data.
11356 Non recursive queries (i.e., those with the RD
11357 bit off) to a static-stub zone are therefore
11358 prohibited and will be responded with REFUSED.
11361 Since the data is statically configured, no
11362 zone maintenance action takes place for a static-stub
11364 For example, there is no periodic refresh
11365 attempt, and an incoming notify message
11366 will be rejected with an rcode of NOTAUTH.
11369 Each static-stub zone is configured with
11370 internally generated NS and (if necessary)
11376 <entry colname="1">
11378 <varname>forward</varname>
11381 <entry colname="2">
11383 A "forward zone" is a way to configure
11384 forwarding on a per-domain basis. A <command>zone</command> statement
11385 of type <command>forward</command> can
11386 contain a <command>forward</command>
11387 and/or <command>forwarders</command>
11389 which will apply to queries within the domain given by
11391 name. If no <command>forwarders</command>
11392 statement is present or
11393 an empty list for <command>forwarders</command> is given, then no
11394 forwarding will be done for the domain, canceling the
11396 any forwarders in the <command>options</command> statement. Thus
11397 if you want to use this type of zone to change the
11399 global <command>forward</command> option
11400 (that is, "forward first"
11401 to, then "forward only", or vice versa, but want to
11403 servers as set globally) you need to re-specify the
11409 <entry colname="1">
11411 <varname>hint</varname>
11414 <entry colname="2">
11416 The initial set of root name servers is
11417 specified using a "hint zone". When the server starts
11419 the root hints to find a root name server and get the
11421 list of root name servers. If no hint zone is
11422 specified for class
11423 IN, the server uses a compiled-in default set of root
11425 Classes other than IN have no built-in defaults hints.
11430 <entry colname="1">
11432 <varname>redirect</varname>
11435 <entry colname="2">
11437 Redirect zones are used to provide answers to
11438 queries when normal resolution would result in
11439 NXDOMAIN being returned.
11440 Only one redirect zone is supported
11441 per view. <command>allow-query</command> can be
11442 used to restrict which clients see these answers.
11445 If the client has requested DNSSEC records (DO=1) and
11446 the NXDOMAIN response is signed then no substitution
11450 To redirect all NXDOMAIN responses to
11452 2001:ffff:ffff::100.100.100.2, one would
11453 configure a type redirect zone named ".",
11454 with the zone file containing wildcard records
11455 that point to the desired addresses:
11456 <literal>"*. IN A 100.100.100.2"</literal>
11458 <literal>"*. IN AAAA 2001:ffff:ffff::100.100.100.2"</literal>.
11461 To redirect all Spanish names (under .ES) one
11462 would use similar entries but with the names
11463 "*.ES." instead of "*.". To redirect all
11464 commercial Spanish names (under COM.ES) one
11465 would use wildcard entries called "*.COM.ES.".
11468 Note that the redirect zone supports all
11469 possible types; it is not limited to A and
11473 Because redirect zones are not referenced
11474 directly by name, they are not kept in the
11475 zone lookup table with normal master and slave
11476 zones. Consequently, it is not currently possible
11478 <command>rndc reload
11479 <replaceable>zonename</replaceable></command>
11480 to reload a redirect zone. However, when using
11481 <command>rndc reload</command> without specifying
11482 a zone name, redirect zones will be reloaded along
11488 <entry colname="1">
11490 <varname>delegation-only</varname>
11493 <entry colname="2">
11495 This is used to enforce the delegation-only
11496 status of infrastructure zones (e.g. COM,
11497 NET, ORG). Any answer that is received
11498 without an explicit or implicit delegation
11499 in the authority section will be treated
11500 as NXDOMAIN. This does not apply to the
11501 zone apex. This should not be applied to
11505 <varname>delegation-only</varname> has no
11506 effect on answers received from forwarders.
11509 See caveats in <xref linkend="root_delegation_only"/>.
11519 <title>Class</title>
11521 The zone's name may optionally be followed by a class. If
11522 a class is not specified, class <literal>IN</literal> (for <varname>Internet</varname>),
11523 is assumed. This is correct for the vast majority of cases.
11526 The <literal>hesiod</literal> class is
11527 named for an information service from MIT's Project Athena. It
11529 used to share information about various systems databases, such
11530 as users, groups, printers and so on. The keyword
11531 <literal>HS</literal> is
11532 a synonym for hesiod.
11535 Another MIT development is Chaosnet, a LAN protocol created
11536 in the mid-1970s. Zone data for it can be specified with the <literal>CHAOS</literal> class.
11541 <title>Zone Options</title>
11546 <term><command>allow-notify</command></term>
11549 See the description of
11550 <command>allow-notify</command> in <xref linkend="access_control"/>.
11556 <term><command>allow-query</command></term>
11559 See the description of
11560 <command>allow-query</command> in <xref linkend="access_control"/>.
11566 <term><command>allow-query-on</command></term>
11569 See the description of
11570 <command>allow-query-on</command> in <xref linkend="access_control"/>.
11576 <term><command>allow-transfer</command></term>
11579 See the description of <command>allow-transfer</command>
11580 in <xref linkend="access_control"/>.
11586 <term><command>allow-update</command></term>
11589 See the description of <command>allow-update</command>
11590 in <xref linkend="access_control"/>.
11596 <term><command>update-policy</command></term>
11599 Specifies a "Simple Secure Update" policy. See
11600 <xref linkend="dynamic_update_policies"/>.
11606 <term><command>allow-update-forwarding</command></term>
11609 See the description of <command>allow-update-forwarding</command>
11610 in <xref linkend="access_control"/>.
11616 <term><command>also-notify</command></term>
11619 Only meaningful if <command>notify</command>
11621 active for this zone. The set of machines that will
11623 <literal>DNS NOTIFY</literal> message
11624 for this zone is made up of all the listed name servers
11626 the primary master) for the zone plus any IP addresses
11628 with <command>also-notify</command>. A port
11630 with each <command>also-notify</command>
11631 address to send the notify
11632 messages to a port other than the default of 53.
11633 A TSIG key may also be specified to cause the
11634 <literal>NOTIFY</literal> to be signed by the
11636 <command>also-notify</command> is not
11637 meaningful for stub zones.
11638 The default is the empty list.
11644 <term><command>check-names</command></term>
11647 This option is used to restrict the character set and
11649 certain domain names in master files and/or DNS responses
11651 network. The default varies according to zone type. For <command>master</command> zones the default is <command>fail</command>. For <command>slave</command>
11652 zones the default is <command>warn</command>.
11653 It is not implemented for <command>hint</command> zones.
11659 <term><command>check-mx</command></term>
11662 See the description of
11663 <command>check-mx</command> in <xref linkend="boolean_options"/>.
11669 <term><command>check-spf</command></term>
11672 See the description of
11673 <command>check-spf</command> in <xref linkend="boolean_options"/>.
11679 <term><command>check-wildcard</command></term>
11682 See the description of
11683 <command>check-wildcard</command> in <xref linkend="boolean_options"/>.
11689 <term><command>check-integrity</command></term>
11692 See the description of
11693 <command>check-integrity</command> in <xref linkend="boolean_options"/>.
11699 <term><command>check-sibling</command></term>
11702 See the description of
11703 <command>check-sibling</command> in <xref linkend="boolean_options"/>.
11709 <term><command>zero-no-soa-ttl</command></term>
11712 See the description of
11713 <command>zero-no-soa-ttl</command> in <xref linkend="boolean_options"/>.
11719 <term><command>update-check-ksk</command></term>
11722 See the description of
11723 <command>update-check-ksk</command> in <xref linkend="boolean_options"/>.
11729 <term><command>dnssec-update-mode</command></term>
11732 See the description of
11733 <command>dnssec-update-mode</command> in <xref linkend="options"/>.
11739 <term><command>dnssec-dnskey-kskonly</command></term>
11742 See the description of
11743 <command>dnssec-dnskey-kskonly</command> in <xref linkend="boolean_options"/>.
11749 <term><command>try-tcp-refresh</command></term>
11752 See the description of
11753 <command>try-tcp-refresh</command> in <xref linkend="boolean_options"/>.
11759 <term><command>database</command></term>
11762 Specify the type of database to be used for storing the
11763 zone data. The string following the <command>database</command> keyword
11764 is interpreted as a list of whitespace-delimited words.
11766 identifies the database type, and any subsequent words are
11768 as arguments to the database to be interpreted in a way
11770 to the database type.
11773 The default is <userinput>"rbt"</userinput>, BIND 9's
11775 red-black-tree database. This database does not take
11779 Other values are possible if additional database drivers
11780 have been linked into the server. Some sample drivers are
11782 with the distribution but none are linked in by default.
11788 <term><command>dialup</command></term>
11791 See the description of
11792 <command>dialup</command> in <xref linkend="boolean_options"/>.
11798 <term><command>delegation-only</command></term>
11801 The flag only applies to forward, hint and stub
11802 zones. If set to <userinput>yes</userinput>,
11803 then the zone will also be treated as if it is
11804 also a delegation-only type zone.
11807 See caveats in <xref linkend="root_delegation_only"/>.
11813 <term><command>forward</command></term>
11816 Only meaningful if the zone has a forwarders
11817 list. The <command>only</command> value causes
11819 after trying the forwarders and getting no answer, while <command>first</command> would
11820 allow a normal lookup to be tried.
11826 <term><command>forwarders</command></term>
11829 Used to override the list of global forwarders.
11830 If it is not specified in a zone of type <command>forward</command>,
11831 no forwarding is done for the zone and the global options are
11838 <term><command>ixfr-base</command></term>
11841 Was used in <acronym>BIND</acronym> 8 to
11843 of the transaction log (journal) file for dynamic update
11845 <acronym>BIND</acronym> 9 ignores the option
11846 and constructs the name of the journal
11847 file by appending "<filename>.jnl</filename>"
11855 <term><command>ixfr-tmp-file</command></term>
11858 Was an undocumented option in <acronym>BIND</acronym> 8.
11859 Ignored in <acronym>BIND</acronym> 9.
11865 <term><command>journal</command></term>
11868 Allow the default journal's filename to be overridden.
11869 The default is the zone's filename with "<filename>.jnl</filename>" appended.
11870 This is applicable to <command>master</command> and <command>slave</command> zones.
11876 <term><command>max-journal-size</command></term>
11879 See the description of
11880 <command>max-journal-size</command> in <xref linkend="server_resource_limits"/>.
11886 <term><command>max-transfer-time-in</command></term>
11889 See the description of
11890 <command>max-transfer-time-in</command> in <xref linkend="zone_transfers"/>.
11896 <term><command>max-transfer-idle-in</command></term>
11899 See the description of
11900 <command>max-transfer-idle-in</command> in <xref linkend="zone_transfers"/>.
11906 <term><command>max-transfer-time-out</command></term>
11909 See the description of
11910 <command>max-transfer-time-out</command> in <xref linkend="zone_transfers"/>.
11916 <term><command>max-transfer-idle-out</command></term>
11919 See the description of
11920 <command>max-transfer-idle-out</command> in <xref linkend="zone_transfers"/>.
11926 <term><command>notify</command></term>
11929 See the description of
11930 <command>notify</command> in <xref linkend="boolean_options"/>.
11936 <term><command>notify-delay</command></term>
11939 See the description of
11940 <command>notify-delay</command> in <xref linkend="tuning"/>.
11946 <term><command>notify-to-soa</command></term>
11949 See the description of
11950 <command>notify-to-soa</command> in
11951 <xref linkend="boolean_options"/>.
11957 <term><command>pubkey</command></term>
11960 In <acronym>BIND</acronym> 8, this option was
11961 intended for specifying
11962 a public zone key for verification of signatures in DNSSEC
11964 zones when they are loaded from disk. <acronym>BIND</acronym> 9 does not verify signatures
11965 on load and ignores the option.
11971 <term><command>zone-statistics</command></term>
11974 If <userinput>yes</userinput>, the server will keep
11976 information for this zone, which can be dumped to the
11977 <command>statistics-file</command> defined in
11978 the server options.
11984 <term><command>server-addresses</command></term>
11987 Only meaningful for static-stub zones.
11988 This is a list of IP addresses to which queries
11989 should be sent in recursive resolution for the
11991 A non empty list for this option will internally
11992 configure the apex NS RR with associated glue A or
11996 For example, if "example.com" is configured as a
11997 static-stub zone with 192.0.2.1 and 2001:db8::1234
11998 in a <command>server-addresses</command> option,
11999 the following RRs will be internally configured.
12001 <programlisting>example.com. NS example.com.
12002 example.com. A 192.0.2.1
12003 example.com. AAAA 2001:db8::1234</programlisting>
12005 These records are internally used to resolve
12006 names under the static-stub zone.
12007 For instance, if the server receives a query for
12008 "www.example.com" with the RD bit on, the server
12009 will initiate recursive resolution and send
12010 queries to 192.0.2.1 and/or 2001:db8::1234.
12016 <term><command>server-names</command></term>
12019 Only meaningful for static-stub zones.
12020 This is a list of domain names of nameservers that
12021 act as authoritative servers of the static-stub
12023 These names will be resolved to IP addresses when
12024 <command>named</command> needs to send queries to
12026 To make this supplemental resolution successful,
12027 these names must not be a subdomain of the origin
12028 name of static-stub zone.
12029 That is, when "example.net" is the origin of a
12030 static-stub zone, "ns.example" and
12031 "master.example.com" can be specified in the
12032 <command>server-names</command> option, but
12033 "ns.example.net" cannot, and will be rejected by
12034 the configuration parser.
12037 A non empty list for this option will internally
12038 configure the apex NS RR with the specified names.
12039 For example, if "example.com" is configured as a
12040 static-stub zone with "ns1.example.net" and
12042 in a <command>server-names</command> option,
12043 the following RRs will be internally configured.
12045 <programlisting>example.com. NS ns1.example.net.
12046 example.com. NS ns2.example.net.
12049 These records are internally used to resolve
12050 names under the static-stub zone.
12051 For instance, if the server receives a query for
12052 "www.example.com" with the RD bit on, the server
12053 initiate recursive resolution,
12054 resolve "ns1.example.net" and/or
12055 "ns2.example.net" to IP addresses, and then send
12056 queries to (one or more of) these addresses.
12062 <term><command>sig-validity-interval</command></term>
12065 See the description of
12066 <command>sig-validity-interval</command> in <xref linkend="tuning"/>.
12072 <term><command>sig-signing-nodes</command></term>
12075 See the description of
12076 <command>sig-signing-nodes</command> in <xref linkend="tuning"/>.
12082 <term><command>sig-signing-signatures</command></term>
12085 See the description of
12086 <command>sig-signing-signatures</command> in <xref linkend="tuning"/>.
12092 <term><command>sig-signing-type</command></term>
12095 See the description of
12096 <command>sig-signing-type</command> in <xref linkend="tuning"/>.
12102 <term><command>transfer-source</command></term>
12105 See the description of
12106 <command>transfer-source</command> in <xref linkend="zone_transfers"/>.
12112 <term><command>transfer-source-v6</command></term>
12115 See the description of
12116 <command>transfer-source-v6</command> in <xref linkend="zone_transfers"/>.
12122 <term><command>alt-transfer-source</command></term>
12125 See the description of
12126 <command>alt-transfer-source</command> in <xref linkend="zone_transfers"/>.
12132 <term><command>alt-transfer-source-v6</command></term>
12135 See the description of
12136 <command>alt-transfer-source-v6</command> in <xref linkend="zone_transfers"/>.
12142 <term><command>use-alt-transfer-source</command></term>
12145 See the description of
12146 <command>use-alt-transfer-source</command> in <xref linkend="zone_transfers"/>.
12153 <term><command>notify-source</command></term>
12156 See the description of
12157 <command>notify-source</command> in <xref linkend="zone_transfers"/>.
12163 <term><command>notify-source-v6</command></term>
12166 See the description of
12167 <command>notify-source-v6</command> in <xref linkend="zone_transfers"/>.
12173 <term><command>min-refresh-time</command></term>
12174 <term><command>max-refresh-time</command></term>
12175 <term><command>min-retry-time</command></term>
12176 <term><command>max-retry-time</command></term>
12179 See the description in <xref linkend="tuning"/>.
12185 <term><command>ixfr-from-differences</command></term>
12188 See the description of
12189 <command>ixfr-from-differences</command> in <xref linkend="boolean_options"/>.
12190 (Note that the <command>ixfr-from-differences</command>
12191 <userinput>master</userinput> and
12192 <userinput>slave</userinput> choices are not
12193 available at the zone level.)
12199 <term><command>key-directory</command></term>
12202 See the description of
12203 <command>key-directory</command> in <xref linkend="options"/>.
12209 <term><command>auto-dnssec</command></term>
12212 Zones configured for dynamic DNS may also use this
12213 option to allow varying levels of automatic DNSSEC key
12214 management. There are three possible settings:
12217 <command>auto-dnssec allow;</command> permits
12218 keys to be updated and the zone fully re-signed
12219 whenever the user issues the command <command>rndc sign
12220 <replaceable>zonename</replaceable></command>.
12223 <command>auto-dnssec maintain;</command> includes the
12224 above, but also automatically adjusts the zone's DNSSEC
12225 keys on schedule, according to the keys' timing metadata
12226 (see <xref linkend="man.dnssec-keygen"/> and
12227 <xref linkend="man.dnssec-settime"/>). The command
12229 <replaceable>zonename</replaceable></command> causes
12230 <command>named</command> to load keys from the key
12231 repository and sign the zone with all keys that are
12233 <command>rndc loadkeys
12234 <replaceable>zonename</replaceable></command> causes
12235 <command>named</command> to load keys from the key
12236 repository and schedule key maintenance events to occur
12237 in the future, but it does not sign the full zone
12238 immediately. Note: once keys have been loaded for a
12239 zone the first time, the repository will be searched
12240 for changes periodically, regardless of whether
12241 <command>rndc loadkeys</command> is used. The recheck
12242 interval is defined by
12243 <command>dnssec-loadkeys-interval</command>.)
12246 The default setting is <command>auto-dnssec off</command>.
12252 <term><command>serial-update-method</command></term>
12255 Zones configured for dynamic DNS may use this
12256 option to set the update method that will be used for
12257 the zone serial number in the SOA record.
12260 With the default setting of
12261 <command>serial-update-method increment;</command>, the
12262 SOA serial number will be incremented by one each time
12263 the zone is updated.
12267 <command>serial-update-method unixtime;</command>, the
12268 SOA serial number will be set to the number of seconds
12269 since the UNIX epoch, unless the serial number is
12270 already greater than or equal to that value, in which
12271 case it is simply incremented by one.
12277 <term><command>inline-signing</command></term>
12280 If <literal>yes</literal>, this enables
12281 "bump in the wire" signing of a zone, where a
12282 unsigned zone is transferred in or loaded from
12283 disk and a signed version of the zone is served,
12284 with possibly, a different serial number. This
12285 behaviour is disabled by default.
12291 <term><command>multi-master</command></term>
12294 See the description of <command>multi-master</command> in
12295 <xref linkend="boolean_options"/>.
12301 <term><command>masterfile-format</command></term>
12304 See the description of <command>masterfile-format</command>
12305 in <xref linkend="tuning"/>.
12311 <term><command>max-zone-ttl</command></term>
12314 See the description of <command>max-zone-ttl</command>
12315 in <xref linkend="options"/>.
12321 <term><command>dnssec-secure-to-insecure</command></term>
12324 See the description of
12325 <command>dnssec-secure-to-insecure</command> in <xref linkend="boolean_options"/>.
12333 <sect3 id="dynamic_update_policies">
12334 <title>Dynamic Update Policies</title>
12335 <para><acronym>BIND</acronym> 9 supports two alternative
12336 methods of granting clients the right to perform
12337 dynamic updates to a zone, configured by the
12338 <command>allow-update</command> and
12339 <command>update-policy</command> option, respectively.
12342 The <command>allow-update</command> clause works the
12343 same way as in previous versions of <acronym>BIND</acronym>.
12344 It grants given clients the permission to update any
12345 record of any name in the zone.
12348 The <command>update-policy</command> clause
12349 allows more fine-grained control over what updates are
12350 allowed. A set of rules is specified, where each rule
12351 either grants or denies permissions for one or more
12352 names to be updated by one or more identities. If
12353 the dynamic update request message is signed (that is,
12354 it includes either a TSIG or SIG(0) record), the
12355 identity of the signer can be determined.
12358 Rules are specified in the <command>update-policy</command>
12359 zone option, and are only meaningful for master zones.
12360 When the <command>update-policy</command> statement
12361 is present, it is a configuration error for the
12362 <command>allow-update</command> statement to be
12363 present. The <command>update-policy</command> statement
12364 only examines the signer of a message; the source
12365 address is not relevant.
12368 There is a pre-defined <command>update-policy</command>
12369 rule which can be switched on with the command
12370 <command>update-policy local;</command>.
12371 Switching on this rule in a zone causes
12372 <command>named</command> to generate a TSIG session
12373 key and place it in a file, and to allow that key
12374 to update the zone. (By default, the file is
12375 <filename>/var/run/named/session.key</filename>, the key
12376 name is "local-ddns" and the key algorithm is HMAC-SHA256,
12377 but these values are configurable with the
12378 <command>session-keyfile</command>,
12379 <command>session-keyname</command> and
12380 <command>session-keyalg</command> options, respectively).
12383 A client running on the local system, and with appropriate
12384 permissions, may read that file and use the key to sign update
12385 requests. The zone's update policy will be set to allow that
12386 key to change any record within the zone. Assuming the
12387 key name is "local-ddns", this policy is equivalent to:
12390 <programlisting>update-policy { grant local-ddns zonesub any; };
12394 The command <command>nsupdate -l</command> sends update
12395 requests to localhost, and signs them using the session key.
12399 Other rule definitions look like this:
12403 ( <command>grant</command> | <command>deny</command> ) <replaceable>identity</replaceable> <replaceable>nametype</replaceable> <optional> <replaceable>name</replaceable> </optional> <optional> <replaceable>types</replaceable> </optional>
12407 Each rule grants or denies privileges. Once a message has
12408 successfully matched a rule, the operation is immediately
12409 granted or denied and no further rules are examined. A rule
12410 is matched when the signer matches the identity field, the
12411 name matches the name field in accordance with the nametype
12412 field, and the type matches the types specified in the type
12416 No signer is required for <replaceable>tcp-self</replaceable>
12417 or <replaceable>6to4-self</replaceable> however the standard
12418 reverse mapping / prefix conversion must match the identity
12422 The identity field specifies a name or a wildcard
12423 name. Normally, this is the name of the TSIG or
12424 SIG(0) key used to sign the update request. When a
12425 TKEY exchange has been used to create a shared secret,
12426 the identity of the shared secret is the same as the
12427 identity of the key used to authenticate the TKEY
12428 exchange. TKEY is also the negotiation method used
12429 by GSS-TSIG, which establishes an identity that is
12430 the Kerberos principal of the client, such as
12431 <userinput>"user@host.domain"</userinput>. When the
12432 <replaceable>identity</replaceable> field specifies
12433 a wildcard name, it is subject to DNS wildcard
12434 expansion, so the rule will apply to multiple identities.
12435 The <replaceable>identity</replaceable> field must
12436 contain a fully-qualified domain name.
12439 For nametypes <varname>krb5-self</varname>,
12440 <varname>ms-self</varname>, <varname>krb5-subdomain</varname>,
12441 and <varname>ms-subdomain</varname> the
12442 <replaceable>identity</replaceable> field specifies
12443 the Windows or Kerberos realm of the machine belongs to.
12446 The <replaceable>nametype</replaceable> field has 13
12448 <varname>name</varname>, <varname>subdomain</varname>,
12449 <varname>wildcard</varname>, <varname>self</varname>,
12450 <varname>selfsub</varname>, <varname>selfwild</varname>,
12451 <varname>krb5-self</varname>, <varname>ms-self</varname>,
12452 <varname>krb5-subdomain</varname>,
12453 <varname>ms-subdomain</varname>,
12454 <varname>tcp-self</varname>, <varname>6to4-self</varname>,
12455 <varname>zonesub</varname>, and <varname>external</varname>.
12458 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
12459 <colspec colname="1" colnum="1" colsep="0" colwidth="0.819in"/>
12460 <colspec colname="2" colnum="2" colsep="0" colwidth="3.681in"/>
12463 <entry colname="1">
12465 <varname>name</varname>
12467 </entry> <entry colname="2">
12469 Exact-match semantics. This rule matches
12470 when the name being updated is identical
12471 to the contents of the
12472 <replaceable>name</replaceable> field.
12477 <entry colname="1">
12479 <varname>subdomain</varname>
12481 </entry> <entry colname="2">
12483 This rule matches when the name being updated
12484 is a subdomain of, or identical to, the
12485 contents of the <replaceable>name</replaceable>
12491 <entry colname="1">
12493 <varname>zonesub</varname>
12495 </entry> <entry colname="2">
12497 This rule is similar to subdomain, except that
12498 it matches when the name being updated is a
12499 subdomain of the zone in which the
12500 <command>update-policy</command> statement
12501 appears. This obviates the need to type the zone
12502 name twice, and enables the use of a standard
12503 <command>update-policy</command> statement in
12504 multiple zones without modification.
12507 When this rule is used, the
12508 <replaceable>name</replaceable> field is omitted.
12513 <entry colname="1">
12515 <varname>wildcard</varname>
12517 </entry> <entry colname="2">
12519 The <replaceable>name</replaceable> field
12520 is subject to DNS wildcard expansion, and
12521 this rule matches when the name being updated
12522 name is a valid expansion of the wildcard.
12527 <entry colname="1">
12529 <varname>self</varname>
12532 <entry colname="2">
12534 This rule matches when the name being updated
12535 matches the contents of the
12536 <replaceable>identity</replaceable> field.
12537 The <replaceable>name</replaceable> field
12538 is ignored, but should be the same as the
12539 <replaceable>identity</replaceable> field.
12540 The <varname>self</varname> nametype is
12541 most useful when allowing using one key per
12542 name to update, where the key has the same
12543 name as the name to be updated. The
12544 <replaceable>identity</replaceable> would
12545 be specified as <constant>*</constant> (an asterisk) in
12551 <entry colname="1">
12553 <varname>selfsub</varname>
12555 </entry> <entry colname="2">
12557 This rule is similar to <varname>self</varname>
12558 except that subdomains of <varname>self</varname>
12559 can also be updated.
12564 <entry colname="1">
12566 <varname>selfwild</varname>
12568 </entry> <entry colname="2">
12570 This rule is similar to <varname>self</varname>
12571 except that only subdomains of
12572 <varname>self</varname> can be updated.
12577 <entry colname="1">
12579 <varname>ms-self</varname>
12581 </entry> <entry colname="2">
12583 This rule takes a Windows machine principal
12584 (machine$@REALM) for machine in REALM and
12585 and converts it machine.realm allowing the machine
12586 to update machine.realm. The REALM to be matched
12587 is specified in the <replaceable>identity</replaceable>
12593 <entry colname="1">
12595 <varname>ms-subdomain</varname>
12597 </entry> <entry colname="2">
12599 This rule takes a Windows machine principal
12600 (machine$@REALM) for machine in REALM and
12601 converts it to machine.realm allowing the machine
12602 to update subdomains of machine.realm. The REALM
12603 to be matched is specified in the
12604 <replaceable>identity</replaceable> field.
12609 <entry colname="1">
12611 <varname>krb5-self</varname>
12613 </entry> <entry colname="2">
12615 This rule takes a Kerberos machine principal
12616 (host/machine@REALM) for machine in REALM and
12617 and converts it machine.realm allowing the machine
12618 to update machine.realm. The REALM to be matched
12619 is specified in the <replaceable>identity</replaceable>
12625 <entry colname="1">
12627 <varname>krb5-subdomain</varname>
12629 </entry> <entry colname="2">
12631 This rule takes a Kerberos machine principal
12632 (host/machine@REALM) for machine in REALM and
12633 converts it to machine.realm allowing the machine
12634 to update subdomains of machine.realm. The REALM
12635 to be matched is specified in the
12636 <replaceable>identity</replaceable> field.
12641 <entry colname="1">
12643 <varname>tcp-self</varname>
12645 </entry> <entry colname="2">
12647 Allow updates that have been sent via TCP and
12648 for which the standard mapping from the initiating
12649 IP address into the IN-ADDR.ARPA and IP6.ARPA
12650 namespaces match the name to be updated.
12653 It is theoretically possible to spoof these TCP
12659 <entry colname="1">
12661 <varname>6to4-self</varname>
12663 </entry> <entry colname="2">
12665 Allow the 6to4 prefix to be update by any TCP
12666 connection from the 6to4 network or from the
12667 corresponding IPv4 address. This is intended
12668 to allow NS or DNAME RRsets to be added to the
12672 It is theoretically possible to spoof these TCP
12678 <entry colname="1">
12680 <varname>external</varname>
12682 </entry> <entry colname="2">
12684 This rule allows <command>named</command>
12685 to defer the decision of whether to allow a
12686 given update to an external daemon.
12689 The method of communicating with the daemon is
12690 specified in the <replaceable>identity</replaceable>
12691 field, the format of which is
12692 "<constant>local:</constant><replaceable>path</replaceable>",
12693 where <replaceable>path</replaceable> is the location
12694 of a UNIX-domain socket. (Currently, "local" is the
12695 only supported mechanism.)
12698 Requests to the external daemon are sent over the
12699 UNIX-domain socket as datagrams with the following
12703 Protocol version number (4 bytes, network byte order, currently 1)
12704 Request length (4 bytes, network byte order)
12705 Signer (null-terminated string)
12706 Name (null-terminated string)
12707 TCP source address (null-terminated string)
12708 Rdata type (null-terminated string)
12709 Key (null-terminated string)
12710 TKEY token length (4 bytes, network byte order)
12711 TKEY token (remainder of packet)</programlisting>
12713 The daemon replies with a four-byte value in
12714 network byte order, containing either 0 or 1; 0
12715 indicates that the specified update is not
12716 permitted, and 1 indicates that it is.
12725 In all cases, the <replaceable>name</replaceable>
12726 field must specify a fully-qualified domain name.
12730 If no types are explicitly specified, this rule matches
12731 all types except RRSIG, NS, SOA, NSEC and NSEC3. Types
12732 may be specified by name, including "ANY" (ANY matches
12733 all types except NSEC and NSEC3, which can never be
12734 updated). Note that when an attempt is made to delete
12735 all records associated with a name, the rules are
12736 checked for each existing record type.
12741 <title>Multiple views</title>
12743 When multiple views are in use, a zone may be
12744 referenced by more than one of them. Often, the views
12745 will contain different zones with the same name, allowing
12746 different clients to receive different answers for the same
12747 queries. At times, however, it is desirable for multiple
12748 views to contain identical zones. The
12749 <command>in-view</command> zone option provides an efficient
12750 way to do this: it allows a view to reference a zone that
12751 was defined in a previously configured view. Example:
12755 match-clients { 10/8; };
12759 file "example-external.db";
12764 match-clients { any; };
12772 An <command>in-view</command> option cannot refer to a view
12773 that is configured later in the configuration file.
12776 A <command>zone</command> statement which uses the
12777 <command>in-view</command> option may not use any other
12778 options with the exception of <command>forward</command>
12779 and <command>forwarders</command>. (These options control
12780 the behavior of the containing view, rather than changing
12781 the zone object itself.)
12784 An <command>in-view</command> zone cannot be used as a
12785 response policy zone.
12792 <title>Zone File</title>
12793 <sect2 id="types_of_resource_records_and_when_to_use_them">
12794 <title>Types of Resource Records and When to Use Them</title>
12796 This section, largely borrowed from RFC 1034, describes the
12797 concept of a Resource Record (RR) and explains when each is used.
12798 Since the publication of RFC 1034, several new RRs have been
12800 and implemented in the DNS. These are also included.
12803 <title>Resource Records</title>
12806 A domain name identifies a node. Each node has a set of
12807 resource information, which may be empty. The set of resource
12808 information associated with a particular name is composed of
12809 separate RRs. The order of RRs in a set is not significant and
12810 need not be preserved by name servers, resolvers, or other
12811 parts of the DNS. However, sorting of multiple RRs is
12812 permitted for optimization purposes, for example, to specify
12813 that a particular nearby server be tried first. See <xref linkend="the_sortlist_statement"/> and <xref linkend="rrset_ordering"/>.
12817 The components of a Resource Record are:
12819 <informaltable colsep="0" rowsep="0">
12820 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
12821 <colspec colname="1" colnum="1" colsep="0" colwidth="1.000in"/>
12822 <colspec colname="2" colnum="2" colsep="0" colwidth="3.500in"/>
12825 <entry colname="1">
12830 <entry colname="2">
12832 The domain name where the RR is found.
12837 <entry colname="1">
12842 <entry colname="2">
12844 An encoded 16-bit value that specifies
12845 the type of the resource record.
12850 <entry colname="1">
12855 <entry colname="2">
12857 The time-to-live of the RR. This field
12858 is a 32-bit integer in units of seconds, and is
12860 resolvers when they cache RRs. The TTL describes how
12862 be cached before it should be discarded.
12867 <entry colname="1">
12872 <entry colname="2">
12874 An encoded 16-bit value that identifies
12875 a protocol family or instance of a protocol.
12880 <entry colname="1">
12885 <entry colname="2">
12887 The resource data. The format of the
12888 data is type (and sometimes class) specific.
12896 The following are <emphasis>types</emphasis> of valid RRs:
12898 <informaltable colsep="0" rowsep="0">
12899 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
12900 <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
12901 <colspec colname="2" colnum="2" colsep="0" colwidth="3.625in"/>
12904 <entry colname="1">
12909 <entry colname="2">
12911 A host address. In the IN class, this is a
12912 32-bit IP address. Described in RFC 1035.
12917 <entry colname="1">
12922 <entry colname="2">
12924 IPv6 address. Described in RFC 1886.
12929 <entry colname="1">
12934 <entry colname="2">
12936 IPv6 address. This can be a partial
12937 address (a suffix) and an indirection to the name
12938 where the rest of the
12939 address (the prefix) can be found. Experimental.
12940 Described in RFC 2874.
12945 <entry colname="1">
12950 <entry colname="2">
12952 Location of AFS database servers.
12953 Experimental. Described in RFC 1183.
12958 <entry colname="1">
12963 <entry colname="2">
12965 Address prefix list. Experimental.
12966 Described in RFC 3123.
12971 <entry colname="1">
12976 <entry colname="2">
12978 Holds a digital certificate.
12979 Described in RFC 2538.
12984 <entry colname="1">
12989 <entry colname="2">
12991 Identifies the canonical name of an alias.
12992 Described in RFC 1035.
12997 <entry colname="1">
13002 <entry colname="2">
13004 Is used for identifying which DHCP client is
13005 associated with this name. Described in RFC 4701.
13010 <entry colname="1">
13015 <entry colname="2">
13017 Replaces the domain name specified with
13018 another name to be looked up, effectively aliasing an
13020 subtree of the domain name space rather than a single
13022 as in the case of the CNAME RR.
13023 Described in RFC 2672.
13028 <entry colname="1">
13033 <entry colname="2">
13035 Stores a public key associated with a signed
13036 DNS zone. Described in RFC 4034.
13041 <entry colname="1">
13046 <entry colname="2">
13048 Stores the hash of a public key associated with a
13049 signed DNS zone. Described in RFC 4034.
13054 <entry colname="1">
13059 <entry colname="2">
13061 Specifies the global position. Superseded by LOC.
13066 <entry colname="1">
13071 <entry colname="2">
13073 Identifies the CPU and OS used by a host.
13074 Described in RFC 1035.
13079 <entry colname="1">
13084 <entry colname="2">
13086 Provides a method for storing IPsec keying material in
13087 DNS. Described in RFC 4025.
13092 <entry colname="1">
13097 <entry colname="2">
13099 Representation of ISDN addresses.
13100 Experimental. Described in RFC 1183.
13105 <entry colname="1">
13110 <entry colname="2">
13112 Stores a public key associated with a
13113 DNS name. Used in original DNSSEC; replaced
13114 by DNSKEY in DNSSECbis, but still used with
13115 SIG(0). Described in RFCs 2535 and 2931.
13120 <entry colname="1">
13125 <entry colname="2">
13127 Identifies a key exchanger for this
13128 DNS name. Described in RFC 2230.
13133 <entry colname="1">
13138 <entry colname="2">
13140 For storing GPS info. Described in RFC 1876.
13146 <entry colname="1">
13151 <entry colname="2">
13153 Identifies a mail exchange for the domain with
13154 a 16-bit preference value (lower is better)
13155 followed by the host name of the mail exchange.
13156 Described in RFC 974, RFC 1035.
13161 <entry colname="1">
13166 <entry colname="2">
13168 Name authority pointer. Described in RFC 2915.
13173 <entry colname="1">
13178 <entry colname="2">
13180 A network service access point.
13181 Described in RFC 1706.
13186 <entry colname="1">
13191 <entry colname="2">
13193 The authoritative name server for the
13194 domain. Described in RFC 1035.
13199 <entry colname="1">
13204 <entry colname="2">
13206 Used in DNSSECbis to securely indicate that
13207 RRs with an owner name in a certain name interval do
13209 a zone and indicate what RR types are present for an
13211 Described in RFC 4034.
13216 <entry colname="1">
13221 <entry colname="2">
13223 Used in DNSSECbis to securely indicate that
13224 RRs with an owner name in a certain name
13225 interval do not exist in a zone and indicate
13226 what RR types are present for an existing
13227 name. NSEC3 differs from NSEC in that it
13228 prevents zone enumeration but is more
13229 computationally expensive on both the server
13230 and the client than NSEC. Described in RFC
13236 <entry colname="1">
13241 <entry colname="2">
13243 Used in DNSSECbis to tell the authoritative
13244 server which NSEC3 chains are available to use.
13245 Described in RFC 5155.
13250 <entry colname="1">
13255 <entry colname="2">
13257 Used in DNSSEC to securely indicate that
13258 RRs with an owner name in a certain name interval do
13260 a zone and indicate what RR types are present for an
13262 Used in original DNSSEC; replaced by NSEC in
13264 Described in RFC 2535.
13269 <entry colname="1">
13274 <entry colname="2">
13276 A pointer to another part of the domain
13277 name space. Described in RFC 1035.
13282 <entry colname="1">
13287 <entry colname="2">
13289 Provides mappings between RFC 822 and X.400
13290 addresses. Described in RFC 2163.
13295 <entry colname="1">
13300 <entry colname="2">
13302 Information on persons responsible
13303 for the domain. Experimental. Described in RFC 1183.
13308 <entry colname="1">
13313 <entry colname="2">
13315 Contains DNSSECbis signature data. Described
13321 <entry colname="1">
13326 <entry colname="2">
13328 Route-through binding for hosts that
13329 do not have their own direct wide area network
13331 Experimental. Described in RFC 1183.
13336 <entry colname="1">
13341 <entry colname="2">
13343 Contains DNSSEC signature data. Used in
13344 original DNSSEC; replaced by RRSIG in
13345 DNSSECbis, but still used for SIG(0).
13346 Described in RFCs 2535 and 2931.
13351 <entry colname="1">
13356 <entry colname="2">
13358 Identifies the start of a zone of authority.
13359 Described in RFC 1035.
13364 <entry colname="1">
13369 <entry colname="2">
13371 Contains the Sender Policy Framework information
13372 for a given email domain. Described in RFC 4408.
13377 <entry colname="1">
13382 <entry colname="2">
13384 Information about well known network
13385 services (replaces WKS). Described in RFC 2782.
13390 <entry colname="1">
13395 <entry colname="2">
13397 Provides a way to securely publish a secure shell key's
13398 fingerprint. Described in RFC 4255.
13403 <entry colname="1">
13408 <entry colname="2">
13410 Text records. Described in RFC 1035.
13415 <entry colname="1">
13420 <entry colname="2">
13422 Information about which well known
13423 network services, such as SMTP, that a domain
13424 supports. Historical.
13429 <entry colname="1">
13434 <entry colname="2">
13436 Representation of X.25 network addresses.
13437 Experimental. Described in RFC 1183.
13445 The following <emphasis>classes</emphasis> of resource records
13446 are currently valid in the DNS:
13448 <informaltable colsep="0" rowsep="0"><tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
13449 <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
13450 <colspec colname="2" colnum="2" colsep="0" colwidth="3.625in"/>
13454 <entry colname="1">
13459 <entry colname="2">
13467 <entry colname="1">
13472 <entry colname="2">
13474 Chaosnet, a LAN protocol created at MIT in the
13476 Rarely used for its historical purpose, but reused for
13478 built-in server information zones, e.g.,
13479 <literal>version.bind</literal>.
13485 <entry colname="1">
13490 <entry colname="2">
13492 Hesiod, an information service
13493 developed by MIT's Project Athena. It is used to share
13495 about various systems databases, such as users,
13507 The owner name is often implicit, rather than forming an
13509 part of the RR. For example, many name servers internally form
13511 or hash structures for the name space, and chain RRs off nodes.
13512 The remaining RR parts are the fixed header (type, class, TTL)
13513 which is consistent for all RRs, and a variable part (RDATA)
13515 fits the needs of the resource being described.
13518 The meaning of the TTL field is a time limit on how long an
13519 RR can be kept in a cache. This limit does not apply to
13521 data in zones; it is also timed out, but by the refreshing
13523 for the zone. The TTL is assigned by the administrator for the
13524 zone where the data originates. While short TTLs can be used to
13525 minimize caching, and a zero TTL prohibits caching, the
13527 of Internet performance suggest that these times should be on
13529 order of days for the typical host. If a change can be
13531 the TTL can be reduced prior to the change to minimize
13533 during the change, and then increased back to its former value
13538 The data in the RDATA section of RRs is carried as a combination
13539 of binary strings and domain names. The domain names are
13541 used as "pointers" to other data in the DNS.
13545 <title>Textual expression of RRs</title>
13547 RRs are represented in binary form in the packets of the DNS
13548 protocol, and are usually represented in highly encoded form
13550 stored in a name server or resolver. In the examples provided
13552 RFC 1034, a style similar to that used in master files was
13554 in order to show the contents of RRs. In this format, most RRs
13555 are shown on a single line, although continuation lines are
13560 The start of the line gives the owner of the RR. If a line
13561 begins with a blank, then the owner is assumed to be the same as
13562 that of the previous RR. Blank lines are often included for
13566 Following the owner, we list the TTL, type, and class of the
13567 RR. Class and type use the mnemonics defined above, and TTL is
13568 an integer before the type field. In order to avoid ambiguity
13570 parsing, type and class mnemonics are disjoint, TTLs are
13572 and the type mnemonic is always last. The IN class and TTL
13574 are often omitted from examples in the interests of clarity.
13577 The resource data or RDATA section of the RR are given using
13578 knowledge of the typical representation for the data.
13581 For example, we might show the RRs carried in a message as:
13583 <informaltable colsep="0" rowsep="0"><tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
13584 <colspec colname="1" colnum="1" colsep="0" colwidth="1.381in"/>
13585 <colspec colname="2" colnum="2" colsep="0" colwidth="1.020in"/>
13586 <colspec colname="3" colnum="3" colsep="0" colwidth="2.099in"/>
13589 <entry colname="1">
13591 <literal>ISI.EDU.</literal>
13594 <entry colname="2">
13596 <literal>MX</literal>
13599 <entry colname="3">
13601 <literal>10 VENERA.ISI.EDU.</literal>
13606 <entry colname="1">
13609 <entry colname="2">
13611 <literal>MX</literal>
13614 <entry colname="3">
13616 <literal>10 VAXA.ISI.EDU</literal>
13621 <entry colname="1">
13623 <literal>VENERA.ISI.EDU</literal>
13626 <entry colname="2">
13628 <literal>A</literal>
13631 <entry colname="3">
13633 <literal>128.9.0.32</literal>
13638 <entry colname="1">
13641 <entry colname="2">
13643 <literal>A</literal>
13646 <entry colname="3">
13648 <literal>10.1.0.52</literal>
13653 <entry colname="1">
13655 <literal>VAXA.ISI.EDU</literal>
13658 <entry colname="2">
13660 <literal>A</literal>
13663 <entry colname="3">
13665 <literal>10.2.0.27</literal>
13670 <entry colname="1">
13673 <entry colname="2">
13675 <literal>A</literal>
13678 <entry colname="3">
13680 <literal>128.9.0.33</literal>
13688 The MX RRs have an RDATA section which consists of a 16-bit
13689 number followed by a domain name. The address RRs use a
13691 IP address format to contain a 32-bit internet address.
13694 The above example shows six RRs, with two RRs at each of three
13698 Similarly we might see:
13700 <informaltable colsep="0" rowsep="0"><tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
13701 <colspec colname="1" colnum="1" colsep="0" colwidth="1.491in"/>
13702 <colspec colname="2" colnum="2" colsep="0" colwidth="1.067in"/>
13703 <colspec colname="3" colnum="3" colsep="0" colwidth="2.067in"/>
13706 <entry colname="1">
13708 <literal>XX.LCS.MIT.EDU.</literal>
13711 <entry colname="2">
13713 <literal>IN A</literal>
13716 <entry colname="3">
13718 <literal>10.0.0.44</literal>
13723 <entry colname="1"/>
13724 <entry colname="2">
13726 <literal>CH A</literal>
13729 <entry colname="3">
13731 <literal>MIT.EDU. 2420</literal>
13739 This example shows two addresses for
13740 <literal>XX.LCS.MIT.EDU</literal>, each of a different class.
13746 <title>Discussion of MX Records</title>
13749 As described above, domain servers store information as a
13750 series of resource records, each of which contains a particular
13751 piece of information about a given domain name (which is usually,
13752 but not always, a host). The simplest way to think of a RR is as
13753 a typed pair of data, a domain name matched with a relevant datum,
13754 and stored with some additional type information to help systems
13755 determine when the RR is relevant.
13759 MX records are used to control delivery of email. The data
13760 specified in the record is a priority and a domain name. The
13762 controls the order in which email delivery is attempted, with the
13763 lowest number first. If two priorities are the same, a server is
13764 chosen randomly. If no servers at a given priority are responding,
13765 the mail transport agent will fall back to the next largest
13767 Priority numbers do not have any absolute meaning — they are
13769 only respective to other MX records for that domain name. The
13771 name given is the machine to which the mail will be delivered.
13772 It <emphasis>must</emphasis> have an associated address record
13773 (A or AAAA) — CNAME is not sufficient.
13776 For a given domain, if there is both a CNAME record and an
13777 MX record, the MX record is in error, and will be ignored.
13779 the mail will be delivered to the server specified in the MX
13781 pointed to by the CNAME.
13784 <informaltable colsep="0" rowsep="0">
13785 <tgroup cols="5" colsep="0" rowsep="0" tgroupstyle="3Level-table">
13786 <colspec colname="1" colnum="1" colsep="0" colwidth="1.708in"/>
13787 <colspec colname="2" colnum="2" colsep="0" colwidth="0.444in"/>
13788 <colspec colname="3" colnum="3" colsep="0" colwidth="0.444in"/>
13789 <colspec colname="4" colnum="4" colsep="0" colwidth="0.976in"/>
13790 <colspec colname="5" colnum="5" colsep="0" colwidth="1.553in"/>
13793 <entry colname="1">
13795 <literal>example.com.</literal>
13798 <entry colname="2">
13800 <literal>IN</literal>
13803 <entry colname="3">
13805 <literal>MX</literal>
13808 <entry colname="4">
13810 <literal>10</literal>
13813 <entry colname="5">
13815 <literal>mail.example.com.</literal>
13820 <entry colname="1">
13823 <entry colname="2">
13825 <literal>IN</literal>
13828 <entry colname="3">
13830 <literal>MX</literal>
13833 <entry colname="4">
13835 <literal>10</literal>
13838 <entry colname="5">
13840 <literal>mail2.example.com.</literal>
13845 <entry colname="1">
13848 <entry colname="2">
13850 <literal>IN</literal>
13853 <entry colname="3">
13855 <literal>MX</literal>
13858 <entry colname="4">
13860 <literal>20</literal>
13863 <entry colname="5">
13865 <literal>mail.backup.org.</literal>
13870 <entry colname="1">
13872 <literal>mail.example.com.</literal>
13875 <entry colname="2">
13877 <literal>IN</literal>
13880 <entry colname="3">
13882 <literal>A</literal>
13885 <entry colname="4">
13887 <literal>10.0.0.1</literal>
13890 <entry colname="5">
13895 <entry colname="1">
13897 <literal>mail2.example.com.</literal>
13900 <entry colname="2">
13902 <literal>IN</literal>
13905 <entry colname="3">
13907 <literal>A</literal>
13910 <entry colname="4">
13912 <literal>10.0.0.2</literal>
13915 <entry colname="5">
13921 </informaltable><para>
13922 Mail delivery will be attempted to <literal>mail.example.com</literal> and
13923 <literal>mail2.example.com</literal> (in
13924 any order), and if neither of those succeed, delivery to <literal>mail.backup.org</literal> will
13928 <sect2 id="Setting_TTLs">
13929 <title>Setting TTLs</title>
13931 The time-to-live of the RR field is a 32-bit integer represented
13932 in units of seconds, and is primarily used by resolvers when they
13933 cache RRs. The TTL describes how long a RR can be cached before it
13934 should be discarded. The following three types of TTL are
13936 used in a zone file.
13938 <informaltable colsep="0" rowsep="0">
13939 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
13940 <colspec colname="1" colnum="1" colsep="0" colwidth="0.750in"/>
13941 <colspec colname="2" colnum="2" colsep="0" colwidth="4.375in"/>
13944 <entry colname="1">
13949 <entry colname="2">
13951 The last field in the SOA is the negative
13952 caching TTL. This controls how long other servers will
13953 cache no-such-domain
13954 (NXDOMAIN) responses from you.
13957 The maximum time for
13958 negative caching is 3 hours (3h).
13963 <entry colname="1">
13968 <entry colname="2">
13970 The $TTL directive at the top of the
13971 zone file (before the SOA) gives a default TTL for every
13973 a specific TTL set.
13978 <entry colname="1">
13983 <entry colname="2">
13985 Each RR can have a TTL as the second
13986 field in the RR, which will control how long other
13987 servers can cache it.
13995 All of these TTLs default to units of seconds, though units
13996 can be explicitly specified, for example, <literal>1h30m</literal>.
14000 <title>Inverse Mapping in IPv4</title>
14002 Reverse name resolution (that is, translation from IP address
14003 to name) is achieved by means of the <emphasis>in-addr.arpa</emphasis> domain
14004 and PTR records. Entries in the in-addr.arpa domain are made in
14005 least-to-most significant order, read left to right. This is the
14006 opposite order to the way IP addresses are usually written. Thus,
14007 a machine with an IP address of 10.1.2.3 would have a
14009 in-addr.arpa name of
14010 3.2.1.10.in-addr.arpa. This name should have a PTR resource record
14011 whose data field is the name of the machine or, optionally,
14013 PTR records if the machine has more than one name. For example,
14014 in the <optional>example.com</optional> domain:
14016 <informaltable colsep="0" rowsep="0">
14017 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
14018 <colspec colname="1" colnum="1" colsep="0" colwidth="1.125in"/>
14019 <colspec colname="2" colnum="2" colsep="0" colwidth="4.000in"/>
14022 <entry colname="1">
14024 <literal>$ORIGIN</literal>
14027 <entry colname="2">
14029 <literal>2.1.10.in-addr.arpa</literal>
14034 <entry colname="1">
14036 <literal>3</literal>
14039 <entry colname="2">
14041 <literal>IN PTR foo.example.com.</literal>
14050 The <command>$ORIGIN</command> lines in the examples
14051 are for providing context to the examples only — they do not
14053 appear in the actual usage. They are only used here to indicate
14054 that the example is relative to the listed origin.
14059 <title>Other Zone File Directives</title>
14061 The Master File Format was initially defined in RFC 1035 and
14062 has subsequently been extended. While the Master File Format
14064 is class independent all records in a Master File must be of the
14069 Master File Directives include <command>$ORIGIN</command>, <command>$INCLUDE</command>,
14070 and <command>$TTL.</command>
14073 <title>The <command>@</command> (at-sign)</title>
14075 When used in the label (or name) field, the asperand or
14076 at-sign (@) symbol represents the current origin.
14077 At the start of the zone file, it is the
14078 <<varname>zone_name</varname>> (followed by
14083 <title>The <command>$ORIGIN</command> Directive</title>
14085 Syntax: <command>$ORIGIN</command>
14086 <replaceable>domain-name</replaceable>
14087 <optional><replaceable>comment</replaceable></optional>
14089 <para><command>$ORIGIN</command>
14090 sets the domain name that will be appended to any
14091 unqualified records. When a zone is first read in there
14092 is an implicit <command>$ORIGIN</command>
14093 <<varname>zone_name</varname>><command>.</command>
14094 (followed by trailing dot).
14095 The current <command>$ORIGIN</command> is appended to
14096 the domain specified in the <command>$ORIGIN</command>
14097 argument if it is not absolute.
14101 $ORIGIN example.com.
14102 WWW CNAME MAIN-SERVER
14110 WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
14115 <title>The <command>$INCLUDE</command> Directive</title>
14117 Syntax: <command>$INCLUDE</command>
14118 <replaceable>filename</replaceable>
14120 <replaceable>origin</replaceable> </optional>
14121 <optional> <replaceable>comment</replaceable> </optional>
14124 Read and process the file <filename>filename</filename> as
14125 if it were included into the file at this point. If <command>origin</command> is
14126 specified the file is processed with <command>$ORIGIN</command> set
14127 to that value, otherwise the current <command>$ORIGIN</command> is
14131 The origin and the current domain name
14132 revert to the values they had prior to the <command>$INCLUDE</command> once
14133 the file has been read.
14137 RFC 1035 specifies that the current origin should be restored
14139 an <command>$INCLUDE</command>, but it is silent
14140 on whether the current
14141 domain name should also be restored. BIND 9 restores both of
14143 This could be construed as a deviation from RFC 1035, a
14149 <title>The <command>$TTL</command> Directive</title>
14151 Syntax: <command>$TTL</command>
14152 <replaceable>default-ttl</replaceable>
14154 <replaceable>comment</replaceable> </optional>
14157 Set the default Time To Live (TTL) for subsequent records
14158 with undefined TTLs. Valid TTLs are of the range 0-2147483647
14161 <para><command>$TTL</command>
14162 is defined in RFC 2308.
14167 <title><acronym>BIND</acronym> Master File Extension: the <command>$GENERATE</command> Directive</title>
14169 Syntax: <command>$GENERATE</command>
14170 <replaceable>range</replaceable>
14171 <replaceable>lhs</replaceable>
14172 <optional><replaceable>ttl</replaceable></optional>
14173 <optional><replaceable>class</replaceable></optional>
14174 <replaceable>type</replaceable>
14175 <replaceable>rhs</replaceable>
14176 <optional><replaceable>comment</replaceable></optional>
14178 <para><command>$GENERATE</command>
14179 is used to create a series of resource records that only
14180 differ from each other by an
14181 iterator. <command>$GENERATE</command> can be used to
14182 easily generate the sets of records required to support
14183 sub /24 reverse delegations described in RFC 2317:
14184 Classless IN-ADDR.ARPA delegation.
14187 <programlisting>$ORIGIN 0.0.192.IN-ADDR.ARPA.
14188 $GENERATE 1-2 @ NS SERVER$.EXAMPLE.
14189 $GENERATE 1-127 $ CNAME $.0</programlisting>
14195 <programlisting>0.0.0.192.IN-ADDR.ARPA. NS SERVER1.EXAMPLE.
14196 0.0.0.192.IN-ADDR.ARPA. NS SERVER2.EXAMPLE.
14197 1.0.0.192.IN-ADDR.ARPA. CNAME 1.0.0.0.192.IN-ADDR.ARPA.
14198 2.0.0.192.IN-ADDR.ARPA. CNAME 2.0.0.0.192.IN-ADDR.ARPA.
14200 127.0.0.192.IN-ADDR.ARPA. CNAME 127.0.0.0.192.IN-ADDR.ARPA.
14204 Generate a set of A and MX records. Note the MX's right hand
14205 side is a quoted string. The quotes will be stripped when the
14206 right hand side is processed.
14211 $GENERATE 1-127 HOST-$ A 1.2.3.$
14212 $GENERATE 1-127 HOST-$ MX "0 ."</programlisting>
14218 <programlisting>HOST-1.EXAMPLE. A 1.2.3.1
14219 HOST-1.EXAMPLE. MX 0 .
14220 HOST-2.EXAMPLE. A 1.2.3.2
14221 HOST-2.EXAMPLE. MX 0 .
14222 HOST-3.EXAMPLE. A 1.2.3.3
14223 HOST-3.EXAMPLE. MX 0 .
14225 HOST-127.EXAMPLE. A 1.2.3.127
14226 HOST-127.EXAMPLE. MX 0 .
14229 <informaltable colsep="0" rowsep="0">
14230 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="3Level-table">
14231 <colspec colname="1" colnum="1" colsep="0" colwidth="0.875in"/>
14232 <colspec colname="2" colnum="2" colsep="0" colwidth="4.250in"/>
14235 <entry colname="1">
14236 <para><command>range</command></para>
14238 <entry colname="2">
14240 This can be one of two forms: start-stop
14241 or start-stop/step. If the first form is used, then step
14242 is set to 1. start, stop and step must be positive
14243 integers between 0 and (2^31)-1. start must not be
14249 <entry colname="1">
14250 <para><command>lhs</command></para>
14252 <entry colname="2">
14254 describes the owner name of the resource records
14255 to be created. Any single <command>$</command>
14257 symbols within the <command>lhs</command> string
14258 are replaced by the iterator value.
14260 To get a $ in the output, you need to escape the
14261 <command>$</command> using a backslash
14262 <command>\</command>,
14263 e.g. <command>\$</command>. The
14264 <command>$</command> may optionally be followed
14265 by modifiers which change the offset from the
14266 iterator, field width and base.
14268 Modifiers are introduced by a
14269 <command>{</command> (left brace) immediately following the
14270 <command>$</command> as
14271 <command>${offset[,width[,base]]}</command>.
14272 For example, <command>${-20,3,d}</command>
14273 subtracts 20 from the current value, prints the
14274 result as a decimal in a zero-padded field of
14277 Available output forms are decimal
14278 (<command>d</command>), octal
14279 (<command>o</command>), hexadecimal
14280 (<command>x</command> or <command>X</command>
14281 for uppercase) and nibble
14282 (<command>n</command> or <command>N</command>\
14283 for uppercase). The default modifier is
14284 <command>${0,0,d}</command>. If the
14285 <command>lhs</command> is not absolute, the
14286 current <command>$ORIGIN</command> is appended
14290 In nibble mode the value will be treated as
14291 if it was a reversed hexadecimal string
14292 with each hexadecimal digit as a separate
14293 label. The width field includes the label
14297 For compatibility with earlier versions,
14298 <command>$$</command> is still recognized as
14299 indicating a literal $ in the output.
14304 <entry colname="1">
14305 <para><command>ttl</command></para>
14307 <entry colname="2">
14309 Specifies the time-to-live of the generated records. If
14310 not specified this will be inherited using the
14311 normal TTL inheritance rules.
14313 <para><command>class</command>
14314 and <command>ttl</command> can be
14315 entered in either order.
14320 <entry colname="1">
14321 <para><command>class</command></para>
14323 <entry colname="2">
14325 Specifies the class of the generated records.
14326 This must match the zone class if it is
14329 <para><command>class</command>
14330 and <command>ttl</command> can be
14331 entered in either order.
14336 <entry colname="1">
14337 <para><command>type</command></para>
14339 <entry colname="2">
14346 <entry colname="1">
14347 <para><command>rhs</command></para>
14349 <entry colname="2">
14351 <command>rhs</command>, optionally, quoted string.
14359 The <command>$GENERATE</command> directive is a <acronym>BIND</acronym> extension
14360 and not part of the standard zone file format.
14363 BIND 8 does not support the optional TTL and CLASS fields.
14367 <sect2 id="zonefile_format">
14368 <title>Additional File Formats</title>
14370 In addition to the standard textual format, BIND 9
14371 supports the ability to read or dump to zone files in
14375 The <constant>raw</constant> format is
14376 a binary representation of zone data in a manner similar
14377 to that used in zone transfers. Since it does not require
14378 parsing text, load time is significantly reduced.
14381 An even faster alternative is the <constant>map</constant>
14382 format, which is an image of a <acronym>BIND</acronym> 9
14383 in-memory zone database; it is capable of being loaded
14384 directly into memory via the <command>mmap()</command>
14385 function; the zone can begin serving queries almost
14389 For a primary server, a zone file in
14390 <constant>raw</constant> or <constant>map</constant>
14391 format is expected to be generated from a textual zone
14392 file by the <command>named-compilezone</command> command.
14393 For a secondary server or for a dynamic zone, it is automatically
14394 generated (if this format is specified by the
14395 <command>masterfile-format</command> option) when
14396 <command>named</command> dumps the zone contents after
14397 zone transfer or when applying prior updates.
14400 If a zone file in a binary format needs manual modification,
14401 it first must be converted to a textual form by the
14402 <command>named-compilezone</command> command. All
14403 necessary modification should go to the text file, which
14404 should then be converted to the binary form by the
14405 <command>named-compilezone</command> command again.
14408 Note that <command>map</command> format is extremely
14409 architecture-specific. A <constant>map</constant>
14410 file <emphasis>cannot</emphasis> be used on a system
14411 with different pointer size, endianness or data alignment
14412 than the system on which it was generated, and should in
14413 general be used only inside a single system.
14414 While <constant>raw</constant> format uses
14415 network byte order and avoids architecture-dependent
14416 data alignment so that it is as portable as
14417 possible, it is also primarily expected to be used
14418 inside the same single system. To export a
14419 zone file in either <constant>raw</constant> or
14420 <constant>map</constant> format, or make a
14421 portable backup of such a file, conversion to
14422 <constant>text</constant> format is recommended.
14427 <sect1 id="statistics">
14428 <title>BIND9 Statistics</title>
14430 <acronym>BIND</acronym> 9 maintains lots of statistics
14431 information and provides several interfaces for users to
14432 get access to the statistics.
14433 The available statistics include all statistics counters
14434 that were available in <acronym>BIND</acronym> 8 and
14435 are meaningful in <acronym>BIND</acronym> 9,
14436 and other information that is considered useful.
14440 The statistics information is categorized into the following
14444 <informaltable frame="all">
14446 <colspec colname="1" colnum="1" colsep="0" colwidth="3.300in"/>
14447 <colspec colname="2" colnum="2" colsep="0" colwidth="2.625in"/>
14451 <entry colname="1">
14452 <para>Incoming Requests</para>
14454 <entry colname="2">
14456 The number of incoming DNS requests for each OPCODE.
14462 <entry colname="1">
14463 <para>Incoming Queries</para>
14465 <entry colname="2">
14467 The number of incoming queries for each RR type.
14473 <entry colname="1">
14474 <para>Outgoing Queries</para>
14476 <entry colname="2">
14478 The number of outgoing queries for each RR
14479 type sent from the internal resolver.
14480 Maintained per view.
14486 <entry colname="1">
14487 <para>Name Server Statistics</para>
14489 <entry colname="2">
14491 Statistics counters about incoming request processing.
14497 <entry colname="1">
14498 <para>Zone Maintenance Statistics</para>
14500 <entry colname="2">
14502 Statistics counters regarding zone maintenance
14503 operations such as zone transfers.
14509 <entry colname="1">
14510 <para>Resolver Statistics</para>
14512 <entry colname="2">
14514 Statistics counters about name resolution
14515 performed in the internal resolver.
14516 Maintained per view.
14522 <entry colname="1">
14523 <para>Cache DB RRsets</para>
14525 <entry colname="2">
14527 The number of RRsets per RR type and nonexistent
14528 names stored in the cache database.
14529 If the exclamation mark (!) is printed for a RR
14530 type, it means that particular type of RRset is
14531 known to be nonexistent (this is also known as
14532 "NXRRSET"). If a hash mark (#) is present then
14533 the RRset is marked for garbage collection.
14534 Maintained per view.
14540 <entry colname="1">
14541 <para>Socket I/O Statistics</para>
14543 <entry colname="2">
14545 Statistics counters about network related events.
14555 A subset of Name Server Statistics is collected and shown
14556 per zone for which the server has the authority when
14557 <command>zone-statistics</command> is set to
14558 <userinput>yes</userinput>.
14559 These statistics counters are shown with their zone and view
14561 In some cases the view names are omitted for the default view.
14565 There are currently two user interfaces to get access to the
14567 One is in the plain text format dumped to the file specified
14568 by the <command>statistics-file</command> configuration option.
14569 The other is remotely accessible via a statistics channel
14570 when the <command>statistics-channels</command> statement
14571 is specified in the configuration file
14572 (see <xref linkend="statschannels"/>.)
14575 <sect3 id="statsfile">
14576 <title>The Statistics File</title>
14578 The text format statistics dump begins with a line, like:
14581 <command>+++ Statistics Dump +++ (973798949)</command>
14584 The number in parentheses is a standard
14585 Unix-style timestamp, measured as seconds since January 1, 1970.
14588 that line is a set of statistics information, which is categorized
14589 as described above.
14590 Each section begins with a line, like:
14594 <command>++ Name Server Statistics ++</command>
14598 Each section consists of lines, each containing the statistics
14599 counter value followed by its textual description.
14600 See below for available counters.
14601 For brevity, counters that have a value of 0 are not shown
14602 in the statistics file.
14606 The statistics dump ends with the line where the
14607 number is identical to the number in the beginning line; for example:
14610 <command>--- Statistics Dump --- (973798949)</command>
14614 <sect2 id="statistics_counters">
14615 <title>Statistics Counters</title>
14617 The following tables summarize statistics counters that
14618 <acronym>BIND</acronym> 9 provides.
14619 For each row of the tables, the leftmost column is the
14620 abbreviated symbol name of that counter.
14621 These symbols are shown in the statistics information
14622 accessed via an HTTP statistics channel.
14623 The rightmost column gives the description of the counter,
14624 which is also shown in the statistics file
14625 (but, in this document, possibly with slight modification
14626 for better readability).
14627 Additional notes may also be provided in this column.
14628 When a middle column exists between these two columns,
14629 it gives the corresponding counter name of the
14630 <acronym>BIND</acronym> 8 statistics, if applicable.
14634 <title>Name Server Statistics Counters</title>
14636 <informaltable colsep="0" rowsep="0">
14637 <tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
14638 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
14639 <colspec colname="2" colnum="2" colsep="0" colwidth="1.150in"/>
14640 <colspec colname="3" colnum="3" colsep="0" colwidth="3.350in"/>
14643 <entry colname="1">
14645 <emphasis>Symbol</emphasis>
14648 <entry colname="2">
14650 <emphasis>BIND8 Symbol</emphasis>
14653 <entry colname="3">
14655 <emphasis>Description</emphasis>
14661 <entry colname="1">
14662 <para><command>Requestv4</command></para>
14664 <entry colname="2">
14665 <para><command>RQ</command></para>
14667 <entry colname="3">
14669 IPv4 requests received.
14670 Note: this also counts non query requests.
14675 <entry colname="1">
14676 <para><command>Requestv6</command></para>
14678 <entry colname="2">
14679 <para><command>RQ</command></para>
14681 <entry colname="3">
14683 IPv6 requests received.
14684 Note: this also counts non query requests.
14689 <entry colname="1">
14690 <para><command>ReqEdns0</command></para>
14692 <entry colname="2">
14693 <para><command></command></para>
14695 <entry colname="3">
14697 Requests with EDNS(0) received.
14702 <entry colname="1">
14703 <para><command>ReqBadEDNSVer</command></para>
14705 <entry colname="2">
14706 <para><command></command></para>
14708 <entry colname="3">
14710 Requests with unsupported EDNS version received.
14715 <entry colname="1">
14716 <para><command>ReqTSIG</command></para>
14718 <entry colname="2">
14719 <para><command></command></para>
14721 <entry colname="3">
14723 Requests with TSIG received.
14728 <entry colname="1">
14729 <para><command>ReqSIG0</command></para>
14731 <entry colname="2">
14732 <para><command></command></para>
14734 <entry colname="3">
14736 Requests with SIG(0) received.
14741 <entry colname="1">
14742 <para><command>ReqBadSIG</command></para>
14744 <entry colname="2">
14745 <para><command></command></para>
14747 <entry colname="3">
14749 Requests with invalid (TSIG or SIG(0)) signature.
14754 <entry colname="1">
14755 <para><command>ReqTCP</command></para>
14757 <entry colname="2">
14758 <para><command>RTCP</command></para>
14760 <entry colname="3">
14762 TCP requests received.
14767 <entry colname="1">
14768 <para><command>AuthQryRej</command></para>
14770 <entry colname="2">
14771 <para><command>RUQ</command></para>
14773 <entry colname="3">
14775 Authoritative (non recursive) queries rejected.
14780 <entry colname="1">
14781 <para><command>RecQryRej</command></para>
14783 <entry colname="2">
14784 <para><command>RURQ</command></para>
14786 <entry colname="3">
14788 Recursive queries rejected.
14793 <entry colname="1">
14794 <para><command>XfrRej</command></para>
14796 <entry colname="2">
14797 <para><command>RUXFR</command></para>
14799 <entry colname="3">
14801 Zone transfer requests rejected.
14806 <entry colname="1">
14807 <para><command>UpdateRej</command></para>
14809 <entry colname="2">
14810 <para><command>RUUpd</command></para>
14812 <entry colname="3">
14814 Dynamic update requests rejected.
14819 <entry colname="1">
14820 <para><command>Response</command></para>
14822 <entry colname="2">
14823 <para><command>SAns</command></para>
14825 <entry colname="3">
14832 <entry colname="1">
14833 <para><command>RespTruncated</command></para>
14835 <entry colname="2">
14836 <para><command></command></para>
14838 <entry colname="3">
14840 Truncated responses sent.
14845 <entry colname="1">
14846 <para><command>RespEDNS0</command></para>
14848 <entry colname="2">
14849 <para><command></command></para>
14851 <entry colname="3">
14853 Responses with EDNS(0) sent.
14858 <entry colname="1">
14859 <para><command>RespTSIG</command></para>
14861 <entry colname="2">
14862 <para><command></command></para>
14864 <entry colname="3">
14866 Responses with TSIG sent.
14871 <entry colname="1">
14872 <para><command>RespSIG0</command></para>
14874 <entry colname="2">
14875 <para><command></command></para>
14877 <entry colname="3">
14879 Responses with SIG(0) sent.
14884 <entry colname="1">
14885 <para><command>QrySuccess</command></para>
14887 <entry colname="2">
14888 <para><command></command></para>
14890 <entry colname="3">
14892 Queries resulted in a successful answer.
14893 This means the query which returns a NOERROR response
14894 with at least one answer RR.
14895 This corresponds to the
14896 <command>success</command> counter
14897 of previous versions of
14898 <acronym>BIND</acronym> 9.
14903 <entry colname="1">
14904 <para><command>QryAuthAns</command></para>
14906 <entry colname="2">
14907 <para><command></command></para>
14909 <entry colname="3">
14911 Queries resulted in authoritative answer.
14916 <entry colname="1">
14917 <para><command>QryNoauthAns</command></para>
14919 <entry colname="2">
14920 <para><command>SNaAns</command></para>
14922 <entry colname="3">
14924 Queries resulted in non authoritative answer.
14929 <entry colname="1">
14930 <para><command>QryReferral</command></para>
14932 <entry colname="2">
14933 <para><command></command></para>
14935 <entry colname="3">
14937 Queries resulted in referral answer.
14938 This corresponds to the
14939 <command>referral</command> counter
14940 of previous versions of
14941 <acronym>BIND</acronym> 9.
14946 <entry colname="1">
14947 <para><command>QryNxrrset</command></para>
14949 <entry colname="2">
14950 <para><command></command></para>
14952 <entry colname="3">
14954 Queries resulted in NOERROR responses with no data.
14955 This corresponds to the
14956 <command>nxrrset</command> counter
14957 of previous versions of
14958 <acronym>BIND</acronym> 9.
14963 <entry colname="1">
14964 <para><command>QrySERVFAIL</command></para>
14966 <entry colname="2">
14967 <para><command>SFail</command></para>
14969 <entry colname="3">
14971 Queries resulted in SERVFAIL.
14976 <entry colname="1">
14977 <para><command>QryFORMERR</command></para>
14979 <entry colname="2">
14980 <para><command>SFErr</command></para>
14982 <entry colname="3">
14984 Queries resulted in FORMERR.
14989 <entry colname="1">
14990 <para><command>QryNXDOMAIN</command></para>
14992 <entry colname="2">
14993 <para><command>SNXD</command></para>
14995 <entry colname="3">
14997 Queries resulted in NXDOMAIN.
14998 This corresponds to the
14999 <command>nxdomain</command> counter
15000 of previous versions of
15001 <acronym>BIND</acronym> 9.
15006 <entry colname="1">
15007 <para><command>QryRecursion</command></para>
15009 <entry colname="2">
15010 <para><command>RFwdQ</command></para>
15012 <entry colname="3">
15014 Queries which caused the server
15015 to perform recursion in order to find the final answer.
15016 This corresponds to the
15017 <command>recursion</command> counter
15018 of previous versions of
15019 <acronym>BIND</acronym> 9.
15024 <entry colname="1">
15025 <para><command>QryDuplicate</command></para>
15027 <entry colname="2">
15028 <para><command>RDupQ</command></para>
15030 <entry colname="3">
15032 Queries which the server attempted to
15033 recurse but discovered an existing query with the same
15034 IP address, port, query ID, name, type and class
15035 already being processed.
15036 This corresponds to the
15037 <command>duplicate</command> counter
15038 of previous versions of
15039 <acronym>BIND</acronym> 9.
15044 <entry colname="1">
15045 <para><command>QryDropped</command></para>
15047 <entry colname="2">
15048 <para><command></command></para>
15050 <entry colname="3">
15052 Recursive queries for which the server
15053 discovered an excessive number of existing
15054 recursive queries for the same name, type and
15055 class and were subsequently dropped.
15056 This is the number of dropped queries due to
15057 the reason explained with the
15058 <command>clients-per-query</command>
15060 <command>max-clients-per-query</command>
15062 (see the description about
15063 <xref linkend="clients-per-query"/>.)
15064 This corresponds to the
15065 <command>dropped</command> counter
15066 of previous versions of
15067 <acronym>BIND</acronym> 9.
15072 <entry colname="1">
15073 <para><command>QryFailure</command></para>
15075 <entry colname="2">
15076 <para><command></command></para>
15078 <entry colname="3">
15080 Other query failures.
15081 This corresponds to the
15082 <command>failure</command> counter
15083 of previous versions of
15084 <acronym>BIND</acronym> 9.
15085 Note: this counter is provided mainly for
15086 backward compatibility with the previous versions.
15087 Normally a more fine-grained counters such as
15088 <command>AuthQryRej</command> and
15089 <command>RecQryRej</command>
15090 that would also fall into this counter are provided,
15091 and so this counter would not be of much
15092 interest in practice.
15097 <entry colname="1">
15098 <para><command>XfrReqDone</command></para>
15100 <entry colname="2">
15101 <para><command></command></para>
15103 <entry colname="3">
15105 Requested zone transfers completed.
15110 <entry colname="1">
15111 <para><command>UpdateReqFwd</command></para>
15113 <entry colname="2">
15114 <para><command></command></para>
15116 <entry colname="3">
15118 Update requests forwarded.
15123 <entry colname="1">
15124 <para><command>UpdateRespFwd</command></para>
15126 <entry colname="2">
15127 <para><command></command></para>
15129 <entry colname="3">
15131 Update responses forwarded.
15136 <entry colname="1">
15137 <para><command>UpdateFwdFail</command></para>
15139 <entry colname="2">
15140 <para><command></command></para>
15142 <entry colname="3">
15144 Dynamic update forward failed.
15149 <entry colname="1">
15150 <para><command>UpdateDone</command></para>
15152 <entry colname="2">
15153 <para><command></command></para>
15155 <entry colname="3">
15157 Dynamic updates completed.
15162 <entry colname="1">
15163 <para><command>UpdateFail</command></para>
15165 <entry colname="2">
15166 <para><command></command></para>
15168 <entry colname="3">
15170 Dynamic updates failed.
15175 <entry colname="1">
15176 <para><command>UpdateBadPrereq</command></para>
15178 <entry colname="2">
15179 <para><command></command></para>
15181 <entry colname="3">
15183 Dynamic updates rejected due to prerequisite failure.
15188 <entry colname="1">
15189 <para><command>RateDropped</command></para>
15191 <entry colname="2">
15192 <para><command></command></para>
15194 <entry colname="3">
15196 Responses dropped by rate limits.
15201 <entry colname="1">
15202 <para><command>RateSlipped</command></para>
15204 <entry colname="2">
15205 <para><command></command></para>
15207 <entry colname="3">
15209 Responses truncated by rate limits.
15214 <entry colname="1">
15215 <para><command>RPZRewrites</command></para>
15217 <entry colname="2">
15218 <para><command></command></para>
15220 <entry colname="3">
15222 Response policy zone rewrites.
15232 <title>Zone Maintenance Statistics Counters</title>
15234 <informaltable colsep="0" rowsep="0">
15235 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
15236 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
15237 <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
15240 <entry colname="1">
15242 <emphasis>Symbol</emphasis>
15245 <entry colname="2">
15247 <emphasis>Description</emphasis>
15253 <entry colname="1">
15254 <para><command>NotifyOutv4</command></para>
15256 <entry colname="2">
15258 IPv4 notifies sent.
15263 <entry colname="1">
15264 <para><command>NotifyOutv6</command></para>
15266 <entry colname="2">
15268 IPv6 notifies sent.
15273 <entry colname="1">
15274 <para><command>NotifyInv4</command></para>
15276 <entry colname="2">
15278 IPv4 notifies received.
15283 <entry colname="1">
15284 <para><command>NotifyInv6</command></para>
15286 <entry colname="2">
15288 IPv6 notifies received.
15293 <entry colname="1">
15294 <para><command>NotifyRej</command></para>
15296 <entry colname="2">
15298 Incoming notifies rejected.
15303 <entry colname="1">
15304 <para><command>SOAOutv4</command></para>
15306 <entry colname="2">
15308 IPv4 SOA queries sent.
15313 <entry colname="1">
15314 <para><command>SOAOutv6</command></para>
15316 <entry colname="2">
15318 IPv6 SOA queries sent.
15323 <entry colname="1">
15324 <para><command>AXFRReqv4</command></para>
15326 <entry colname="2">
15328 IPv4 AXFR requested.
15333 <entry colname="1">
15334 <para><command>AXFRReqv6</command></para>
15336 <entry colname="2">
15338 IPv6 AXFR requested.
15343 <entry colname="1">
15344 <para><command>IXFRReqv4</command></para>
15346 <entry colname="2">
15348 IPv4 IXFR requested.
15353 <entry colname="1">
15354 <para><command>IXFRReqv6</command></para>
15356 <entry colname="2">
15358 IPv6 IXFR requested.
15363 <entry colname="1">
15364 <para><command>XfrSuccess</command></para>
15366 <entry colname="2">
15368 Zone transfer requests succeeded.
15373 <entry colname="1">
15374 <para><command>XfrFail</command></para>
15376 <entry colname="2">
15378 Zone transfer requests failed.
15388 <title>Resolver Statistics Counters</title>
15390 <informaltable colsep="0" rowsep="0">
15391 <tgroup cols="3" colsep="0" rowsep="0" tgroupstyle="4Level-table">
15392 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
15393 <colspec colname="2" colnum="2" colsep="0" colwidth="1.150in"/>
15394 <colspec colname="3" colnum="3" colsep="0" colwidth="3.350in"/>
15397 <entry colname="1">
15399 <emphasis>Symbol</emphasis>
15402 <entry colname="2">
15404 <emphasis>BIND8 Symbol</emphasis>
15407 <entry colname="3">
15409 <emphasis>Description</emphasis>
15415 <entry colname="1">
15416 <para><command>Queryv4</command></para>
15418 <entry colname="2">
15419 <para><command>SFwdQ</command></para>
15421 <entry colname="3">
15428 <entry colname="1">
15429 <para><command>Queryv6</command></para>
15431 <entry colname="2">
15432 <para><command>SFwdQ</command></para>
15434 <entry colname="3">
15441 <entry colname="1">
15442 <para><command>Responsev4</command></para>
15444 <entry colname="2">
15445 <para><command>RR</command></para>
15447 <entry colname="3">
15449 IPv4 responses received.
15454 <entry colname="1">
15455 <para><command>Responsev6</command></para>
15457 <entry colname="2">
15458 <para><command>RR</command></para>
15460 <entry colname="3">
15462 IPv6 responses received.
15467 <entry colname="1">
15468 <para><command>NXDOMAIN</command></para>
15470 <entry colname="2">
15471 <para><command>RNXD</command></para>
15473 <entry colname="3">
15480 <entry colname="1">
15481 <para><command>SERVFAIL</command></para>
15483 <entry colname="2">
15484 <para><command>RFail</command></para>
15486 <entry colname="3">
15493 <entry colname="1">
15494 <para><command>FORMERR</command></para>
15496 <entry colname="2">
15497 <para><command>RFErr</command></para>
15499 <entry colname="3">
15506 <entry colname="1">
15507 <para><command>OtherError</command></para>
15509 <entry colname="2">
15510 <para><command>RErr</command></para>
15512 <entry colname="3">
15514 Other errors received.
15519 <entry colname="1">
15520 <para><command>EDNS0Fail</command></para>
15522 <entry colname="2">
15523 <para><command></command></para>
15525 <entry colname="3">
15527 EDNS(0) query failures.
15532 <entry colname="1">
15533 <para><command>Mismatch</command></para>
15535 <entry colname="2">
15536 <para><command>RDupR</command></para>
15538 <entry colname="3">
15540 Mismatch responses received.
15541 The DNS ID, response's source address,
15542 and/or the response's source port does not
15543 match what was expected.
15544 (The port must be 53 or as defined by
15545 the <command>port</command> option.)
15546 This may be an indication of a cache
15552 <entry colname="1">
15553 <para><command>Truncated</command></para>
15555 <entry colname="2">
15556 <para><command></command></para>
15558 <entry colname="3">
15560 Truncated responses received.
15565 <entry colname="1">
15566 <para><command>Lame</command></para>
15568 <entry colname="2">
15569 <para><command>RLame</command></para>
15571 <entry colname="3">
15573 Lame delegations received.
15578 <entry colname="1">
15579 <para><command>Retry</command></para>
15581 <entry colname="2">
15582 <para><command>SDupQ</command></para>
15584 <entry colname="3">
15586 Query retries performed.
15591 <entry colname="1">
15592 <para><command>QueryAbort</command></para>
15594 <entry colname="2">
15595 <para><command></command></para>
15597 <entry colname="3">
15599 Queries aborted due to quota control.
15604 <entry colname="1">
15605 <para><command>QuerySockFail</command></para>
15607 <entry colname="2">
15608 <para><command></command></para>
15610 <entry colname="3">
15612 Failures in opening query sockets.
15613 One common reason for such failures is a
15614 failure of opening a new socket due to a
15615 limitation on file descriptors.
15620 <entry colname="1">
15621 <para><command>QueryTimeout</command></para>
15623 <entry colname="2">
15624 <para><command></command></para>
15626 <entry colname="3">
15633 <entry colname="1">
15634 <para><command>GlueFetchv4</command></para>
15636 <entry colname="2">
15637 <para><command>SSysQ</command></para>
15639 <entry colname="3">
15641 IPv4 NS address fetches invoked.
15646 <entry colname="1">
15647 <para><command>GlueFetchv6</command></para>
15649 <entry colname="2">
15650 <para><command>SSysQ</command></para>
15652 <entry colname="3">
15654 IPv6 NS address fetches invoked.
15659 <entry colname="1">
15660 <para><command>GlueFetchv4Fail</command></para>
15662 <entry colname="2">
15663 <para><command></command></para>
15665 <entry colname="3">
15667 IPv4 NS address fetch failed.
15672 <entry colname="1">
15673 <para><command>GlueFetchv6Fail</command></para>
15675 <entry colname="2">
15676 <para><command></command></para>
15678 <entry colname="3">
15680 IPv6 NS address fetch failed.
15685 <entry colname="1">
15686 <para><command>ValAttempt</command></para>
15688 <entry colname="2">
15689 <para><command></command></para>
15691 <entry colname="3">
15693 DNSSEC validation attempted.
15698 <entry colname="1">
15699 <para><command>ValOk</command></para>
15701 <entry colname="2">
15702 <para><command></command></para>
15704 <entry colname="3">
15706 DNSSEC validation succeeded.
15711 <entry colname="1">
15712 <para><command>ValNegOk</command></para>
15714 <entry colname="2">
15715 <para><command></command></para>
15717 <entry colname="3">
15719 DNSSEC validation on negative information succeeded.
15724 <entry colname="1">
15725 <para><command>ValFail</command></para>
15727 <entry colname="2">
15728 <para><command></command></para>
15730 <entry colname="3">
15732 DNSSEC validation failed.
15737 <entry colname="1">
15738 <para><command>QryRTTnn</command></para>
15740 <entry colname="2">
15741 <para><command></command></para>
15743 <entry colname="3">
15745 Frequency table on round trip times (RTTs) of
15747 Each <command>nn</command> specifies the corresponding
15750 <command>nn_1</command>,
15751 <command>nn_2</command>,
15753 <command>nn_m</command>,
15754 the value of <command>nn_i</command> is the
15755 number of queries whose RTTs are between
15756 <command>nn_(i-1)</command> (inclusive) and
15757 <command>nn_i</command> (exclusive) milliseconds.
15758 For the sake of convenience we define
15759 <command>nn_0</command> to be 0.
15760 The last entry should be represented as
15761 <command>nn_m+</command>, which means the
15762 number of queries whose RTTs are equal to or over
15763 <command>nn_m</command> milliseconds.
15774 <title>Socket I/O Statistics Counters</title>
15777 Socket I/O statistics counters are defined per socket
15779 <command>UDP4</command> (UDP/IPv4),
15780 <command>UDP6</command> (UDP/IPv6),
15781 <command>TCP4</command> (TCP/IPv4),
15782 <command>TCP6</command> (TCP/IPv6),
15783 <command>Unix</command> (Unix Domain), and
15784 <command>FDwatch</command> (sockets opened outside the
15786 In the following table <command><TYPE></command>
15787 represents a socket type.
15788 Not all counters are available for all socket types;
15789 exceptions are noted in the description field.
15792 <informaltable colsep="0" rowsep="0">
15793 <tgroup cols="2" colsep="0" rowsep="0" tgroupstyle="4Level-table">
15794 <colspec colname="1" colnum="1" colsep="0" colwidth="1.150in"/>
15795 <colspec colname="2" colnum="2" colsep="0" colwidth="3.350in"/>
15798 <entry colname="1">
15800 <emphasis>Symbol</emphasis>
15803 <entry colname="2">
15805 <emphasis>Description</emphasis>
15811 <entry colname="1">
15812 <para><command><TYPE>Open</command></para>
15814 <entry colname="2">
15816 Sockets opened successfully.
15817 This counter is not applicable to the
15818 <command>FDwatch</command> type.
15823 <entry colname="1">
15824 <para><command><TYPE>OpenFail</command></para>
15826 <entry colname="2">
15828 Failures of opening sockets.
15829 This counter is not applicable to the
15830 <command>FDwatch</command> type.
15835 <entry colname="1">
15836 <para><command><TYPE>Close</command></para>
15838 <entry colname="2">
15845 <entry colname="1">
15846 <para><command><TYPE>BindFail</command></para>
15848 <entry colname="2">
15850 Failures of binding sockets.
15855 <entry colname="1">
15856 <para><command><TYPE>ConnFail</command></para>
15858 <entry colname="2">
15860 Failures of connecting sockets.
15865 <entry colname="1">
15866 <para><command><TYPE>Conn</command></para>
15868 <entry colname="2">
15870 Connections established successfully.
15875 <entry colname="1">
15876 <para><command><TYPE>AcceptFail</command></para>
15878 <entry colname="2">
15880 Failures of accepting incoming connection requests.
15881 This counter is not applicable to the
15882 <command>UDP</command> and
15883 <command>FDwatch</command> types.
15888 <entry colname="1">
15889 <para><command><TYPE>Accept</command></para>
15891 <entry colname="2">
15893 Incoming connections successfully accepted.
15894 This counter is not applicable to the
15895 <command>UDP</command> and
15896 <command>FDwatch</command> types.
15901 <entry colname="1">
15902 <para><command><TYPE>SendErr</command></para>
15904 <entry colname="2">
15906 Errors in socket send operations.
15907 This counter corresponds
15908 to <command>SErr</command> counter of
15909 <command>BIND</command> 8.
15914 <entry colname="1">
15915 <para><command><TYPE>RecvErr</command></para>
15917 <entry colname="2">
15919 Errors in socket receive operations.
15920 This includes errors of send operations on a
15921 connected UDP socket notified by an ICMP error
15931 <title>Compatibility with <emphasis>BIND</emphasis> 8 Counters</title>
15933 Most statistics counters that were available
15934 in <command>BIND</command> 8 are also supported in
15935 <command>BIND</command> 9 as shown in the above tables.
15936 Here are notes about other counters that do not appear
15942 <term><command>RFwdR,SFwdR</command></term>
15945 These counters are not supported
15946 because <command>BIND</command> 9 does not adopt
15947 the notion of <emphasis>forwarding</emphasis>
15948 as <command>BIND</command> 8 did.
15954 <term><command>RAXFR</command></term>
15957 This counter is accessible in the Incoming Queries section.
15963 <term><command>RIQ</command></term>
15966 This counter is accessible in the Incoming Requests section.
15972 <term><command>ROpts</command></term>
15975 This counter is not supported
15976 because <command>BIND</command> 9 does not care
15977 about IP options in the first place.
15987 <chapter id="Bv9ARM.ch07">
15988 <title><acronym>BIND</acronym> 9 Security Considerations</title>
15989 <sect1 id="Access_Control_Lists">
15990 <title>Access Control Lists</title>
15992 Access Control Lists (ACLs) are address match lists that
15993 you can set up and nickname for future use in <command>allow-notify</command>,
15994 <command>allow-query</command>, <command>allow-query-on</command>,
15995 <command>allow-recursion</command>, <command>allow-recursion-on</command>,
15996 <command>blackhole</command>, <command>allow-transfer</command>,
16000 Using ACLs allows you to have finer control over who can access
16001 your name server, without cluttering up your config files with huge
16002 lists of IP addresses.
16005 It is a <emphasis>good idea</emphasis> to use ACLs, and to
16006 control access to your server. Limiting access to your server by
16007 outside parties can help prevent spoofing and denial of service (DoS) attacks against
16011 Here is an example of how to properly apply ACLs:
16015 // Set up an ACL named "bogusnets" that will block
16016 // RFC1918 space and some reserved space, which is
16017 // commonly used in spoofing attacks.
16019 0.0.0.0/8; 192.0.2.0/24; 224.0.0.0/3;
16020 10.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16;
16023 // Set up an ACL called our-nets. Replace this with the
16024 // real IP numbers.
16025 acl our-nets { x.x.x.x/24; x.x.x.x/21; };
16029 allow-query { our-nets; };
16030 allow-recursion { our-nets; };
16032 blackhole { bogusnets; };
16036 zone "example.com" {
16038 file "m/example.com";
16039 allow-query { any; };
16044 This allows recursive queries of the server from the outside
16045 unless recursion has been previously disabled.
16049 <title><command>Chroot</command> and <command>Setuid</command></title>
16051 On UNIX servers, it is possible to run <acronym>BIND</acronym>
16052 in a <emphasis>chrooted</emphasis> environment (using
16053 the <command>chroot()</command> function) by specifying
16054 the "<option>-t</option>" option for <command>named</command>.
16055 This can help improve system security by placing
16056 <acronym>BIND</acronym> in a "sandbox", which will limit
16057 the damage done if a server is compromised.
16060 Another useful feature in the UNIX version of <acronym>BIND</acronym> is the
16061 ability to run the daemon as an unprivileged user ( <option>-u</option> <replaceable>user</replaceable> ).
16062 We suggest running as an unprivileged user when using the <command>chroot</command> feature.
16065 Here is an example command line to load <acronym>BIND</acronym> in a <command>chroot</command> sandbox,
16066 <command>/var/named</command>, and to run <command>named</command> <command>setuid</command> to
16070 <userinput>/usr/local/sbin/named -u 202 -t /var/named</userinput>
16074 <title>The <command>chroot</command> Environment</title>
16077 In order for a <command>chroot</command> environment
16079 work properly in a particular directory
16080 (for example, <filename>/var/named</filename>),
16081 you will need to set up an environment that includes everything
16082 <acronym>BIND</acronym> needs to run.
16083 From <acronym>BIND</acronym>'s point of view, <filename>/var/named</filename> is
16084 the root of the filesystem. You will need to adjust the values of
16086 like <command>directory</command> and <command>pid-file</command> to account
16090 Unlike with earlier versions of BIND, you typically will
16091 <emphasis>not</emphasis> need to compile <command>named</command>
16092 statically nor install shared libraries under the new root.
16093 However, depending on your operating system, you may need
16094 to set up things like
16095 <filename>/dev/zero</filename>,
16096 <filename>/dev/random</filename>,
16097 <filename>/dev/log</filename>, and
16098 <filename>/etc/localtime</filename>.
16103 <title>Using the <command>setuid</command> Function</title>
16106 Prior to running the <command>named</command> daemon,
16108 the <command>touch</command> utility (to change file
16110 modification times) or the <command>chown</command>
16112 set the user id and/or group id) on files
16113 to which you want <acronym>BIND</acronym>
16117 Note that if the <command>named</command> daemon is running as an
16118 unprivileged user, it will not be able to bind to new restricted
16119 ports if the server is reloaded.
16124 <sect1 id="dynamic_update_security">
16125 <title>Dynamic Update Security</title>
16128 Access to the dynamic
16129 update facility should be strictly limited. In earlier versions of
16130 <acronym>BIND</acronym>, the only way to do this was
16132 address of the host requesting the update, by listing an IP address
16134 network prefix in the <command>allow-update</command>
16136 This method is insecure since the source address of the update UDP
16138 is easily forged. Also note that if the IP addresses allowed by the
16139 <command>allow-update</command> option include the
16141 server which performs forwarding of dynamic updates, the master can
16143 trivially attacked by sending the update to the slave, which will
16144 forward it to the master with its own source IP address causing the
16145 master to approve it without question.
16149 For these reasons, we strongly recommend that updates be
16150 cryptographically authenticated by means of transaction signatures
16151 (TSIG). That is, the <command>allow-update</command>
16153 list only TSIG key names, not IP addresses or network
16154 prefixes. Alternatively, the new <command>update-policy</command>
16155 option can be used.
16159 Some sites choose to keep all dynamically-updated DNS data
16160 in a subdomain and delegate that subdomain to a separate zone. This
16161 way, the top-level zone containing critical data such as the IP
16163 of public web and mail servers need not allow dynamic update at
16170 <chapter id="Bv9ARM.ch08">
16171 <title>Troubleshooting</title>
16173 <title>Common Problems</title>
16175 <title>It's not working; how can I figure out what's wrong?</title>
16178 The best solution to solving installation and
16179 configuration issues is to take preventative measures by setting
16180 up logging files beforehand. The log files provide a
16181 source of hints and information that can be used to figure out
16182 what went wrong and how to fix the problem.
16188 <title>Incrementing and Changing the Serial Number</title>
16191 Zone serial numbers are just numbers — they aren't
16192 date related. A lot of people set them to a number that
16193 represents a date, usually of the form YYYYMMDDRR.
16194 Occasionally they will make a mistake and set them to a
16195 "date in the future" then try to correct them by setting
16196 them to the "current date". This causes problems because
16197 serial numbers are used to indicate that a zone has been
16198 updated. If the serial number on the slave server is
16199 lower than the serial number on the master, the slave
16200 server will attempt to update its copy of the zone.
16204 Setting the serial number to a lower number on the master
16205 server than the slave server means that the slave will not perform
16206 updates to its copy of the zone.
16210 The solution to this is to add 2147483647 (2^31-1) to the
16211 number, reload the zone and make sure all slaves have updated to
16212 the new zone serial number, then reset the number to what you want
16213 it to be, and reload the zone again.
16218 <title>Where Can I Get Help?</title>
16221 The Internet Systems Consortium
16222 (<acronym>ISC</acronym>) offers a wide range
16223 of support and service agreements for <acronym>BIND</acronym> and <acronym>DHCP</acronym> servers. Four
16224 levels of premium support are available and each level includes
16225 support for all <acronym>ISC</acronym> programs,
16226 significant discounts on products
16227 and training, and a recognized priority on bug fixes and
16228 non-funded feature requests. In addition, <acronym>ISC</acronym> offers a standard
16229 support agreement package which includes services ranging from bug
16230 fix announcements to remote support. It also includes training in
16231 <acronym>BIND</acronym> and <acronym>DHCP</acronym>.
16235 To discuss arrangements for support, contact
16236 <ulink url="mailto:info@isc.org">info@isc.org</ulink> or visit the
16237 <acronym>ISC</acronym> web page at
16238 <ulink url="http://www.isc.org/services/support/"
16239 >http://www.isc.org/services/support/</ulink>
16245 <appendix id="Bv9ARM.ch09">
16246 <title>Release Notes</title>
16247 <xi:include href="notes.xml"/>
16250 <appendix id="Bv9ARM.ch10">
16251 <title>A Brief History of the <acronym>DNS</acronym> and <acronym>BIND</acronym></title>
16252 <sect1 id="historical_dns_information">
16254 Although the "official" beginning of the Domain Name
16255 System occurred in 1984 with the publication of RFC 920, the
16256 core of the new system was described in 1983 in RFCs 882 and
16257 883. From 1984 to 1987, the ARPAnet (the precursor to today's
16258 Internet) became a testbed of experimentation for developing the
16259 new naming/addressing scheme in a rapidly expanding,
16260 operational network environment. New RFCs were written and
16261 published in 1987 that modified the original documents to
16262 incorporate improvements based on the working model. RFC 1034,
16263 "Domain Names-Concepts and Facilities", and RFC 1035, "Domain
16264 Names-Implementation and Specification" were published and
16265 became the standards upon which all <acronym>DNS</acronym> implementations are
16270 The first working domain name server, called "Jeeves", was
16271 written in 1983-84 by Paul Mockapetris for operation on DEC
16273 machines located at the University of Southern California's
16275 Sciences Institute (USC-ISI) and SRI International's Network
16277 Center (SRI-NIC). A <acronym>DNS</acronym> server for
16278 Unix machines, the Berkeley Internet
16279 Name Domain (<acronym>BIND</acronym>) package, was
16280 written soon after by a group of
16281 graduate students at the University of California at Berkeley
16283 a grant from the US Defense Advanced Research Projects
16288 Versions of <acronym>BIND</acronym> through
16289 4.8.3 were maintained by the Computer
16290 Systems Research Group (CSRG) at UC Berkeley. Douglas Terry, Mark
16291 Painter, David Riggle and Songnian Zhou made up the initial <acronym>BIND</acronym>
16292 project team. After that, additional work on the software package
16293 was done by Ralph Campbell. Kevin Dunlap, a Digital Equipment
16295 employee on loan to the CSRG, worked on <acronym>BIND</acronym> for 2 years, from 1985
16296 to 1987. Many other people also contributed to <acronym>BIND</acronym> development
16297 during that time: Doug Kingston, Craig Partridge, Smoot
16299 Mike Muuss, Jim Bloom and Mike Schwartz. <acronym>BIND</acronym> maintenance was subsequently
16300 handled by Mike Karels and Øivind Kure.
16303 <acronym>BIND</acronym> versions 4.9 and 4.9.1 were
16304 released by Digital Equipment
16305 Corporation (now Compaq Computer Corporation). Paul Vixie, then
16306 a DEC employee, became <acronym>BIND</acronym>'s
16307 primary caretaker. He was assisted
16308 by Phil Almquist, Robert Elz, Alan Barrett, Paul Albitz, Bryan
16310 Partan, Andy Cherenson, Tom Limoncelli, Berthold Paffrath, Fuat
16311 Baran, Anant Kumar, Art Harkin, Win Treese, Don Lewis, Christophe
16312 Wolfhugel, and others.
16315 In 1994, <acronym>BIND</acronym> version 4.9.2 was sponsored by
16316 Vixie Enterprises. Paul
16317 Vixie became <acronym>BIND</acronym>'s principal
16318 architect/programmer.
16321 <acronym>BIND</acronym> versions from 4.9.3 onward
16322 have been developed and maintained
16323 by the Internet Systems Consortium and its predecessor,
16324 the Internet Software Consortium, with support being provided
16328 As co-architects/programmers, Bob Halley and
16329 Paul Vixie released the first production-ready version of
16330 <acronym>BIND</acronym> version 8 in May 1997.
16333 BIND version 9 was released in September 2000 and is a
16334 major rewrite of nearly all aspects of the underlying
16338 BIND versions 4 and 8 are officially deprecated.
16339 No additional development is done
16340 on BIND version 4 or BIND version 8.
16343 <acronym>BIND</acronym> development work is made
16344 possible today by the sponsorship
16345 of several corporations, and by the tireless work efforts of
16346 numerous individuals.
16351 <appendix id="Bv9ARM.ch11">
16352 <title>General <acronym>DNS</acronym> Reference Information</title>
16353 <sect1 id="ipv6addresses">
16354 <title>IPv6 addresses (AAAA)</title>
16356 IPv6 addresses are 128-bit identifiers for interfaces and
16357 sets of interfaces which were introduced in the <acronym>DNS</acronym> to facilitate
16358 scalable Internet routing. There are three types of addresses: <emphasis>Unicast</emphasis>,
16359 an identifier for a single interface;
16360 <emphasis>Anycast</emphasis>,
16361 an identifier for a set of interfaces; and <emphasis>Multicast</emphasis>,
16362 an identifier for a set of interfaces. Here we describe the global
16363 Unicast address scheme. For more information, see RFC 3587,
16364 "Global Unicast Address Format."
16367 IPv6 unicast addresses consist of a
16368 <emphasis>global routing prefix</emphasis>, a
16369 <emphasis>subnet identifier</emphasis>, and an
16370 <emphasis>interface identifier</emphasis>.
16373 The global routing prefix is provided by the
16374 upstream provider or ISP, and (roughly) corresponds to the
16375 IPv4 <emphasis>network</emphasis> section
16376 of the address range.
16378 The subnet identifier is for local subnetting, much the
16379 same as subnetting an
16380 IPv4 /16 network into /24 subnets.
16382 The interface identifier is the address of an individual
16383 interface on a given network; in IPv6, addresses belong to
16384 interfaces rather than to machines.
16387 The subnetting capability of IPv6 is much more flexible than
16388 that of IPv4: subnetting can be carried out on bit boundaries,
16389 in much the same way as Classless InterDomain Routing
16390 (CIDR), and the DNS PTR representation ("nibble" format)
16391 makes setting up reverse zones easier.
16394 The Interface Identifier must be unique on the local link,
16395 and is usually generated automatically by the IPv6
16396 implementation, although it is usually possible to
16397 override the default setting if necessary. A typical IPv6
16398 address might look like:
16399 <command>2001:db8:201:9:a00:20ff:fe81:2b32</command>
16402 IPv6 address specifications often contain long strings
16403 of zeros, so the architects have included a shorthand for
16405 them. The double colon (`::') indicates the longest possible
16407 of zeros that can fit, and can be used only once in an address.
16410 <sect1 id="bibliography">
16411 <title>Bibliography (and Suggested Reading)</title>
16413 <title>Request for Comments (RFCs)</title>
16415 Specification documents for the Internet protocol suite, including
16416 the <acronym>DNS</acronym>, are published as part of
16417 the Request for Comments (RFCs)
16418 series of technical notes. The standards themselves are defined
16419 by the Internet Engineering Task Force (IETF) and the Internet
16420 Engineering Steering Group (IESG). RFCs can be obtained online via FTP at:
16423 <ulink url="ftp://www.isi.edu/in-notes/">
16424 ftp://www.isi.edu/in-notes/RFC<replaceable>xxxx</replaceable>.txt
16428 (where <replaceable>xxxx</replaceable> is
16429 the number of the RFC). RFCs are also available via the Web at:
16432 <ulink url="http://www.ietf.org/rfc/"
16433 >http://www.ietf.org/rfc/</ulink>.
16437 <!-- one of (BIBLIOENTRY BIBLIOMIXED) -->
16438 <title>Standards</title>
16440 <abbrev>RFC974</abbrev>
16442 <surname>Partridge</surname>
16443 <firstname>C.</firstname>
16445 <title>Mail Routing and the Domain System</title>
16446 <pubdate>January 1986</pubdate>
16449 <abbrev>RFC1034</abbrev>
16451 <surname>Mockapetris</surname>
16452 <firstname>P.V.</firstname>
16454 <title>Domain Names — Concepts and Facilities</title>
16455 <pubdate>November 1987</pubdate>
16458 <abbrev>RFC1035</abbrev>
16460 <surname>Mockapetris</surname>
16461 <firstname>P. V.</firstname>
16462 </author> <title>Domain Names — Implementation and
16463 Specification</title>
16464 <pubdate>November 1987</pubdate>
16467 <bibliodiv id="proposed_standards" xreflabel="Proposed Standards">
16469 <title>Proposed Standards</title>
16470 <!-- one of (BIBLIOENTRY BIBLIOMIXED) -->
16472 <abbrev>RFC2181</abbrev>
16474 <surname>Elz</surname>
16475 <firstname>R., R. Bush</firstname>
16477 <title>Clarifications to the <acronym>DNS</acronym>
16478 Specification</title>
16479 <pubdate>July 1997</pubdate>
16482 <abbrev>RFC2308</abbrev>
16484 <surname>Andrews</surname>
16485 <firstname>M.</firstname>
16487 <title>Negative Caching of <acronym>DNS</acronym>
16489 <pubdate>March 1998</pubdate>
16492 <abbrev>RFC1995</abbrev>
16494 <surname>Ohta</surname>
16495 <firstname>M.</firstname>
16497 <title>Incremental Zone Transfer in <acronym>DNS</acronym></title>
16498 <pubdate>August 1996</pubdate>
16501 <abbrev>RFC1996</abbrev>
16503 <surname>Vixie</surname>
16504 <firstname>P.</firstname>
16506 <title>A Mechanism for Prompt Notification of Zone Changes</title>
16507 <pubdate>August 1996</pubdate>
16510 <abbrev>RFC2136</abbrev>
16513 <surname>Vixie</surname>
16514 <firstname>P.</firstname>
16517 <firstname>S.</firstname>
16518 <surname>Thomson</surname>
16521 <firstname>Y.</firstname>
16522 <surname>Rekhter</surname>
16525 <firstname>J.</firstname>
16526 <surname>Bound</surname>
16529 <title>Dynamic Updates in the Domain Name System</title>
16530 <pubdate>April 1997</pubdate>
16533 <abbrev>RFC2671</abbrev>
16536 <firstname>P.</firstname>
16537 <surname>Vixie</surname>
16540 <title>Extension Mechanisms for DNS (EDNS0)</title>
16541 <pubdate>August 1997</pubdate>
16544 <abbrev>RFC2672</abbrev>
16547 <firstname>M.</firstname>
16548 <surname>Crawford</surname>
16551 <title>Non-Terminal DNS Name Redirection</title>
16552 <pubdate>August 1999</pubdate>
16555 <abbrev>RFC2845</abbrev>
16558 <surname>Vixie</surname>
16559 <firstname>P.</firstname>
16562 <firstname>O.</firstname>
16563 <surname>Gudmundsson</surname>
16566 <firstname>D.</firstname>
16567 <surname>Eastlake</surname>
16568 <lineage>3rd</lineage>
16571 <firstname>B.</firstname>
16572 <surname>Wellington</surname>
16575 <title>Secret Key Transaction Authentication for <acronym>DNS</acronym> (TSIG)</title>
16576 <pubdate>May 2000</pubdate>
16579 <abbrev>RFC2930</abbrev>
16582 <firstname>D.</firstname>
16583 <surname>Eastlake</surname>
16584 <lineage>3rd</lineage>
16587 <title>Secret Key Establishment for DNS (TKEY RR)</title>
16588 <pubdate>September 2000</pubdate>
16591 <abbrev>RFC2931</abbrev>
16594 <firstname>D.</firstname>
16595 <surname>Eastlake</surname>
16596 <lineage>3rd</lineage>
16599 <title>DNS Request and Transaction Signatures (SIG(0)s)</title>
16600 <pubdate>September 2000</pubdate>
16603 <abbrev>RFC3007</abbrev>
16606 <firstname>B.</firstname>
16607 <surname>Wellington</surname>
16610 <title>Secure Domain Name System (DNS) Dynamic Update</title>
16611 <pubdate>November 2000</pubdate>
16614 <abbrev>RFC3645</abbrev>
16617 <firstname>S.</firstname>
16618 <surname>Kwan</surname>
16621 <firstname>P.</firstname>
16622 <surname>Garg</surname>
16625 <firstname>J.</firstname>
16626 <surname>Gilroy</surname>
16629 <firstname>L.</firstname>
16630 <surname>Esibov</surname>
16633 <firstname>J.</firstname>
16634 <surname>Westhead</surname>
16637 <firstname>R.</firstname>
16638 <surname>Hall</surname>
16641 <title>Generic Security Service Algorithm for Secret
16642 Key Transaction Authentication for DNS
16644 <pubdate>October 2003</pubdate>
16648 <title><acronym>DNS</acronym> Security Proposed Standards</title>
16650 <abbrev>RFC3225</abbrev>
16653 <firstname>D.</firstname>
16654 <surname>Conrad</surname>
16657 <title>Indicating Resolver Support of DNSSEC</title>
16658 <pubdate>December 2001</pubdate>
16661 <abbrev>RFC3833</abbrev>
16664 <firstname>D.</firstname>
16665 <surname>Atkins</surname>
16668 <firstname>R.</firstname>
16669 <surname>Austein</surname>
16672 <title>Threat Analysis of the Domain Name System (DNS)</title>
16673 <pubdate>August 2004</pubdate>
16676 <abbrev>RFC4033</abbrev>
16679 <firstname>R.</firstname>
16680 <surname>Arends</surname>
16683 <firstname>R.</firstname>
16684 <surname>Austein</surname>
16687 <firstname>M.</firstname>
16688 <surname>Larson</surname>
16691 <firstname>D.</firstname>
16692 <surname>Massey</surname>
16695 <firstname>S.</firstname>
16696 <surname>Rose</surname>
16699 <title>DNS Security Introduction and Requirements</title>
16700 <pubdate>March 2005</pubdate>
16703 <abbrev>RFC4034</abbrev>
16706 <firstname>R.</firstname>
16707 <surname>Arends</surname>
16710 <firstname>R.</firstname>
16711 <surname>Austein</surname>
16714 <firstname>M.</firstname>
16715 <surname>Larson</surname>
16718 <firstname>D.</firstname>
16719 <surname>Massey</surname>
16722 <firstname>S.</firstname>
16723 <surname>Rose</surname>
16726 <title>Resource Records for the DNS Security Extensions</title>
16727 <pubdate>March 2005</pubdate>
16730 <abbrev>RFC4035</abbrev>
16733 <firstname>R.</firstname>
16734 <surname>Arends</surname>
16737 <firstname>R.</firstname>
16738 <surname>Austein</surname>
16741 <firstname>M.</firstname>
16742 <surname>Larson</surname>
16745 <firstname>D.</firstname>
16746 <surname>Massey</surname>
16749 <firstname>S.</firstname>
16750 <surname>Rose</surname>
16753 <title>Protocol Modifications for the DNS
16754 Security Extensions</title>
16755 <pubdate>March 2005</pubdate>
16759 <title>Other Important RFCs About <acronym>DNS</acronym>
16760 Implementation</title>
16762 <abbrev>RFC1535</abbrev>
16764 <surname>Gavron</surname>
16765 <firstname>E.</firstname>
16767 <title>A Security Problem and Proposed Correction With Widely
16768 Deployed <acronym>DNS</acronym> Software.</title>
16769 <pubdate>October 1993</pubdate>
16772 <abbrev>RFC1536</abbrev>
16775 <surname>Kumar</surname>
16776 <firstname>A.</firstname>
16779 <firstname>J.</firstname>
16780 <surname>Postel</surname>
16783 <firstname>C.</firstname>
16784 <surname>Neuman</surname>
16787 <firstname>P.</firstname>
16788 <surname>Danzig</surname>
16791 <firstname>S.</firstname>
16792 <surname>Miller</surname>
16795 <title>Common <acronym>DNS</acronym> Implementation
16796 Errors and Suggested Fixes</title>
16797 <pubdate>October 1993</pubdate>
16800 <abbrev>RFC1982</abbrev>
16803 <surname>Elz</surname>
16804 <firstname>R.</firstname>
16807 <firstname>R.</firstname>
16808 <surname>Bush</surname>
16811 <title>Serial Number Arithmetic</title>
16812 <pubdate>August 1996</pubdate>
16815 <abbrev>RFC4074</abbrev>
16818 <surname>Morishita</surname>
16819 <firstname>Y.</firstname>
16822 <firstname>T.</firstname>
16823 <surname>Jinmei</surname>
16826 <title>Common Misbehaviour Against <acronym>DNS</acronym>
16827 Queries for IPv6 Addresses</title>
16828 <pubdate>May 2005</pubdate>
16832 <title>Resource Record Types</title>
16834 <abbrev>RFC1183</abbrev>
16837 <surname>Everhart</surname>
16838 <firstname>C.F.</firstname>
16841 <firstname>L. A.</firstname>
16842 <surname>Mamakos</surname>
16845 <firstname>R.</firstname>
16846 <surname>Ullmann</surname>
16849 <firstname>P.</firstname>
16850 <surname>Mockapetris</surname>
16853 <title>New <acronym>DNS</acronym> RR Definitions</title>
16854 <pubdate>October 1990</pubdate>
16857 <abbrev>RFC1706</abbrev>
16860 <surname>Manning</surname>
16861 <firstname>B.</firstname>
16864 <firstname>R.</firstname>
16865 <surname>Colella</surname>
16868 <title><acronym>DNS</acronym> NSAP Resource Records</title>
16869 <pubdate>October 1994</pubdate>
16872 <abbrev>RFC2168</abbrev>
16875 <surname>Daniel</surname>
16876 <firstname>R.</firstname>
16879 <firstname>M.</firstname>
16880 <surname>Mealling</surname>
16883 <title>Resolution of Uniform Resource Identifiers using
16884 the Domain Name System</title>
16885 <pubdate>June 1997</pubdate>
16888 <abbrev>RFC1876</abbrev>
16891 <surname>Davis</surname>
16892 <firstname>C.</firstname>
16895 <firstname>P.</firstname>
16896 <surname>Vixie</surname>
16899 <firstname>T.</firstname>
16900 <firstname>Goodwin</firstname>
16903 <firstname>I.</firstname>
16904 <surname>Dickinson</surname>
16907 <title>A Means for Expressing Location Information in the
16909 Name System</title>
16910 <pubdate>January 1996</pubdate>
16913 <abbrev>RFC2052</abbrev>
16916 <surname>Gulbrandsen</surname>
16917 <firstname>A.</firstname>
16920 <firstname>P.</firstname>
16921 <surname>Vixie</surname>
16924 <title>A <acronym>DNS</acronym> RR for Specifying the
16927 <pubdate>October 1996</pubdate>
16930 <abbrev>RFC2163</abbrev>
16932 <surname>Allocchio</surname>
16933 <firstname>A.</firstname>
16935 <title>Using the Internet <acronym>DNS</acronym> to
16937 Conformant Global Address Mapping</title>
16938 <pubdate>January 1998</pubdate>
16941 <abbrev>RFC2230</abbrev>
16943 <surname>Atkinson</surname>
16944 <firstname>R.</firstname>
16946 <title>Key Exchange Delegation Record for the <acronym>DNS</acronym></title>
16947 <pubdate>October 1997</pubdate>
16950 <abbrev>RFC2536</abbrev>
16952 <surname>Eastlake</surname>
16953 <firstname>D.</firstname>
16954 <lineage>3rd</lineage>
16956 <title>DSA KEYs and SIGs in the Domain Name System (DNS)</title>
16957 <pubdate>March 1999</pubdate>
16960 <abbrev>RFC2537</abbrev>
16962 <surname>Eastlake</surname>
16963 <firstname>D.</firstname>
16964 <lineage>3rd</lineage>
16966 <title>RSA/MD5 KEYs and SIGs in the Domain Name System (DNS)</title>
16967 <pubdate>March 1999</pubdate>
16970 <abbrev>RFC2538</abbrev>
16973 <surname>Eastlake</surname>
16974 <firstname>D.</firstname>
16975 <lineage>3rd</lineage>
16978 <surname>Gudmundsson</surname>
16979 <firstname>O.</firstname>
16982 <title>Storing Certificates in the Domain Name System (DNS)</title>
16983 <pubdate>March 1999</pubdate>
16986 <abbrev>RFC2539</abbrev>
16989 <surname>Eastlake</surname>
16990 <firstname>D.</firstname>
16991 <lineage>3rd</lineage>
16994 <title>Storage of Diffie-Hellman Keys in the Domain Name System (DNS)</title>
16995 <pubdate>March 1999</pubdate>
16998 <abbrev>RFC2540</abbrev>
17001 <surname>Eastlake</surname>
17002 <firstname>D.</firstname>
17003 <lineage>3rd</lineage>
17006 <title>Detached Domain Name System (DNS) Information</title>
17007 <pubdate>March 1999</pubdate>
17010 <abbrev>RFC2782</abbrev>
17012 <surname>Gulbrandsen</surname>
17013 <firstname>A.</firstname>
17016 <surname>Vixie</surname>
17017 <firstname>P.</firstname>
17020 <surname>Esibov</surname>
17021 <firstname>L.</firstname>
17023 <title>A DNS RR for specifying the location of services (DNS SRV)</title>
17024 <pubdate>February 2000</pubdate>
17027 <abbrev>RFC2915</abbrev>
17029 <surname>Mealling</surname>
17030 <firstname>M.</firstname>
17033 <surname>Daniel</surname>
17034 <firstname>R.</firstname>
17036 <title>The Naming Authority Pointer (NAPTR) DNS Resource Record</title>
17037 <pubdate>September 2000</pubdate>
17040 <abbrev>RFC3110</abbrev>
17042 <surname>Eastlake</surname>
17043 <firstname>D.</firstname>
17044 <lineage>3rd</lineage>
17046 <title>RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS)</title>
17047 <pubdate>May 2001</pubdate>
17050 <abbrev>RFC3123</abbrev>
17052 <surname>Koch</surname>
17053 <firstname>P.</firstname>
17055 <title>A DNS RR Type for Lists of Address Prefixes (APL RR)</title>
17056 <pubdate>June 2001</pubdate>
17059 <abbrev>RFC3596</abbrev>
17062 <surname>Thomson</surname>
17063 <firstname>S.</firstname>
17066 <firstname>C.</firstname>
17067 <surname>Huitema</surname>
17070 <firstname>V.</firstname>
17071 <surname>Ksinant</surname>
17074 <firstname>M.</firstname>
17075 <surname>Souissi</surname>
17078 <title><acronym>DNS</acronym> Extensions to support IP
17080 <pubdate>October 2003</pubdate>
17083 <abbrev>RFC3597</abbrev>
17085 <surname>Gustafsson</surname>
17086 <firstname>A.</firstname>
17088 <title>Handling of Unknown DNS Resource Record (RR) Types</title>
17089 <pubdate>September 2003</pubdate>
17093 <title><acronym>DNS</acronym> and the Internet</title>
17095 <abbrev>RFC1101</abbrev>
17097 <surname>Mockapetris</surname>
17098 <firstname>P. V.</firstname>
17100 <title><acronym>DNS</acronym> Encoding of Network Names
17101 and Other Types</title>
17102 <pubdate>April 1989</pubdate>
17105 <abbrev>RFC1123</abbrev>
17107 <surname>Braden</surname>
17108 <surname>R.</surname>
17110 <title>Requirements for Internet Hosts - Application and
17112 <pubdate>October 1989</pubdate>
17115 <abbrev>RFC1591</abbrev>
17117 <surname>Postel</surname>
17118 <firstname>J.</firstname>
17120 <title>Domain Name System Structure and Delegation</title>
17121 <pubdate>March 1994</pubdate>
17124 <abbrev>RFC2317</abbrev>
17127 <surname>Eidnes</surname>
17128 <firstname>H.</firstname>
17131 <firstname>G.</firstname>
17132 <surname>de Groot</surname>
17135 <firstname>P.</firstname>
17136 <surname>Vixie</surname>
17139 <title>Classless IN-ADDR.ARPA Delegation</title>
17140 <pubdate>March 1998</pubdate>
17143 <abbrev>RFC2826</abbrev>
17146 <surname>Internet Architecture Board</surname>
17149 <title>IAB Technical Comment on the Unique DNS Root</title>
17150 <pubdate>May 2000</pubdate>
17153 <abbrev>RFC2929</abbrev>
17156 <surname>Eastlake</surname>
17157 <firstname>D.</firstname>
17158 <lineage>3rd</lineage>
17161 <surname>Brunner-Williams</surname>
17162 <firstname>E.</firstname>
17165 <surname>Manning</surname>
17166 <firstname>B.</firstname>
17169 <title>Domain Name System (DNS) IANA Considerations</title>
17170 <pubdate>September 2000</pubdate>
17174 <title><acronym>DNS</acronym> Operations</title>
17176 <abbrev>RFC1033</abbrev>
17178 <surname>Lottor</surname>
17179 <firstname>M.</firstname>
17181 <title>Domain administrators operations guide.</title>
17182 <pubdate>November 1987</pubdate>
17185 <abbrev>RFC1537</abbrev>
17187 <surname>Beertema</surname>
17188 <firstname>P.</firstname>
17190 <title>Common <acronym>DNS</acronym> Data File
17191 Configuration Errors</title>
17192 <pubdate>October 1993</pubdate>
17195 <abbrev>RFC1912</abbrev>
17197 <surname>Barr</surname>
17198 <firstname>D.</firstname>
17200 <title>Common <acronym>DNS</acronym> Operational and
17201 Configuration Errors</title>
17202 <pubdate>February 1996</pubdate>
17205 <abbrev>RFC2010</abbrev>
17208 <surname>Manning</surname>
17209 <firstname>B.</firstname>
17212 <firstname>P.</firstname>
17213 <surname>Vixie</surname>
17216 <title>Operational Criteria for Root Name Servers.</title>
17217 <pubdate>October 1996</pubdate>
17220 <abbrev>RFC2219</abbrev>
17223 <surname>Hamilton</surname>
17224 <firstname>M.</firstname>
17227 <firstname>R.</firstname>
17228 <surname>Wright</surname>
17231 <title>Use of <acronym>DNS</acronym> Aliases for
17232 Network Services.</title>
17233 <pubdate>October 1997</pubdate>
17237 <title>Internationalized Domain Names</title>
17239 <abbrev>RFC2825</abbrev>
17242 <surname>IAB</surname>
17245 <surname>Daigle</surname>
17246 <firstname>R.</firstname>
17249 <title>A Tangled Web: Issues of I18N, Domain Names,
17250 and the Other Internet protocols</title>
17251 <pubdate>May 2000</pubdate>
17254 <abbrev>RFC3490</abbrev>
17257 <surname>Faltstrom</surname>
17258 <firstname>P.</firstname>
17261 <surname>Hoffman</surname>
17262 <firstname>P.</firstname>
17265 <surname>Costello</surname>
17266 <firstname>A.</firstname>
17269 <title>Internationalizing Domain Names in Applications (IDNA)</title>
17270 <pubdate>March 2003</pubdate>
17273 <abbrev>RFC3491</abbrev>
17276 <surname>Hoffman</surname>
17277 <firstname>P.</firstname>
17280 <surname>Blanchet</surname>
17281 <firstname>M.</firstname>
17284 <title>Nameprep: A Stringprep Profile for Internationalized Domain Names</title>
17285 <pubdate>March 2003</pubdate>
17288 <abbrev>RFC3492</abbrev>
17291 <surname>Costello</surname>
17292 <firstname>A.</firstname>
17295 <title>Punycode: A Bootstring encoding of Unicode
17296 for Internationalized Domain Names in
17297 Applications (IDNA)</title>
17298 <pubdate>March 2003</pubdate>
17302 <title>Other <acronym>DNS</acronym>-related RFCs</title>
17305 Note: the following list of RFCs, although
17306 <acronym>DNS</acronym>-related, are not
17307 concerned with implementing software.
17311 <abbrev>RFC1464</abbrev>
17313 <surname>Rosenbaum</surname>
17314 <firstname>R.</firstname>
17316 <title>Using the Domain Name System To Store Arbitrary String
17318 <pubdate>May 1993</pubdate>
17321 <abbrev>RFC1713</abbrev>
17323 <surname>Romao</surname>
17324 <firstname>A.</firstname>
17326 <title>Tools for <acronym>DNS</acronym> Debugging</title>
17327 <pubdate>November 1994</pubdate>
17330 <abbrev>RFC1794</abbrev>
17332 <surname>Brisco</surname>
17333 <firstname>T.</firstname>
17335 <title><acronym>DNS</acronym> Support for Load
17337 <pubdate>April 1995</pubdate>
17340 <abbrev>RFC2240</abbrev>
17342 <surname>Vaughan</surname>
17343 <firstname>O.</firstname>
17345 <title>A Legal Basis for Domain Name Allocation</title>
17346 <pubdate>November 1997</pubdate>
17349 <abbrev>RFC2345</abbrev>
17352 <surname>Klensin</surname>
17353 <firstname>J.</firstname>
17356 <firstname>T.</firstname>
17357 <surname>Wolf</surname>
17360 <firstname>G.</firstname>
17361 <surname>Oglesby</surname>
17364 <title>Domain Names and Company Name Retrieval</title>
17365 <pubdate>May 1998</pubdate>
17368 <abbrev>RFC2352</abbrev>
17370 <surname>Vaughan</surname>
17371 <firstname>O.</firstname>
17373 <title>A Convention For Using Legal Names as Domain Names</title>
17374 <pubdate>May 1998</pubdate>
17377 <abbrev>RFC3071</abbrev>
17380 <surname>Klensin</surname>
17381 <firstname>J.</firstname>
17384 <title>Reflections on the DNS, RFC 1591, and Categories of Domains</title>
17385 <pubdate>February 2001</pubdate>
17388 <abbrev>RFC3258</abbrev>
17391 <surname>Hardie</surname>
17392 <firstname>T.</firstname>
17395 <title>Distributing Authoritative Name Servers via
17396 Shared Unicast Addresses</title>
17397 <pubdate>April 2002</pubdate>
17400 <abbrev>RFC3901</abbrev>
17403 <surname>Durand</surname>
17404 <firstname>A.</firstname>
17407 <firstname>J.</firstname>
17408 <surname>Ihren</surname>
17411 <title>DNS IPv6 Transport Operational Guidelines</title>
17412 <pubdate>September 2004</pubdate>
17416 <title>Obsolete and Unimplemented Experimental RFC</title>
17418 <abbrev>RFC1712</abbrev>
17421 <surname>Farrell</surname>
17422 <firstname>C.</firstname>
17425 <firstname>M.</firstname>
17426 <surname>Schulze</surname>
17429 <firstname>S.</firstname>
17430 <surname>Pleitner</surname>
17433 <firstname>D.</firstname>
17434 <surname>Baldoni</surname>
17437 <title><acronym>DNS</acronym> Encoding of Geographical
17439 <pubdate>November 1994</pubdate>
17442 <abbrev>RFC2673</abbrev>
17445 <surname>Crawford</surname>
17446 <firstname>M.</firstname>
17449 <title>Binary Labels in the Domain Name System</title>
17450 <pubdate>August 1999</pubdate>
17453 <abbrev>RFC2874</abbrev>
17456 <surname>Crawford</surname>
17457 <firstname>M.</firstname>
17460 <surname>Huitema</surname>
17461 <firstname>C.</firstname>
17464 <title>DNS Extensions to Support IPv6 Address Aggregation
17465 and Renumbering</title>
17466 <pubdate>July 2000</pubdate>
17470 <title>Obsoleted DNS Security RFCs</title>
17473 Most of these have been consolidated into RFC4033,
17474 RFC4034 and RFC4035 which collectively describe DNSSECbis.
17478 <abbrev>RFC2065</abbrev>
17481 <surname>Eastlake</surname>
17482 <lineage>3rd</lineage>
17483 <firstname>D.</firstname>
17486 <firstname>C.</firstname>
17487 <surname>Kaufman</surname>
17490 <title>Domain Name System Security Extensions</title>
17491 <pubdate>January 1997</pubdate>
17494 <abbrev>RFC2137</abbrev>
17496 <surname>Eastlake</surname>
17497 <lineage>3rd</lineage>
17498 <firstname>D.</firstname>
17500 <title>Secure Domain Name System Dynamic Update</title>
17501 <pubdate>April 1997</pubdate>
17504 <abbrev>RFC2535</abbrev>
17507 <surname>Eastlake</surname>
17508 <lineage>3rd</lineage>
17509 <firstname>D.</firstname>
17512 <title>Domain Name System Security Extensions</title>
17513 <pubdate>March 1999</pubdate>
17516 <abbrev>RFC3008</abbrev>
17519 <surname>Wellington</surname>
17520 <firstname>B.</firstname>
17523 <title>Domain Name System Security (DNSSEC)
17524 Signing Authority</title>
17525 <pubdate>November 2000</pubdate>
17528 <abbrev>RFC3090</abbrev>
17531 <surname>Lewis</surname>
17532 <firstname>E.</firstname>
17535 <title>DNS Security Extension Clarification on Zone Status</title>
17536 <pubdate>March 2001</pubdate>
17539 <abbrev>RFC3445</abbrev>
17542 <surname>Massey</surname>
17543 <firstname>D.</firstname>
17546 <surname>Rose</surname>
17547 <firstname>S.</firstname>
17550 <title>Limiting the Scope of the KEY Resource Record (RR)</title>
17551 <pubdate>December 2002</pubdate>
17554 <abbrev>RFC3655</abbrev>
17557 <surname>Wellington</surname>
17558 <firstname>B.</firstname>
17561 <surname>Gudmundsson</surname>
17562 <firstname>O.</firstname>
17565 <title>Redefinition of DNS Authenticated Data (AD) bit</title>
17566 <pubdate>November 2003</pubdate>
17569 <abbrev>RFC3658</abbrev>
17572 <surname>Gudmundsson</surname>
17573 <firstname>O.</firstname>
17576 <title>Delegation Signer (DS) Resource Record (RR)</title>
17577 <pubdate>December 2003</pubdate>
17580 <abbrev>RFC3755</abbrev>
17583 <surname>Weiler</surname>
17584 <firstname>S.</firstname>
17587 <title>Legacy Resolver Compatibility for Delegation Signer (DS)</title>
17588 <pubdate>May 2004</pubdate>
17591 <abbrev>RFC3757</abbrev>
17594 <surname>Kolkman</surname>
17595 <firstname>O.</firstname>
17598 <surname>Schlyter</surname>
17599 <firstname>J.</firstname>
17602 <surname>Lewis</surname>
17603 <firstname>E.</firstname>
17606 <title>Domain Name System KEY (DNSKEY) Resource Record
17607 (RR) Secure Entry Point (SEP) Flag</title>
17608 <pubdate>April 2004</pubdate>
17611 <abbrev>RFC3845</abbrev>
17614 <surname>Schlyter</surname>
17615 <firstname>J.</firstname>
17618 <title>DNS Security (DNSSEC) NextSECure (NSEC) RDATA Format</title>
17619 <pubdate>August 2004</pubdate>
17624 <sect2 id="internet_drafts">
17625 <title>Internet Drafts</title>
17627 Internet Drafts (IDs) are rough-draft working documents of
17628 the Internet Engineering Task Force. They are, in essence, RFCs
17629 in the preliminary stages of development. Implementors are
17631 to regard IDs as archival, and they should not be quoted or cited
17632 in any formal documents unless accompanied by the disclaimer that
17633 they are "works in progress." IDs have a lifespan of six months
17634 after which they are deleted unless updated by their authors.
17638 <title>Other Documents About <acronym>BIND</acronym></title>
17644 <surname>Albitz</surname>
17645 <firstname>Paul</firstname>
17648 <firstname>Cricket</firstname>
17649 <surname>Liu</surname>
17652 <title><acronym>DNS</acronym> and <acronym>BIND</acronym></title>
17655 <holder>Sebastopol, CA: O'Reilly and Associates</holder>
17663 <appendix id="Bv9ARM.ch12">
17664 <title>BIND 9 DNS Library Support</title>
17665 <xi:include href="libdns.xml"/>
17668 <reference id="Bv9ARM.ch13">
17669 <title>Manual pages</title>
17670 <xi:include href="../../bin/dig/dig.docbook"/>
17671 <xi:include href="../../bin/dig/host.docbook"/>
17672 <xi:include href="../../bin/delv/delv.docbook"/>
17673 <xi:include href="../../bin/python/dnssec-checkds.docbook"/>
17674 <xi:include href="../../bin/python/dnssec-coverage.docbook"/>
17675 <xi:include href="../../bin/dnssec/dnssec-dsfromkey.docbook"/>
17676 <xi:include href="../../bin/dnssec/dnssec-importkey.docbook"/>
17677 <xi:include href="../../bin/dnssec/dnssec-keyfromlabel.docbook"/>
17678 <xi:include href="../../bin/dnssec/dnssec-keygen.docbook"/>
17679 <xi:include href="../../bin/dnssec/dnssec-revoke.docbook"/>
17680 <xi:include href="../../bin/dnssec/dnssec-settime.docbook"/>
17681 <xi:include href="../../bin/dnssec/dnssec-signzone.docbook"/>
17682 <xi:include href="../../bin/dnssec/dnssec-verify.docbook"/>
17683 <xi:include href="../../bin/check/named-checkconf.docbook"/>
17684 <xi:include href="../../bin/check/named-checkzone.docbook"/>
17685 <xi:include href="../../bin/named/named.docbook"/>
17686 <xi:include href="../../bin/tools/named-journalprint.docbook"/>
17687 <xi:include href="../../bin/tools/named-rrchecker.docbook"/>
17688 <!-- named.conf.docbook and others? -->
17689 <xi:include href="../../bin/nsupdate/nsupdate.docbook"/>
17690 <xi:include href="../../bin/rndc/rndc.docbook"/>
17691 <xi:include href="../../bin/rndc/rndc.conf.docbook"/>
17692 <xi:include href="../../bin/confgen/rndc-confgen.docbook"/>
17693 <xi:include href="../../bin/confgen/ddns-confgen.docbook"/>
17694 <xi:include href="../../bin/tools/arpaname.docbook"/>
17695 <xi:include href="../../bin/tools/genrandom.docbook"/>
17696 <xi:include href="../../bin/tools/isc-hmac-fixup.docbook"/>
17697 <xi:include href="../../bin/tools/nsec3hash.docbook"/>