$GENERATE in zone files and how to use it

Mark_Andrews at isc.org Mark_Andrews at isc.org
Mon Jul 15 22:46:17 UTC 2002


> 
> "Andris Kalnozols" <andris at hpl.hp.com> wrote in message
> news:agsm4c$ebv2$1 at isrv4.isc.org...
> > > Nico Kadel-Garcia <nkadel at bellatlantic.net> wrote:
> > >
> > > Is there any decent bind 8.x or 9.x documentation on how to use the
> > > $GENERATE option in the zone files? And what are the performance
> trade-offs
> > > of using it? I've also gone poking through the O'Reilly DNS book, and
> > > searched the Linux bind documentation, but found no good references.
> >
> > You'll find some documentation in the following relative paths
> > in the BIND distribution:
> >
> > BIND 8:  doc/html/master.html
> > BIND 9:  doc/arm/Bv9ARM.ch06.html
> 
> This answer was right on. The key phrase for web searches is "generate
> directive".
> 
> > I would think that letting the name server self-load zone data
> > from a $GENERATE directive would be more efficient that reading
> > and parsing the equivalent amount of text records.
> 
> I dunno about this: has anyone actually tested this?

	All it saves is disk I/O.  The text still has to be parsed.

> > > I've succeeded in some tests with it, but I'd like to be able to use
> > > zero-filled numbers as well. For examble IP addresses 1-254 in a /24 get
> > > listed as foo001.bar.coom through foo254.bar.com. As it is, I seem to
> > > require 3 distinct commands to get it right in the bar.com zone file.
> > >
> > >     $GENERATE    1-9            foo00$ A 192.168.1.$
> > >     $GENERATE    10-99        foo0$   A 192.168.1.$
> > >     $GENERATE    100-254    foo$     A 192.168.1.$
> > >
> > > Is that the only way to do it?
> >
> > $GENERATE  1-254   foo${0,3}   A    192.168.1.$
> 
> Also right on. I *like* you....
> 
> 
--
Mark Andrews, Internet Software Consortium
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark.Andrews at isc.org


More information about the bind-users mailing list