Classless subnet reverse DNS delegation
Sep. 29th, 2003 04:23 pmIn a comment to a previous post of mine,
quentincoyote asked me:
>"How do you properly create an authoritative reverse DNS zone file for a classless /27? "
Since the answer is pretty complicated, I figured I would post it here so that others might benefit, too.
Normally, reverse DNS domains are done in chunks of /24. For example, the IP range 192.168/16 would have the reverse DNS zones 0.168.192.in-addr.arpa, 1.168.192.in-addr.arpa, all the way through 255.168.192.in-addr.arpa.
The trick in your case is to get your ISP to delegate the DNS records for that block of 32 addresses. This is done with CNAME records. For example, if you had 192.168.1.0/27:
0.1.168.192.in-addr.arpa CNAME 0.rdns.your-server.com
1.1.168.192.in-addr.arpa CNAME 1.rdns.your-server.com
through...
31.1.168.192.in-addr.arpa CNAME 31.rdns.your-server.com
Now, on your server, you'll need to create PTR records for each of those CNAMES, such as:
1.rdns.your-server.com PTR gw.yourserver.com
2.rdns.your-server.com PTR mail.yourserver.com
yadayadayada...
More details (and probably syntactically correct examples) can be found in RFC 2317.
Share and enjoy!
>"How do you properly create an authoritative reverse DNS zone file for a classless /27? "
Since the answer is pretty complicated, I figured I would post it here so that others might benefit, too.
Normally, reverse DNS domains are done in chunks of /24. For example, the IP range 192.168/16 would have the reverse DNS zones 0.168.192.in-addr.arpa, 1.168.192.in-addr.arpa, all the way through 255.168.192.in-addr.arpa.
The trick in your case is to get your ISP to delegate the DNS records for that block of 32 addresses. This is done with CNAME records. For example, if you had 192.168.1.0/27:
0.1.168.192.in-addr.arpa CNAME 0.rdns.your-server.com
1.1.168.192.in-addr.arpa CNAME 1.rdns.your-server.com
through...
31.1.168.192.in-addr.arpa CNAME 31.rdns.your-server.com
Now, on your server, you'll need to create PTR records for each of those CNAMES, such as:
1.rdns.your-server.com PTR gw.yourserver.com
2.rdns.your-server.com PTR mail.yourserver.com
yadayadayada...
More details (and probably syntactically correct examples) can be found in RFC 2317.
Share and enjoy!