master.html revision 9c3531d72aeaad6c5f01efe6a1c82023e1379e4d
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--
- Copyright (C) 1999, 2000 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- SOFTWARE.
-->
<!-- $Id: master.html,v 1.3 2000/06/22 21:54:10 tale Exp $ -->
<HTML>
<HEAD>
<TITLE>Master File Format</TITLE>
</HEAD>
<BODY>
<H2>BIND Configuration Guide -- Master File Format</H2>
<HR>
<P>
The Master File Format was initially defined in
and has subsequently been extended.
<P>
While the Master File Format is class independent all records in a
Master File must be of the same class.
<H3>Master File Directives</H3>
<H4>$ORIGIN</H4>
Syntax: <CODE>$ORIGIN <domain-name> [<comment>]</CODE>
<P>
<CODE>$ORIGIN</CODE> set the domain name that will be appended to any
unqualified records.
When a zone is first read in there is an implict <CODE>$ORIGIN</CODE>
<zone-name>.
The current <CODE>$ORIGIN</CODE> is appended to the domain specified in the
<CODE>$ORIGIN</CODE> argument if it is not absolute.
<PRE>
$ORIGIN EXAMPLE.
$ORIGIN MYZONE
WWW CNAME MAIN-SERVER
</PRE>
is equivlent to
<PRE>
</PRE>
<H4>$INCLUDE</H4>
Syntax: <CODE>$INCLUDE <filename> [<origin>] [<comment>]</CODE>
<P>
Read and process the file filename as if it was included into the file at this
point.� If origin is specified the file is processed with <CODE>$ORIGIN</CODE>
set to that value otherwise the current <CODE>$ORIGIN</CODE> is used.
<I>NOTE: The behaviour when <origin> is specified differs from that
described in
<P>
The origin and current domain revert to the values they were prior to the
<CODE>$INCLUDE</CODE> once the file has been read.
<H4>$TTL</H4>
Syntax: <CODE>$TTL <default-ttl> [<comment>]</CODE>
<P>
Set the default Time To Live (TTL) for subsequent records with undefined
TTL's. Valid TTL's are of the range 0-2147483647.
<P>
<CODE>$TTL</CODE> is defined in
<H3>BIND Master File Extentions</H3>
<H4>$GENERATE</H4>
Syntax: <CODE>$GENERATE <range> <lhs> <type> <rhs>
[<comment>]</CODE>
<P>
<CODE>$GENERATE</CODE> is used to create a series of resource records
that only differ from each other by an iterator. <CODE>$GENERATE</CODE>
can be used to easily generate the sets of records required to support
sub /24 reverse delegations described in
<PRE>
$ORIGIN 0.0.192.IN-ADDR.ARPA.
$GENERATE 1-2 0 NS SERVER$.EXAMPLE.
$GENERATE 1-127 $ CNAME $.0
</PRE>
is equivalent to
<PRE>
...
</PRE>
<DL>
<DT>range</DT>
<DD>
This can be one of two forms:
<I>start</I>-<I>stop</I>
or
<I>start</I>-<I>stop</I>/<I>step</I>. If the first form is
used then step is set to 1. All of start, stop and step must be positive.
<DT>lhs</DT>
<DD>
Lhs describes the owner name of the resource records to be created.
Any single $ symbols within the LHS side are replaced by the iterator value.
To get a $ in the output use a double $, e.g. $$. If the lhs is not absolute
the current $ORIGIN is appended to the name.
<DT>type</DT>
<DD>
At present the only supported types are PTR, CNAME and NS.
<DT>rhs</DT>
<DD>
Rhs is a domain name. It is processed similarly to the lhs.
<DD>
</DL>
<H2>Resource Records</H2>
Syntax: <CODE>{<domain>|@|<blank>}
[<ttl>] [<class>] <type> <rdata>
[<comment>]</CODE>
<P>
All resource records have the same basic syntax.
<DL>
<DT><CODE>domain</CODE></DT>
<DD>
Specify the domain name for this record. If it is not absolute the
current <CODE>$ORIGIN</CODE> is appended.
<DT><CODE>@</CODE></DT>
<DD>
Use the current <CODE>$ORIGIN</CODE> for the domain name for this record.
<DT><CODE>blank</CODE></DT>
<DD>
Use the last specified domainname.
<DT><CODE>ttl</CODE></DT>
<DD>
This specifies how long this record will be cached by caching servers.
The valid range is 0-2147483647.
<DT><CODE>class</CODE></DT>
<DD>
Specify the class of this record. This is usually redundent as the
class of a zone is specfied in the configuration file prior to reading
the zone file.
<DT><CODE>type</CODE></DT>
<DD>
Specify the type of this record. This describes the contents of the rdata
section.
<DT><CODE>rdata</CODE></DT>
<DD>
This is the value of the resource record.
</DL>
</BODY>
</HTML>