]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bind/doc/html/master.html
This commit was generated by cvs2svn to compensate for changes in r58782,
[FreeBSD/FreeBSD.git] / contrib / bind / doc / html / master.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4   <TITLE>Master File Format</TITLE>
5 </HEAD>
6
7 <BODY>
8 <H2>BIND Configuration Guide -- Master File Format</H2>
9
10 <HR>
11
12 <P>
13 The Master File Format was initially defined in
14 <A HREF=http://ds.internic.net/rfc/rfc1035.txt>RFC 1035</A>
15 and has subsequently been extended. 
16 <P>
17 While the Master File Format is class independent all records in a 
18 Master File must be of the same class.
19
20 <H3>Master File Directives</H3>
21 <H4>$ORIGIN</H4>
22 Syntax: <CODE>$ORIGIN &lt;domain-name&gt; [&lt;comment&gt;]</CODE>
23 <P>
24 <CODE>$ORIGIN</CODE> set the domain name that will be appended to any
25 unqualified records.
26 When a zone is first read in there is an implict <CODE>$ORIGIN</CODE>
27 &lt;zone-name&gt;.
28 The current <CODE>$ORIGIN</CODE> is appended to the domain specified in the
29 <CODE>$ORIGIN</CODE> argument if it is not absolute.
30
31 <PRE>
32 $ORIGIN EXAMPLE.
33 $ORIGIN MYZONE
34 WWW     CNAME   MAIN-SERVER
35 </PRE>
36 is equivlent to
37 <PRE>
38 WWW.MYZONE.EXAMPLE. CNAME MAIN-SERVER.MYZONE.EXAMPLE.
39 </PRE>
40
41 <H4>$INCLUDE</H4>
42 Syntax: <CODE>$INCLUDE &lt;filename&gt; [&lt;origin&gt;] [&lt;comment&gt;]</CODE>
43 <P>
44 Read and process the file filename as if it was included into the file at this
45 point.  If origin is specified the file is processed with <CODE>$ORIGIN</CODE>
46 set to that value otherwise the current <CODE>$ORIGIN</CODE> is used.
47 <I>NOTE: The  behaviour when &lt;origin&gt; is specified differs from that
48 described in 
49 <A HREF=http://ds.internic.net/rfc/rfc1035.txt>RFC 1035</A>.</I>
50 <P>
51 The origin and current domain revert to the values they were prior to the
52 <CODE>$INCLUDE</CODE> once the file has been read.
53 <H4>$TTL</H4>
54 Syntax: <CODE>$TTL &lt;default-ttl&gt; [&lt;comment&gt;]</CODE>
55 <P>
56 Set the default Time To Live (TTL) for subsequent records with undefined
57 TTL's. Valid TTL's are of the range 0-2147483647.
58 <P>
59 <CODE>$TTL</CODE> is defined in
60 <A HREF=http://ds.internic.net/rfc/rfc2308.txt>RFC 2308</A>.
61 <H3>BIND Master File Extentions</H3>
62 <H4>$GENERATE</H4>
63 Syntax: <CODE>$GENERATE &lt;range&gt; &lt;lhs&gt; &lt;type&gt; &lt;rhs&gt;
64 [&lt;comment&gt;]</CODE>
65 <P>
66 <CODE>$GENERATE</CODE> is used to create a series of resource records
67 that only differ from each other by an iterator.  <CODE>$GENERATE</CODE>
68 can be used to easily generate the sets of records required to support
69 sub /24 reverse delegations described in 
70 <A HREF=http://ds.internic.net/rfc/rfc2317.txt>RFC 2317: Classless IN-ADDR.ARPA delegation</A>.
71
72 <PRE>
73 $ORIGIN 0.0.192.IN-ADDR.ARPA.
74 $GENERATE 1-2 0 NS SERVER$.EXAMPLE.
75 $GENERATE 1-127 $ CNAME $.0
76 </PRE>
77 is equivalent to
78 <PRE>
79 0.0.0.192.IN-ADDR.ARPA NS SERVER1.EXAMPLE.
80 0.0.0.192.IN-ADDR.ARPA NS SERVER2.EXAMPLE.
81 1.0.0.192.IN-ADDR.ARPA CNAME 1.0.0.0.192.IN-ADDR.ARPA.
82 2.0.0.192.IN-ADDR.ARPA CNAME 2.0.0.0.192.IN-ADDR.ARPA.
83 ...
84 127.0.0.192.IN-ADDR.ARPA CNAME 127.0.0.0.192.IN-ADDR.ARPA.
85 </PRE>
86 <DL>
87 <DT>range</DT>
88 <DD>
89 This can be one of two forms:
90 <I>start</I>-<I>stop</I>
91 or
92 <I>start</I>-<I>stop</I>/<I>step</I>.  If the first form is
93 used then step is set to 1.  All of start, stop and step must be positive.
94 <DT>lhs</DT>
95 <DD>
96 Lhs describes the owner name of the resource records to be created.
97 Any single $ symbols within the LHS side are replaced by the iterator value.
98 To get a $ in the output use \$.  If the lhs is not absolute
99 the current $ORIGIN is appended to the name, when appropriate.
100 You can also apply an offset to the iterator by using ${offset} where
101 offset is a decimal value to add to the iterator.
102 And you can also change the format of the iterator by using a printf
103 like string.  The format is ${offset,width,radix} where offset is as before
104 (use 0 for no change), width is the minimum field width (always zero padded)
105 radix is one of d, o, x, or X to change the radix to decimal, octal, hex, or hex
106 with capital letters.
107 The default is ${0,1,d}.
108 For example: ${16,3} will add 16 to the iterator and be replaced by
109 a 3 digit decimal representation.  ${0,2,x} will be replaced by a 2 digit
110 hex representation.  To get a { character inserted into the text
111 immediately after the iterator, use $\{.
112 <DT>type</DT>
113 <DD>
114 At present the only supported types are A, AAAA, PTR, CNAME and NS.
115 <DT>rhs</DT>
116 <DD>
117 Rhs is the data. It is processed similarly to the lhs.
118 <DD>
119 </DL>
120 <H2>Resource Records</H2>
121 Syntax: <CODE>{&lt;domain&gt;|@|&lt;blank&gt;}
122 [&lt;ttl&gt;] [&lt;class&gt;] &lt;type&gt; &lt;rdata&gt;
123 [&lt;comment&gt;]</CODE>
124 <P>
125 All resource records have the same basic syntax.
126 <DL>
127 <DT><CODE>domain</CODE></DT>
128 <DD>
129 Specify the domain name for this record.  If it is not absolute the
130 current <CODE>$ORIGIN</CODE> is appended.
131 <DT><CODE>@</CODE></DT>
132 <DD>
133 Use the current <CODE>$ORIGIN</CODE> for the domain name for this record.
134 <DT><CODE>blank</CODE></DT>
135 <DD>
136 Use the last specified domainname.
137 <DT><CODE>ttl</CODE></DT>
138 <DD>
139 This specifies how long this record will be cached by caching servers.
140 The valid range is 0-2147483647.
141 <DT><CODE>class</CODE></DT>
142 <DD>
143 Specify the class of this record.  This is usually redundent as the
144 class of a zone is specfied in the configuration file prior to reading
145 the zone file.
146 <DT><CODE>type</CODE></DT>
147 <DD>
148 Specify the type of this record. This describes the contents of the rdata
149 section.
150 <DT><CODE>rdata</CODE></DT>
151 <DD>
152 This is the value of the resource record.
153 </DL>
154 <H2>Time Values: Alternate Specification format (BIND Enhancement)</H2>
155 <P>
156 Many time values within the MASTER file may be specified in multiples
157 of weeks, days, hours, minutes and seconds rather than just seconds.
158 <P>
159 The format for this is <CODE>#w#d#h#m#s</CODE>. To specify 1 week you would
160 use <CODE>1w</CODE> or two weeks and 1 hour <CODE>2w1h</CODE>.
161 <P>
162 This format applies to TTL values, and SOA REFRESH, RETRY, EXPIRE and MINIMUM
163 values.
164 </P>
165 </BODY>
166 </HTML>