Bind 9 Administrator Reference Manual
Chapter 6. BIND 9 Configuration Reference
$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 $.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
.
range 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.
lhs 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 you need to escape the $ using a
backslash \, e.g. \$. The $ may optionally be followed by modifiers which
change the offset from the interator, field width and base. Modifiers are
introduced by a { immediately following the $ as
${offset[,width[,base]]}. e.g. ${-20,3,d} 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 (d), octal (o) and
hexadecimal (x or X for uppercase). The default modifier is ${0,0,d}. If
the lhs is not absolute, the current $ORIGIN is appended to the name.
For compatability with earlier versions $$ is still recognised a
indicating a literal $ in the output.
type At present the only supported types are PTR, CNAME, DNAME, A,
AAAA and NS.
rhs rhs is a domain name. It is processed similarly to lhs.
The $GENERATE directive is a BIND extension and not part of the standard zone file format.
97