HP-UX Reference (11i v3 07/02) - 4 File Formats (vol 8)

n
named.conf(4) named.conf(4)
(BIND 9.3)
Syntax
$TTL default-ttl
default-ttl
The default TTL value for subsequent RRs. See the Time to Live (TTL) and Time
Specification sections for more detail.
The $GENERATE Directive
The
$GENERATE directive creates a series of resource records that differ from each other only by an itera-
tor value.
$GENERATE is a BIND extension and not part of the standard DNS zone file format.
Syntax
$GENERATE range lhs [ ttl ][class ] type rhs
(ttl and class may be entered in either order.)
range The range of the iterator value. range can be in either of the 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.
lhs An expression that evaluates to the owner_name for each resource record that is created.
If lhs is not an absolute domain name, the current origin is appended to it.
Any single
$ symbols within lhs are replaced by the iterator value.
The $ may optionally be followed by modifiers that change the offset from the iterator, the
field width, and the base. Modifiers are introduced by a { immediately following the
$,in
the format
${offset[,width[,base]]}. For example,
${-20,3,d}, which subtracts 20
from the current value and prints the result as a decimal in a zero-padded field of 3 charac-
ters. The available base values are
d (decimal), o (octal), x (lowercase hexadecimal), and
X
(uppercase hexadecimal). The default modifier is
${0,0,d}.
To get a
$ in the output, escape the $ with a backslash (\
); for example, \$. For compati-
bility with earlier versions,
$$ is still recognized as indicating a literal $ in the output.
ttl The TTL for the generated records. If it is omitted, the normal TTL inheritance rules
apply. See the Time to Live (TTL) and Time Specification sections for more detail.
class The class of the generated records. This must match the zone class, if it is specified.
type At present, the only supported types are A, AAAA, CNAME, DNAME, NS
, and PTR.
rhs An expression that evaluates to the rrdata for each resource record that is created. At
present, this must be a domain name. It uses the same
$ processing as lhs.
Example
$GENERATE easily generates the sets of records required to support the 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 $.0
is 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.
Resource Records (RRs)
This section, based on RFC 1034, describes the concept of a resource record, known as an RR, and when an
RR is used. Since the publication of RFC 1034, several new RRs have been identified and implemented in
the DNS. These are also included.
HP-UX 11i Version 3: February 2007 31 Hewlett-Packard Company 263