tags:

views:

77

answers:

2

For example, an address record for mail.example.com pointing to the IP address 192.0.2.5 is stored as 5.2.0.192.in-addr.arpa. Why do we reverse the IP address?

+4  A: 

In a domain, the most significant part is on the right (e.g. the "com", "net" or "org" part). As you move left, the parts get less significant, or large, and narrow down to the final point.

IP addresses are the opposite; the most significant part (the 192 in this case) is at the left.

Jon Grant
Much shorter and just as understandable as mine. +1
Joachim Sauer
+3  A: 

Because in a DNS name the most significant part comes last.

There are Root nameservers that tell you which nameservers are responsible for the Top Level Domains (TLD) such as .com, .org, .net. And this delegation basically goes down all the way (but any nameserver could handle multiple levels of course).

So the (simplified) way to look for this is like this:

  • Root nameserver tells you what nameserver is responsible for arpa.
  • arpa. nameserver tells you what nameserver is responsible for in-addr.arpa.
  • in-addr.arpa. nameserver tells you what nameserver is responsible for 192.in-addr.arpa.

Now if we assume that the IP address was not reversed, then there would need to be a nameserver that's responsible for providing the reverse-name lookup for all IP-Addresses that end in 5 (for example). Since the last digit of the IP address is the least significant one (i.e. IP networks/classes are grouped with the earlier parts of the IP adresse) this sepration wouldn't make any sense.

Joachim Sauer