Reverse zone delegation for - HOW TO?

Barry Margolin barmar at
Fri May 18 18:54:49 UTC 2012

In article <mailman.823.1337358596.63724.bind-users at>,
 "Ellad G. Yatsko" <eyatsko at> wrote:

> Hello!
> There is the Supernet is distributed through my network. 
> Some network hierarchy is built in this Supernet. Some addressing plan 
> is used.
> There are some towns. Each town has IP pool of 
> There are some sites in different districts of above towns, they get a 
> block of IP-addresess: 172.xx.0.0/20 from its main town's server.
> Each ending site uses its networks in the following way:
> - servers;
> - voice;
> - video surveillance;
> - top-managers;
> - accounting;
> - ... some other departaments.
> Indeed it's no matter what and why. Now I want to build hierarchic 
> structure of DNS servers in each location. And delegate zones accordingly.
> But I have some troubles in the beginning. How do I describe topmost 
> zone?
> I used a trick and made zone It is not exact but it works.

The problem with this is that you won't be able to do reverse lookups 
for other 172.x.x.x addresses outside the RFC 1918 block.  Maybe you 
could download the real zone, and merge your changes 
into it.

> But I can't at all to delegate block to second level 

In the zone, just do a normal delegation:

16 IN NS second-level-server.

> server to say nothing about delegation from second level 
> to ending DNS!

You can use $GENERATE for this.  In the zone file for, do:


> Then I tried to solve this task in the most general way. I thought If I 
> learn how to delegate "most difficult zone" I delegate simplier one easily.
> So I began to delegate (not from topmost 
> server to its neighbor as follows:
> zone "" {
>    type master;
>    file "/etc/bind/master/reverse/";
>    forwarders { };
> };
> and (in zone file):
> 0.16/    IN NS   
> $GENERATE 0-256 $       IN CNAME 
> $.0.16/
> $GENERATE 0-256 $       IN CNAME 
> $.0.31/

This technique is really only needed for delegations of blocks smaller 
than /24.  For anything larger, just do multiple delegations.

Barry Margolin
Arlington, MA

More information about the bind-users mailing list