Tuesday, 28 July 2009

PTR records within a forward zone

In some cases your ISP may not want to create NS records for your allocation, especially if the ISP has assigned a large number of very small blocks to individual customers. In such a case, they can still allow you to control the reverse by using the method discussed in section 5.2 "Alternative naming conventions" of RFC 2317.

Let's say, for example that your ISP has provided you with 4 IP addresses, 192.168.5.27 - 192.168.5.30. Not only is this a very small block, but it doesn't fall on an octet boundary. Thus it is actually not possible to use the above described method.

In such a case, instead of having the ISP create NS records for Classless delegation, you would have them create CNAME records within the 5.168.192.in-addr.arpa zone like this:

   27.5.168.192.in-addr.arpa   86400  IN      CNAME      27.rev.example.com
28.5.168.192.in-addr.arpa 86400 IN CNAME 28.rev.example.com
29.5.168.192.in-addr.arpa 86400 IN CNAME 29.rev.example.com
30.5.168.192.in-addr.arpa 86400 IN CNAME 30.rev.example.com

Then, in the Custom DNS zone for example.com you would create PTR records like this:

Host: 27.rev
TTL: 86400
Type: PTR
Data: mail.example.com

Important: Just as with the earlier example, unless your ISP does their part and create the necessary CNAME records, DNS queries to resolve the IP addresses won't come to us and those PTR records will be useless. Not all ISPs are willing to do this, even for customers who have static IP addresses (if you have a dynamic IP address, they almost certainly won't create these for you).

No comments: