Knowledge Base ISC Main Website Ask a Question/Contact ISC
Classless subnet delegation
Author: Cathy Almond Reference Number: AA-01589 Views: 1660 Created: 2018-03-06 18:42 Last Updated: 2018-03-26 16:05 0 Rating/ Voters

This article is a worked example of one of the simpler cases of of classless subnet delegation, as described in RFC2317 (BCP 20):

  1. You are the owner of subnet for which you maintain zone
  2. You want to delegate to a third party content provider whose nameservers are:
  3. The problem is that IPv4 labels in dot-notation in DNS only have dots at the label boundaries you can see above, but you need to be able to delegate a subdomain that breaks right in the middle of one of those labels.
Sample solution

As the owner of zone, you can delegate, but you need to find a way of making that delegated subdomain provide the resolution for queries for reverse addresses in the range:

This is a problem that is specific to DNS (it's not just in BIND).  The way we get around it is by creating CNAMEs to something else that you can delegate, for each and every address in the range of addresses that you need to handle this way.

So let's start with the delegating part.  Consider this sub-domain:

This is a perfectly legitimate delegation - you are authoritative for, what you delegate can have any subdomain label that you wish, and 0-63 is a legitimate label for a zone name. 

A reverse (PTR) zone is just a DNS zone

Although by convention an zone is being used for PTR RRs, it is still just a DNS zone and a delegated subdomain doesn't have to follow the exact pattern of the IPv4 address labels in dot notation.

So this is what you'd put in your zone to create the delegation to Exemplary Examples:  IN   NS  IN   NS

Meanwhile, over at Exemplary Examples, the administrators should be creating records in this zone that have the hostnames associated with -, except that they're going to have an additional name label in the zone, so something like this:  IN   PTR  IN   PTR
...  IN   PTR

There just one final piece that needs to be put in place.

If someone queries their resolver for, then following the delegation from the nameservers down, their resolver will reach your nameserver that is authoritative for  From here you want to tell that it needs instead to send the queries to and/or, and instead of, to be querying for

This is achieved by adding a set of CNAME RRs to the zone on your server, causing a redirection (that the resolver will follow): IN CNAME IN CNAME

You can (if you wish) use $GENERATE as a shortcut to adding all of these RRs individually to your zone ($GENERATE causes named to construct the RRs for you automatically as it populates the zone when loading it):


If they will permit this, consider slaving the zone you delegated to the third party

This is optional, but will enable your servers to respond directly to queries with both your CNAME RR and the target PTR RR provided by the third party and will speed up DNS resolution by eliminating the additional query that resolvers would otherwise be obliged to make.

© 2001-2018 Internet Systems Consortium

For assistance with problems and questions for which you have not been able to find an answer in our Knowledge Base, we recommend searching our community mailing list archives and/or posting your question there (you will need to register there first for your posts to be accepted). The bind-users and the dhcp-users lists particularly have a long-standing and active membership.

ISC relies on the financial support of the community to fund the development of its open source software products. If you would like to support future product evolution and maintenance as well having peace of mind knowing that our team of experts are poised to provide you with individual technical assistance whenever you call upon them, then please consider our Professional Subscription Support services - details can be found on our main website.

  • There is no feedback for this article
Quick Jump Menu