Bv9ARM.ch06.html revision c13c404e9712a24d2ff95da9b77af8dbe76da38f
<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#AEN4028"
>Zone File</A
></DT
></DL
></DIV
><P
><SPAN
CLASS="acronym"
>BIND</SPAN
> 9 configuration is broadly similar
to <SPAN
CLASS="acronym"
>BIND</SPAN
> 8; however, there are a few new areas
of configuration, such as views. <SPAN
CLASS="acronym"
>BIND</SPAN
>
8 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"
>.</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="AEN1076"
></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 to four integers valued 0 through
255 separated 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"
>2001:ffff::200:f8ff:fe01:9742</B
>.
IPv6 scoped addresses that have ambiguity on their scope zones must be
disambiguated by an appropriate zone ID with the percent character
(`%') as delimiter.
It is strongly recommended to use string zone names rather than
numeric identifiers, in order to be robust against system
configuration changes.
However, since there is no standard mapping for such names and
identifier values, currently only interface names as link identifiers
are supported, assuming one-to-one mapping between interfaces and links.
For example, a link-local address <B
CLASS="command"
>fe80::1</B
> on the
link attached to the interface <B
CLASS="command"
>ne0</B
>
can be specified as <B
CLASS="command"
>fe80::1%ne0</B
>.
Note that on most systems link-local addresses always have the
ambiguity, and need to be disambiguated.</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 use by processes running as root.
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"
> 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 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"
>.</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="AEN1241"
>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="AEN1249"
>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 in
the <B
CLASS="command"
>listen-on</B
> and <B
CLASS="command"
>sortlist</B
>
statements. 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 `/' notation)</P
></LI
><LI
><P
>a key ID, as defined by the <B
CLASS="command"
>key</B
> 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 in a sortlist,
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
>, <B
CLASS="command"
>allow-update-forwarding</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
>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"
> the 1.2.3.13 element is
completely useless because the algorithm will match any lookup for
Using <B
CLASS="command"
> 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="AEN1280"
>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
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN1285"
>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="AEN1294"
>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
>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 sub-statements, which are also
terminated with a semicolon.</P
><P
>The following statements are supported:</P
><DIV
CLASS="informaltable"
><A
NAME="AEN1318"
></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"
>lwres</B
></P
></TD
><TD
WIDTH="363"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>configures <B
CLASS="command"
>named</B
> to
also act as a light weight resolver daemon (<B
CLASS="command"
>lwresd</B
>).</P
></TD
></TR
><TR
><TD
WIDTH="128"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
><B
CLASS="command"
>masters</B
></P
></TD
><TD
WIDTH="363"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>defines a named masters list for
inclusion in stub and slave zone masters clauses.</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="AEN1401"
>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="AEN1414"
></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 and IPv6 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 or IPv6 network
for which the system has an interface.
Some systems do not provide a way to determine the prefix lengths of
local IPv6 addresses.
In such a case, <B
CLASS="command"
>localnets</B
> only matches the local
IPv6 addresses, just like <B
CLASS="command"
>localhost</B
>.
</P
></TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN1445"
>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 control the
operation of the name server. These control channels are
used by the <B
CLASS="command"
>rndc</B
> utility to send commands to
and retrieve non-DNS results from a name server.</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
> If no port is specified, port 953
is used. "<TT
CLASS="literal"
>*</TT
>" cannot be used for
<B
CLASS="command"
>ip_port</B
>.</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
<B
CLASS="command"
>address_match_list</B
>. This is for simple
IP address based filtering only; any <B
CLASS="command"
>key_id</B
>
elements of the <B
CLASS="command"
>address_match_list</B
> are
ignored.
</P
><P
>The primary authorization mechanism of the command
channel is the <B
CLASS="command"
>key_list</B
>, which contains
a list of <B
CLASS="command"
>key_id</B
>s.
Each <B
CLASS="command"
>key_id</B
> in
the <B
CLASS="command"
>key_list</B
> is authorized to execute
commands over the control channel.
See <A
HREF="Bv9ARM.ch03.html#rndc"
>Remote Name Daemon Control application</A
> in
<A
HREF="Bv9ARM.ch03.html#admin_tools"
>Section 3.3.1.2</A
>) for information about
configuring keys in <B
CLASS="command"
>rndc</B
>.</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="AEN1524"
>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="AEN1529"
>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 where 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 the name server.</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN1536"
>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="AEN1543"
>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.5</A
>)
or the command channel
(see <A
HREF="Bv9ARM.ch06.html#controls_statement_definition_and_usage"
>Section 6.2.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 <B
CLASS="command"
>server</B
>
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="AEN1563"
>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="AEN1603"
>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 name server. 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 default { default_syslog; default_debug; };
category unmatched { null; };
};
</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="AEN1619"
>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
><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 debug 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 {
// 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 {
stderr; // writes to 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="AEN1743"
></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"
>update-security</B
></P
></TD
><TD
WIDTH="322"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>Approval and denial of update requests.</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
>Specify where queries should be logged to.</P
>
<P
> At startup, specifing the category <B
CLASS="command"
>queries</B
> will also
enable query logging unless <B
CLASS="command"
>querylog</B
> option has been
specified.
</P
>
<P
> The query log entry reports the client's IP address and port number. The
query name, class and type. It also reports whether the Recursion Desired
flag was set (+ if set, - if not set), EDNS was in use (E) or if the
query was signed (S).</P
>
<PRE
CLASS="programlisting"
><TT
CLASS="computeroutput"
>client 127.0.0.1#62536: query: www.example.com IN AAAA +SE</TT
>
<TT
CLASS="computeroutput"
>client ::1#62537: query: www.example.net IN AAAA -SE</TT
>
</PRE
>
</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
><TR
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
><B
CLASS="command"
>delegation-only</B
></P
></TD
><TD
WIDTH="322"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>Delegation only. Logs queries that have have
been forced to NXDOMAIN as the result of a delegation-only zone or
a <B
CLASS="command"
>delegation-only</B
> in a hint or stub zone declaration.
</P
></TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN1873"
>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="AEN1897"
>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"
>. 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"
>. 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="AEN1916"
>6.2.13. <B
CLASS="command"
>masters</B
> Statement Grammar</A
></H2
><PRE
CLASS="programlisting"
> <B
CLASS="command"
>masters</B
> <TT
CLASS="replaceable"
><I
>name</I
></TT
> [<SPAN
CLASS="optional"
>port <TT
CLASS="replaceable"
><I
>ip_port</I
></TT
></SPAN
>] { ( <TT
CLASS="replaceable"
><I
>masters_list</I
></TT
> | <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
>] } ;
</PRE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN1931"
>6.2.14. <B
CLASS="command"
>masters</B
> Statement Definition and Usage</A
></H2
><P
><B
CLASS="command"
>masters</B
> lists allow for a common set of masters
to be easily used by multiple stub and slave zones.</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN1936"
>6.2.15. <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"
> hostname <TT
CLASS="replaceable"
><I
>hostname_string</I
></TT
>; </SPAN
>]
[<SPAN
CLASS="optional"
> server-id <TT
CLASS="replaceable"
><I
>server_id_string</I
></TT
>; </SPAN
>]
[<SPAN
CLASS="optional"
> directory <TT
CLASS="replaceable"
><I
>path_name</I
></TT
>; </SPAN
>]
[<SPAN
CLASS="optional"
> key-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"
> flush-zones-on-shutdown <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
> | <TT
CLASS="replaceable"
><I
>master-only</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"
> dnssec-enable <TT
CLASS="replaceable"
><I
>yes_or_no</I
></TT
>; </SPAN
>]
[<SPAN
CLASS="optional"
> dnssec-lookaside <TT
CLASS="replaceable"
><I
>domain</I
></TT
> trust-anchor <TT
CLASS="replaceable"
><I
>domain</I
></TT
>; </SPAN
>]
[<SPAN
CLASS="optional"
> dnssec-must-be-secure <TT
CLASS="replaceable"
><I
>domain 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"
> dual-stack-servers [<SPAN
CLASS="optional"
>port <TT
CLASS="replaceable"
><I
>ip_port</I
></TT
></SPAN
>] { ( <TT
CLASS="replaceable"
><I
>domain_name</I
></TT
> [<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
>]
[<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-update-forwarding { <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"
> avoid-v4-udp-ports { <TT
CLASS="replaceable"
><I
>port_list</I
></TT
> }; </SPAN
>]
[<SPAN
CLASS="optional"
> avoid-v6-udp-ports { <TT
CLASS="replaceable"
><I
>port_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 ( ( <TT
CLASS="replaceable"
><I
>ip4_addr</I
></TT
> | <TT
CLASS="replaceable"
><I
>*</I
></TT
> ) [<SPAN
CLASS="optional"
> port ( <TT
CLASS="replaceable"
><I
>ip_port</I
></TT
> | <TT
CLASS="replaceable"
><I
>*</I
></TT
> ) </SPAN
>] | [<SPAN
CLASS="optional"
> address ( <TT
CLASS="replaceable"
><I
>ip4_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 ( ( <TT
CLASS="replaceable"
><I
>ip6_addr</I
></TT
> | <TT
CLASS="replaceable"
><I
>*</I
></TT
> ) [<SPAN
CLASS="optional"
> port ( <TT
CLASS="replaceable"
><I
>ip_port</I
></TT
> | <TT
CLASS="replaceable"
><I
>*</I
></TT
> ) </SPAN
>] | [<SPAN
CLASS="optional"
> address ( <TT
CLASS="replaceable"
><I
>ip6_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"
> tcp-listen-queue <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"
> alt-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"
> alt-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"
> use-alt-transfer-source <TT
CLASS="replaceable"
><I
>yes_or_no</I
></TT
>; </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"
> max-journal-size <TT
CLASS="replaceable"
><I
>size_spec</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
>]
[<SPAN
CLASS="optional"
> preferred-glue ( <TT
CLASS="replaceable"
><I
>A</I
></TT
> | <TT
CLASS="replaceable"
><I
>AAAA</I
></TT
> | <TT
CLASS="replaceable"
><I
>NONE</I
></TT
> ); </SPAN
>]
[<SPAN
CLASS="optional"
> edns-udp-size <TT
CLASS="replaceable"
><I
>number</I
></TT
>; </SPAN
>]
[<SPAN
CLASS="optional"
> root-delegation-only [<SPAN
CLASS="optional"
> exclude { <TT
CLASS="replaceable"
><I
>namelist</I
></TT
> } </SPAN
>] ; </SPAN
>]
[<SPAN
CLASS="optional"
> querylog <TT
CLASS="replaceable"
><I
>yes_or_no</I
></TT
> ; </SPAN
>]
};
[<SPAN
CLASS="optional"
> disable-algorithms <TT
CLASS="replaceable"
><I
>domain</I
></TT
> { <TT
CLASS="replaceable"
><I
>algorithm</I
></TT
>; [<SPAN
CLASS="optional"
> <TT
CLASS="replaceable"
><I
>algorithm</I
></TT
>; </SPAN
>] }; </SPAN
>]
</PRE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="options"
>6.2.16. <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 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"
>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"
>key-directory</B
></DT
><DD
><P
>When performing dynamic update of secure zones, the
directory where the public and private key files should be found,
if different than the current working directory. The directory specified
must 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
></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"
>.
The pid-file is used by programs that want to send signals to the running
name server. Specifying <B
CLASS="command"
>pid-file none</B
> disables the
use of a PID file — no file will be written and any
existing one will be removed. Note that <B
CLASS="command"
>none</B
>
is a keyword, not a file name, and therefore is not enclosed in
double quotes.</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.16.17</A
></P
></DD
><DT
><B
CLASS="command"
>port</B
></DT
><DD
><P
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"
>
(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
><DT
><B
CLASS="command"
>preferred-glue</B
></DT
><DD
><P
> If specified the listed type (A or AAAA) will be emitted before other glue
in the additional section of a query response.
The default is not to preference any type (NONE).
</P
></DD
><DT
><B
CLASS="command"
>root-delegation-only</B
></DT
><DD
><P
> Turn on enforcement of delegation-only in TLDs and root zones with an optional
exclude list.
</P
><P
> Note some TLDs are NOT delegation only (e.g. "DE", "LV", "US" and "MUSEUM").
</P
><PRE
CLASS="programlisting"
> options {
root-delegation-only exclude { "de"; "lv"; "us"; "museum"; };
};
</PRE
></DD
><DT
><B
CLASS="command"
>disable-algorithms</B
></DT
><DD
><P
> Disable the specified DNSSEC algorithms at and below the specified name.
Multiple <B
CLASS="command"
>disable-algorithms</B
> statements are allowed.
Only the most specific will be applied.
</P
></DD
><DT
><B
CLASS="command"
>dnssec-lookaside</B
></DT
><DD
><P
> When set <B
CLASS="command"
>dnssec-lookaside</B
> provides the
validator with an alternate method to validate DNSKEY records at the
top of a zone. When a DNSKEY is at or below a domain specified by the
deepest <B
CLASS="command"
>dnssec-lookaside</B
>, and the normal dnssec validation
has left the key untrusted, the trust-anchor will be append to the key
name and a DLV record will be looked up to see if it can validate the
key. If the DLV record validates a DNSKEY (similarly to the way a DS
record does) the DNSKEY RRset is deemed to be trusted.
</P
></DD
><DT
><B
CLASS="command"
>dnssec-must-be-secure</B
></DT
><DD
><P
> Specify heirachies which must / may not be secure (signed and validated).
If <TT
CLASS="userinput"
><B
>yes</B
></TT
> then named will only accept answers if they
are secure.
If <TT
CLASS="userinput"
><B
>no</B
></TT
> then normal dnssec validation applies
allowing for insecure answers to be accepted.
The specified domain must be under a <B
CLASS="command"
>trusted-key</B
> or
<B
CLASS="command"
>dnssec-lookaside</B
> must be active.
</P
></DD
></DL
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="boolean_options"
>6.2.16.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 (default). This should 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.
The set of servers to which NOTIFY is sent can be controlled by
<B
CLASS="command"
>notify</B
> and <B
CLASS="command"
>also-notify</B
>.</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 sends 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
><DIV
CLASS="informaltable"
><A
NAME="AEN2401"
></A
><P
></P
><TABLE
CELLPADDING="3"
BORDER="1"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>dialup mode</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>normal refresh</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>heart-beat refresh</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>heart-beat notify</P
></TD
></TR
><TR
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
><B
CLASS="command"
>no</B
> (default)</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>yes</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>no</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>no</P
></TD
></TR
><TR
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
><B
CLASS="command"
>yes</B
></P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>no</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>yes</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>yes</P
></TD
></TR
><TR
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
><B
CLASS="command"
>notify</B
></P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>yes</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>no</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>yes</P
></TD
></TR
><TR
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
><B
CLASS="command"
>refresh</B
></P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>no</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>yes</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>no</P
></TD
></TR
><TR
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
><B
CLASS="command"
>passive</B
></P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>no</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>no</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>no</P
></TD
></TR
><TR
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
><B
CLASS="command"
>notify-passive</B
></P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>no</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>no</P
></TD
><TD
WIDTH="110"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>yes</P
></TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
><P
>Note that normal NOTIFY processing is not affected by
<B
CLASS="command"
>dialup</B
>.</P
></DD
><DT
><B
CLASS="command"
>fake-iquery</B
></DT
><DD
><P
>In <SPAN
CLASS="acronym"
>BIND</SPAN
> 8, this option
enabled 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"
>flush-zones-on-shutdown</B
></DT
><DD
><P
>When the nameserver exits due receiving SIGTERM,
flush / do not flush any pending zone writes. The default is
<B
CLASS="command"
>flush-zones-on-shutdown</B
> <TT
CLASS="userinput"
><B
>no</B
></TT
>.
</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 name server 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 have 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.ch04.html#notify"
>Section 4.1</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
>master-only</B
></TT
>, notifies are only sent
for master zones.
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 collect
statistical data on all zones (unless specifically turned off
on a per-zone basis by specifying <B
CLASS="command"
>zone-statistics no</B
>
in the <B
CLASS="command"
>zone</B
> statement). 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.16.17</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.18</A
>. See also
<A
HREF="Bv9ARM.ch04.html#incremental_zone_transfers"
>Section 4.3</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.18</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.18</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
>"
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 and AAAA) for <TT
CLASS="literal"
>mail.example.net</TT
> will be provided as well,
if known, even though they are not in the example.com zone.
Setting these options to <B
CLASS="command"
>no</B
> disables this behavior and makes
the server only search for additional data in the zone it answers from.
</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
><DT
><B
CLASS="command"
>ixfr-from-differences</B
></DT
><DD
><P
> When 'yes' and the server loads a new version of a master
zone from its zone file or receives a new version of a slave
file by a non-incremental zone transfer, it will compare
the new version to the previous one and calculate a set
of differences. The differences are then logged in the
zone's journal file such that the changes can be transmitted
to downstream slaves as an incremental zone transfer.
</P
><P
> By allowing incremental zone transfers to be used for
non-dynamic zones, this option saves bandwidth at the
expense of increased CPU and memory consumption at the master.
In particular, if the new version of a zone is completely
different from the previous one, the set of differences
will be of a size comparable to the combined size of the
old and new zone version, and the server will need to
temporarily allocate memory to hold this complete
difference set.
</P
></DD
><DT
><B
CLASS="command"
>multi-master</B
></DT
><DD
><P
> This should be set when you have multiple masters for a zone and the
addresses refer to different machines. If 'yes' named will not log
when the serial number on the master is less than what named currently
has. The default is <TT
CLASS="userinput"
><B
>no</B
></TT
>.
</P
></DD
><DT
><B
CLASS="command"
>dnssec-enable</B
></DT
><DD
><P
> Enable DNSSEC support in named. Unless set to <TT
CLASS="userinput"
><B
>yes</B
></TT
>
named behaves as if it does not support DNSSEC.
The default is <TT
CLASS="userinput"
><B
>no</B
></TT
>.
</P
></DD
><DT
><B
CLASS="command"
>querylog</B
></DT
><DD
><P
> Specify whether query logging should be started when named start.
If <B
CLASS="command"
>querylog</B
> is not specified then the query logging
is determined by the presence of the logging category <B
CLASS="command"
>queries</B
>.
</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN2681"
>6.2.16.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
name servers. 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"
> behavior,
or not forward at all, see <A
HREF="Bv9ARM.ch06.html#zone_statement_grammar"
>Section 6.2.23</A
>.</P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN2700"
>6.2.16.3. 6 to 4 Servers</A
></H3
><P
>6 to 4 servers are used as servers of last resort to work around
problems in reachability due the lack of support for either IPv4 or IPv6
on the host machine.</P
><P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><B
CLASS="command"
>dual-stack-servers</B
></DT
><DD
><P
>Specifies host names / addresses of machines with access to
both IPv4 and IPv6 transports. If a hostname is used the server must be able
to resolve the name using only the transport it has. If the machine is dual
stacked then the <B
CLASS="command"
>dual-stack-servers</B
> have no effect unless
access to a transport has been disabled on the command line
(e.g. <B
CLASS="command"
>named -4</B
>).</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="access_control"
>6.2.16.4. 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 this server, a slave, of zone changes 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 DNS 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-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"
>allow-v6-synthesis</B
></DT
><DD
><P
>This option was introduced for the smooth transition from AAAA
to A6 and from "nibble labels" to binary labels.
However, since both A6 and binary labels were then deprecated,
this option was also deprecated.
It is now ignored with some warning messages.
</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="AEN2767"
>6.2.16.5. 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; };
</PRE
><P
>will enable the name server 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 interfaces and the ports on which the server will listen
for incoming queries sent using IPv6.</P
><P
>When <PRE
CLASS="programlisting"
>{ any; }</PRE
> is specified
as the <TT
CLASS="varname"
>address_match_list</TT
> for the
<B
CLASS="command"
>listen-on-v6</B
> option,
the server does not bind a separate socket to each IPv6 interface
address as it does for IPv4 if the operating system has enough API
support for IPv6 (specifically if it conforms to RFC 3493 and RFC 3542).
Instead, it listens on the IPv6 wildcard address.
If the system only has incomplete API support for IPv6, however,
the behavior is the same as that for IPv4.</P
><P
>A list of particular IPv6 addresses can also be specified, in which case
the server listens on a separate socket for each specified address,
regardless of whether the desired API is supported by the system.</P
><P
>Multiple <B
CLASS="command"
>listen-on-v6</B
> options can be used.
For example,</P
><PRE
CLASS="programlisting"
>listen-on-v6 { any; };
listen-on-v6 port 1234 { !3ffe::/16; any; };
</PRE
><P
>will enable the name server on port 53 for any IPv6 addresses
(with a single wildcard socket),
and on port 1234 of IPv6 addresses that is not in the prefix
3ffe::/16 (with separate sockets for each matched address.)</P
><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
> option is specified,
the server will not listen on any IPv6 address.</P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN2794"
>6.2.16.6. Query Address</A
></H3
><P
>If the server doesn't know the answer to a question, it will
query other name servers. <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, <B
CLASS="command"
>avoid-v4-udp-ports</B
>
and <B
CLASS="command"
>avoid-v6-udp-ports</B
> can be used to prevent named
from selecting certain ports. 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
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>See also <B
CLASS="command"
>transfer-source</B
> and
<B
CLASS="command"
>notify-source</B
>.</P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="zone_transfers"
>6.2.16.7. 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). The maximum value is 28 days (40320 minutes).</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). The maximum value is 28 days (40320 minutes).</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). The maximum value is 28 days (40320 minutes).</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). The maximum value is 28 days (40320 minutes).</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 name server.
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 name server. <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"
>alt-transfer-source</B
></DT
><DD
><P
>An alternate transfer source if the one listed in
<B
CLASS="command"
>transfer-source</B
> fails and
<B
CLASS="command"
>use-alt-transfer-source</B
> is set.</P
></DD
><DT
><B
CLASS="command"
>alt-transfer-source-v6</B
></DT
><DD
><P
>An alternate transfer source if the one listed in
<B
CLASS="command"
>transfer-source-v6</B
> fails and
<B
CLASS="command"
>use-alt-transfer-source</B
> is set.</P
></DD
><DT
><B
CLASS="command"
>use-alt-transfer-source</B
></DT
><DD
><P
>Use the alternate transfer sources or not. If views are
specified this defaults to <B
CLASS="command"
>no</B
> otherwise it defaults to
<B
CLASS="command"
>yes</B
> (for BIND 8 compatibility).</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="AEN2960"
>6.2.16.8. Bad UDP Port Lists</A
></H3
><P
> <B
CLASS="command"
>avoid-v4-udp-ports</B
> and <B
CLASS="command"
>avoid-v6-udp-ports</B
>
specify a list of IPv4 and IPv6 UDP ports that will not be used as system
assigned source ports for UDP sockets. These lists prevent named
from choosing as its random source port a port that is blocked by
your firewall. If a query went out with such a source port, the
answer would not get by the firewall and the name server would have
to query again.
</P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN2965"
>6.2.16.9. 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="AEN3002"
>6.2.16.10. 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. The option
<B
CLASS="command"
>max-journal-size</B
> performs a similar
function in BIND 8.
</P
></DD
><DT
><B
CLASS="command"
>max-journal-size</B
></DT
><DD
><P
>Sets a maximum size for each journal file
(<A
HREF="Bv9ARM.ch04.html#journal"
>Section 4.2.1</A
>). When the journal file approaches
the specified size, some of the oldest transactions in the journal
will be automatically removed. The default is
<TT
CLASS="literal"
>unlimited</TT
>.</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
><DT
><B
CLASS="command"
>tcp-listen-queue</B
></DT
><DD
><P
>The listen queue depth. The default and minimum is 3.
If the kernel supports the accept filter "dataready" this also controls how
many TCP connections that will be queued in kernel space waiting for
some data before being passed to accept. Values less than 3 will be
silently raised.
</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN3043"
>6.2.16.11. 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. The maximum value is 28 days (40320 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). The maximum value is 28 days (40320 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. The maximum value is 28 days (40320 minutes).
If set to 0, interface scanning will only occur when
the configuration file is loaded. After the scan, the server will
begin listening for queries on any newly discovered
interfaces (provided they are allowed by the
<B
CLASS="command"
>listen-on</B
> configuration), and will
stop listening on interfaces that have gone away.</P
></DD
><DT
><B
CLASS="command"
>statistics-interval</B
></DT
><DD
><P
>Name server statistics will be logged
every <B
CLASS="command"
>statistics-interval</B
> minutes. The default is
60. The maximum value is 28 days (40320 minutes).
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.16.12. Topology</A
></H3
><P
>All other things being equal, when the server chooses a name server
to query from a list of name servers, 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;
};</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.16.13. 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.16.14</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 name servers, 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.16.12</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
or
and
their directly connected networks.</P
><PRE
CLASS="programlisting"
>sortlist {
{ localhost; // IF the local host
{ localnets; // THEN first fit on the
};
};</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.16.14. 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.16.13</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="AEN3131"
></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 fully implemented in <SPAN
CLASS="acronym"
>BIND</SPAN
> 9.
BIND 9 currently does not support "fixed" ordering.
</P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="tuning"
>6.2.16.15. 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 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.2</A
>)
will expire. The default is <TT
CLASS="literal"
>30</TT
> days.
The maximum value is 10 years (3660 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
><DT
><B
CLASS="command"
>edns-udp-size</B
></DT
><DD
><P
> <B
CLASS="command"
>edns-udp-size</B
> sets the advertised EDNS UDP buffer
size. Valid values are 512 to 4096 (values outside this range will be
silently adjusted). The default value is 4096. The usual reason for
setting edns-udp-size to a non default value it to get UDP answers to
block UDP packets that are greater than 512 bytes.
</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="builtin"
>6.2.16.16. Built-in server information zones</A
></H3
><P
>The server provides some helpful diagnostic information
through a number of built-in zones under the
pseudo-top-level-domain <TT
CLASS="literal"
>bind</TT
> in the
<B
CLASS="command"
>CHAOS</B
> class. These zones are part of a
built-in view (see <A
HREF="Bv9ARM.ch06.html#view_statement_grammar"
>Section 6.2.21</A
>) of class
<B
CLASS="command"
>CHAOS</B
> which is separate from the default view of
class <B
CLASS="command"
>IN</B
>; therefore, any global server options
such as <B
CLASS="command"
>allow-query</B
> do not apply the these zones.
If you feel the need to disable these zones, use the options
below, or hide the built-in <B
CLASS="command"
>CHAOS</B
> view by
defining an explicit view of class <B
CLASS="command"
>CHAOS</B
>
that matches all clients.</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 the name <TT
CLASS="literal"
>version.bind</TT
>
with type <B
CLASS="command"
>TXT</B
>, class <B
CLASS="command"
>CHAOS</B
>.
The default is the real version number of this server.
Specifying <B
CLASS="command"
>version none</B
>
disables processing of the queries.</P
></DD
><DT
><B
CLASS="command"
>hostname</B
></DT
><DD
><P
>The hostname the server should report via a query of
the name <TT
CLASS="filename"
>hostname.bind</TT
>
with type <B
CLASS="command"
>TXT</B
>, class <B
CLASS="command"
>CHAOS</B
>.
This defaults to the hostname of the machine hosting the name server as
found by gethostname(). The primary purpose of such queries is to
identify which of a group of anycast servers is actually
answering your queries. Specifying <B
CLASS="command"
>hostname none;</B
>
disables processing of the queries.</P
></DD
><DT
><B
CLASS="command"
>server-id</B
></DT
><DD
><P
>The ID of the server should report via a query of
the name <TT
CLASS="filename"
>ID.SERVER</TT
>
with type <B
CLASS="command"
>TXT</B
>, class <B
CLASS="command"
>CHAOS</B
>.
The primary purpose of such queries is to
identify which of a group of anycast servers is actually
answering your queries. Specifying <B
CLASS="command"
>server-id none;</B
>
disables processing of the queries.
Specifying <B
CLASS="command"
>server-id hostname;</B
> will cause named to
use the hostname as found by gethostname().
The default <B
CLASS="command"
>server-id</B
> is <B
CLASS="command"
>none</B
>.
</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="statsfile"
>6.2.16.17. 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="AEN3275"
></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 with at least
one answer RR.</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"
>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
><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
></TBODY
></TABLE
><P
></P
></DIV
><P
> Each query received by the server will cause exactly one of
<B
CLASS="command"
>success</B
>,
<B
CLASS="command"
>referral</B
>,
<B
CLASS="command"
>nxrrset</B
>,
<B
CLASS="command"
>nxdomain</B
>, or
<B
CLASS="command"
>failure</B
>
to be incremented, and may additionally cause the
<B
CLASS="command"
>recursion</B
> counter to be incremented.
</P
></DIV
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="server_statement_grammar"
>6.2.17. <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
>]
[<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
>]
};
</PRE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="server_statement_definition_and_usage"
>6.2.18. <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 name server.</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 non-incremental. 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 identifies a
<B
CLASS="command"
>key_id</B
> defined by the <B
CLASS="command"
>key</B
> statement,
to be used for transaction security (TSIG, <A
HREF="Bv9ARM.ch04.html#tsig"
>Section 4.5</A
>)
when talking to the remote server.
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
><P
>The <B
CLASS="command"
>transfer-source</B
> and
<B
CLASS="command"
>transfer-source-v6</B
> clauses specify the IPv4 and IPv6 source
address to be used for zone transfer with the remote server, respectively.
For an IPv4 remote server, only <B
CLASS="command"
>transfer-source</B
> can
be specified.
Similarly, for an IPv6 remote server, only
<B
CLASS="command"
>transfer-source-v6</B
> can be specified.
Form more details, see the description of
<B
CLASS="command"
>transfer-source</B
> and
<B
CLASS="command"
>transfer-source-v6</B
> in
<A
HREF="Bv9ARM.ch06.html#zone_transfers"
>Section 6.2.16.7</A
>.</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN3414"
>6.2.19. <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="AEN3430"
>6.2.20. <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.8</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 because 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="view_statement_grammar"
>6.2.21. <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"
> <TT
CLASS="replaceable"
><I
>zone_statement</I
></TT
>; ...</SPAN
>]
};
</PRE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN3452"
>6.2.22. <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. In addition to checking IP addresses
<B
CLASS="command"
>match-clients</B
> and <B
CLASS="command"
>match-destinations</B
>
can also take <B
CLASS="command"
>keys</B
> which provide an mechanism for the
client to select the view. 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. 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, and the <B
CLASS="command"
>options</B
> statement will
apply to the 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 all clients not matched by the previous view.
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.23. <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 | delegation-only ) ;
[<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"
> delegation-only <TT
CLASS="replaceable"
><I
>yes_or_no</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
>masters_list</I
></TT
> | <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
> | <TT
CLASS="replaceable"
><I
>master-only</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"
> alt-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"
> alt-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"
> use-alt-transfer-source <TT
CLASS="replaceable"
><I
>yes_or_no</I
></TT
>; </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
CLASS="optional"
> multi-master <TT
CLASS="replaceable"
><I
>yes_or_no</I
></TT
> ; </SPAN
>]
[<SPAN
CLASS="optional"
> key-directory <TT
CLASS="replaceable"
><I
>path_name</I
></TT
>; </SPAN
>]
}</SPAN
>];
</PRE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN3627"
>6.2.24. <B
CLASS="command"
>zone</B
> Statement Definition and Usage</A
></H2
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN3630"
>6.2.24.1. Zone Types</A
></H3
><DIV
CLASS="informaltable"
><A
NAME="AEN3632"
></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.
Masters list elements can also be names of other masters lists.
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"
> 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 100 000 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
RFC1981 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
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 re-specify 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 name servers is
specified using a "hint zone". When the server starts up, it uses
the root hints to find a root name server and get the most recent
list of root name servers. 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
><TR
><TD
WIDTH="87"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
><TT
CLASS="varname"
>delegation-only</TT
></P
></TD
><TD
WIDTH="405"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>This is used to enforce the delegation only
status of infrastructure zones (e.g. COM, NET, ORG). Any answer that
is received without a explicit or implicit delegation in the authority
section will be treated as NXDOMAIN. This does not apply to the zone
apex. This SHOULD NOT be applied to leaf zones.</P
>
<P
><TT
CLASS="varname"
>delegation-only</TT
> has no effect on answers received
from forwarders.</P
></TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN3695"
>6.2.24.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="AEN3705"
>6.2.24.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.16.4</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.16.4</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.16.4</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. Note that allowing updates based
on the requestor's IP address is insecure; see
<A
HREF="Bv9ARM.ch07.html#dynamic_update_security"
>Section 7.3</A
> for details.
</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.24.4</A
>.</P
></DD
><DT
><B
CLASS="command"
>allow-update-forwarding</B
></DT
><DD
><P
>See the description of <B
CLASS="command"
>allow-update-forwarding</B
>
in <A
HREF="Bv9ARM.ch06.html#access_control"
>Section 6.2.16.4</A
>.</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 name servers (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 is used to restrict the character set and syntax of
network.
</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.16.1</A
>.</P
></DD
><DT
><B
CLASS="command"
>delegation-only</B
></DT
><DD
><P
>The flag only applies to hint and stub zones. If set
to <TT
CLASS="userinput"
><B
>yes</B
></TT
> then the zone will also be treated as if it
is also a delegation-only type zone.
</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.16.7</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.16.7</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.16.7</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.16.7</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.16.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 load 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.16.15</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.16.7</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.16.7</A
>
</P
></DD
><DT
><B
CLASS="command"
>alt-transfer-source</B
></DT
><DD
><P
>See the description of
<B
CLASS="command"
>alt-transfer-source</B
> in <A
HREF="Bv9ARM.ch06.html#zone_transfers"
>Section 6.2.16.7</A
>
</P
></DD
><DT
><B
CLASS="command"
>alt-transfer-source-v6</B
></DT
><DD
><P
>See the description of
<B
CLASS="command"
>alt-transfer-source-v6</B
> in <A
HREF="Bv9ARM.ch06.html#zone_transfers"
>Section 6.2.16.7</A
>
</P
></DD
><DT
><B
CLASS="command"
>use-alt-transfer-source</B
></DT
><DD
><P
>See the description of
<B
CLASS="command"
>use-alt-transfer-source</B
> in <A
HREF="Bv9ARM.ch06.html#zone_transfers"
>Section 6.2.16.7</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.16.7</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.16.7</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.16.15</A
>.
</P
></DD
><DT
><B
CLASS="command"
>ixfr-from-differences</B
></DT
><DD
><P
>See the description of
<B
CLASS="command"
>ixfr-from-differences</B
> in <A
HREF="Bv9ARM.ch06.html#boolean_options"
>Section 6.2.16.1</A
>.</P
></DD
><DT
><B
CLASS="command"
>key-directory</B
></DT
><DD
><P
>See the description of
<B
CLASS="command"
>key-directory</B
> in <A
HREF="Bv9ARM.ch06.html#options"
>Section 6.2.16</A
></P
></DD
><DT
><B
CLASS="command"
>multi-master</B
></DT
><DD
><P
>See the description of
<B
CLASS="command"
>multi-master</B
> in <A
HREF="Bv9ARM.ch06.html#boolean_options"
>Section 6.2.16.1</A
>.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="dynamic_update_policies"
>6.2.24.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 in accordance with the nametype field, and the type matches
the types specified in the type field.</P
><P
>The identity field specifies a name or a wildcard name. Normally, this
is the name of the TSIG or SIG(0) key used to sign the update request. When a
TKEY exchange has been used to create a shared secret, the identity of the
shared secret is the same as the identity of the key used to authenticate the
TKEY exchange. When the <TT
CLASS="replaceable"
><I
>identity</I
></TT
> field specifies a
wildcard name, it is subject to DNS wildcard expansion, so the rule will apply
to multiple identities. The <TT
CLASS="replaceable"
><I
>identity</I
></TT
> field must
contain a fully qualified domain name.</P
><P
>The <TT
CLASS="replaceable"
><I
>nametype</I
></TT
> 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="AEN3987"
></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
>Exact-match semantics. This rule matches when the
name being updated is identical to the contents of the
<TT
CLASS="replaceable"
><I
>name</I
></TT
> 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
>This rule matches when the name being updated
is a subdomain of, or identical to, the contents of the
<TT
CLASS="replaceable"
><I
>name</I
></TT
> field.</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
>The <TT
CLASS="replaceable"
><I
>name</I
></TT
> field is
subject to DNS wildcard expansion, and this rule matches when the name
being updated name is a valid expansion of the wildcard.</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
>This rule matches when the name being updated
matches the contents of the <TT
CLASS="replaceable"
><I
>identity</I
></TT
> field.
The <TT
CLASS="replaceable"
><I
>name</I
></TT
> field is ignored, but should be
the same as the <TT
CLASS="replaceable"
><I
>identity</I
></TT
> field. The
<TT
CLASS="varname"
>self</TT
> nametype is most useful when allowing using
one key per name to update, where the key has the same name as the name
to be updated. The <TT
CLASS="replaceable"
><I
>identity</I
></TT
> would be
specified as <TT
CLASS="constant"
>*</TT
> in this case.</P
></TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
><P
>In all cases, the <TT
CLASS="replaceable"
><I
>name</I
></TT
> field must
specify a fully qualified domain name.</P
><P
>If no types are explicitly specified, this 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).
Note that when an attempt is made to delete all records associated with a
name, the rules are checked for each existing record type.
</P
></DIV
></DIV
></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="AEN4028"
>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="AEN4033"
>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 name servers, 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.16.13</A
> and <A
HREF="Bv9ARM.ch06.html#rrset_ordering"
>Section 6.2.16.14</A
>.</P
><P
>The components of a Resource Record are:</P
><DIV
CLASS="informaltable"
><A
NAME="AEN4039"
></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 record.</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 resource data. The format of the
data is type (and sometimes class) specific.</P
></TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
><P
>The following are <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>types</I
></SPAN
> of valid RRs:</P
><DIV
CLASS="informaltable"
><A
NAME="AEN4071"
></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. In the IN class, this is a
32-bit IP address. Described in RFC 1035.</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>AAAA</P
></TD
><TD
WIDTH="348"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>IPv6 address. Described in RFC 1886.</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>A6</P
></TD
><TD
WIDTH="348"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>IPv6 address. This can be a partial
address (a suffix) and an indirection to the name where the rest of the
address (the prefix) can be found. Experimental. Described in RFC 2874.</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>AFSDB</P
></TD
><TD
WIDTH="348"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>location of AFS database servers.
Experimental. Described in RFC 1183.</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>APL</P
></TD
><TD
WIDTH="348"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>address prefix list. Experimental.
Described in RFC 3123.</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.
Described in RFC 2538.</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.
Described in RFC 1035.</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>DNAME</P
></TD
><TD
WIDTH="348"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>Replaces the domain name specified with
another name to be looked up, effectively aliasing an entire
subtree of the domain name space rather than a single record
as in the case of the CNAME RR.
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.
Described in RFC 1035.</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>ISDN</P
></TD
><TD
WIDTH="348"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>representation of ISDN addresses.
Experimental. Described in RFC 1183.</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. Described in RFC 2535.</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. Described in RFC 2230.</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>LOC</P
></TD
><TD
WIDTH="348"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>for storing GPS info. Described in 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.
a 16 bit preference value (lower is better)
followed by the host name of the mail exchange.
Described in RFC 974, RFC 1035.</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. Described in RFC 2915.</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.
Described in RFC 1706.</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 name server for the
domain. Described in RFC 1035.</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.
Described in RFC 2535.</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. Described in RFC 1035.</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. Described in RFC 2163.</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>RP</P
></TD
><TD
WIDTH="348"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>information on persons responsible
for the domain. Experimental. Described in RFC 1183.</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>RT</P
></TD
><TD
WIDTH="348"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>route-through binding for hosts that
do not have their own direct wide area network addresses.
Experimental. Described in RFC 1183.</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. Described in RFC 2535.</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.
Described in RFC 1035.</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). Described in RFC 2782.</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. Described in RFC 1035.</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>WKS</P
></TD
><TD
WIDTH="348"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>information about which well known
network services, such as SMTP, that a domain supports. Historical.
</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>X25</P
></TD
><TD
WIDTH="348"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>representation of X.25 network addresses.
Experimental. Described in RFC 1183.</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="AEN4223"
></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.</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>CH</P
></TD
><TD
WIDTH="348"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
> CHAOSnet, a LAN protocol created at MIT in the mid-1970s.
Rarely used for its historical purpose, but reused for BIND's
built-in server information zones, e.g.,
<TT
CLASS="literal"
>version.bind</TT
>.
</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
>HS</P
></TD
><TD
WIDTH="348"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
> Hesiod, an information service
developed by MIT's Project Athena. It is used to share information
about various systems databases, such as users, groups, printers
and so on.
</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 name servers 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="AEN4247"
>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 name server 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="AEN4254"
></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="AEN4320"
></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="AEN4348"
>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="AEN4354"
></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="AEN4446"
></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="AEN4469"
>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="AEN4474"
></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="AEN4496"
>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="AEN4503"
>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"
></PRE
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN4523"
>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="AEN4543"
>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="AEN4554"
>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
> [<SPAN
CLASS="optional"
><TT
CLASS="replaceable"
><I
>ttl</I
></TT
></SPAN
>] [<SPAN
CLASS="optional"
><TT
CLASS="replaceable"
><I
>class</I
></TT
></SPAN
>] <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"
...
</TT
></PRE
><DIV
CLASS="informaltable"
><A
NAME="AEN4578"
></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 iterator, 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
recognized a indicating a literal $ in the output.</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
><B
CLASS="command"
>ttl</B
></P
></TD
><TD
WIDTH="408"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
><B
CLASS="command"
>ttl</B
> specifies the
ttl of the generated records. If not specified this will be
inherited using the normal ttl inheritance rules.</P
>
<P
><B
CLASS="command"
>class</B
> and <B
CLASS="command"
>ttl</B
> can be
entered in either order.</P
></TD
></TR
><TR
><TD
WIDTH="84"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
><B
CLASS="command"
>class</B
></P
></TD
><TD
WIDTH="408"
ALIGN="LEFT"
VALIGN="MIDDLE"
><P
><B
CLASS="command"
>class</B
> specifies the
class of the generated records. This must match the zone class if
it is specified.</P
>
<P
><B
CLASS="command"
>class</B
> and <B
CLASS="command"
>ttl</B
> can be
entered in either order.</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
><P
>BIND 8 does not support the optional TTL and CLASS fields.</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
>