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!
(no subject)
Date: 2003-09-29 03:51 pm (UTC)you d0rk!
Date: 2003-09-29 04:28 pm (UTC)(no subject)
Date: 2003-09-29 08:44 pm (UTC)My brain exploded. I think. Thanks. =9
(no subject)
Date: 2003-09-30 07:24 am (UTC)Just don't think in my mouth. ;-)
Thanks
Date: 2003-10-01 07:32 pm (UTC)Thank you for the explanation -- I knew it was possible, if unorthodox... Now if I can only convince my ISP that CNAME really works this way, I'll be happy.. (having an RFC definitely helps). From what I remember, it's a side effect, not an intended feature..
I just hate having to wait for their lazy admins to update tables when I'm setting up a network in a new place...
Hey, how about telling me why my damn server keeps crashing? (Kidding, kidding... it's just driving me crazy... my old personal server is a Via C3, and after a year of faithful service, it locks up hard with no log entries to help.. I'm ready to dump the box and move to a new one at this point..)