Friday, 1 March 2013

BIND DNS: reverse delegation of IP range

Besides mapping domain name to IP address, DNS systems can also map IP address to domain name. Many applications rely on DNS reverse mapping to function properly.
NetBackup will throw error if reverse mapping is not setup or is setup incorrectly, email system also needs correct reverse mapping.

Suppose we have the whole range of IP addresses in, we can configure reverse mapping in named.conf:

zone "" {
    type master;
    file "222.222.222.rev";

If we only have part of the IP addresses in, suppose to, the reverse mapping is called classless reverse delegation.

From to there are 30 usable addresses, plus the network and broadcast address, there are 32 addresses, 32 = 2^5, 8 x 4 - 5 = 27. so our IP range can be represented as

ISP should have defined reverse delegation in their reverse zone file:
64/27    IN    NS

Now we can define the reverse mapping for our IP range in our own named.conf:
zone "64/" {
    type master;
    file "64-";
Note: The domain name and IP addresses in this post are dummy ones, I use them for easier writing.

No comments:

Post a Comment