Delegating Reverse-Mapping for Networks Smaller than a /24

Delegating Reverse Mapping for Networks Smaller than a 24

6.5.1 Problem

You want to delegate responsibility for reverse-mapping a network's IP addresses to a set of name servers, but the network or subnet is smaller than a /24.

6.5.2 Solution

Add CNAME records to the domain names that would normally own PTR records, making those domain names aliases to domain names in other zones. Those zones can be either new zones or existing zones. If they are new zones, delegate the zones to the appropriate name servers. If they are existing zones, make sure they're already delegated to the proper name servers.

Here's an example. Say you manage, the reverse-mapping zone for the network 192.168.0/24. You have divided it into two subnets, though: and You'd like to delegate responsibility for maintaining each subnet's reverse-mapping information to a different set of name servers, but you've only got a single reverse-mapping zone,

So you add CNAME records to the zone data file for In addition, the administrator of the first subnet,, wants a new subdomain,, delegated to his name servers. The administrator of the subnet has an existing zone, bar.example, and he'd like to manage just that zone.

For the first subnet, you add CNAME records like these: IN CNAME IN CNAME

For the second subnet, you add CNAME records like these: IN CNAME IN CNAME

Since the subdomain is new, you'll also need to add delegation to the zone data file: IN NS IN NS

On and, the administrator would add zone statements like this one:

zone "" {
 type master;
 file "db.";

And within the zone data file for, he'd add PTR records like these: IN PTR IN PTR

The administrator of the second subnet can add PTR records like these to the zone data file for bar.example: IN PTR IN PTR

6.5.3 Discussion

This scheme is fairly simple, although its simplicity is obscured by all the nasty syntax. Basically, where you'd normally add PTR records in the zone, you add CNAME records that create aliases to domain names in other zones. Then, at the domain names those aliases point to, you attach PTR records. A name server looking up a PTR record for, for example, will find that that domain name is an alias for, and on a successive lookup will find the PTR record attached to

If you need to create lots of very similar CNAME records, avail yourself of the $GENERATE control statement, introduced back in Section 2.21. For example, you could create CNAME records for all of the network with just this control statement:


The naming scheme I used for the new zone,, reflects both the values of the first three octets of the reverse-mapped addresses (192.168.0) and the range of values in the fourth octet (0 to 127). This scheme is just a useful convention, though; there's nothing magic about it. If you prefer a different scheme, you're welcome to use it.

6.5.4 See Also

Section 2.21, for the syntax of the $GENERATE control statement; RFC 2317, the official description of the technique; and "Subnetting on a Non-Octet Boundary" in Chapter 9 of DNS and BIND.

Getting Started

Zone Data

BIND Name Server Configuration

Electronic Mail

BIND Name Server Operations

Delegation and Registration


Interoperability and Upgrading

Resolvers and Programming

Logging and Troubleshooting


DNS & BIND Cookbook
DNS & BIND Cookbook
ISBN: 0596004109
EAN: 2147483647
Year: 2005
Pages: 220
Authors: Cricket Liu © 2008-2020.
If you may any questions please contact us: