<HTML ><HEAD ><TITLE >BIND 9 Configuration Reference</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.73 "><LINK REL="HOME" TITLE="BIND 9 Administrator Reference Manual" HREF="Bv9ARM.html"><LINK REL="PREVIOUS" TITLE="The BIND 9 Lightweight Resolver" HREF="Bv9ARM.ch05.html"><LINK REL="NEXT" TITLE="BIND 9 Security Considerations" HREF="Bv9ARM.ch07.html"></HEAD ><BODY CLASS="chapter" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >BIND 9 Administrator Reference Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="Bv9ARM.ch05.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="Bv9ARM.ch07.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="chapter" ><H1 ><A NAME="ch06" >Chapter 6. <SPAN CLASS="acronym" >BIND</SPAN > 9 Configuration Reference</A ></H1 ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT >6.1. <A HREF="Bv9ARM.ch06.html#configuration_file_elements" >Configuration File Elements</A ></DT ><DT >6.2. <A HREF="Bv9ARM.ch06.html#Configuration_File_Grammar" >Configuration File Grammar</A ></DT ><DT >6.3. <A HREF="Bv9ARM.ch06.html#AEN3565" >Zone File</A ></DT ></DL ></DIV ><P ><SPAN CLASS="acronym" >BIND</SPAN > 9 configuration is broadly similar to <SPAN CLASS="acronym" >BIND</SPAN > 8.x; however, there are a few new areas of configuration, such as views. <SPAN CLASS="acronym" >BIND</SPAN > 8.x configuration files should work with few alterations in <SPAN CLASS="acronym" >BIND</SPAN > 9, although more complex configurations should be reviewed to check if they can be more efficiently implemented using the new features found in <SPAN CLASS="acronym" >BIND</SPAN > 9.</P ><P ><SPAN CLASS="acronym" >BIND</SPAN > 4 configuration files can be converted to the new format using the shell script <TT CLASS="filename" >contrib/named-bootconf/named-bootconf.sh</TT >.</P ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="configuration_file_elements" >6.1. Configuration File Elements</A ></H1 ><P >Following is a list of elements used throughout the <SPAN CLASS="acronym" >BIND</SPAN > configuration file documentation:</P ><DIV CLASS="informaltable" ><A NAME="AEN1105" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >acl_name</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The name of an <TT CLASS="varname" >address_match_list</TT > as defined by the <B CLASS="command" >acl</B > statement.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >address_match_list</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A list of one or more <TT CLASS="varname" >ip_addr</TT >, <TT CLASS="varname" >ip_prefix</TT >, <TT CLASS="varname" >key_id</TT >, or <TT CLASS="varname" >acl_name</TT > elements, see <A HREF="Bv9ARM.ch06.html#address_match_lists" >Section 6.1.1</A >.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >domain_name</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A quoted string which will be used as a DNS name, for example "<TT CLASS="literal" >my.test.domain</TT >".</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >dotted_decimal</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >One or more integers valued 0 through 255 separated only by dots (`.'), such as <B CLASS="command" >123</B >, <B CLASS="command" >45.67</B > or <B CLASS="command" >89.123.45.67</B >.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >ip4_addr</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >An IPv4 address with exactly four elements in <TT CLASS="varname" >dotted_decimal</TT > notation.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >ip6_addr</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >An IPv6 address, such as <B CLASS="command" >fe80::200:f8ff:fe01:9742</B >.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >ip_addr</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >An <TT CLASS="varname" >ip4_addr</TT > or <TT CLASS="varname" >ip6_addr</TT >.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >ip_port</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >An IP port <TT CLASS="varname" >number</TT >. <TT CLASS="varname" >number</TT > is limited to 0 through 65535, with values below 1024 typically restricted to root-owned processes. In some cases an asterisk (`*') character can be used as a placeholder to select a random high-numbered port.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >ip_prefix</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >An IP network specified as an <TT CLASS="varname" >ip_addr</TT >, followed by a slash (`/') and then the number of bits in the netmask. Trailing zeros in a <TT CLASS="varname" >ip_addr</TT > may omitted. For example, <B CLASS="command" >127/8</B > is the network <B CLASS="command" >127.0.0.0</B > with netmask <B CLASS="command" >255.0.0.0</B > and <B CLASS="command" >1.2.3.0/28</B > is network <B CLASS="command" >1.2.3.0</B > with netmask <B CLASS="command" >255.255.255.240</B >.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >key_id</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A <TT CLASS="varname" >domain_name</TT > representing the name of a shared key, to be used for transaction security.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >key_list</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A list of one or more <TT CLASS="varname" >key_id</TT >s, separated by semicolons and ending with a semicolon.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >number</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A non-negative 32 bit unsigned integer (i.e., a number between 0 and 4294967295, inclusive). Its acceptable value might further be limited by the context in which it is used.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >path_name</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A quoted string which will be used as a pathname, such as <TT CLASS="filename" >zones/master/my.test.domain</TT >.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >size_spec</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A number, the word <TT CLASS="userinput" ><B >unlimited</B ></TT >, or the word <TT CLASS="userinput" ><B >default</B ></TT >.</P ><P > An <TT CLASS="varname" >unlimited</TT > <TT CLASS="varname" >size_spec</TT > requests unlimited use, or the maximum available amount. A <TT CLASS="varname" >default size_spec</TT > uses the limit that was in force when the server was started.</P ><P >A <TT CLASS="varname" >number</TT > can optionally be followed by a scaling factor: <TT CLASS="userinput" ><B >K</B ></TT > or <TT CLASS="userinput" ><B >k</B ></TT > for kilobytes, <TT CLASS="userinput" ><B >M</B ></TT > or <TT CLASS="userinput" ><B >m</B ></TT > for megabytes, and <TT CLASS="userinput" ><B >G</B ></TT > or <TT CLASS="userinput" ><B >g</B ></TT > for gigabytes, which scale by 1024, 1024*1024, and 1024*1024*1024 respectively.</P > <P >The value must be representable as a 64-bit unsigned integer (0 to 18446744073709551615, inclusive). Using <TT CLASS="varname" >unlimited</TT > is the best way to safely set a really large number.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >yes_or_no</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Either <TT CLASS="userinput" ><B >yes</B ></TT > or <TT CLASS="userinput" ><B >no</B ></TT >. The words <TT CLASS="userinput" ><B >true</B ></TT > and <TT CLASS="userinput" ><B >false</B ></TT > are also accepted, as are the numbers <TT CLASS="userinput" ><B >1</B ></TT > and <TT CLASS="userinput" ><B >0</B ></TT >.</P ></TD ></TR ><TR ><TD WIDTH="178" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >dialup_option</TT ></P ></TD ><TD WIDTH="362" ALIGN="LEFT" VALIGN="MIDDLE" ><P >One of <TT CLASS="userinput" ><B >yes</B ></TT >, <TT CLASS="userinput" ><B >no</B ></TT >, <TT CLASS="userinput" ><B >notify</B ></TT >, <TT CLASS="userinput" ><B >notify-passive</B ></TT >, <TT CLASS="userinput" ><B >refresh</B ></TT > or <TT CLASS="userinput" ><B >passive</B ></TT >. When used in a zone, <TT CLASS="userinput" ><B >notify-passive</B ></TT >, <TT CLASS="userinput" ><B >refresh</B ></TT >, and <TT CLASS="userinput" ><B >passive</B ></TT > are restricted to slave and stub zones.</P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="address_match_lists" >6.1.1. Address Match Lists</A ></H2 ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN1267" >6.1.1.1. Syntax</A ></H3 ><PRE CLASS="programlisting" ><TT CLASS="varname" >address_match_list</TT > = address_match_list_element ; [<SPAN CLASS="optional" > address_match_list_element; ... </SPAN >] <TT CLASS="varname" >address_match_list_element</TT > = [<SPAN CLASS="optional" > ! </SPAN >] (ip_address [<SPAN CLASS="optional" >/length</SPAN >] | key key_id | acl_name | { address_match_list } ) </PRE ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN1275" >6.1.1.2. Definition and Usage</A ></H3 ><P >Address match lists are primarily used to determine access control for various server operations. They are also used to define priorities for querying other nameservers and to set the addresses on which <B CLASS="command" >named</B > will listen for queries. The elements which constitute an address match list can be any of the following:</P ><P ></P ><UL ><LI ><P >an IP address (IPv4 or IPv6)</P ></LI ><LI ><P >an IP prefix (in the `/'-notation)</P ></LI ><LI ><P >a key ID, as defined by the key statement</P ></LI ><LI ><P >the name of an address match list previously defined with the <B CLASS="command" >acl</B > statement</P ></LI ><LI ><P >a nested address match list enclosed in braces</P ></LI ></UL ><P >Elements can be negated with a leading exclamation mark (`!') and the match list names "any," "none," "localhost" and "localnets" are predefined. More information on those names can be found in the description of the acl statement.</P ><P >The addition of the key clause made the name of this syntactic element something of a misnomer, since security keys can be used to validate access without regard to a host or network address. Nonetheless, the term "address match list" is still used throughout the documentation.</P ><P >When a given IP address or prefix is compared to an address match list, the list is traversed in order until an element matches. The interpretation of a match depends on whether the list is being used for access control, defining listen-on ports, or as a topology, and whether the element was negated.</P ><P >When used as an access control list, a non-negated match allows access and a negated match denies access. If there is no match, access is denied. The clauses <B CLASS="command" >allow-notify</B >, <B CLASS="command" >allow-query</B >, <B CLASS="command" >allow-transfer</B >, <B CLASS="command" >allow-update</B > and <B CLASS="command" >blackhole</B > all use address match lists this. Similarly, the listen-on option will cause the server to not accept queries on any of the machine's addresses which do not match the list.</P ><P >When used with the topology clause, a non-negated match returns a distance based on its position on the list (the closer the match is to the start of the list, the shorter the distance is between it and the server). A negated match will be assigned the maximum distance from the server. If there is no match, the address will get a distance which is further than any non-negated list element, and closer than any negated element.</P ><P >Because of the first-match aspect of the algorithm, an element that defines a subset of another element in the list should come before the broader element, regardless of whether either is negated. For example, in <B CLASS="command" >1.2.3/24; ! 1.2.3.13;</B > the 1.2.3.13 element is completely useless because the algorithm will match any lookup for 1.2.3.13 to the 1.2.3/24 element. Using <B CLASS="command" >! 1.2.3.13; 1.2.3/24</B > fixes that problem by having 1.2.3.13 blocked by the negation but all other 1.2.3.* hosts fall through.</P ></DIV ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1304" >6.1.2. Comment Syntax</A ></H2 ><P >The <SPAN CLASS="acronym" >BIND</SPAN > 9 comment syntax allows for comments to appear anywhere that white space may appear in a <SPAN CLASS="acronym" >BIND</SPAN > configuration file. To appeal to programmers of all kinds, they can be written in C, C++, or shell/perl constructs.</P ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN1309" >6.1.2.1. Syntax</A ></H3 ><P ><PRE CLASS="programlisting" >/* This is a <SPAN CLASS="acronym" >BIND</SPAN > comment as in C */</PRE > <PRE CLASS="programlisting" >// This is a <SPAN CLASS="acronym" >BIND</SPAN > comment as in C++</PRE > <PRE CLASS="programlisting" ># This is a <SPAN CLASS="acronym" >BIND</SPAN > comment as in common UNIX shells and perl</PRE > </P ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN1318" >6.1.2.2. Definition and Usage</A ></H3 ><P >Comments may appear anywhere that whitespace may appear in a <SPAN CLASS="acronym" >BIND</SPAN > configuration file.</P ><P >C-style comments start with the two characters /* (slash, star) and end with */ (star, slash). Because they are completely delimited with these characters, they can be used to comment only a portion of a line or to span multiple lines.</P ><P >C-style comments cannot be nested. For example, the following is not valid because the entire comment ends with the first */:</P ><P ><PRE CLASS="programlisting" >/* This is the start of a comment. This is still part of the comment. /* This is an incorrect attempt at nesting a comment. */ This is no longer in any comment. */ </PRE ></P ><P >C++-style comments start with the two characters // (slash, slash) and continue to the end of the physical line. They cannot be continued across multiple physical lines; to have one logical comment span multiple lines, each line must use the // pair.</P ><P >For example:</P ><P ><PRE CLASS="programlisting" >// This is the start of a comment. The next line // is a new comment, even though it is logically // part of the previous comment. </PRE ></P ><P >Shell-style (or perl-style, if you prefer) comments start with the character <TT CLASS="literal" >#</TT > (number sign) and continue to the end of the physical line, as in C++ comments.</P ><P >For example:</P ><P ><PRE CLASS="programlisting" ># This is the start of a comment. The next line # is a new comment, even though it is logically # part of the previous comment. </PRE ></P ><DIV CLASS="warning" ><P ></P ><TABLE CLASS="warning" BORDER="1" WIDTH="100%" ><TR ><TD ALIGN="CENTER" ><B >Warning</B ></TD ></TR ><TR ><TD ALIGN="LEFT" ><P >WARNING: you cannot use the semicolon (`;') character to start a comment such as you would in a zone file. The semicolon indicates the end of a configuration statement.</P ></TD ></TR ></TABLE ></DIV ></DIV ></DIV ></DIV ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="Configuration_File_Grammar" >6.2. Configuration File Grammar</A ></H1 ><P >A <SPAN CLASS="acronym" >BIND</SPAN > 9 configuration consists of statements and comments. Statements end with a semicolon. Statements and comments are the only elements that can appear without enclosing braces. Many statements contain a block of substatements, which are also terminated with a semicolon.</P ><P >The following statements are supported:</P ><DIV CLASS="informaltable" ><A NAME="AEN1342" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="128" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >acl</B ></P ></TD ><TD WIDTH="363" ALIGN="LEFT" VALIGN="MIDDLE" ><P >defines a named IP address matching list, for access control and other uses.</P ></TD ></TR ><TR ><TD WIDTH="128" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >controls</B ></P ></TD ><TD WIDTH="363" ALIGN="LEFT" VALIGN="MIDDLE" ><P >declares control channels to be used by the <B CLASS="command" >rndc</B > utility.</P ></TD ></TR ><TR ><TD WIDTH="128" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >include</B ></P ></TD ><TD WIDTH="363" ALIGN="LEFT" VALIGN="MIDDLE" ><P >includes a file.</P ></TD ></TR ><TR ><TD WIDTH="128" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >key</B ></P ></TD ><TD WIDTH="363" ALIGN="LEFT" VALIGN="MIDDLE" ><P >specifies key information for use in authentication and authorization using TSIG.</P ></TD ></TR ><TR ><TD WIDTH="128" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >logging</B ></P ></TD ><TD WIDTH="363" ALIGN="LEFT" VALIGN="MIDDLE" ><P >specifies what the server logs, and where the log messages are sent.</P ></TD ></TR ><TR ><TD WIDTH="128" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >options</B ></P ></TD ><TD WIDTH="363" ALIGN="LEFT" VALIGN="MIDDLE" ><P >controls global server configuration options and sets defaults for other statements.</P ></TD ></TR ><TR ><TD WIDTH="128" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >server</B ></P ></TD ><TD WIDTH="363" ALIGN="LEFT" VALIGN="MIDDLE" ><P >sets certain configuration options on a per-server basis.</P ></TD ></TR ><TR ><TD WIDTH="128" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >trusted-keys</B ></P ></TD ><TD WIDTH="363" ALIGN="LEFT" VALIGN="MIDDLE" ><P >defines trusted DNSSEC keys.</P ></TD ></TR ><TR ><TD WIDTH="128" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >view</B ></P ></TD ><TD WIDTH="363" ALIGN="LEFT" VALIGN="MIDDLE" ><P >defines a view.</P ></TD ></TR ><TR ><TD WIDTH="128" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >zone</B ></P ></TD ><TD WIDTH="363" ALIGN="LEFT" VALIGN="MIDDLE" ><P >defines a zone.</P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><P >The <B CLASS="command" >logging</B > and <B CLASS="command" >options</B > statements may only occur once per configuration.</P ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1411" >6.2.1. <B CLASS="command" >acl</B > Statement Grammar</A ></H2 ><PRE CLASS="programlisting" ><B CLASS="command" >acl</B > acl-name { address_match_list }; </PRE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="acl" >6.2.2. <B CLASS="command" >acl</B > Statement Definition and Usage</A ></H2 ><P >The <B CLASS="command" >acl</B > statement assigns a symbolic name to an address match list. It gets its name from a primary use of address match lists: Access Control Lists (ACLs).</P ><P >Note that an address match list's name must be defined with <B CLASS="command" >acl</B > before it can be used elsewhere; no forward references are allowed.</P ><P >The following ACLs are built-in:</P ><DIV CLASS="informaltable" ><A NAME="AEN1424" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="108" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >any</B ></P ></TD ><TD WIDTH="384" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Matches all hosts.</P ></TD ></TR ><TR ><TD WIDTH="108" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >none</B ></P ></TD ><TD WIDTH="384" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Matches no hosts.</P ></TD ></TR ><TR ><TD WIDTH="108" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >localhost</B ></P ></TD ><TD WIDTH="384" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Matches the IPv4 addresses of all network interfaces on the system.</P ></TD ></TR ><TR ><TD WIDTH="108" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >localnets</B ></P ></TD ><TD WIDTH="384" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Matches any host on an IPv4 network for which the system has an interface.</P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><P >The <B CLASS="command" >localhost</B > and <B CLASS="command" >localnets</B > ACLs do not currently support IPv6 (that is, <B CLASS="command" >localhost</B > does not match the host's IPv6 addresses, and <B CLASS="command" >localnets</B > does not match the host's attached IPv6 networks) due to the lack of a standard method of determining the complete set of local IPv6 addresses for a host. </P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1458" >6.2.3. <B CLASS="command" >controls</B > Statement Grammar</A ></H2 ><PRE CLASS="programlisting" ><B CLASS="command" >controls</B > { inet ( ip_addr | * ) [<SPAN CLASS="optional" > port ip_port </SPAN >] allow { <TT CLASS="replaceable" ><I > address_match_list </I ></TT > } keys { <TT CLASS="replaceable" ><I > key_list </I ></TT > }; [<SPAN CLASS="optional" > inet ...; </SPAN >] }; </PRE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="controls_statement_definition_and_usage" >6.2.4. <B CLASS="command" >controls</B > Statement Definition and Usage</A ></H2 ><P >The <B CLASS="command" >controls</B > statement declares control channels to be used by system administrators to affect the operation of the local nameserver. These control channels are used by the <B CLASS="command" >rndc</B > utility to send commands to and retrieve non-DNS results from a nameserver.</P ><P >An <B CLASS="command" >inet</B > control channel is a TCP socket listening at the specified <B CLASS="command" >ip_port</B > on the specified <B CLASS="command" >ip_addr</B >, which can be an IPv4 or IPv6 address. An <B CLASS="command" >ip_addr</B > of <TT CLASS="literal" >*</TT > is interpreted as the IPv4 wildcard address; connections will be accepted on any of the system's IPv4 addresses. To listen on the IPv6 wildcard address, use an <B CLASS="command" >ip_addr</B > of <TT CLASS="literal" >::</TT >. If you will only use <B CLASS="command" >rndc</B > on the local host, using the loopback address (<TT CLASS="literal" >127.0.0.1</TT > or <TT CLASS="literal" >::1</TT >) is recommended for maximum security. </P ><P >The ability to issue commands over the control channel is restricted by the <B CLASS="command" >allow</B > and <B CLASS="command" >keys</B > clauses. Connections to the control channel are permitted based on the address permissions in <B CLASS="command" >address_match_list</B >. <B CLASS="command" >key_id</B > members of the <B CLASS="command" >address_match_list</B > are ignored, and instead are interpreted independently based the <B CLASS="command" >key_list</B >. Each <B CLASS="command" >key_id</B > in the <B CLASS="command" >key_list</B > is allowed to be used to authenticate commands and responses given over the control channel by digitally signing each message between the server and a command client (See <A HREF="Bv9ARM.ch03.html#rndc" >Remote Name Daemon Control application</A > in <A HREF="Bv9ARM.ch03.html#admin_tools" >Section 3.4.1.2</A >). All commands to the control channel must be signed by one of its specified keys to be honored.</P ><P > If no <B CLASS="command" >controls</B > statement is present, <B CLASS="command" >named</B > will set up a default control channel listening on the loopback address 127.0.0.1 and its IPv6 counterpart ::1. In this case, and also when the <B CLASS="command" >controls</B > statement is present but does not have a <B CLASS="command" >keys</B > clause, <B CLASS="command" >named</B > will attempt to load the command channel key from the file <TT CLASS="filename" >rndc.key</TT > in <TT CLASS="filename" >/etc</TT > (or whatever <TT CLASS="varname" >sysconfdir</TT > was specified as when <SPAN CLASS="acronym" >BIND</SPAN > was built). To create a <TT CLASS="filename" >rndc.key</TT > file, run <TT CLASS="userinput" ><B >rndc-confgen -a</B ></TT >. </P ><P >The <TT CLASS="filename" >rndc.key</TT > feature was created to ease the transition of systems from <SPAN CLASS="acronym" >BIND</SPAN > 8, which did not have digital signatures on its command channel messages and thus did not have a <B CLASS="command" >keys</B > clause. It makes it possible to use an existing <SPAN CLASS="acronym" >BIND</SPAN > 8 configuration file in <SPAN CLASS="acronym" >BIND</SPAN > 9 unchanged, and still have <B CLASS="command" >rndc</B > work the same way <B CLASS="command" >ndc</B > worked in BIND 8, simply by executing the command <TT CLASS="userinput" ><B >rndc-confgen -a</B ></TT > after BIND 9 is installed. </P ><P > Since the <TT CLASS="filename" >rndc.key</TT > feature is only intended to allow the backward-compatible usage of <SPAN CLASS="acronym" >BIND</SPAN > 8 configuration files, this feature does not have a high degree of configurability. You cannot easily change the key name or the size of the secret, so you should make a <TT CLASS="filename" >rndc.conf</TT > with your own key if you wish to change those things. The <TT CLASS="filename" >rndc.key</TT > file also has its permissions set such that only the owner of the file (the user that <B CLASS="command" >named</B > is running as) can access it. If you desire greater flexibility in allowing other users to access <B CLASS="command" >rndc</B > commands then you need to create an <TT CLASS="filename" >rndc.conf</TT > and make it group readable by a group that contains the users who should have access.</P ><P >The UNIX control channel type of <SPAN CLASS="acronym" >BIND</SPAN > 8 is not supported in <SPAN CLASS="acronym" >BIND</SPAN > 9, and is not expected to be added in future releases. If it is present in the controls statement from a <SPAN CLASS="acronym" >BIND</SPAN > 8 configuration file, it is ignored and a warning is logged.</P ><P > To disable the command channel, use an empty <B CLASS="command" >controls</B > statement: <B CLASS="command" >controls { };</B >. </P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1531" >6.2.5. <B CLASS="command" >include</B > Statement Grammar</A ></H2 ><PRE CLASS="programlisting" >include <TT CLASS="replaceable" ><I >filename</I ></TT >;</PRE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1536" >6.2.6. <B CLASS="command" >include</B > Statement Definition and Usage</A ></H2 ><P >The <B CLASS="command" >include</B > statement inserts the specified file at the point that the <B CLASS="command" >include</B > statement is encountered. The <B CLASS="command" >include</B > statement facilitates the administration of configuration files by permitting the reading or writing of some things but not others. For example, the statement could include private keys that are readable only by a nameserver.</P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1543" >6.2.7. <B CLASS="command" >key</B > Statement Grammar</A ></H2 ><PRE CLASS="programlisting" >key <TT CLASS="replaceable" ><I >key_id</I ></TT > { algorithm <TT CLASS="replaceable" ><I >string</I ></TT >; secret <TT CLASS="replaceable" ><I >string</I ></TT >; }; </PRE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1550" >6.2.8. <B CLASS="command" >key</B > Statement Definition and Usage</A ></H2 ><P >The <B CLASS="command" >key</B > statement defines a shared secret key for use with TSIG, see <A HREF="Bv9ARM.ch04.html#tsig" >Section 4.4</A >.</P ><P > The <B CLASS="command" >key</B > statement can occur at the top level of the configuration file or inside a <B CLASS="command" >view</B > statement. Keys defined in top-level <B CLASS="command" >key</B > statements can be used in all views. Keys intended for use in a <B CLASS="command" >controls</B > statement (see <A HREF="Bv9ARM.ch06.html#controls_statement_definition_and_usage" >Section 6.2.4</A >) must be defined at the top level. </P ><P >The <TT CLASS="replaceable" ><I >key_id</I ></TT >, also known as the key name, is a domain name uniquely identifying the key. It can be used in a "server" statement to cause requests sent to that server to be signed with this key, or in address match lists to verify that incoming requests have been signed with a key matching this name, algorithm, and secret.</P ><P >The <TT CLASS="replaceable" ><I >algorithm_id</I ></TT > is a string that specifies a security/authentication algorithm. The only algorithm currently supported with TSIG authentication is <TT CLASS="literal" >hmac-md5</TT >. The <TT CLASS="replaceable" ><I >secret_string</I ></TT > is the secret to be used by the algorithm, and is treated as a base-64 encoded string.</P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1568" >6.2.9. <B CLASS="command" >logging</B > Statement Grammar</A ></H2 ><PRE CLASS="programlisting" ><B CLASS="command" >logging</B > { [ <B CLASS="command" >channel</B > <TT CLASS="replaceable" ><I >channel_name</I ></TT > { ( <B CLASS="command" >file</B > <TT CLASS="replaceable" ><I >path name</I ></TT > [ <B CLASS="command" >versions</B > ( <TT CLASS="replaceable" ><I >number</I ></TT > | <TT CLASS="literal" >unlimited</TT > ) ] [ <B CLASS="command" >size</B > <TT CLASS="replaceable" ><I >size spec</I ></TT > ] | <B CLASS="command" >syslog</B > <TT CLASS="replaceable" ><I >syslog_facility</I ></TT > | <B CLASS="command" >stderr</B > | <B CLASS="command" >null</B > ); [ <B CLASS="command" >severity</B > (<TT CLASS="option" >critical</TT > | <TT CLASS="option" >error</TT > | <TT CLASS="option" >warning</TT > | <TT CLASS="option" >notice</TT > | <TT CLASS="option" >info</TT > | <TT CLASS="option" >debug</TT > [ <TT CLASS="replaceable" ><I >level</I ></TT > ] | <TT CLASS="option" >dynamic</TT > ); ] [ <B CLASS="command" >print-category</B > <TT CLASS="option" >yes</TT > or <TT CLASS="option" >no</TT >; ] [ <B CLASS="command" >print-severity</B > <TT CLASS="option" >yes</TT > or <TT CLASS="option" >no</TT >; ] [ <B CLASS="command" >print-time</B > <TT CLASS="option" >yes</TT > or <TT CLASS="option" >no</TT >; ] }; ] [ <B CLASS="command" >category</B > <TT CLASS="replaceable" ><I >category_name</I ></TT > { <TT CLASS="replaceable" ><I >channel_name</I ></TT > ; [ <TT CLASS="replaceable" ><I >channel_nam</I ></TT >e ; ... ] }; ] ... }; </PRE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1608" >6.2.10. <B CLASS="command" >logging</B > Statement Definition and Usage</A ></H2 ><P >The <B CLASS="command" >logging</B > statement configures a wide variety of logging options for the nameserver. Its <B CLASS="command" >channel</B > phrase associates output methods, format options and severity levels with a name that can then be used with the <B CLASS="command" >category</B > phrase to select how various classes of messages are logged.</P ><P >Only one <B CLASS="command" >logging</B > statement is used to define as many channels and categories as are wanted. If there is no <B CLASS="command" >logging</B > statement, the logging configuration will be:</P ><PRE CLASS="programlisting" >logging { category "unmatched" { "null"; }; category "default" { "default_syslog"; "default_debug"; }; }; </PRE ><P >In <SPAN CLASS="acronym" >BIND</SPAN > 9, the logging configuration is only established when the entire configuration file has been parsed. In <SPAN CLASS="acronym" >BIND</SPAN > 8, it was established as soon as the <B CLASS="command" >logging</B > statement was parsed. When the server is starting up, all logging messages regarding syntax errors in the configuration file go to the default channels, or to standard error if the "<TT CLASS="option" >-g</TT >" option was specified.</P ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN1624" >6.2.10.1. The <B CLASS="command" >channel</B > Phrase</A ></H3 ><P >All log output goes to one or more <SPAN CLASS="emphasis" ><I CLASS="emphasis" >channels</I ></SPAN >; you can make as many of them as you want.</P ><P >Every channel definition must include a destination clause that says whether messages selected for the channel go to a file, to a particular syslog facility, to the standard error stream, or are discarded. It can optionally also limit the message severity level that will be accepted by the channel (the default is <B CLASS="command" >info</B >), and whether to include a <B CLASS="command" >named</B >-generated time stamp, the category name and/or severity level (the default is not to include any).</P ><P >The <B CLASS="command" >null</B > destination clause causes all messages sent to the channel to be discarded; in that case, other options for the channel are meaningless.</P ><P >The <B CLASS="command" >file</B > destination clause directs the channel to a disk file. It can include limitations both on how large the file is allowed to become, and how many versions of the file will be saved each time the file is opened.</P ><P >If you use the <B CLASS="command" >versions</B > log file option, then <B CLASS="command" >named</B > will retain that many backup versions of the file by renaming them when opening. For example, if you choose to keep 3 old versions of the file <TT CLASS="filename" >lamers.log</TT > then just before it is opened <TT CLASS="filename" >lamers.log.1</TT > is renamed to <TT CLASS="filename" >lamers.log.2</TT >, <TT CLASS="filename" >lamers.log.0</TT > is renamed to <TT CLASS="filename" >lamers.log.1</TT >, and <TT CLASS="filename" >lamers.log</TT > is renamed to <TT CLASS="filename" >lamers.log.0</TT >. You can say <B CLASS="command" >versions unlimited;</B > to not limit the number of versions. If a <B CLASS="command" >size</B > option is associated with the log file, then renaming is only done when the file being opened exceeds the indicated size. No backup versions are kept by default; any existing log file is simply appended.</P ><P >The <B CLASS="command" >size</B > option for files is used to limit log growth. If the file ever exceeds the size, then <B CLASS="command" >named</B > will stop writing to the file unless it has a <B CLASS="command" >versions</B > option associated with it. If backup versions are kept, the files are rolled as described above and a new one begun. If there is no <B CLASS="command" >versions</B > option, no more data will be written to the log until some out-of-band mechanism removes or truncates the log to less than the maximum size. The default behavior is not to limit the size of the file.</P ><P >Example usage of the <B CLASS="command" >size</B > and <B CLASS="command" >versions</B > options:</P ><PRE CLASS="programlisting" >channel "an_example_channel" { file "example.log" versions 3 size 20m; print-time yes; print-category yes; }; </PRE ><P >The <B CLASS="command" >syslog</B > destination clause directs the channel to the system log. Its argument is a syslog facility as described in the <B CLASS="command" >syslog</B > man page. Known facilities are <B CLASS="command" >kern</B >, <B CLASS="command" >user</B >, <B CLASS="command" >mail</B >, <B CLASS="command" >daemon</B >, <B CLASS="command" >auth</B >, <B CLASS="command" >syslog</B >, <B CLASS="command" >lpr</B >, <B CLASS="command" >news</B >, <B CLASS="command" >uucp</B >, <B CLASS="command" >cron</B >, <B CLASS="command" >authpriv</B >, <B CLASS="command" >ftp</B >, <B CLASS="command" >local0</B >, <B CLASS="command" >local1</B >, <B CLASS="command" >local2</B >, <B CLASS="command" >local3</B >, <B CLASS="command" >local4</B >, <B CLASS="command" >local5</B >, <B CLASS="command" >local6</B > and <B CLASS="command" >local7</B >, however not all facilities are supported on all operating systems. How <B CLASS="command" >syslog</B > will handle messages sent to this facility is described in the <B CLASS="command" >syslog.conf</B > man page. If you have a system which uses a very old version of <B CLASS="command" >syslog</B > that only uses two arguments to the <B CLASS="command" >openlog()</B > function, then this clause is silently ignored.</P ><P >The <B CLASS="command" >severity</B > clause works like <B CLASS="command" >syslog</B >'s "priorities," except that they can also be used if you are writing straight to a file rather than using <B CLASS="command" >syslog</B >. Messages which are not at least of the severity level given will not be selected for the channel; messages of higher severity levels will be accepted.</P ><P >If you are using <B CLASS="command" >syslog</B >, then the <B CLASS="command" >syslog.conf</B > priorities will also determine what eventually passes through. For example, defining a channel facility and severity as <B CLASS="command" >daemon</B > and <B CLASS="command" >debug</B > but only logging <B CLASS="command" >daemon.warning</B > via <B CLASS="command" >syslog.conf</B > will cause messages of severity <B CLASS="command" >info</B > and <B CLASS="command" >notice</B > to be dropped. If the situation were reversed, with <B CLASS="command" >named</B > writing messages of only <B CLASS="command" >warning</B > or higher, then <B CLASS="command" >syslogd</B > would print all messages it received from the channel.</P ><P >The <B CLASS="command" >stderr</B > destination clause directs the channel to the server's standard error stream. This is intended for use when the server is running as a foreground process, for example when debugging a configuration.</P ><P >The server can supply extensive debugging information when it is in debugging mode. If the server's global debug level is greater than zero, then debugging mode will be active. The global debug level is set either by starting the <B CLASS="command" >named</B > server with the <TT CLASS="option" >-d</TT > flag followed by a positive integer, or by running <B CLASS="command" >rndc trace</B >. The global debug level can be set to zero, and debugging mode turned off, by running <B CLASS="command" >ndc notrace</B >. All debugging messages in the server have a debug level, and higher debug levels give more detailed output. Channels that specify a specific debug severity, for example:</P ><PRE CLASS="programlisting" >channel "specific_debug_level" { file "foo"; severity debug 3; }; </PRE ><P >will get debugging output of level 3 or less any time the server is in debugging mode, regardless of the global debugging level. Channels with <B CLASS="command" >dynamic</B > severity use the server's global level to determine what messages to print.</P ><P >If <B CLASS="command" >print-time</B > has been turned on, then the date and time will be logged. <B CLASS="command" >print-time</B > may be specified for a <B CLASS="command" >syslog</B > channel, but is usually pointless since <B CLASS="command" >syslog</B > also prints the date and time. If <B CLASS="command" >print-category</B > is requested, then the category of the message will be logged as well. Finally, if <B CLASS="command" >print-severity</B > is on, then the severity level of the message will be logged. The <B CLASS="command" >print-</B > options may be used in any combination, and will always be printed in the following order: time, category, severity. Here is an example where all three <B CLASS="command" >print-</B > options are on:</P ><P ><TT CLASS="computeroutput" >28-Feb-2000 15:05:32.863 general: notice: running</TT ></P ><P >There are four predefined channels that are used for <B CLASS="command" >named</B >'s default logging as follows. How they are used is described in <A HREF="Bv9ARM.ch06.html#the_category_phrase" >Section 6.2.10.2</A >. </P ><PRE CLASS="programlisting" >channel "default_syslog" { syslog daemon; // send to syslog's daemon // facility severity info; // only send priority info // and higher }; channel "default_debug" { file "named.run"; // write to named.run in // the working directory // Note: stderr is used instead // of "named.run" // if the server is started // with the '-f' option. severity dynamic; // log at the server's // current debug level }; channel "default_stderr" { // writes to stderr stderr; severity info; // only send priority info // and higher }; channel "null" { null; // toss anything sent to // this channel }; </PRE ><P >The <B CLASS="command" >default_debug</B > channel has the special property that it only produces output when the server's debug level is nonzero. It normally writes to a file <TT CLASS="filename" >named.run</TT > in the server's working directory.</P ><P >For security reasons, when the "<TT CLASS="option" >-u</TT >" command line option is used, the <TT CLASS="filename" >named.run</TT > file is created only after <B CLASS="command" >named</B > has changed to the new UID, and any debug output generated while <B CLASS="command" >named</B > is starting up and still running as root is discarded. If you need to capture this output, you must run the server with the "<TT CLASS="option" >-g</TT >" option and redirect standard error to a file.</P ><P >Once a channel is defined, it cannot be redefined. Thus you cannot alter the built-in channels directly, but you can modify the default logging by pointing categories at channels you have defined.</P ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="the_category_phrase" >6.2.10.2. The <B CLASS="command" >category</B > Phrase</A ></H3 ><P >There are many categories, so you can send the logs you want to see wherever you want, without seeing logs you don't want. If you don't specify a list of channels for a category, then log messages in that category will be sent to the <B CLASS="command" >default</B > category instead. If you don't specify a default category, the following "default default" is used:</P ><PRE CLASS="programlisting" >category "default" { "default_syslog"; "default_debug"; }; </PRE ><P >As an example, let's say you want to log security events to a file, but you also want keep the default logging behavior. You'd specify the following:</P ><PRE CLASS="programlisting" >channel "my_security_channel" { file "my_security_file"; severity info; }; category "security" { "my_security_channel"; "default_syslog"; "default_debug"; };</PRE ><P >To discard all messages in a category, specify the <B CLASS="command" >null</B > channel:</P ><PRE CLASS="programlisting" >category "xfer-out" { "null"; }; category "notify" { "null"; }; </PRE ><P >Following are the available categories and brief descriptions of the types of log information they contain. More categories may be added in future <SPAN CLASS="acronym" >BIND</SPAN > releases.</P ><DIV CLASS="informaltable" ><A NAME="AEN1748" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >default</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The default category defines the logging options for those categories where no specific configuration has been defined.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >general</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The catch-all. Many things still aren't classified into categories, and they all end up here.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >database</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Messages relating to the databases used internally by the name server to store zone and cache data.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >security</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Approval and denial of requests.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >config</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Configuration file parsing and processing.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >resolver</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >DNS resolution, such as the recursive lookups performed on behalf of clients by a caching name server.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >xfer-in</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Zone transfers the server is receiving.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >xfer-out</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Zone transfers the server is sending.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >notify</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The NOTIFY protocol.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >client</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Processing of client requests.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >unmatched</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Messages that named was unable to determine the class of or for which there was no matching <B CLASS="command" >view</B >. A one line summary is also logged to the <B CLASS="command" >client</B > category. This category is best sent to a file or stderr, by default it is sent to the <B CLASS="command" >null</B > channel.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >network</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Network operations.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >update</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Dynamic updates.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >queries</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Queries. Using the category <B CLASS="command" >queries</B > will enable query logging.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >dispatch</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Dispatching of incoming packets to the server modules where they are to be processed. </P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >dnssec</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >DNSSEC and TSIG protocol processing. </P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >lame-servers</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Lame servers. These are misconfigurations in remote servers, discovered by BIND 9 when trying to query those servers during resolution. </P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1859" >6.2.11. <B CLASS="command" >lwres</B > Statement Grammar</A ></H2 ><P > This is the grammar of the <B CLASS="command" >lwres</B > statement in the <TT CLASS="filename" >named.conf</TT > file:</P ><PRE CLASS="programlisting" ><B CLASS="command" >lwres</B > { [<SPAN CLASS="optional" > listen-on { <TT CLASS="replaceable" ><I >ip_addr</I ></TT > [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >ip_addr</I ></TT > [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; ... </SPAN >] }; </SPAN >] [<SPAN CLASS="optional" > view <TT CLASS="replaceable" ><I >view_name</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > search { <TT CLASS="replaceable" ><I >domain_name</I ></TT > ; [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >domain_name</I ></TT > ; ... </SPAN >] }; </SPAN >] [<SPAN CLASS="optional" > ndots <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] }; </PRE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1883" >6.2.12. <B CLASS="command" >lwres</B > Statement Definition and Usage</A ></H2 ><P >The <B CLASS="command" >lwres</B > statement configures the name server to also act as a lightweight resolver server, see <A HREF="Bv9ARM.ch05.html#lwresd" >Section 5.2</A >. There may be be multiple <B CLASS="command" >lwres</B > statements configuring lightweight resolver servers with different properties.</P ><P >The <B CLASS="command" >listen-on</B > statement specifies a list of addresses (and ports) that this instance of a lightweight resolver daemon should accept requests on. If no port is specified, port 921 is used. If this statement is omitted, requests will be accepted on 127.0.0.1, port 921.</P ><P >The <B CLASS="command" >view</B > statement binds this instance of a lightweight resolver daemon to a view in the DNS namespace, so that the response will be constructed in the same manner as a normal DNS query matching this view. If this statement is omitted, the default view is used, and if there is no default view, an error is triggered.</P ><P >The <B CLASS="command" >search</B > statement is equivalent to the <B CLASS="command" >search</B > statement in <TT CLASS="filename" >/etc/resolv.conf</TT >. It provides a list of domains which are appended to relative names in queries.</P ><P >The <B CLASS="command" >ndots</B > statement is equivalent to the <B CLASS="command" >ndots</B > statement in <TT CLASS="filename" >/etc/resolv.conf</TT >. It indicates the minimum number of dots in a relative domain name that should result in an exact match lookup before search path elements are appended.</P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1902" >6.2.13. <B CLASS="command" >options</B > Statement Grammar</A ></H2 ><P >This is the grammar of the <B CLASS="command" >options</B > statement in the <TT CLASS="filename" >named.conf</TT > file:</P ><PRE CLASS="programlisting" >options { [<SPAN CLASS="optional" > version <TT CLASS="replaceable" ><I >version_string</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > directory <TT CLASS="replaceable" ><I >path_name</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > named-xfer <TT CLASS="replaceable" ><I >path_name</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > tkey-domain <TT CLASS="replaceable" ><I >domainname</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > tkey-dhkey <TT CLASS="replaceable" ><I >key_name</I ></TT > <TT CLASS="replaceable" ><I >key_tag</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > dump-file <TT CLASS="replaceable" ><I >path_name</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > memstatistics-file <TT CLASS="replaceable" ><I >path_name</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > pid-file <TT CLASS="replaceable" ><I >path_name</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > statistics-file <TT CLASS="replaceable" ><I >path_name</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > zone-statistics <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > auth-nxdomain <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > deallocate-on-exit <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > dialup <TT CLASS="replaceable" ><I >dialup_option</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > fake-iquery <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > fetch-glue <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > has-old-clients <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > host-statistics <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > minimal-responses <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > multiple-cnames <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > notify <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > | <TT CLASS="replaceable" ><I >explicit</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > recursion <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > rfc2308-type1 <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > use-id-pool <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > maintain-ixfr-base <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > forward ( <TT CLASS="replaceable" ><I >only</I ></TT > | <TT CLASS="replaceable" ><I >first</I ></TT > ); </SPAN >] [<SPAN CLASS="optional" > forwarders { <TT CLASS="replaceable" ><I >ip_addr</I ></TT > [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >ip_addr</I ></TT > [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; ... </SPAN >] }; </SPAN >] [<SPAN CLASS="optional" > check-names ( <TT CLASS="replaceable" ><I >master</I ></TT > | <TT CLASS="replaceable" ><I >slave</I ></TT > | <TT CLASS="replaceable" ><I > response</I ></TT > )( <TT CLASS="replaceable" ><I >warn</I ></TT > | <TT CLASS="replaceable" ><I >fail</I ></TT > | <TT CLASS="replaceable" ><I >ignore</I ></TT > ); </SPAN >] [<SPAN CLASS="optional" > allow-notify { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > }; </SPAN >] [<SPAN CLASS="optional" > allow-query { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > }; </SPAN >] [<SPAN CLASS="optional" > allow-transfer { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > }; </SPAN >] [<SPAN CLASS="optional" > allow-recursion { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > }; </SPAN >] [<SPAN CLASS="optional" > allow-v6-synthesis { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > }; </SPAN >] [<SPAN CLASS="optional" > blackhole { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > }; </SPAN >] [<SPAN CLASS="optional" > listen-on [<SPAN CLASS="optional" > port <TT CLASS="replaceable" ><I >ip_port</I ></TT > </SPAN >] { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > }; </SPAN >] [<SPAN CLASS="optional" > listen-on-v6 [<SPAN CLASS="optional" > port <TT CLASS="replaceable" ><I >ip_port</I ></TT > </SPAN >] { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > }; </SPAN >] [<SPAN CLASS="optional" > query-source [<SPAN CLASS="optional" > address ( <TT CLASS="replaceable" ><I >ip_addr</I ></TT > | <TT CLASS="replaceable" ><I >*</I ></TT > ) </SPAN >] [<SPAN CLASS="optional" > port ( <TT CLASS="replaceable" ><I >ip_port</I ></TT > | <TT CLASS="replaceable" ><I >*</I ></TT > ) </SPAN >]; </SPAN >] [<SPAN CLASS="optional" > query-source-v6 [<SPAN CLASS="optional" > address ( <TT CLASS="replaceable" ><I >ip_addr</I ></TT > | <TT CLASS="replaceable" ><I >*</I ></TT > ) </SPAN >] [<SPAN CLASS="optional" > port ( <TT CLASS="replaceable" ><I >ip_port</I ></TT > | <TT CLASS="replaceable" ><I >*</I ></TT > ) </SPAN >]; </SPAN >] [<SPAN CLASS="optional" > max-transfer-time-in <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > max-transfer-time-out <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > max-transfer-idle-in <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > max-transfer-idle-out <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > tcp-clients <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > recursive-clients <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > serial-query-rate <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > serial-queries <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > transfer-format <TT CLASS="replaceable" ><I >( one-answer | many-answers )</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > transfers-in <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > transfers-out <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > transfers-per-ns <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > transfer-source (<TT CLASS="replaceable" ><I >ip4_addr</I ></TT > | <TT CLASS="constant" >*</TT >) [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; </SPAN >] [<SPAN CLASS="optional" > transfer-source-v6 (<TT CLASS="replaceable" ><I >ip6_addr</I ></TT > | <TT CLASS="constant" >*</TT >) [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; </SPAN >] [<SPAN CLASS="optional" > notify-source (<TT CLASS="replaceable" ><I >ip4_addr</I ></TT > | <TT CLASS="constant" >*</TT >) [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; </SPAN >] [<SPAN CLASS="optional" > notify-source-v6 (<TT CLASS="replaceable" ><I >ip6_addr</I ></TT > | <TT CLASS="constant" >*</TT >) [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; </SPAN >] [<SPAN CLASS="optional" > also-notify { <TT CLASS="replaceable" ><I >ip_addr</I ></TT > [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >ip_addr</I ></TT > [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; ... </SPAN >] }; </SPAN >] [<SPAN CLASS="optional" > max-ixfr-log-size <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > coresize <TT CLASS="replaceable" ><I >size_spec</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > datasize <TT CLASS="replaceable" ><I >size_spec</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > files <TT CLASS="replaceable" ><I >size_spec</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > stacksize <TT CLASS="replaceable" ><I >size_spec</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > cleaning-interval <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > heartbeat-interval <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > interface-interval <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > statistics-interval <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > topology { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > }</SPAN >]; [<SPAN CLASS="optional" > sortlist { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > }</SPAN >]; [<SPAN CLASS="optional" > rrset-order { <TT CLASS="replaceable" ><I >order_spec</I ></TT > ; [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >order_spec</I ></TT > ; ... </SPAN >] </SPAN >] }; [<SPAN CLASS="optional" > lame-ttl <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > max-ncache-ttl <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > max-cache-ttl <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > sig-validity-interval <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > min-roots <TT CLASS="replaceable" ><I >number</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > use-ixfr <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > provide-ixfr <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > request-ixfr <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > treat-cr-as-space <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > min-refresh-time <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > max-refresh-time <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > min-retry-time <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > max-retry-time <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > port <TT CLASS="replaceable" ><I >ip_port</I ></TT >; </SPAN >] [<SPAN CLASS="optional" > additional-from-auth <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > additional-from-cache <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > random-device <TT CLASS="replaceable" ><I >path_name</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > max-cache-size <TT CLASS="replaceable" ><I >size_spec</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > match-mapped-addresses <TT CLASS="replaceable" ><I >yes_or_no</I ></TT >; </SPAN >] }; </PRE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN2127" >6.2.14. <B CLASS="command" >options</B > Statement Definition and Usage</A ></H2 ><P >The <B CLASS="command" >options</B > statement sets up global options to be used by <SPAN CLASS="acronym" >BIND</SPAN >. This statement may appear only once in a configuration file. If more than one occurrence is found, the first occurrence determines the actual options used, and a warning will be generated. If there is no <B CLASS="command" >options</B > statement, an options block with each option set to its default will be used.</P ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><B CLASS="command" >version</B ></DT ><DD ><P >The version the server should report via a query of name <TT CLASS="filename" >version.bind</TT > in class <B CLASS="command" >CHAOS</B >. The default is the real version number of this server.</P ></DD ><DT ><B CLASS="command" >directory</B ></DT ><DD ><P >The working directory of the server. Any non-absolute pathnames in the configuration file will be taken as relative to this directory. The default location for most server output files (e.g. <TT CLASS="filename" >named.run</TT >) is this directory. If a directory is not specified, the working directory defaults to `<TT CLASS="filename" >.</TT >', the directory from which the server was started. The directory specified should be an absolute path.</P ></DD ><DT ><B CLASS="command" >named-xfer</B ></DT ><DD ><P ><SPAN CLASS="emphasis" ><I CLASS="emphasis" >This option is obsolete.</I ></SPAN > It was used in <SPAN CLASS="acronym" >BIND</SPAN > 8 to specify the pathname to the <B CLASS="command" >named-xfer</B > program. In <SPAN CLASS="acronym" >BIND</SPAN > 9, no separate <B CLASS="command" >named-xfer</B > program is needed; its functionality is built into the name server.</P ></DD ><DT ><B CLASS="command" >tkey-domain</B ></DT ><DD ><P >The domain appended to the names of all shared keys generated with <B CLASS="command" >TKEY</B >. When a client requests a <B CLASS="command" >TKEY</B > exchange, it may or may not specify the desired name for the key. If present, the name of the shared key will be "<TT CLASS="varname" >client specified part</TT >" + "<TT CLASS="varname" >tkey-domain</TT >". Otherwise, the name of the shared key will be "<TT CLASS="varname" >random hex digits</TT >" + "<TT CLASS="varname" >tkey-domain</TT >". In most cases, the <B CLASS="command" >domainname</B > should be the server's domain name.</P ></DD ><DT ><B CLASS="command" >tkey-dhkey</B ></DT ><DD ><P >The Diffie-Hellman key used by the server to generate shared keys with clients using the Diffie-Hellman mode of <B CLASS="command" >TKEY</B >. The server must be able to load the public and private keys from files in the working directory. In most cases, the keyname should be the server's host name.</P ></DD ><DT ><B CLASS="command" >dump-file</B ></DT ><DD ><P >The pathname of the file the server dumps the database to when instructed to do so with <B CLASS="command" >rndc dumpdb</B >. If not specified, the default is <TT CLASS="filename" >named_dump.db</TT >.</P ></DD ><DT ><B CLASS="command" >memstatistics-file</B ></DT ><DD ><P >The pathname of the file the server writes memory usage statistics to on exit. If not specified, the default is <TT CLASS="filename" >named.memstats</TT >.</P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B >Not yet implemented in <SPAN CLASS="acronym" >BIND</SPAN > 9.</P ></BLOCKQUOTE ></DIV ></DD ><DT ><B CLASS="command" >pid-file</B ></DT ><DD ><P >The pathname of the file the server writes its process ID in. If not specified, the default is <TT CLASS="filename" >/var/run/named.pid</TT >. The pid-file is used by programs that want to send signals to the running nameserver.</P ></DD ><DT ><B CLASS="command" >statistics-file</B ></DT ><DD ><P >The pathname of the file the server appends statistics to when instructed to do so using <B CLASS="command" >rndc stats</B >. If not specified, the default is <TT CLASS="filename" >named.stats</TT > in the server's current directory. The format of the file is described in <A HREF="Bv9ARM.ch06.html#statsfile" >Section 6.2.14.15</A ></P ></DD ><DT ><B CLASS="command" >port</B ></DT ><DD ><P > The UDP/TCP port number the server uses for receiving and sending DNS protocol traffic. The default is 53. This option is mainly intended for server testing; a server using a port other than 53 will not be able to communicate with the global DNS. </P ></DD ><DT ><B CLASS="command" >random-device</B ></DT ><DD ><P > The source of entropy to be used by the server. Entropy is primarily needed for DNSSEC operations, such as TKEY transactions and dynamic update of signed zones. This options specifies the device (or file) from which to read entropy. If this is a file, operations requiring entropy will fail when the file has been exhausted. If not specified, the default value is <TT CLASS="filename" >/dev/random</TT > (or equivalent) when present, and none otherwise. The <B CLASS="command" >random-device</B > option takes effect during the initial configuration load at server startup time and is ignored on subsequent reloads.</P ></DD ></DL ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="boolean_options" >6.2.14.1. Boolean Options</A ></H3 ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><B CLASS="command" >auth-nxdomain</B ></DT ><DD ><P >If <TT CLASS="userinput" ><B >yes</B ></TT >, then the <B CLASS="command" >AA</B > bit is always set on NXDOMAIN responses, even if the server is not actually authoritative. The default is <TT CLASS="userinput" ><B >no</B ></TT >; this is a change from <SPAN CLASS="acronym" >BIND</SPAN > 8. If you are using very old DNS software, you may need to set it to <TT CLASS="userinput" ><B >yes</B ></TT >.</P ></DD ><DT ><B CLASS="command" >deallocate-on-exit</B ></DT ><DD ><P >This option was used in <SPAN CLASS="acronym" >BIND</SPAN > 8 to enable checking for memory leaks on exit. <SPAN CLASS="acronym" >BIND</SPAN > 9 ignores the option and always performs the checks.</P ></DD ><DT ><B CLASS="command" >dialup</B ></DT ><DD ><P >If <TT CLASS="userinput" ><B >yes</B ></TT >, then the server treats all zones as if they are doing zone transfers across a dial on demand dialup link, which can be brought up by traffic originating from this server. This has different effects according to zone type and concentrates the zone maintenance so that it all happens in a short interval, once every <B CLASS="command" >heartbeat-interval</B > and hopefully during the one call. It also suppresses some of the normal zone maintenance traffic. The default is <TT CLASS="userinput" ><B >no</B ></TT >.</P ><P >The <B CLASS="command" >dialup</B > option may also be specified in the <B CLASS="command" >view</B > and <B CLASS="command" >zone</B > statements, in which case it overrides the global <B CLASS="command" >dialup</B > option.</P ><P >If the zone is a master zone then the server will send out a NOTIFY request to all the slaves. This will trigger the zone serial number check in the slave (providing it supports NOTIFY) allowing the slave to verify the zone while the connection is active.</P ><P >If the zone is a slave or stub zone, then the server will suppress the regular "zone up to date" (refresh) queries and only perform them when the <B CLASS="command" >heartbeat-interval</B > expires in addition to sending NOTIFY requests.</P ><P >Finer control can be achieved by using <TT CLASS="userinput" ><B >notify</B ></TT > which only sends NOTIFY messages, <TT CLASS="userinput" ><B >notify-passive</B ></TT > which sends NOTIFY messages and suppresses the normal refresh queries, <TT CLASS="userinput" ><B >refresh</B ></TT > which suppresses normal refresh processing and send refresh queries when the <B CLASS="command" >heartbeat-interval</B > expires and <TT CLASS="userinput" ><B >passive</B ></TT > which just disables normal refresh processing.</P ></DD ><DT ><B CLASS="command" >fake-iquery</B ></DT ><DD ><P >In <SPAN CLASS="acronym" >BIND</SPAN > 8, this option was used to enable simulating the obsolete DNS query type IQUERY. <SPAN CLASS="acronym" >BIND</SPAN > 9 never does IQUERY simulation. </P ></DD ><DT ><B CLASS="command" >fetch-glue</B ></DT ><DD ><P >This option is obsolete. In BIND 8, <TT CLASS="userinput" ><B >fetch-glue yes</B ></TT > caused the server to attempt to fetch glue resource records it didn't have when constructing the additional data section of a response. This is now considered a bad idea and BIND 9 never does it.</P ></DD ><DT ><B CLASS="command" >has-old-clients</B ></DT ><DD ><P >This option was incorrectly implemented in <SPAN CLASS="acronym" >BIND</SPAN > 8, and is ignored by <SPAN CLASS="acronym" >BIND</SPAN > 9. To achieve the intended effect of <B CLASS="command" >has-old-clients</B > <TT CLASS="userinput" ><B >yes</B ></TT >, specify the two separate options <B CLASS="command" >auth-nxdomain</B > <TT CLASS="userinput" ><B >yes</B ></TT > and <B CLASS="command" >rfc2308-type1</B > <TT CLASS="userinput" ><B >no</B ></TT > instead. </P ></DD ><DT ><B CLASS="command" >host-statistics</B ></DT ><DD ><P >In BIND 8, this enables keeping of statistics for every host that the nameserver interacts with. Not implemented in BIND 9. </P ></DD ><DT ><B CLASS="command" >maintain-ixfr-base</B ></DT ><DD ><P ><SPAN CLASS="emphasis" ><I CLASS="emphasis" >This option is obsolete</I ></SPAN >. It was used in <SPAN CLASS="acronym" >BIND</SPAN > 8 to determine whether a transaction log was kept for Incremental Zone Transfer. <SPAN CLASS="acronym" >BIND</SPAN > 9 maintains a transaction log whenever possible. If you need to disable outgoing incremental zone transfers, use <B CLASS="command" >provide-ixfr</B > <TT CLASS="userinput" ><B >no</B ></TT >. </P ></DD ><DT ><B CLASS="command" >minimal-responses</B ></DT ><DD ><P >If <TT CLASS="userinput" ><B >yes</B ></TT >, then when generating responses the server will only add records to the authority and additional data sections when they are required (e.g. delegations, negative responses). This may improve the performance of the server. The default is <TT CLASS="userinput" ><B >no</B ></TT >. </P ></DD ><DT ><B CLASS="command" >multiple-cnames</B ></DT ><DD ><P >This option was used in <SPAN CLASS="acronym" >BIND</SPAN > 8 to allow a domain name to allow multiple CNAME records in violation of the DNS standards. <SPAN CLASS="acronym" >BIND</SPAN > 9.2 always strictly enforces the CNAME rules both in master files and dynamic updates. </P ></DD ><DT ><B CLASS="command" >notify</B ></DT ><DD ><P >If <TT CLASS="userinput" ><B >yes</B ></TT > (the default), DNS NOTIFY messages are sent when a zone the server is authoritative for changes, see <A HREF="Bv9ARM.ch03.html#notify" >Section 3.3</A >. The messages are sent to the servers listed in the zone's NS records (except the master server identified in the SOA MNAME field), and to any servers listed in the <B CLASS="command" >also-notify</B > option. </P ><P > If <TT CLASS="userinput" ><B >explicit</B ></TT >, notifies are sent only to servers explicitly listed using <B CLASS="command" >also-notify</B >. If <TT CLASS="userinput" ><B >no</B ></TT >, no notifies are sent. </P ><P > The <B CLASS="command" >notify</B > option may also be specified in the <B CLASS="command" >zone</B > statement, in which case it overrides the <B CLASS="command" >options notify</B > statement. It would only be necessary to turn off this option if it caused slaves to crash.</P ></DD ><DT ><B CLASS="command" >recursion</B ></DT ><DD ><P >If <TT CLASS="userinput" ><B >yes</B ></TT >, and a DNS query requests recursion, then the server will attempt to do all the work required to answer the query. If recursion is off and the server does not already know the answer, it will return a referral response. The default is <TT CLASS="userinput" ><B >yes</B ></TT >. Note that setting <B CLASS="command" >recursion no;</B > does not prevent clients from getting data from the server's cache; it only prevents new data from being cached as an effect of client queries. Caching may still occur as an effect the server's internal operation, such as NOTIFY address lookups. See also <B CLASS="command" >fetch-glue</B > above. </P ></DD ><DT ><B CLASS="command" >rfc2308-type1</B ></DT ><DD ><P >Setting this to <TT CLASS="userinput" ><B >yes</B ></TT > will cause the server to send NS records along with the SOA record for negative answers. The default is <TT CLASS="userinput" ><B >no</B ></TT >.</P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B >Not yet implemented in <SPAN CLASS="acronym" >BIND</SPAN > 9.</P ></BLOCKQUOTE ></DIV ></DD ><DT ><B CLASS="command" >use-id-pool</B ></DT ><DD ><P ><SPAN CLASS="emphasis" ><I CLASS="emphasis" >This option is obsolete</I ></SPAN >. <SPAN CLASS="acronym" >BIND</SPAN > 9 always allocates query IDs from a pool. </P ></DD ><DT ><B CLASS="command" >zone-statistics</B ></DT ><DD ><P >If <TT CLASS="userinput" ><B >yes</B ></TT >, the server will, by default, collect statistical data on all zones in the server. These statistics may be accessed using <B CLASS="command" >rndc stats</B >, which will dump them to the file listed in the <B CLASS="command" >statistics-file</B >. See also <A HREF="Bv9ARM.ch06.html#statsfile" >Section 6.2.14.15</A >. </P ></DD ><DT ><B CLASS="command" >use-ixfr</B ></DT ><DD ><P ><SPAN CLASS="emphasis" ><I CLASS="emphasis" >This option is obsolete</I ></SPAN >. If you need to disable IXFR to a particular server or servers see the information on the <B CLASS="command" >provide-ixfr</B > option in <A HREF="Bv9ARM.ch06.html#server_statement_definition_and_usage" >Section 6.2.16</A >. See also <A HREF="Bv9ARM.ch04.html#incremental_zone_transfers" >Section 4.2</A >. </P ></DD ><DT ><B CLASS="command" >provide-ixfr</B ></DT ><DD ><P > See the description of <B CLASS="command" >provide-ixfr</B > in <A HREF="Bv9ARM.ch06.html#server_statement_definition_and_usage" >Section 6.2.16</A > </P ></DD ><DT ><B CLASS="command" >request-ixfr</B ></DT ><DD ><P > See the description of <B CLASS="command" >request-ixfr</B > in <A HREF="Bv9ARM.ch06.html#server_statement_definition_and_usage" >Section 6.2.16</A > </P ></DD ><DT ><B CLASS="command" >treat-cr-as-space</B ></DT ><DD ><P >This option was used in <SPAN CLASS="acronym" >BIND</SPAN > 8 to make the server treat carriage return ("<B CLASS="command" >\r</B >") characters the same way as a space or tab character, to facilitate loading of zone files on a UNIX system that were generated on an NT or DOS machine. In <SPAN CLASS="acronym" >BIND</SPAN > 9, both UNIX "<B CLASS="command" >\n</B >" and NT/DOS "<B CLASS="command" >\r\n</B >" newlines are always accepted, and the option is ignored.</P ></DD ><DT ><B CLASS="command" >additional-from-auth</B >, <B CLASS="command" >additional-from-cache</B ></DT ><DD ><P > These options control the behavior of an authoritative server when answering queries which have additional data, or when following CNAME and DNAME chains. </P ><P > When both of these options are set to <TT CLASS="userinput" ><B >yes</B ></TT > (the default) and a query is being answered from authoritative data (a zone configured into the server), the additional data section of the reply will be filled in using data from other authoritative zones and from the cache. In some situations this is undesirable, such as when there is concern over the correctness of the cache, or in servers where slave zones may be added and modified by untrusted third parties. Also, avoiding the search for this additional data will speed up server operations at the possible expense of additional queries to resolve what would otherwise be provided in the additional section. </P ><P > For example, if a query asks for an MX record for host <TT CLASS="literal" >foo.example.com</TT >, and the record found is "<TT CLASS="literal" >MX 10 mail.example.net</TT >", normally the address records (A, A6, and AAAA) for <TT CLASS="literal" >mail.example.net</TT > will be provided as well, if known. Setting these options to <B CLASS="command" >no</B > disables this behavior. </P ><P > These options are intended for use in authoritative-only servers, or in authoritative-only views. Attempts to set them to <B CLASS="command" >no</B > without also specifying <B CLASS="command" >recursion no;</B > will cause the server to ignore the options and log a warning message. </P ><P > Specifying <B CLASS="command" >additional-from-cache no</B > actually disables the use of the cache not only for additional data lookups but also when looking up the answer. This is usually the desired behavior in an authoritative-only server where the correctness of the cached data is an issue. </P ><P > When a name server is non-recursively queried for a name that is not below the apex of any served zone, it normally answers with an "upwards referral" to the root servers or the servers of some other known parent of the query name. Since the data in an upwards referral comes from the cache, the server will not be able to provide upwards referrals when <B CLASS="command" >additional-from-cache no</B > has been specified. Instead, it will respond to such queries with REFUSED. This should not cause any problems since upwards referrals are not required for the resolution process. </P ></DD ><DT ><B CLASS="command" >match-mapped-addresses</B ></DT ><DD ><P >If <TT CLASS="userinput" ><B >yes</B ></TT >, then an IPv4-mapped IPv6 address will match any address match list entries that match the corresponding IPv4 address. Enabling this option is sometimes useful on IPv6-enabled Linux systems, to work around a kernel quirk that causes IPv4 TCP connections such as zone transfers to be accepted on an IPv6 socket using mapped addresses, causing address match lists designed for IPv4 to fail to match. The use of this option for any other purpose is discouraged. </P ></DD ></DL ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN2427" >6.2.14.2. Forwarding</A ></H3 ><P >The forwarding facility can be used to create a large site-wide cache on a few servers, reducing traffic over links to external nameservers. It can also be used to allow queries by servers that do not have direct access to the Internet, but wish to look up exterior names anyway. Forwarding occurs only on those queries for which the server is not authoritative and does not have the answer in its cache.</P ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><B CLASS="command" >forward</B ></DT ><DD ><P >This option is only meaningful if the forwarders list is not empty. A value of <TT CLASS="varname" >first</TT >, the default, causes the server to query the forwarders first, and if that doesn't answer the question the server will then look for the answer itself. If <TT CLASS="varname" >only</TT > is specified, the server will only query the forwarders. </P ></DD ><DT ><B CLASS="command" >forwarders</B ></DT ><DD ><P >Specifies the IP addresses to be used for forwarding. The default is the empty list (no forwarding). </P ></DD ></DL ></DIV ><P >Forwarding can also be configured on a per-domain basis, allowing for the global forwarding options to be overridden in a variety of ways. You can set particular domains to use different forwarders, or have a different <B CLASS="command" >forward only/first</B > behavior, or not forward at all, see <A HREF="Bv9ARM.ch06.html#zone_statement_grammar" >Section 6.2.21</A >.</P ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="access_control" >6.2.14.3. Access Control</A ></H3 ><P >Access to the server can be restricted based on the IP address of the requesting system. See <A HREF="Bv9ARM.ch06.html#address_match_lists" >Section 6.1.1</A > for details on how to specify IP address lists.</P ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><B CLASS="command" >allow-notify</B ></DT ><DD ><P >Specifies which hosts are allowed to notify slaves of a zone change in addition to the zone masters. <B CLASS="command" >allow-notify</B > may also be specified in the <B CLASS="command" >zone</B > statement, in which case it overrides the <B CLASS="command" >options allow-notify</B > statement. It is only meaningful for a slave zone. If not specified, the default is to process notify messages only from a zone's master.</P ></DD ><DT ><B CLASS="command" >allow-query</B ></DT ><DD ><P >Specifies which hosts are allowed to ask ordinary questions. <B CLASS="command" >allow-query</B > may also be specified in the <B CLASS="command" >zone</B > statement, in which case it overrides the <B CLASS="command" >options allow-query</B > statement. If not specified, the default is to allow queries from all hosts.</P ></DD ><DT ><B CLASS="command" >allow-recursion</B ></DT ><DD ><P >Specifies which hosts are allowed to make recursive queries through this server. If not specified, the default is to allow recursive queries from all hosts. Note that disallowing recursive queries for a host does not prevent the host from retrieving data that is already in the server's cache. </P ></DD ><DT ><B CLASS="command" >allow-v6-synthesis</B ></DT ><DD ><P >Specifies which hosts are to receive synthetic responses to IPv6 queries as described in <A HREF="Bv9ARM.ch06.html#synthesis" >Section 6.2.14.13</A >. </P ></DD ><DT ><B CLASS="command" >allow-transfer</B ></DT ><DD ><P >Specifies which hosts are allowed to receive zone transfers from the server. <B CLASS="command" >allow-transfer</B > may also be specified in the <B CLASS="command" >zone</B > statement, in which case it overrides the <B CLASS="command" >options allow-transfer</B > statement. If not specified, the default is to allow transfers to all hosts.</P ></DD ><DT ><B CLASS="command" >blackhole</B ></DT ><DD ><P >Specifies a list of addresses that the server will not accept queries from or use to resolve a query. Queries from these addresses will not be responded to. The default is <TT CLASS="userinput" ><B >none</B ></TT >.</P ></DD ></DL ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN2492" >6.2.14.4. Interfaces</A ></H3 ><P >The interfaces and ports that the server will answer queries from may be specified using the <B CLASS="command" >listen-on</B > option. <B CLASS="command" >listen-on</B > takes an optional port, and an <TT CLASS="varname" >address_match_list</TT >. The server will listen on all interfaces allowed by the address match list. If a port is not specified, port 53 will be used.</P ><P >Multiple <B CLASS="command" >listen-on</B > statements are allowed. For example,</P ><PRE CLASS="programlisting" >listen-on { 5.6.7.8; }; listen-on port 1234 { !1.2.3.4; 1.2/16; }; </PRE ><P >will enable the nameserver on port 53 for the IP address 5.6.7.8, and on port 1234 of an address on the machine in net 1.2 that is not 1.2.3.4.</P ><P >If no <B CLASS="command" >listen-on</B > is specified, the server will listen on port 53 on all interfaces.</P ><P >The <B CLASS="command" >listen-on-v6</B > option is used to specify the ports on which the server will listen for incoming queries sent using IPv6.</P ><P >The server does not bind a separate socket to each IPv6 interface address as it does for IPv4. Instead, it always listens on the IPv6 wildcard address. Therefore, the only values allowed for the <TT CLASS="varname" >address_match_list</TT > argument to the <B CLASS="command" >listen-on-v6</B > statement are <PRE CLASS="programlisting" >{ any; }</PRE > and <PRE CLASS="programlisting" >{ none;}</PRE ></P ><P >Multiple <B CLASS="command" >listen-on-v6</B > options can be used to listen on multiple ports:</P ><PRE CLASS="programlisting" >listen-on-v6 port 53 { any; }; listen-on-v6 port 1234 { any; }; </PRE ><P >To make the server not listen on any IPv6 address, use</P ><PRE CLASS="programlisting" >listen-on-v6 { none; }; </PRE ><P >If no <B CLASS="command" >listen-on-v6</B > statement is specified, the server will not listen on any IPv6 address.</P ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN2518" >6.2.14.5. Query Address</A ></H3 ><P >If the server doesn't know the answer to a question, it will query other nameservers. <B CLASS="command" >query-source</B > specifies the address and port used for such queries. For queries sent over IPv6, there is a separate <B CLASS="command" >query-source-v6</B > option. If <B CLASS="command" >address</B > is <B CLASS="command" >*</B > or is omitted, a wildcard IP address (<B CLASS="command" >INADDR_ANY</B >) will be used. If <B CLASS="command" >port</B > is <B CLASS="command" >*</B > or is omitted, a random unprivileged port will be used. The defaults are</P ><PRE CLASS="programlisting" >query-source address * port *; query-source-v6 address * port *; </PRE ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B >The address specified in the <B CLASS="command" >query-source</B > option is used for both UDP and TCP queries, but the port applies only to UDP queries. TCP queries always use a random unprivileged port.</P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="zone_transfers" >6.2.14.6. Zone Transfers</A ></H3 ><P ><SPAN CLASS="acronym" >BIND</SPAN > has mechanisms in place to facilitate zone transfers and set limits on the amount of load that transfers place on the system. The following options apply to zone transfers.</P ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><B CLASS="command" >also-notify</B ></DT ><DD ><P >Defines a global list of IP addresses of name servers that are also sent NOTIFY messages whenever a fresh copy of the zone is loaded, in addition to the servers listed in the zone's NS records. This helps to ensure that copies of the zones will quickly converge on stealth servers. If an <B CLASS="command" >also-notify</B > list is given in a <B CLASS="command" >zone</B > statement, it will override the <B CLASS="command" >options also-notify</B > statement. When a <B CLASS="command" >zone notify</B > statement is set to <B CLASS="command" >no</B >, the IP addresses in the global <B CLASS="command" >also-notify</B > list will not be sent NOTIFY messages for that zone. The default is the empty list (no global notification list).</P ></DD ><DT ><B CLASS="command" >max-transfer-time-in</B ></DT ><DD ><P >Inbound zone transfers running longer than this many minutes will be terminated. The default is 120 minutes (2 hours).</P ></DD ><DT ><B CLASS="command" >max-transfer-idle-in</B ></DT ><DD ><P >Inbound zone transfers making no progress in this many minutes will be terminated. The default is 60 minutes (1 hour).</P ></DD ><DT ><B CLASS="command" >max-transfer-time-out</B ></DT ><DD ><P >Outbound zone transfers running longer than this many minutes will be terminated. The default is 120 minutes (2 hours).</P ></DD ><DT ><B CLASS="command" >max-transfer-idle-out</B ></DT ><DD ><P >Outbound zone transfers making no progress in this many minutes will be terminated. The default is 60 minutes (1 hour).</P ></DD ><DT ><B CLASS="command" >serial-query-rate</B ></DT ><DD ><P >Slave servers will periodically query master servers to find out if zone serial numbers have changed. Each such query uses a minute amount of the slave server's network bandwidth. To limit the amount of bandwidth used, BIND 9 limits the rate at which queries are sent. The value of the <B CLASS="command" >serial-query-rate</B > option, an integer, is the maximum number of queries sent per second. The default is 20. </P ></DD ><DT ><B CLASS="command" >serial-queries</B ></DT ><DD ><P >In BIND 8, the <B CLASS="command" >serial-queries</B > option set the maximum number of concurrent serial number queries allowed to be outstanding at any given time. BIND 9 does not limit the number of outstanding serial queries and ignores the <B CLASS="command" >serial-queries</B > option. Instead, it limits the rate at which the queries are sent as defined using the <B CLASS="command" >serial-query-rate</B > option. </P ></DD ><DT ><B CLASS="command" >transfer-format</B ></DT ><DD ><P > Zone transfers can be sent using two different formats, <B CLASS="command" >one-answer</B > and <B CLASS="command" >many-answers</B >. The <B CLASS="command" >transfer-format</B > option is used on the master server to determine which format it sends. <B CLASS="command" >one-answer</B > uses one DNS message per resource record transferred. <B CLASS="command" >many-answers</B > packs as many resource records as possible into a message. <B CLASS="command" >many-answers</B > is more efficient, but is only supported by relatively new slave servers, such as <SPAN CLASS="acronym" >BIND</SPAN > 9, <SPAN CLASS="acronym" >BIND</SPAN > 8.x and patched versions of <SPAN CLASS="acronym" >BIND</SPAN > 4.9.5. The default is <B CLASS="command" >many-answers</B >. <B CLASS="command" >transfer-format</B > may be overridden on a per-server basis by using the <B CLASS="command" >server</B > statement. </P ></DD ><DT ><B CLASS="command" >transfers-in</B ></DT ><DD ><P >The maximum number of inbound zone transfers that can be running concurrently. The default value is <TT CLASS="literal" >10</TT >. Increasing <B CLASS="command" >transfers-in</B > may speed up the convergence of slave zones, but it also may increase the load on the local system.</P ></DD ><DT ><B CLASS="command" >transfers-out</B ></DT ><DD ><P >The maximum number of outbound zone transfers that can be running concurrently. Zone transfer requests in excess of the limit will be refused. The default value is <TT CLASS="literal" >10</TT >.</P ></DD ><DT ><B CLASS="command" >transfers-per-ns</B ></DT ><DD ><P >The maximum number of inbound zone transfers that can be concurrently transferring from a given remote nameserver. The default value is <TT CLASS="literal" >2</TT >. Increasing <B CLASS="command" >transfers-per-ns</B > may speed up the convergence of slave zones, but it also may increase the load on the remote nameserver. <B CLASS="command" >transfers-per-ns</B > may be overridden on a per-server basis by using the <B CLASS="command" >transfers</B > phrase of the <B CLASS="command" >server</B > statement.</P ></DD ><DT ><B CLASS="command" >transfer-source</B ></DT ><DD ><P ><B CLASS="command" >transfer-source</B > determines which local address will be bound to IPv4 TCP connections used to fetch zones transferred inbound by the server. It also determines the source IPv4 address, and optionally the UDP port, used for the refresh queries and forwarded dynamic updates. If not set, it defaults to a system controlled value which will usually be the address of the interface "closest to" the remote end. This address must appear in the remote end's <B CLASS="command" >allow-transfer</B > option for the zone being transferred, if one is specified. This statement sets the <B CLASS="command" >transfer-source</B > for all zones, but can be overridden on a per-view or per-zone basis by including a <B CLASS="command" >transfer-source</B > statement within the <B CLASS="command" >view</B > or <B CLASS="command" >zone</B > block in the configuration file.</P ></DD ><DT ><B CLASS="command" >transfer-source-v6</B ></DT ><DD ><P >The same as <B CLASS="command" >transfer-source</B >, except zone transfers are performed using IPv6.</P ></DD ><DT ><B CLASS="command" >notify-source</B ></DT ><DD ><P ><B CLASS="command" >notify-source</B > determines which local source address, and optionally UDP port, will be used to send NOTIFY messages. This address must appear in the slave server's <B CLASS="command" >masters</B > zone clause or in an <B CLASS="command" >allow-notify</B > clause. This statement sets the <B CLASS="command" >notify-source</B > for all zones, but can be overridden on a per-zone / per-view basis by including a <B CLASS="command" >notify-source</B > statement within the <B CLASS="command" >zone</B > or <B CLASS="command" >view</B > block in the configuration file.</P ></DD ><DT ><B CLASS="command" >notify-source-v6</B ></DT ><DD ><P >Like <B CLASS="command" >notify-source</B >, but applies to notify messages sent to IPv6 addresses.</P ></DD ></DL ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN2657" >6.2.14.7. Operating System Resource Limits</A ></H3 ><P >The server's usage of many system resources can be limited. Scaled values are allowed when specifying resource limits. For example, <B CLASS="command" >1G</B > can be used instead of <B CLASS="command" >1073741824</B > to specify a limit of one gigabyte. <B CLASS="command" >unlimited</B > requests unlimited use, or the maximum available amount. <B CLASS="command" >default</B > uses the limit that was in force when the server was started. See the description of <B CLASS="command" >size_spec</B > in <A HREF="Bv9ARM.ch06.html#configuration_file_elements" >Section 6.1</A >.</P ><P >The following options set operating system resource limits for the name server process. Some operating systems don't support some or any of the limits. On such systems, a warning will be issued if the unsupported limit is used.</P ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><B CLASS="command" >coresize</B ></DT ><DD ><P >The maximum size of a core dump. The default is <TT CLASS="literal" >default</TT >.</P ></DD ><DT ><B CLASS="command" >datasize</B ></DT ><DD ><P >The maximum amount of data memory the server may use. The default is <TT CLASS="literal" >default</TT >. This is a hard limit on server memory usage. If the server attempts to allocate memory in excess of this limit, the allocation will fail, which may in turn leave the server unable to perform DNS service. Therefore, this option is rarely useful as a way of limiting the amount of memory used by the server, but it can be used to raise an operating system data size limit that is too small by default. If you wish to limit the amount of memory used by the server, use the <B CLASS="command" >max-cache-size</B > and <B CLASS="command" >recursive-clients</B > options instead. </P ></DD ><DT ><B CLASS="command" >files</B ></DT ><DD ><P >The maximum number of files the server may have open concurrently. The default is <TT CLASS="literal" >unlimited</TT >. </P ></DD ><DT ><B CLASS="command" >stacksize</B ></DT ><DD ><P >The maximum amount of stack memory the server may use. The default is <TT CLASS="literal" >default</TT >.</P ></DD ></DL ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN2694" >6.2.14.8. Server Resource Limits</A ></H3 ><P >The following options set limits on the server's resource consumption that are enforced internally by the server rather than the operating system.</P ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><B CLASS="command" >max-ixfr-log-size</B ></DT ><DD ><P >This option is obsolete; it is accepted and ignored for BIND 8 compatibility.</P ></DD ><DT ><B CLASS="command" >recursive-clients</B ></DT ><DD ><P >The maximum number of simultaneous recursive lookups the server will perform on behalf of clients. The default is <TT CLASS="literal" >1000</TT >. Because each recursing client uses a fair bit of memory, on the order of 20 kilobytes, the value of the <B CLASS="command" >recursive-clients</B > option may have to be decreased on hosts with limited memory. </P ></DD ><DT ><B CLASS="command" >tcp-clients</B ></DT ><DD ><P >The maximum number of simultaneous client TCP connections that the server will accept. The default is <TT CLASS="literal" >100</TT >.</P ></DD ><DT ><B CLASS="command" >max-cache-size</B ></DT ><DD ><P >The maximum amount of memory to use for the server's cache, in bytes. When the amount of data in the cache reaches this limit, the server will cause records to expire prematurely so that the limit is not exceeded. In a server with multiple views, the limit applies separately to the cache of each view. The default is <TT CLASS="literal" >unlimited</TT >, meaning that records are purged from the cache only when their TTLs expire. </P ></DD ></DL ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN2722" >6.2.14.9. Periodic Task Intervals</A ></H3 ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><B CLASS="command" >cleaning-interval</B ></DT ><DD ><P >The server will remove expired resource records from the cache every <B CLASS="command" >cleaning-interval</B > minutes. The default is 60 minutes. If set to 0, no periodic cleaning will occur.</P ></DD ><DT ><B CLASS="command" >heartbeat-interval</B ></DT ><DD ><P >The server will perform zone maintenance tasks for all zones marked as <B CLASS="command" >dialup</B > whenever this interval expires. The default is 60 minutes. Reasonable values are up to 1 day (1440 minutes). If set to 0, no zone maintenance for these zones will occur.</P ></DD ><DT ><B CLASS="command" >interface-interval</B ></DT ><DD ><P >The server will scan the network interface list every <B CLASS="command" >interface-interval</B > minutes. The default is 60 minutes. If set to 0, interface scanning will only occur when the configuration file is loaded. After the scan, listeners will be started on any new interfaces (provided they are allowed by the <B CLASS="command" >listen-on</B > configuration). Listeners on interfaces that have gone away will be cleaned up.</P ></DD ><DT ><B CLASS="command" >statistics-interval</B ></DT ><DD ><P >Nameserver statistics will be logged every <B CLASS="command" >statistics-interval</B > minutes. The default is 60. If set to 0, no statistics will be logged.</P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B >Not yet implemented in <SPAN CLASS="acronym" >BIND</SPAN >9.</P ></BLOCKQUOTE ></DIV ></DD ></DL ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="topology" >6.2.14.10. Topology</A ></H3 ><P >All other things being equal, when the server chooses a nameserver to query from a list of nameservers, it prefers the one that is topologically closest to itself. The <B CLASS="command" >topology</B > statement takes an <B CLASS="command" >address_match_list</B > and interprets it in a special way. Each top-level list element is assigned a distance. Non-negated elements get a distance based on their position in the list, where the closer the match is to the start of the list, the shorter the distance is between it and the server. A negated match will be assigned the maximum distance from the server. If there is no match, the address will get a distance which is further than any non-negated list element, and closer than any negated element. For example,</P ><PRE CLASS="programlisting" >topology { 10/8; !1.2.3/24; { 1.2/16; 3/8; }; };</PRE ><P >will prefer servers on network 10 the most, followed by hosts on network 1.2.0.0 (netmask 255.255.0.0) and network 3, with the exception of hosts on network 1.2.3 (netmask 255.255.255.0), which is preferred least of all.</P ><P >The default topology is</P ><PRE CLASS="programlisting" > topology { localhost; localnets; }; </PRE ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B >The <B CLASS="command" >topology</B > option is not implemented in <SPAN CLASS="acronym" >BIND</SPAN > 9. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="the_sortlist_statement" >6.2.14.11. The <B CLASS="command" >sortlist</B > Statement</A ></H3 ><P >The response to a DNS query may consist of multiple resource records (RRs) forming a resource records set (RRset). The name server will normally return the RRs within the RRset in an indeterminate order (but see the <B CLASS="command" >rrset-order</B > statement in <A HREF="Bv9ARM.ch06.html#rrset_ordering" >Section 6.2.14.12</A >). The client resolver code should rearrange the RRs as appropriate, that is, using any addresses on the local net in preference to other addresses. However, not all resolvers can do this or are correctly configured. When a client is using a local server the sorting can be performed in the server, based on the client's address. This only requires configuring the nameservers, not all the clients.</P ><P >The <B CLASS="command" >sortlist</B > statement (see below) takes an <B CLASS="command" >address_match_list</B > and interprets it even more specifically than the <B CLASS="command" >topology</B > statement does (<A HREF="Bv9ARM.ch06.html#topology" >Section 6.2.14.10</A >). Each top level statement in the <B CLASS="command" >sortlist</B > must itself be an explicit <B CLASS="command" >address_match_list</B > with one or two elements. The first element (which may be an IP address, an IP prefix, an ACL name or a nested <B CLASS="command" >address_match_list</B >) of each top level list is checked against the source address of the query until a match is found.</P ><P >Once the source address of the query has been matched, if the top level statement contains only one element, the actual primitive element that matched the source address is used to select the address in the response to move to the beginning of the response. If the statement is a list of two elements, then the second element is treated the same as the <B CLASS="command" >address_match_list</B > in a <B CLASS="command" >topology</B > statement. Each top level element is assigned a distance and the address in the response with the minimum distance is moved to the beginning of the response.</P ><P >In the following example, any queries received from any of the addresses of the host itself will get responses preferring addresses on any of the locally connected networks. Next most preferred are addresses on the 192.168.1/24 network, and after that either the 192.168.2/24 or 192.168.3/24 network with no preference shown between these two networks. Queries received from a host on the 192.168.1/24 network will prefer other addresses on that network to the 192.168.2/24 and 192.168.3/24 networks. Queries received from a host on the 192.168.4/24 or the 192.168.5/24 network will only prefer other addresses on their directly connected networks.</P ><PRE CLASS="programlisting" >sortlist { { localhost; // IF the local host { localnets; // THEN first fit on the 192.168.1/24; // following nets { 192.168.2/24; 192.168.3/24; }; }; }; { 192.168.1/24; // IF on class C 192.168.1 { 192.168.1/24; // THEN use .1, or .2 or .3 { 192.168.2/24; 192.168.3/24; }; }; }; { 192.168.2/24; // IF on class C 192.168.2 { 192.168.2/24; // THEN use .2, or .1 or .3 { 192.168.1/24; 192.168.3/24; }; }; }; { 192.168.3/24; // IF on class C 192.168.3 { 192.168.3/24; // THEN use .3, or .1 or .2 { 192.168.1/24; 192.168.2/24; }; }; }; { { 192.168.4/24; 192.168.5/24; }; // if .4 or .5, prefer that net }; };</PRE ><P >The following example will give reasonable behavior for the local host and hosts on directly connected networks. It is similar to the behavior of the address sort in <SPAN CLASS="acronym" >BIND</SPAN > 4.9.x. Responses sent to queries from the local host will favor any of the directly connected networks. Responses sent to queries from any other hosts on a directly connected network will prefer addresses on that same network. Responses to other queries will not be sorted.</P ><PRE CLASS="programlisting" >sortlist { { localhost; localnets; }; { localnets; }; }; </PRE ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="rrset_ordering" >6.2.14.12. RRset Ordering</A ></H3 ><P >When multiple records are returned in an answer it may be useful to configure the order of the records placed into the response. The <B CLASS="command" >rrset-order</B > statement permits configuration of the ordering of the records in a multiple record response. See also the <B CLASS="command" >sortlist</B > statement, <A HREF="Bv9ARM.ch06.html#the_sortlist_statement" >Section 6.2.14.11</A >. </P ><P >An <B CLASS="command" >order_spec</B > is defined as follows:</P ><PRE CLASS="programlisting" >[<SPAN CLASS="optional" > class <TT CLASS="replaceable" ><I >class_name</I ></TT > </SPAN >][<SPAN CLASS="optional" > type <TT CLASS="replaceable" ><I >type_name</I ></TT > </SPAN >][<SPAN CLASS="optional" > name <TT CLASS="replaceable" ><I >"domain_name"</I ></TT ></SPAN >] order <TT CLASS="replaceable" ><I >ordering</I ></TT > </PRE ><P >If no class is specified, the default is <B CLASS="command" >ANY</B >. If no type is specified, the default is <B CLASS="command" >ANY</B >. If no name is specified, the default is "<B CLASS="command" >*</B >".</P ><P >The legal values for <B CLASS="command" >ordering</B > are:</P ><DIV CLASS="informaltable" ><A NAME="AEN2810" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="72" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >fixed</B ></P ></TD ><TD WIDTH="360" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Records are returned in the order they are defined in the zone file.</P ></TD ></TR ><TR ><TD WIDTH="72" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >random</B ></P ></TD ><TD WIDTH="360" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Records are returned in some random order.</P ></TD ></TR ><TR ><TD WIDTH="72" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >cyclic</B ></P ></TD ><TD WIDTH="360" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Records are returned in a round-robin order.</P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><P >For example:</P ><PRE CLASS="programlisting" >rrset-order { class IN type A name "host.example.com" order random; order cyclic; }; </PRE ><P >will cause any responses for type A records in class IN that have "<TT CLASS="literal" >host.example.com</TT >" as a suffix, to always be returned in random order. All other records are returned in cyclic order.</P ><P >If multiple <B CLASS="command" >rrset-order</B > statements appear, they are not combined — the last one applies.</P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B >The <B CLASS="command" >rrset-order</B > statement is not yet implemented in <SPAN CLASS="acronym" >BIND</SPAN > 9. BIND 9 currently supports only a "random-cyclic" ordering, where the server randomly chooses a starting point within the RRset and returns the records in order starting at that point, wrapping around the end of the RRset if necessary.</P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="synthesis" >6.2.14.13. Synthetic IPv6 responses</A ></H3 ><P >Many existing stub resolvers support IPv6 DNS lookups as defined in RFC1886, using AAAA records for forward lookups and "nibble labels" in the <TT CLASS="literal" >ip6.int</TT > domain for reverse lookups, but do not support RFC2874-style lookups (using A6 records and binary labels in the <TT CLASS="literal" >ip6.arpa</TT > domain).</P ><P >For those who wish to continue to use such stub resolvers rather than switching to the BIND 9 lightweight resolver, BIND 9 provides a way to automatically convert RFC1886-style lookups into RFC2874-style lookups and return the results as "synthetic" AAAA and PTR records.</P ><P >This feature is disabled by default and can be enabled on a per-client basis by adding a <B CLASS="command" >allow-v6-synthesis { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > };</B > clause to the <B CLASS="command" >options</B > or <B CLASS="command" >view</B > statement. When it is enabled, recursive AAAA queries cause the server to first try an A6 lookup and if that fails, an AAAA lookups. No matter which one succeeds, the results are returned as a set of synthetic AAAA records. Similarly, recursive PTR queries in <TT CLASS="literal" >ip6.int</TT > will cause a lookup in <TT CLASS="literal" >ip6.arpa</TT > using binary labels, and if that fails, another lookup in <TT CLASS="literal" >ip6.int</TT >. The results are returned as a synthetic PTR record in <TT CLASS="literal" >ip6.int</TT >.</P ><P >The synthetic records have a TTL of zero. DNSSEC validation of synthetic responses is not currently supported; therefore responses containing synthetic RRs will not have the AD flag set.</P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B ><B CLASS="command" >allow-v6-synthesis</B > is only performed for clients that are supplied recursive service.</P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="tuning" >6.2.14.14. Tuning</A ></H3 ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><B CLASS="command" >lame-ttl</B ></DT ><DD ><P >Sets the number of seconds to cache a lame server indication. 0 disables caching. (This is <SPAN CLASS="bold" ><B CLASS="emphasis" >NOT</B ></SPAN > recommended.) Default is <TT CLASS="literal" >600</TT > (10 minutes). Maximum value is <TT CLASS="literal" >1800</TT > (30 minutes).</P ></DD ><DT ><B CLASS="command" >max-ncache-ttl</B ></DT ><DD ><P >To reduce network traffic and increase performance the server stores negative answers. <B CLASS="command" >max-ncache-ttl</B > is used to set a maximum retention time for these answers in the server in seconds. The default <B CLASS="command" >max-ncache-ttl</B > is <TT CLASS="literal" >10800</TT > seconds (3 hours). <B CLASS="command" >max-ncache-ttl</B > cannot exceed 7 days and will be silently truncated to 7 days if set to a greater value.</P ></DD ><DT ><B CLASS="command" >max-cache-ttl</B ></DT ><DD ><P ><B CLASS="command" >max-cache-ttl</B > sets the maximum time for which the server will cache ordinary (positive) answers. The default is one week (7 days).</P ></DD ><DT ><B CLASS="command" >min-roots</B ></DT ><DD ><P >The minimum number of root servers that is required for a request for the root servers to be accepted. Default is <TT CLASS="userinput" ><B >2</B ></TT >.</P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B >Not yet implemented in <SPAN CLASS="acronym" >BIND</SPAN >9.</P ></BLOCKQUOTE ></DIV ></DD ><DT ><B CLASS="command" >sig-validity-interval</B ></DT ><DD ><P >Specifies the number of days into the future when DNSSEC signatures automatically generated as a result of dynamic updates (<A HREF="Bv9ARM.ch04.html#dynamic_update" >Section 4.1</A >) will expire. The default is <TT CLASS="literal" >30</TT > days. The signature inception time is unconditionally set to one hour before the current time to allow for a limited amount of clock skew.</P ></DD ><DT ><B CLASS="command" >min-refresh-time</B >, <B CLASS="command" >max-refresh-time</B >, <B CLASS="command" >min-retry-time</B >, <B CLASS="command" >max-retry-time</B ></DT ><DD ><P > These options control the server's behavior on refreshing a zone (querying for SOA changes) or retrying failed transfers. Usually the SOA values for the zone are used, but these values are set by the master, giving slave server administrators little control over their contents. </P ><P > These options allow the administrator to set a minimum and maximum refresh and retry time either per-zone, per-view or globally. These options are valid for slave and stub zones, and clamp the SOA refresh and retry times to the specified values. </P ></DD ></DL ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="statsfile" >6.2.14.15. The Statistics File</A ></H3 ><P >The statistics file generated by <SPAN CLASS="acronym" >BIND</SPAN > 9 is similar, but not identical, to that generated by <SPAN CLASS="acronym" >BIND</SPAN > 8. </P ><P >The statistics dump begins with the line <B CLASS="command" >+++ Statistics Dump +++ (973798949)</B >, where the number in parentheses is a standard Unix-style timestamp, measured as seconds since January 1, 1970. Following that line are a series of lines containing a counter type, the value of the counter, optionally a zone name, and optionally a view name. The lines without view and zone listed are global statistics for the entire server. Lines with a zone and view name for the given view and zone (the view name is omitted for the default view). The statistics dump ends with the line <B CLASS="command" >--- Statistics Dump --- (973798949)</B >, where the number is identical to the number in the beginning line.</P ><P >The following statistics counters are maintained:</P ><DIV CLASS="informaltable" ><A NAME="AEN2925" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >success</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The number of successful queries made to the server or zone. A successful query is defined as query which returns a NOERROR response other than a referral response.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >referral</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The number of queries which resulted in referral responses.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >nxrrset</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The number of queries which resulted in NOERROR responses with no data.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >nxdomain</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The number of queries which resulted in NXDOMAIN responses.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >recursion</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The number of queries which caused the server to perform recursion in order to find the final answer.</P ></TD ></TR ><TR ><TD WIDTH="110" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >failure</B ></P ></TD ><TD WIDTH="322" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The number of queries which resulted in a failure response other than those above.</P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="server_statement_grammar" >6.2.15. <B CLASS="command" >server</B > Statement Grammar</A ></H2 ><PRE CLASS="programlisting" >server <TT CLASS="replaceable" ><I >ip_addr</I ></TT > { [<SPAN CLASS="optional" > bogus <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > provide-ixfr <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > request-ixfr <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > edns <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > transfers <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > transfer-format <TT CLASS="replaceable" ><I >( one-answer | many-answers )</I ></TT > ; ]</SPAN >] [<SPAN CLASS="optional" > keys <TT CLASS="replaceable" ><I >{ string ; [<SPAN CLASS="optional" > string ; [<SPAN CLASS="optional" >...</SPAN >]</SPAN >] }</I ></TT > ; </SPAN >] }; </PRE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="server_statement_definition_and_usage" >6.2.16. <B CLASS="command" >server</B > Statement Definition and Usage</A ></H2 ><P >The <B CLASS="command" >server</B > statement defines characteristics to be associated with a remote nameserver.</P ><P > The <B CLASS="command" >server</B > statement can occur at the top level of the configuration file or inside a <B CLASS="command" >view</B > statement. If a <B CLASS="command" >view</B > statement contains one or more <B CLASS="command" >server</B > statements, only those apply to the view and any top-level ones are ignored. If a view contains no <B CLASS="command" >server</B > statements, any top-level <B CLASS="command" >server</B > statements are used as defaults. </P ><P >If you discover that a remote server is giving out bad data, marking it as bogus will prevent further queries to it. The default value of <B CLASS="command" >bogus</B > is <B CLASS="command" >no</B >.</P ><P >The <B CLASS="command" >provide-ixfr</B > clause determines whether the local server, acting as master, will respond with an incremental zone transfer when the given remote server, a slave, requests it. If set to <B CLASS="command" >yes</B >, incremental transfer will be provided whenever possible. If set to <B CLASS="command" >no</B >, all transfers to the remote server will be nonincremental. If not set, the value of the <B CLASS="command" >provide-ixfr</B > option in the view or global options block is used as a default.</P ><P >The <B CLASS="command" >request-ixfr</B > clause determines whether the local server, acting as a slave, will request incremental zone transfers from the given remote server, a master. If not set, the value of the <B CLASS="command" >request-ixfr</B > option in the view or global options block is used as a default.</P ><P >IXFR requests to servers that do not support IXFR will automatically fall back to AXFR. Therefore, there is no need to manually list which servers support IXFR and which ones do not; the global default of <B CLASS="command" >yes</B > should always work. The purpose of the <B CLASS="command" >provide-ixfr</B > and <B CLASS="command" >request-ixfr</B > clauses is to make it possible to disable the use of IXFR even when both master and slave claim to support it, for example if one of the servers is buggy and crashes or corrupts data when IXFR is used.</P ><P >The <B CLASS="command" >edns</B > clause determines whether the local server will attempt to use EDNS when communicating with the remote server. The default is <B CLASS="command" >yes</B >.</P ><P >The server supports two zone transfer methods. The first, <B CLASS="command" >one-answer</B >, uses one DNS message per resource record transferred. <B CLASS="command" >many-answers</B > packs as many resource records as possible into a message. <B CLASS="command" >many-answers</B > is more efficient, but is only known to be understood by <SPAN CLASS="acronym" >BIND</SPAN > 9, <SPAN CLASS="acronym" >BIND</SPAN > 8.x, and patched versions of <SPAN CLASS="acronym" >BIND</SPAN > 4.9.5. You can specify which method to use for a server with the <B CLASS="command" >transfer-format</B > option. If <B CLASS="command" >transfer-format</B > is not specified, the <B CLASS="command" >transfer-format</B > specified by the <B CLASS="command" >options</B > statement will be used.</P ><P ><B CLASS="command" >transfers</B > is used to limit the number of concurrent inbound zone transfers from the specified server. If no <B CLASS="command" >transfers</B > clause is specified, the limit is set according to the <B CLASS="command" >transfers-per-ns</B > option.</P ><P >The <B CLASS="command" >keys</B > clause is used to identify a <B CLASS="command" >key_id</B > defined by the <B CLASS="command" >key</B > statement, to be used for transaction security when talking to the remote server. The <B CLASS="command" >key</B > statement must come before the <B CLASS="command" >server</B > statement that references it. When a request is sent to the remote server, a request signature will be generated using the key specified here and appended to the message. A request originating from the remote server is not required to be signed by this key.</P ><P >Although the grammar of the <B CLASS="command" >keys</B > clause allows for multiple keys, only a single key per server is currently supported.</P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN3040" >6.2.17. <B CLASS="command" >trusted-keys</B > Statement Grammar</A ></H2 ><PRE CLASS="programlisting" >trusted-keys { <TT CLASS="replaceable" ><I >string</I ></TT > <TT CLASS="replaceable" ><I >number</I ></TT > <TT CLASS="replaceable" ><I >number</I ></TT > <TT CLASS="replaceable" ><I >number</I ></TT > <TT CLASS="replaceable" ><I >string</I ></TT > ; [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >string</I ></TT > <TT CLASS="replaceable" ><I >number</I ></TT > <TT CLASS="replaceable" ><I >number</I ></TT > <TT CLASS="replaceable" ><I >number</I ></TT > <TT CLASS="replaceable" ><I >string</I ></TT > ; [<SPAN CLASS="optional" >...</SPAN >]</SPAN >] }; </PRE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN3056" >6.2.18. <B CLASS="command" >trusted-keys</B > Statement Definition and Usage</A ></H2 ><P >The <B CLASS="command" >trusted-keys</B > statement defines DNSSEC security roots. DNSSEC is described in <A HREF="Bv9ARM.ch04.html#DNSSEC" >Section 4.7</A >. A security root is defined when the public key for a non-authoritative zone is known, but cannot be securely obtained through DNS, either because it is the DNS root zone or its parent zone is unsigned. Once a key has been configured as a trusted key, it is treated as if it had been validated and proven secure. The resolver attempts DNSSEC validation on all DNS data in subdomains of a security root.</P ><P >The <B CLASS="command" >trusted-keys</B > statement can contain multiple key entries, each consisting of the key's domain name, flags, protocol, algorithm, and the base-64 representation of the key data.</P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN3064" >6.2.19. <B CLASS="command" >view</B > Statement Grammar</A ></H2 ><PRE CLASS="programlisting" >view <TT CLASS="replaceable" ><I >view_name</I ></TT > [<SPAN CLASS="optional" ><TT CLASS="replaceable" ><I >class</I ></TT ></SPAN >] { match-clients { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > } ; match-destinations { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > } ; match-recursive-only <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > ; [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >view_option</I ></TT >; ...</SPAN >] [<SPAN CLASS="optional" > zone-statistics <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >zone_statement</I ></TT >; ...</SPAN >] }; </PRE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN3080" >6.2.20. <B CLASS="command" >view</B > Statement Definition and Usage</A ></H2 ><P >The <B CLASS="command" >view</B > statement is a powerful new feature of <SPAN CLASS="acronym" >BIND</SPAN > 9 that lets a name server answer a DNS query differently depending on who is asking. It is particularly useful for implementing split DNS setups without having to run multiple servers.</P ><P >Each <B CLASS="command" >view</B > statement defines a view of the DNS namespace that will be seen by a subset of clients. A client matches a view if its source IP address matches the <TT CLASS="varname" >address_match_list</TT > of the view's <B CLASS="command" >match-clients</B > clause and its destination IP address matches the <TT CLASS="varname" >address_match_list</TT > of the view's <B CLASS="command" >match-destinations</B > clause. If not specified, both <B CLASS="command" >match-clients</B > and <B CLASS="command" >match-destinations</B > default to matching all addresses. A view can also be specified as <B CLASS="command" >match-recursive-only</B >, which means that only recursive requests from matching clients will match that view. The order of the <B CLASS="command" >view</B > statements is significant — a client request will be resolved in the context of the first <B CLASS="command" >view</B > that it matches.</P ><P >Zones defined within a <B CLASS="command" >view</B > statement will be only be accessible to clients that match the <B CLASS="command" >view</B >. By defining a zone of the same name in multiple views, different zone data can be given to different clients, for example, "internal" and "external" clients in a split DNS setup.</P ><P >Many of the options given in the <B CLASS="command" >options</B > statement can also be used within a <B CLASS="command" >view</B > statement, and then apply only when resolving queries with that view. When no view-specific value is given, the value in the <B CLASS="command" >options</B > statement is used as a default. Also, zone options can have default values specified in the <B CLASS="command" >view</B > statement; these view-specific defaults take precedence over those in the <B CLASS="command" >options</B > statement.</P ><P >Views are class specific. If no class is given, class IN is assumed. Note that all non-IN views must contain a hint zone, since only the IN class has compiled-in default hints.</P ><P >If there are no <B CLASS="command" >view</B > statements in the config file, a default view that matches any client is automatically created in class IN, and any <B CLASS="command" >zone</B > statements specified on the top level of the configuration file are considered to be part of this default view. If any explicit <B CLASS="command" >view</B > statements are present, all <B CLASS="command" >zone</B > statements must occur inside <B CLASS="command" >view</B > statements.</P ><P >Here is an example of a typical split DNS setup implemented using <B CLASS="command" >view</B > statements.</P ><PRE CLASS="programlisting" >view "internal" { // This should match our internal networks. match-clients { 10.0.0.0/8; }; // Provide recursive service to internal clients only. recursion yes; // Provide a complete view of the example.com zone // including addresses of internal hosts. zone "example.com" { type master; file "example-internal.db"; }; }; view "external" { match-clients { any; }; // Refuse recursive service to external clients. recursion no; // Provide a restricted view of the example.com zone // containing only publicly accessible hosts. zone "example.com" { type master; file "example-external.db"; }; }; </PRE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="zone_statement_grammar" >6.2.21. <B CLASS="command" >zone</B > Statement Grammar</A ></H2 ><PRE CLASS="programlisting" >zone <TT CLASS="replaceable" ><I >zone_name</I ></TT > [<SPAN CLASS="optional" ><TT CLASS="replaceable" ><I >class</I ></TT ></SPAN >] [<SPAN CLASS="optional" >{ type ( master | slave | hint | stub | forward ) ; [<SPAN CLASS="optional" > allow-notify { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > } ; </SPAN >] [<SPAN CLASS="optional" > allow-query { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > } ; </SPAN >] [<SPAN CLASS="optional" > allow-transfer { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > } ; </SPAN >] [<SPAN CLASS="optional" > allow-update { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > } ; </SPAN >] [<SPAN CLASS="optional" > update-policy { <TT CLASS="replaceable" ><I >update_policy_rule</I ></TT > [<SPAN CLASS="optional" >...</SPAN >] } ; </SPAN >] [<SPAN CLASS="optional" > allow-update-forwarding { <TT CLASS="replaceable" ><I >address_match_list</I ></TT > } ; </SPAN >] [<SPAN CLASS="optional" > also-notify { <TT CLASS="replaceable" ><I >ip_addr</I ></TT > [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >ip_addr</I ></TT > [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; ... </SPAN >] }; </SPAN >] [<SPAN CLASS="optional" > check-names (<TT CLASS="constant" >warn</TT >|<TT CLASS="constant" >fail</TT >|<TT CLASS="constant" >ignore</TT >) ; </SPAN >] [<SPAN CLASS="optional" > dialup <TT CLASS="replaceable" ><I >dialup_option</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > file <TT CLASS="replaceable" ><I >string</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > forward (<TT CLASS="constant" >only</TT >|<TT CLASS="constant" >first</TT >) ; </SPAN >] [<SPAN CLASS="optional" > forwarders { <TT CLASS="replaceable" ><I >ip_addr</I ></TT > [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >ip_addr</I ></TT > [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; ... </SPAN >] }; </SPAN >] [<SPAN CLASS="optional" > ixfr-base <TT CLASS="replaceable" ><I >string</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > ixfr-tmp-file <TT CLASS="replaceable" ><I >string</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > maintain-ixfr-base <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > masters [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] { <TT CLASS="replaceable" ><I >ip_addr</I ></TT > [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] [<SPAN CLASS="optional" >key <TT CLASS="replaceable" ><I >key</I ></TT ></SPAN >]; [<SPAN CLASS="optional" >...</SPAN >] } ; </SPAN >] [<SPAN CLASS="optional" > max-ixfr-log-size <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > max-transfer-idle-in <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > max-transfer-idle-out <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > max-transfer-time-in <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > max-transfer-time-out <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > notify <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > | <TT CLASS="replaceable" ><I >explicit</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > pubkey <TT CLASS="replaceable" ><I >number</I ></TT > <TT CLASS="replaceable" ><I >number</I ></TT > <TT CLASS="replaceable" ><I >number</I ></TT > <TT CLASS="replaceable" ><I >string</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > transfer-source (<TT CLASS="replaceable" ><I >ip4_addr</I ></TT > | <TT CLASS="constant" >*</TT >) [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; </SPAN >] [<SPAN CLASS="optional" > transfer-source-v6 (<TT CLASS="replaceable" ><I >ip6_addr</I ></TT > | <TT CLASS="constant" >*</TT >) [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; </SPAN >] [<SPAN CLASS="optional" > notify-source (<TT CLASS="replaceable" ><I >ip4_addr</I ></TT > | <TT CLASS="constant" >*</TT >) [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; </SPAN >] [<SPAN CLASS="optional" > notify-source-v6 (<TT CLASS="replaceable" ><I >ip6_addr</I ></TT > | <TT CLASS="constant" >*</TT >) [<SPAN CLASS="optional" >port <TT CLASS="replaceable" ><I >ip_port</I ></TT ></SPAN >] ; </SPAN >] [<SPAN CLASS="optional" > zone-statistics <TT CLASS="replaceable" ><I >yes_or_no</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > sig-validity-interval <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > database <TT CLASS="replaceable" ><I >string</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > min-refresh-time <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > max-refresh-time <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > min-retry-time <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] [<SPAN CLASS="optional" > max-retry-time <TT CLASS="replaceable" ><I >number</I ></TT > ; </SPAN >] }</SPAN >]; </PRE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN3231" >6.2.22. <B CLASS="command" >zone</B > Statement Definition and Usage</A ></H2 ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN3234" >6.2.22.1. Zone Types</A ></H3 ><DIV CLASS="informaltable" ><A NAME="AEN3236" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="87" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >master</TT ></P ></TD ><TD WIDTH="405" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The server has a master copy of the data for the zone and will be able to provide authoritative answers for it.</P ></TD ></TR ><TR ><TD WIDTH="87" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >slave</TT ></P ></TD ><TD WIDTH="405" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A slave zone is a replica of a master zone. The <B CLASS="command" >masters</B > list specifies one or more IP addresses of master servers that the slave contacts to update its copy of the zone. By default, transfers are made from port 53 on the servers; this can be changed for all servers by specifying a port number before the list of IP addresses, or on a per-server basis after the IP address. Authentication to the master can also be done with per-server TSIG keys. If a file is specified, then the replica will be written to this file whenever the zone is changed, and reloaded from this file on a server restart. Use of a file is recommended, since it often speeds server start-up and eliminates a needless waste of bandwidth. Note that for large numbers (in the tens or hundreds of thousands) of zones per server, it is best to use a two level naming scheme for zone file names. For example, a slave server for the zone <TT CLASS="literal" >example.com</TT > might place the zone contents into a file called <TT CLASS="filename" >ex/example.com</TT > where <TT CLASS="filename" >ex/</TT > is just the first two letters of the zone name. (Most operating systems behave very slowly if you put 100K files into a single directory.)</P ></TD ></TR ><TR ><TD WIDTH="87" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >stub</TT ></P ></TD ><TD WIDTH="405" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A stub zone is similar to a slave zone, except that it replicates only the NS records of a master zone instead of the entire zone. Stub zones are not a standard part of the DNS; they are a feature specific to the <SPAN CLASS="acronym" >BIND</SPAN > implementation. </P > <P >Stub zones can be used to eliminate the need for glue NS record in a parent zone at the expense of maintaining a stub zone entry and a set of name server addresses in <TT CLASS="filename" >named.conf</TT >. This usage is not recommended for new configurations, and BIND 9 supports it only in a limited way. In <SPAN CLASS="acronym" >BIND</SPAN > 4/8, zone transfers of a parent zone included the NS records from stub children of that zone. This meant that, in some cases, users could get away with configuring child stubs only in the master server for the parent zone. <SPAN CLASS="acronym" >BIND</SPAN > 9 never mixes together zone data from different zones in this way. Therefore, if a <SPAN CLASS="acronym" >BIND</SPAN > 9 master serving a parent zone has child stub zones configured, all the slave servers for the parent zone also need to have the same child stub zones configured.</P > <P >Stub zones can also be used as a way of forcing the resolution of a given domain to use a particular set of authoritative servers. For example, the caching name servers on a private network using RFC2157 addressing may be configured with stub zones for <TT CLASS="literal" >10.in-addr.arpa</TT > to use a set of internal name servers as the authoritative servers for that domain.</P > </TD ></TR ><TR ><TD WIDTH="87" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >forward</TT ></P ></TD ><TD WIDTH="405" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A "forward zone" is a way to configure forwarding on a per-domain basis. A <B CLASS="command" >zone</B > statement of type <B CLASS="command" >forward</B > can contain a <B CLASS="command" >forward</B > and/or <B CLASS="command" >forwarders</B > statement, which will apply to queries within the domain given by the zone name. If no <B CLASS="command" >forwarders</B > statement is present or an empty list for <B CLASS="command" >forwarders</B > is given, then no forwarding will be done for the domain, canceling the effects of any forwarders in the <B CLASS="command" >options</B > statement. Thus if you want to use this type of zone to change the behavior of the global <B CLASS="command" >forward</B > option (that is, "forward first to", then "forward only", or vice versa, but want to use the same servers as set globally) you need to respecify the global forwarders.</P > </TD ></TR ><TR ><TD WIDTH="87" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >hint</TT ></P ></TD ><TD WIDTH="405" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The initial set of root nameservers is specified using a "hint zone". When the server starts up, it uses the root hints to find a root nameserver and get the most recent list of root nameservers. If no hint zone is specified for class IN, the server uses a compiled-in default set of root servers hints. Classes other than IN have no built-in defaults hints.</P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN3291" >6.2.22.2. Class</A ></H3 ><P >The zone's name may optionally be followed by a class. If a class is not specified, class <TT CLASS="literal" >IN</TT > (for <TT CLASS="varname" >Internet</TT >), is assumed. This is correct for the vast majority of cases.</P ><P >The <TT CLASS="literal" >hesiod</TT > class is named for an information service from MIT's Project Athena. It is used to share information about various systems databases, such as users, groups, printers and so on. The keyword <TT CLASS="literal" >HS</TT > is a synonym for hesiod.</P ><P >Another MIT development is CHAOSnet, a LAN protocol created in the mid-1970s. Zone data for it can be specified with the <TT CLASS="literal" >CHAOS</TT > class.</P ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN3301" >6.2.22.3. Zone Options</A ></H3 ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><B CLASS="command" >allow-notify</B ></DT ><DD ><P >See the description of <B CLASS="command" >allow-notify</B > in <A HREF="Bv9ARM.ch06.html#access_control" >Section 6.2.14.3</A ></P ></DD ><DT ><B CLASS="command" >allow-query</B ></DT ><DD ><P >See the description of <B CLASS="command" >allow-query</B > in <A HREF="Bv9ARM.ch06.html#access_control" >Section 6.2.14.3</A ></P ></DD ><DT ><B CLASS="command" >allow-transfer</B ></DT ><DD ><P >See the description of <B CLASS="command" >allow-transfer</B > in <A HREF="Bv9ARM.ch06.html#access_control" >Section 6.2.14.3</A >.</P ></DD ><DT ><B CLASS="command" >allow-update</B ></DT ><DD ><P >Specifies which hosts are allowed to submit Dynamic DNS updates for master zones. The default is to deny updates from all hosts.</P ></DD ><DT ><B CLASS="command" >update-policy</B ></DT ><DD ><P >Specifies a "Simple Secure Update" policy. See <A HREF="Bv9ARM.ch06.html#dynamic_update_policies" >Section 6.2.22.4</A >.</P ></DD ><DT ><B CLASS="command" >allow-update-forwarding</B ></DT ><DD ><P >Specifies which hosts are allowed to submit Dynamic DNS updates to slave zones to be forwarded to the master. The default is <TT CLASS="userinput" ><B >{ none; }</B ></TT >, which means that no update forwarding will be performed. To enable update forwarding, specify <TT CLASS="userinput" ><B >allow-update-forwarding { any; };</B ></TT >. Specifying values other than <TT CLASS="userinput" ><B >{ none; }</B ></TT > or <TT CLASS="userinput" ><B >{ any; }</B ></TT > is usually counterproductive, since the responsibility for update access control should rest with the master server, not the slaves.</P ><P >Note that enabling the update forwarding feature on a slave server may expose master servers relying on insecure IP address based access control to attacks; see <A HREF="Bv9ARM.ch07.html#dynamic_update_security" >Section 7.3</A > for more details.</P ></DD ><DT ><B CLASS="command" >also-notify</B ></DT ><DD ><P >Only meaningful if <B CLASS="command" >notify</B > is active for this zone. The set of machines that will receive a <TT CLASS="literal" >DNS NOTIFY</TT > message for this zone is made up of all the listed nameservers (other than the primary master) for the zone plus any IP addresses specified with <B CLASS="command" >also-notify</B >. A port may be specified with each <B CLASS="command" >also-notify</B > address to send the notify messages to a port other than the default of 53. <B CLASS="command" >also-notify</B > is not meaningful for stub zones. The default is the empty list.</P ></DD ><DT ><B CLASS="command" >check-names</B ></DT ><DD ><P > This option was used in BIND 8 to restrict the character set of domain names in master files and/or DNS responses received from the network. BIND 9 does not restrict the character set of domain names and does not implement the <B CLASS="command" >check-names</B > option. </P ></DD ><DT ><B CLASS="command" >database</B ></DT ><DD ><P >Specify the type of database to be used for storing the zone data. The string following the <B CLASS="command" >database</B > keyword is interpreted as a list of whitespace-delimited words. The first word identifies the database type, and any subsequent words are passed as arguments to the database to be interpreted in a way specific to the database type.</P ><P >The default is <TT CLASS="userinput" ><B >"rbt"</B ></TT >, BIND 9's native in-memory red-black-tree database. This database does not take arguments.</P ><P >Other values are possible if additional database drivers have been linked into the server. Some sample drivers are included with the distribution but none are linked in by default.</P ></DD ><DT ><B CLASS="command" >dialup</B ></DT ><DD ><P >See the description of <B CLASS="command" >dialup</B > in <A HREF="Bv9ARM.ch06.html#boolean_options" >Section 6.2.14.1</A >.</P ></DD ><DT ><B CLASS="command" >forward</B ></DT ><DD ><P >Only meaningful if the zone has a forwarders list. The <B CLASS="command" >only</B > value causes the lookup to fail after trying the forwarders and getting no answer, while <B CLASS="command" >first</B > would allow a normal lookup to be tried.</P ></DD ><DT ><B CLASS="command" >forwarders</B ></DT ><DD ><P >Used to override the list of global forwarders. If it is not specified in a zone of type <B CLASS="command" >forward</B >, no forwarding is done for the zone; the global options are not used.</P ></DD ><DT ><B CLASS="command" >ixfr-base</B ></DT ><DD ><P >Was used in <SPAN CLASS="acronym" >BIND</SPAN > 8 to specify the name of the transaction log (journal) file for dynamic update and IXFR. <SPAN CLASS="acronym" >BIND</SPAN > 9 ignores the option and constructs the name of the journal file by appending "<TT CLASS="filename" >.jnl</TT >" to the name of the zone file.</P ></DD ><DT ><B CLASS="command" >ixfr-tmp-file</B ></DT ><DD ><P >Was an undocumented option in <SPAN CLASS="acronym" >BIND</SPAN > 8. Ignored in <SPAN CLASS="acronym" >BIND</SPAN > 9.</P ></DD ><DT ><B CLASS="command" >max-transfer-time-in</B ></DT ><DD ><P >See the description of <B CLASS="command" >max-transfer-time-in</B > in <A HREF="Bv9ARM.ch06.html#zone_transfers" >Section 6.2.14.6</A >.</P ></DD ><DT ><B CLASS="command" >max-transfer-idle-in</B ></DT ><DD ><P >See the description of <B CLASS="command" >max-transfer-idle-in</B > in <A HREF="Bv9ARM.ch06.html#zone_transfers" >Section 6.2.14.6</A >.</P ></DD ><DT ><B CLASS="command" >max-transfer-time-out</B ></DT ><DD ><P >See the description of <B CLASS="command" >max-transfer-time-out</B > in <A HREF="Bv9ARM.ch06.html#zone_transfers" >Section 6.2.14.6</A >.</P ></DD ><DT ><B CLASS="command" >max-transfer-idle-out</B ></DT ><DD ><P >See the description of <B CLASS="command" >max-transfer-idle-out</B > in <A HREF="Bv9ARM.ch06.html#zone_transfers" >Section 6.2.14.6</A >.</P ></DD ><DT ><B CLASS="command" >notify</B ></DT ><DD ><P >See the description of <B CLASS="command" >notify</B > in <A HREF="Bv9ARM.ch06.html#boolean_options" >Section 6.2.14.1</A >.</P ></DD ><DT ><B CLASS="command" >pubkey</B ></DT ><DD ><P >In <SPAN CLASS="acronym" >BIND</SPAN > 8, this option was intended for specifying a public zone key for verification of signatures in DNSSEC signed zones when they are loaded from disk. <SPAN CLASS="acronym" >BIND</SPAN > 9 does not verify signatures on loading and ignores the option.</P ></DD ><DT ><B CLASS="command" >zone-statistics</B ></DT ><DD ><P >If <TT CLASS="userinput" ><B >yes</B ></TT >, the server will keep statistical information for this zone, which can be dumped to the <B CLASS="command" >statistics-file</B > defined in the server options.</P ></DD ><DT ><B CLASS="command" >sig-validity-interval</B ></DT ><DD ><P >See the description of <B CLASS="command" >sig-validity-interval</B > in <A HREF="Bv9ARM.ch06.html#tuning" >Section 6.2.14.14</A >.</P ></DD ><DT ><B CLASS="command" >transfer-source</B ></DT ><DD ><P >See the description of <B CLASS="command" >transfer-source</B > in <A HREF="Bv9ARM.ch06.html#zone_transfers" >Section 6.2.14.6</A > </P ></DD ><DT ><B CLASS="command" >transfer-source-v6</B ></DT ><DD ><P >See the description of <B CLASS="command" >transfer-source-v6</B > in <A HREF="Bv9ARM.ch06.html#zone_transfers" >Section 6.2.14.6</A > </P ></DD ><DT ><B CLASS="command" >notify-source</B ></DT ><DD ><P >See the description of <B CLASS="command" >notify-source</B > in <A HREF="Bv9ARM.ch06.html#zone_transfers" >Section 6.2.14.6</A > </P ></DD ><DT ><B CLASS="command" >notify-source-v6</B ></DT ><DD ><P >See the description of <B CLASS="command" >notify-source-v6</B > in <A HREF="Bv9ARM.ch06.html#zone_transfers" >Section 6.2.14.6</A >. </P ></DD ><DT ><B CLASS="command" >min-refresh-time</B >, <B CLASS="command" >max-refresh-time</B >, <B CLASS="command" >min-retry-time</B >, <B CLASS="command" >max-retry-time</B ></DT ><DD ><P > See the description in <A HREF="Bv9ARM.ch06.html#tuning" >Section 6.2.14.14</A >. </P ></DD ></DL ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="dynamic_update_policies" >6.2.22.4. Dynamic Update Policies</A ></H3 ><P ><SPAN CLASS="acronym" >BIND</SPAN > 9 supports two alternative methods of granting clients the right to perform dynamic updates to a zone, configured by the <B CLASS="command" >allow-update</B > and <B CLASS="command" >update-policy</B > option, respectively.</P ><P >The <B CLASS="command" >allow-update</B > clause works the same way as in previous versions of <SPAN CLASS="acronym" >BIND</SPAN >. It grants given clients the permission to update any record of any name in the zone.</P ><P >The <B CLASS="command" >update-policy</B > clause is new in <SPAN CLASS="acronym" >BIND</SPAN > 9 and allows more fine-grained control over what updates are allowed. A set of rules is specified, where each rule either grants or denies permissions for one or more names to be updated by one or more identities. If the dynamic update request message is signed (that is, it includes either a TSIG or SIG(0) record), the identity of the signer can be determined.</P ><P >Rules are specified in the <B CLASS="command" >update-policy</B > zone option, and are only meaningful for master zones. When the <B CLASS="command" >update-policy</B > statement is present, it is a configuration error for the <B CLASS="command" >allow-update</B > statement to be present. The <B CLASS="command" >update-policy</B > statement only examines the signer of a message; the source address is not relevant.</P ><P >This is how a rule definition looks:</P ><PRE CLASS="programlisting" > ( <B CLASS="command" >grant</B > | <B CLASS="command" >deny</B > ) <TT CLASS="replaceable" ><I >identity</I ></TT > <TT CLASS="replaceable" ><I >nametype</I ></TT > <TT CLASS="replaceable" ><I >name</I ></TT > [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >types</I ></TT > </SPAN >] </PRE ><P >Each rule grants or denies privileges. Once a message has successfully matched a rule, the operation is immediately granted or denied and no further rules are examined. A rule is matched when the signer matches the identity field, the name matches the name field, and the type is specified in the type field.</P ><P >The identity field specifies a name or a wildcard name. The nametype field has 4 values: <TT CLASS="varname" >name</TT >, <TT CLASS="varname" >subdomain</TT >, <TT CLASS="varname" >wildcard</TT >, and <TT CLASS="varname" >self</TT > </P ><DIV CLASS="informaltable" ><A NAME="AEN3535" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="79" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >name</TT ></P ></TD ><TD WIDTH="353" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Matches when the updated name is the same as the name in the name field.</P ></TD ></TR ><TR ><TD WIDTH="79" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >subdomain</TT ></P ></TD ><TD WIDTH="353" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Matches when the updated name is a subdomain of the name in the name field (which includes the name itself).</P ></TD ></TR ><TR ><TD WIDTH="79" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >wildcard</TT ></P ></TD ><TD WIDTH="353" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Matches when the updated name is a valid expansion of the wildcard name in the name field.</P ></TD ></TR ><TR ><TD WIDTH="79" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="varname" >self</TT ></P ></TD ><TD WIDTH="353" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Matches when the updated name is the same as the message signer. The name field is ignored.</P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><P >If no types are specified, the rule matches all types except SIG, NS, SOA, and NXT. Types may be specified by name, including "ANY" (ANY matches all types except NXT, which can never be updated). </P ></DIV ></DIV ></DIV ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="AEN3565" >6.3. Zone File</A ></H1 ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="types_of_resource_records_and_when_to_use_them" >6.3.1. Types of Resource Records and When to Use Them</A ></H2 ><P >This section, largely borrowed from RFC 1034, describes the concept of a Resource Record (RR) and explains when each is used. Since the publication of RFC 1034, several new RRs have been identified and implemented in the DNS. These are also included.</P ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN3570" >6.3.1.1. Resource Records</A ></H3 ><P >A domain name identifies a node. Each node has a set of resource information, which may be empty. The set of resource information associated with a particular name is composed of separate RRs. The order of RRs in a set is not significant and need not be preserved by nameservers, resolvers, or other parts of the DNS. However, sorting of multiple RRs is permitted for optimization purposes, for example, to specify that a particular nearby server be tried first. See <A HREF="Bv9ARM.ch06.html#the_sortlist_statement" >Section 6.2.14.11</A > and <A HREF="Bv9ARM.ch06.html#rrset_ordering" >Section 6.2.14.12</A >.</P ><P >The components of a Resource Record are:</P ><DIV CLASS="informaltable" ><A NAME="AEN3576" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="96" ALIGN="LEFT" VALIGN="MIDDLE" ><P >owner name</P ></TD ><TD WIDTH="336" ALIGN="LEFT" VALIGN="MIDDLE" ><P >the domain name where the RR is found.</P ></TD ></TR ><TR ><TD WIDTH="96" ALIGN="LEFT" VALIGN="MIDDLE" ><P >type</P ></TD ><TD WIDTH="336" ALIGN="LEFT" VALIGN="MIDDLE" ><P >an encoded 16 bit value that specifies the type of the resource in this resource record. Types refer to abstract resources.</P ></TD ></TR ><TR ><TD WIDTH="96" ALIGN="LEFT" VALIGN="MIDDLE" ><P >TTL</P ></TD ><TD WIDTH="336" ALIGN="LEFT" VALIGN="MIDDLE" ><P >the time to live of the RR. This field is a 32 bit integer in units of seconds, and is primarily used by resolvers when they cache RRs. The TTL describes how long a RR can be cached before it should be discarded.</P ></TD ></TR ><TR ><TD WIDTH="96" ALIGN="LEFT" VALIGN="MIDDLE" ><P >class</P ></TD ><TD WIDTH="336" ALIGN="LEFT" VALIGN="MIDDLE" ><P >an encoded 16 bit value that identifies a protocol family or instance of a protocol.</P ></TD ></TR ><TR ><TD WIDTH="96" ALIGN="LEFT" VALIGN="MIDDLE" ><P >RDATA</P ></TD ><TD WIDTH="336" ALIGN="LEFT" VALIGN="MIDDLE" ><P >the type and sometimes class-dependent data that describes the resource.</P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><P >The following are <SPAN CLASS="emphasis" ><I CLASS="emphasis" >types</I ></SPAN > of valid RRs (some of these listed, although not obsolete, are experimental (x) or historical (h) and no longer in general use):</P ><DIV CLASS="informaltable" ><A NAME="AEN3608" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >a host address.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A6</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >an IPv6 address.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >AAAA</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Obsolete format of IPv6 address</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >AFSDB</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >(x) location of AFS database servers. Experimental.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >CERT</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >holds a digital certificate.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >CNAME</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >identifies the canonical name of an alias.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >DNAME</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >for delegation of reverse addresses. Replaces the domain name specified with another name to be looked up. Described in RFC 2672.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >GPOS</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Specifies the global position. Superseded by LOC.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >HINFO</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >identifies the CPU and OS used by a host.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >ISDN</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >(x) representation of ISDN addresses. Experimental.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >KEY</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >stores a public key associated with a DNS name.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >KX</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >identifies a key exchanger for this DNS name.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >LOC</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >(x) for storing GPS info. See RFC 1876. Experimental.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >MX</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >identifies a mail exchange for the domain. See RFC 974 for details.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >NAPTR</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >name authority pointer.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >NSAP</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >a network service access point.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >NS</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >the authoritative nameserver for the domain.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >NXT</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >used in DNSSEC to securely indicate that RRs with an owner name in a certain name interval do not exist in a zone and indicate what RR types are present for an existing name. See RFC 2535 for details.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >PTR</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >a pointer to another part of the domain name space.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >PX</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >provides mappings between RFC 822 and X.400 addresses.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >RP</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >(x) information on persons responsible for the domain. Experimental.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >RT</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >(x) route-through binding for hosts that do not have their own direct wide area network addresses. Experimental.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >SIG</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >("signature") contains data authenticated in the secure DNS. See RFC 2535 for details.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >SOA</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >identifies the start of a zone of authority.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >SRV</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >information about well known network services (replaces WKS).</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >TXT</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >text records.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >WKS</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >(h) information about which well known network services, such as SMTP, that a domain supports. Historical, replaced by newer RR SRV.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >X25</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >(x) representation of X.25 network addresses. Experimental.</P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><P >The following <SPAN CLASS="emphasis" ><I CLASS="emphasis" >classes</I ></SPAN > of resource records are currently valid in the DNS:</P ><DIV CLASS="informaltable" ><A NAME="AEN3755" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >IN</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >the Internet system.</P ></TD ></TR ><TR ><TD COLSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE" ><P >For information about other, older classes of RRs, see <A HREF="Bv9ARM.ch09.html#classes_of_resource_records" >Section A.2.1</A >.</P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><P ><SPAN CLASS="emphasis" ><I CLASS="emphasis" >RDATA</I ></SPAN > is the type-dependent or class-dependent data that describes the resource:</P ><DIV CLASS="informaltable" ><A NAME="AEN3771" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >for the IN class, a 32 bit IP address.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >A6</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >maps a domain name to an IPv6 address, with a provision for indirection for leading "prefix" bits.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >CNAME</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >a domain name.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >DNAME</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >provides alternate naming to an entire subtree of the domain name space, rather than to a single node. It causes some suffix of a queried name to be substituted with a name from the DNAME record's RDATA.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >MX</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >a 16 bit preference value (lower is better) followed by a host name willing to act as a mail exchange for the owner domain.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >NS</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >a fully qualified domain name.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >PTR</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >a fully qualified domain name.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P >SOA</P ></TD ><TD WIDTH="348" ALIGN="LEFT" VALIGN="MIDDLE" ><P >several fields.</P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><P >The owner name is often implicit, rather than forming an integral part of the RR. For example, many nameservers internally form tree or hash structures for the name space, and chain RRs off nodes. The remaining RR parts are the fixed header (type, class, TTL) which is consistent for all RRs, and a variable part (RDATA) that fits the needs of the resource being described.</P ><P >The meaning of the TTL field is a time limit on how long an RR can be kept in a cache. This limit does not apply to authoritative data in zones; it is also timed out, but by the refreshing policies for the zone. The TTL is assigned by the administrator for the zone where the data originates. While short TTLs can be used to minimize caching, and a zero TTL prohibits caching, the realities of Internet performance suggest that these times should be on the order of days for the typical host. If a change can be anticipated, the TTL can be reduced prior to the change to minimize inconsistency during the change, and then increased back to its former value following the change.</P ><P >The data in the RDATA section of RRs is carried as a combination of binary strings and domain names. The domain names are frequently used as "pointers" to other data in the DNS.</P ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN3819" >6.3.1.2. Textual expression of RRs</A ></H3 ><P >RRs are represented in binary form in the packets of the DNS protocol, and are usually represented in highly encoded form when stored in a nameserver or resolver. In the examples provided in RFC 1034, a style similar to that used in master files was employed in order to show the contents of RRs. In this format, most RRs are shown on a single line, although continuation lines are possible using parentheses.</P ><P >The start of the line gives the owner of the RR. If a line begins with a blank, then the owner is assumed to be the same as that of the previous RR. Blank lines are often included for readability.</P ><P >Following the owner, we list the TTL, type, and class of the RR. Class and type use the mnemonics defined above, and TTL is an integer before the type field. In order to avoid ambiguity in parsing, type and class mnemonics are disjoint, TTLs are integers, and the type mnemonic is always last. The IN class and TTL values are often omitted from examples in the interests of clarity.</P ><P >The resource data or RDATA section of the RR are given using knowledge of the typical representation for the data.</P ><P >For example, we might show the RRs carried in a message as:</P ><DIV CLASS="informaltable" ><A NAME="AEN3826" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="133" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >ISI.EDU.</TT ></P ></TD ><TD WIDTH="98" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >MX</TT ></P ></TD ><TD WIDTH="202" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >10 VENERA.ISI.EDU.</TT ></P ></TD ></TR ><TR ><TD WIDTH="133" ALIGN="LEFT" VALIGN="MIDDLE" ><P ></P ></TD ><TD WIDTH="98" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >MX</TT ></P ></TD ><TD WIDTH="202" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >10 VAXA.ISI.EDU</TT ></P ></TD ></TR ><TR ><TD WIDTH="133" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >VENERA.ISI.EDU</TT ></P ></TD ><TD WIDTH="98" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >A</TT ></P ></TD ><TD WIDTH="202" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >128.9.0.32</TT ></P ></TD ></TR ><TR ><TD WIDTH="133" ALIGN="LEFT" VALIGN="MIDDLE" ><P ></P ></TD ><TD WIDTH="98" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >A</TT ></P ></TD ><TD WIDTH="202" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >10.1.0.52</TT ></P ></TD ></TR ><TR ><TD WIDTH="133" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >VAXA.ISI.EDU</TT ></P ></TD ><TD WIDTH="98" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >A</TT ></P ></TD ><TD WIDTH="202" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >10.2.0.27</TT ></P ></TD ></TR ><TR ><TD WIDTH="133" ALIGN="LEFT" VALIGN="MIDDLE" ><P ></P ></TD ><TD WIDTH="98" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >A</TT ></P ></TD ><TD WIDTH="202" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >128.9.0.33</TT ></P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><P >The MX RRs have an RDATA section which consists of a 16 bit number followed by a domain name. The address RRs use a standard IP address format to contain a 32 bit internet address.</P ><P >This example shows six RRs, with two RRs at each of three domain names.</P ><P >Similarly we might see:</P ><DIV CLASS="informaltable" ><A NAME="AEN3892" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="143" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >XX.LCS.MIT.EDU. IN</TT ></P ></TD ><TD WIDTH="102" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >A</TT ></P ></TD ><TD WIDTH="198" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >10.0.0.44</TT ></P ></TD ></TR ><TR ><TD WIDTH="143" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >CH</TT ></P ></TD ><TD WIDTH="102" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >A</TT ></P ></TD ><TD WIDTH="198" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >MIT.EDU. 2420</TT ></P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><P >This example shows two addresses for <TT CLASS="literal" >XX.LCS.MIT.EDU</TT >, each of a different class.</P ></DIV ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN3920" >6.3.2. Discussion of MX Records</A ></H2 ><P >As described above, domain servers store information as a series of resource records, each of which contains a particular piece of information about a given domain name (which is usually, but not always, a host). The simplest way to think of a RR is as a typed pair of data, a domain name matched with a relevant datum, and stored with some additional type information to help systems determine when the RR is relevant.</P ><P >MX records are used to control delivery of email. The data specified in the record is a priority and a domain name. The priority controls the order in which email delivery is attempted, with the lowest number first. If two priorities are the same, a server is chosen randomly. If no servers at a given priority are responding, the mail transport agent will fall back to the next largest priority. Priority numbers do not have any absolute meaning — they are relevant only respective to other MX records for that domain name. The domain name given is the machine to which the mail will be delivered. It <SPAN CLASS="emphasis" ><I CLASS="emphasis" >must</I ></SPAN > have an associated A record — CNAME is not sufficient.</P ><P >For a given domain, if there is both a CNAME record and an MX record, the MX record is in error, and will be ignored. Instead, the mail will be delivered to the server specified in the MX record pointed to by the CNAME.</P ><DIV CLASS="informaltable" ><A NAME="AEN3926" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="164" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >example.com.</TT ></P ></TD ><TD WIDTH="43" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >IN</TT ></P ></TD ><TD WIDTH="43" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >MX</TT ></P ></TD ><TD WIDTH="94" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >10</TT ></P ></TD ><TD WIDTH="149" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >mail.example.com.</TT ></P ></TD ></TR ><TR ><TD WIDTH="164" ALIGN="LEFT" VALIGN="MIDDLE" ><P ></P ></TD ><TD WIDTH="43" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >IN</TT ></P ></TD ><TD WIDTH="43" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >MX</TT ></P ></TD ><TD WIDTH="94" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >10</TT ></P ></TD ><TD WIDTH="149" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >mail2.example.com.</TT ></P ></TD ></TR ><TR ><TD WIDTH="164" ALIGN="LEFT" VALIGN="MIDDLE" ><P ></P ></TD ><TD WIDTH="43" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >IN</TT ></P ></TD ><TD WIDTH="43" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >MX</TT ></P ></TD ><TD WIDTH="94" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >20</TT ></P ></TD ><TD WIDTH="149" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >mail.backup.org.</TT ></P ></TD ></TR ><TR ><TD WIDTH="164" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >mail.example.com.</TT ></P ></TD ><TD WIDTH="43" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >IN</TT ></P ></TD ><TD WIDTH="43" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >A</TT ></P ></TD ><TD WIDTH="94" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >10.0.0.1</TT ></P ></TD ><TD WIDTH="149" ALIGN="LEFT" VALIGN="MIDDLE" ><P ></P ></TD ></TR ><TR ><TD WIDTH="164" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >mail2.example.com.</TT ></P ></TD ><TD WIDTH="43" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >IN</TT ></P ></TD ><TD WIDTH="43" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >A</TT ></P ></TD ><TD WIDTH="94" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >10.0.0.2</TT ></P ></TD ><TD WIDTH="149" ALIGN="LEFT" VALIGN="MIDDLE" ><P ></P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><P >For example:</P ><P >Mail delivery will be attempted to <TT CLASS="literal" >mail.example.com</TT > and <TT CLASS="literal" >mail2.example.com</TT > (in any order), and if neither of those succeed, delivery to <TT CLASS="literal" >mail.backup.org</TT > will be attempted.</P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="Setting_TTLs" >6.3.3. Setting TTLs</A ></H2 ><P >The time to live of the RR field is a 32 bit integer represented in units of seconds, and is primarily used by resolvers when they cache RRs. The TTL describes how long a RR can be cached before it should be discarded. The following three types of TTL are currently used in a zone file.</P ><DIV CLASS="informaltable" ><A NAME="AEN4018" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="72" ALIGN="LEFT" VALIGN="MIDDLE" ><P >SOA</P ></TD ><TD WIDTH="420" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The last field in the SOA is the negative caching TTL. This controls how long other servers will cache no-such-domain (NXDOMAIN) responses from you.</P ><P >The maximum time for negative caching is 3 hours (3h).</P ></TD ></TR ><TR ><TD WIDTH="72" ALIGN="LEFT" VALIGN="MIDDLE" ><P >$TTL</P ></TD ><TD WIDTH="420" ALIGN="LEFT" VALIGN="MIDDLE" ><P >The $TTL directive at the top of the zone file (before the SOA) gives a default TTL for every RR without a specific TTL set.</P ></TD ></TR ><TR ><TD WIDTH="72" ALIGN="LEFT" VALIGN="MIDDLE" ><P >RR TTLs</P ></TD ><TD WIDTH="420" ALIGN="LEFT" VALIGN="MIDDLE" ><P >Each RR can have a TTL as the second field in the RR, which will control how long other servers can cache the it.</P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><P >All of these TTLs default to units of seconds, though units can be explicitly specified, for example, <TT CLASS="literal" >1h30m</TT >. </P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN4041" >6.3.4. Inverse Mapping in IPv4</A ></H2 ><P >Reverse name resolution (that is, translation from IP address to name) is achieved by means of the <SPAN CLASS="emphasis" ><I CLASS="emphasis" >in-addr.arpa</I ></SPAN > domain and PTR records. Entries in the in-addr.arpa domain are made in least-to-most significant order, read left to right. This is the opposite order to the way IP addresses are usually written. Thus, a machine with an IP address of 10.1.2.3 would have a corresponding in-addr.arpa name of 3.2.1.10.in-addr.arpa. This name should have a PTR resource record whose data field is the name of the machine or, optionally, multiple PTR records if the machine has more than one name. For example, in the [<SPAN CLASS="optional" >example.com</SPAN >] domain:</P ><DIV CLASS="informaltable" ><A NAME="AEN4046" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="108" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >$ORIGIN</TT ></P ></TD ><TD WIDTH="384" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >2.1.10.in-addr.arpa</TT ></P ></TD ></TR ><TR ><TD WIDTH="108" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >3</TT ></P ></TD ><TD WIDTH="384" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><TT CLASS="literal" >IN PTR foo.example.com.</TT ></P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B >The <B CLASS="command" >$ORIGIN</B > lines in the examples are for providing context to the examples only-they do not necessarily appear in the actual usage. They are only used here to indicate that the example is relative to the listed origin.</P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN4068" >6.3.5. Other Zone File Directives</A ></H2 ><P >The Master File Format was initially defined in RFC 1035 and has subsequently been extended. While the Master File Format itself is class independent all records in a Master File must be of the same class.</P ><P >Master File Directives include <B CLASS="command" >$ORIGIN</B >, <B CLASS="command" >$INCLUDE</B >, and <B CLASS="command" >$TTL.</B ></P ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN4075" >6.3.5.1. The <B CLASS="command" >$ORIGIN</B > Directive</A ></H3 ><P >Syntax: <B CLASS="command" >$ORIGIN </B ><TT CLASS="replaceable" ><I >domain-name</I ></TT > [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >comment</I ></TT ></SPAN >]</P ><P ><B CLASS="command" >$ORIGIN</B > sets the domain name that will be appended to any unqualified records. When a zone is first read in there is an implicit <B CLASS="command" >$ORIGIN</B > <<TT CLASS="varname" >zone-name</TT >><B CLASS="command" >.</B > The current <B CLASS="command" >$ORIGIN</B > is appended to the domain specified in the <B CLASS="command" >$ORIGIN</B > argument if it is not absolute.</P ><PRE CLASS="programlisting" ><TT CLASS="literal" >$ORIGIN example.com. WWW CNAME MAIN-SERVER</TT ></PRE ><P >is equivalent to</P ><PRE CLASS="programlisting" ><TT CLASS="literal" >WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.</TT ></PRE ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN4095" >6.3.5.2. The <B CLASS="command" >$INCLUDE</B > Directive</A ></H3 ><P >Syntax: <B CLASS="command" >$INCLUDE</B > <TT CLASS="replaceable" ><I >filename</I ></TT > [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >origin</I ></TT > </SPAN >] [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >comment</I ></TT > </SPAN >]</P ><P >Read and process the file <TT CLASS="filename" >filename</TT > as if it were included into the file at this point. If <B CLASS="command" >origin</B > is specified the file is processed with <B CLASS="command" >$ORIGIN</B > set to that value, otherwise the current <B CLASS="command" >$ORIGIN</B > is used.</P ><P >The origin and the current domain name revert to the values they had prior to the <B CLASS="command" >$INCLUDE</B > once the file has been read.</P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B > RFC 1035 specifies that the current origin should be restored after an <B CLASS="command" >$INCLUDE</B >, but it is silent on whether the current domain name should also be restored. BIND 9 restores both of them. This could be construed as a deviation from RFC 1035, a feature, or both. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="AEN4115" >6.3.5.3. The <B CLASS="command" >$TTL</B > Directive</A ></H3 ><P >Syntax: <B CLASS="command" >$TTL</B > <TT CLASS="replaceable" ><I >default-ttl</I ></TT > [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >comment</I ></TT > </SPAN >]</P ><P >Set the default Time To Live (TTL) for subsequent records with undefined TTLs. Valid TTLs are of the range 0-2147483647 seconds.</P ><P ><B CLASS="command" >$TTL</B > is defined in RFC 2308.</P ></DIV ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN4126" >6.3.6. <SPAN CLASS="acronym" >BIND</SPAN > Master File Extension: the <B CLASS="command" >$GENERATE</B > Directive</A ></H2 ><P >Syntax: <B CLASS="command" >$GENERATE</B > <TT CLASS="replaceable" ><I >range</I ></TT > <TT CLASS="replaceable" ><I >lhs</I ></TT > <TT CLASS="replaceable" ><I >type</I ></TT > <TT CLASS="replaceable" ><I >rhs</I ></TT > [<SPAN CLASS="optional" > <TT CLASS="replaceable" ><I >comment</I ></TT > </SPAN >]</P ><P ><B CLASS="command" >$GENERATE</B > is used to create a series of resource records that only differ from each other by an iterator. <B CLASS="command" >$GENERATE</B > can be used to easily generate the sets of records required to support sub /24 reverse delegations described in RFC 2317: Classless IN-ADDR.ARPA delegation.</P ><PRE CLASS="programlisting" ><TT CLASS="literal" >$ORIGIN 0.0.192.IN-ADDR.ARPA. $GENERATE 1-2 0 NS SERVER$.EXAMPLE. $GENERATE 1-127 $ CNAME $.0</TT ></PRE ><P >is equivalent to</P ><PRE CLASS="programlisting" ><TT CLASS="literal" >0.0.0.192.IN-ADDR.ARPA NS SERVER1.EXAMPLE. 0.0.0.192.IN-ADDR.ARPA NS SERVER2.EXAMPLE. 1.0.0.192.IN-ADDR.ARPA CNAME 1.0.0.0.192.IN-ADDR.ARPA 2.0.0.192.IN-ADDR.ARPA CNAME 2.0.0.0.192.IN-ADDR.ARPA ... 127.0.0.192.IN-ADDR.ARPA CNAME 127.0.0.0.192.IN-ADDR.ARPA .</TT ></PRE ><DIV CLASS="informaltable" ><A NAME="AEN4146" ></A ><P ></P ><TABLE CELLPADDING="3" BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >range</B ></P ></TD ><TD WIDTH="408" ALIGN="LEFT" VALIGN="MIDDLE" ><P >This can be one of two forms: start-stop or start-stop/step. If the first form is used then step is set to 1. All of start, stop and step must be positive.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >lhs</B ></P ></TD ><TD WIDTH="408" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >lhs</B > describes the owner name of the resource records to be created. Any single <B CLASS="command" >$</B > symbols within the <B CLASS="command" >lhs</B > side are replaced by the iterator value. To get a $ in the output you need to escape the <B CLASS="command" >$</B > using a backslash <B CLASS="command" >\</B >, e.g. <B CLASS="command" >\$</B >. The <B CLASS="command" >$</B > may optionally be followed by modifiers which change the offset from the interator, field width and base. Modifiers are introduced by a <B CLASS="command" >{</B > immediately following the <B CLASS="command" >$</B > as <B CLASS="command" >${offset[,width[,base]]}</B >. e.g. <B CLASS="command" >${-20,3,d}</B > which subtracts 20 from the current value, prints the result as a decimal in a zero padded field of with 3. Available output forms are decimal (<B CLASS="command" >d</B >), octal (<B CLASS="command" >o</B >) and hexadecimal (<B CLASS="command" >x</B > or <B CLASS="command" >X</B > for uppercase). The default modifier is <B CLASS="command" >${0,0,d}</B >. If the <B CLASS="command" >lhs</B > is not absolute, the current <B CLASS="command" >$ORIGIN</B > is appended to the name.</P > <P >For compatibility with earlier versions <B CLASS="command" >$$</B > is still recognised a indicating a literal $ in the output.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >type</B ></P ></TD ><TD WIDTH="408" ALIGN="LEFT" VALIGN="MIDDLE" ><P >At present the only supported types are PTR, CNAME, DNAME, A, AAAA and NS.</P ></TD ></TR ><TR ><TD WIDTH="84" ALIGN="LEFT" VALIGN="MIDDLE" ><P ><B CLASS="command" >rhs</B ></P ></TD ><TD WIDTH="408" ALIGN="LEFT" VALIGN="MIDDLE" ><P >rhs is a domain name. It is processed similarly to lhs.</P ></TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ><P >The <B CLASS="command" >$GENERATE</B > directive is a <SPAN CLASS="acronym" >BIND</SPAN > extension and not part of the standard zone file format.</P ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="Bv9ARM.ch05.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="Bv9ARM.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="Bv9ARM.ch07.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >The <SPAN CLASS="acronym" >BIND</SPAN > 9 Lightweight Resolver</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><SPAN CLASS="acronym" >BIND</SPAN > 9 Security Considerations</TD ></TR ></TABLE ></DIV ></BODY ></HTML >