Network Administrator: Reverse Lookup Zones
Normal DNS queries are forward lookup queries, they request the IP address that corresponds to a fully qualified domain name. A reverse lookup is the opposite of a forward lookup: It returns the fully qualified domain name of a host based on its IP address.
Reverse lookups are possible because of a special domain called the in-addr.arpa domain, which provides a separate fully qualified domain name for every possible IP address on the Internet.
To enable a reverse lookup for a particular IP address, all you have to do is create a PTR record in a reverse lookup zone (a zone that is authoritative for a portion of the in-addr.arpa domain). The PTR record maps the in-addr.arpa domain name for the address to the host’s actual domain name.
The technique used to create the reverse domain name for a given IP address is pretty clever. It creates subdomains beneath the in-addr.arpa domain by using the octets of the IP address, listing them in reverse order. For example, the reverse domain name for the IP address 18.104.22.168 is 22.214.171.124.in-addr.arpa.
Why list the octets in reverse order? Because that correlates the network portions of the IP address (which work from left to right) with the subdomain structure of DNS names (which works from right to left). The following description should clear this up:
The 255 possible values for the first octet of an IP address each have a subdomain beneath the in-addr.arpa domain. For example, any IP address that begins with 207 can be found in the 207.in-addr.arpa domain.
Within this domain, each of the possible values for the second octet can be found as a subdomain of the first octet’s domain. Thus, any address that begins with 207.126 can be found in the 126.207.in-addr.arpa domain.
The same holds true for the third octet, so any address that begins with 207.126.67 can be found in the 67.126.207.in-addr.arpa domain.
By the time you get to the fourth octet, you’ve pinpointed a specific host. The fourth octet completes the fully qualified reverse domain name. Thus, 126.96.36.199 is mapped to 188.8.131.52.in-addr.arpa.
As a result, to determine the fully qualified domain name for the computer at 184.108.40.206, the client queries its DNS server for the FQDN that corresponds to 220.127.116.11.in-addr.arpa.