The Master File Format was initially defined in RFC 1035 and has subsequently been extended.
While the Master File Format is class independent all records in a Master File must be of the same class.
$ORIGIN <domain-name> [<comment>]
$ORIGIN
set the domain name that will be appended to any
unqualified records.
When a zone is first read in there is an implict $ORIGIN
<zone-name>.
The current $ORIGIN
is appended to the domain specified in the
$ORIGIN
argument if it is not absolute.
$ORIGIN EXAMPLE. $ORIGIN MYZONE WWW CNAME MAIN-SERVERis equivlent to
WWW.MYZONE.EXAMPLE. CNAME MAIN-SERVER.MYZONE.EXAMPLE.
$INCLUDE <filename> [<origin>] [<comment>]
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 $ORIGIN
set to that value otherwise the current $ORIGIN
is used.
NOTE: The behaviour when <origin> is specified differs from that
described in
RFC 1035.
The origin and current domain revert to the values they were prior to the
$INCLUDE
once the file has been read.
$TTL <default-ttl> [<comment>]
Set the default Time To Live (TTL) for subsequent records with undefined TTL's. Valid TTL's are of the range 0-2147483647.
$TTL
is defined in
RFC 2308.
$GENERATE <range> <lhs> <type> <rhs>
[<comment>]
$GENERATE
is used to create a series of resource records
that only differ from each other by an iterator. $GENERATE
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.
$ORIGIN 0.0.192.IN-ADDR.ARPA. $GENERATE 1-2 0 NS SERVER$.EXAMPLE. $GENERATE 1-127 $ CNAME $.0is equivalent to
0.0.0.192.IN-ADDR.ARPA NS SERVER1.EXAMPLE. 0.0.0.192.IN-ADDR.ARPA NS SERVER2.EXAMPLE. 1.0.0.192.IN-ADDR.ARPA CNAME 1.0.0.0.192.IN-ADDR.ARPA 2.0.0.192.IN-ADDR.ARPA CNAME 2.0.0.0.192.IN-ADDR.ARPA ... 127.0.0.192.IN-ADDR.ARPA CNAME 127.0.0.0.192.IN-ADDR.ARPA
{<domain>|@|<blank>}
[<ttl>] [<class>] <type> <rdata>
[<comment>]
All resource records have the same basic syntax.
domain
$ORIGIN
is appended.
@
$ORIGIN
for the domain name for this record.
blank
ttl
class
type
rdata