$GENERATE for /8 networks

Eivind Olsen eivind at aminor.no
Thu Feb 17 16:06:14 UTC 2011

> Is there a way I can use $GENERATE to generate PTR records for the whole
> of in one line?

Disclaimer: I haven't ever really bothered with $GENERATE. But by reading
the BIND 9.7 ARM, it does seem to be aimed at doing the job for /24
segments, not /8.

Pre-generating a static list of PTR records for a /8 isn't too tricky, by
using any scripting language like Perl for example, although the generated
file will probably be somewhat large. Here's a mockup of such a script, to
give an example:

#!/usr/bin/env perl

$network = "10";
for ($bnet = 0; $bnet < 256; $bnet++) {
  for ($cnet = 0; $cnet < 256; $cnet++) {
    for ($dnet = 0; $dnet < 256; $dnet++) {
      print "${dnet}.${cnet}.${bnet} PTR

(no, I'll not pretend it's nice code or anything)

Eivind Olsen

More information about the bind-users mailing list