$generate

Kevin Darcy kcd at daimlerchrysler.com
Thu Sep 16 19:47:27 UTC 2004


Bryan Irvine wrote:

>Is there a way to get this to work for a class b?
>  
>
$GENERATE doesn't do any kind of bitwise or modulo arithmetic, so no, 
there's no way for it to automatically generate all of the possible PTR 
records for a class b. You'd need 256 $GENERATE's for that (one for each 
/24 subdivision of that /16). But, for zone transfer optimization, if 
nothing else, you're already delegating the /24's that you're using 
heavily, right?

I suppose if you are highly structured and only use a narrow band -- 
let's say "x through y" -- range of addresses in each /24 range, then 
you could potentially get away with less $GENERATEs, i.e.

$GENERATE 0-255 {x}.$.168.192.in-addr.arpa. PTR 192.168.$.{x}.example.com.
$GENERATE 0-255 {x+1}.$.168.192.in-addr.arpa. PTR 
192.168.$.{x+1}.example.com.
...
$GENERATE 0-255 {y}.$.168.192.in-addr.arpa. PTR 192.168.$.{y}.example.com.

Using the "offset" modifier might be able to save you some $GENERATEs as 
well, but, again, only if you are structured in such a way as to take 
advantage of it...

- Kevin




More information about the bind-users mailing list