# # Why are in-addr.arpa addresses backwards?
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Why are in-addr.arpa addresses backwards?

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© December 2004 Tony Lawrence
December 2004

An "in-addr.arpa address" is a reverse DNS record, stored in a strange format. If we are considering ip 1.2.3.4, then "4.3.2.1.in-addr.arpa" is the reverse DNS record. It's used when you want to find out the host name of something you have an ip address for (for example, "dig -x " will give you that). But why is it stored backwards?

Well, if you wanted to get really geeky about it, it's the ip addresses that you are used to seeing that are backwards. Think about it this way: when you see mail.xyz.com, what's the least specific part of that? It's the ".com", because there are millions of ".com" machines. The "xyz.com" may have multiple machines, but "mail.zyz.com" nails it down to one.

Well, maybe more than one, because of round-robin DNS, or multiple MX records, but that's not important for this discussion.

Now look at the ip address - let's pretend that it's 192.168.4.5. What's the least specific part of that? The "192", of course. So in names, the least specific part comes last, but in IP addresses, it comes first. Therefore, from a geek point of view, at least one of them is "backwards".

When DNS is used to find something on the internet, it always starts at the least specific. We ask ".com" to tell us who is responsible for "xyz.com" and we ask that DNS server where to find "mail". Likewise, if we are working from an address to find a name, we want to work the same way: go to the least specific first. Ask the machine responsible for 192 addresses to tell us where 192.168 is, etc. (except, of course, that 192.168 is one of the private address ranges so that doesn't really work) That's why in-addr.arpa records are stored in the same way as the names are: most specific to least.

Of course if the convention for addresses had been to present them like we present names, then you'd say " This machine is 34.2.168.192", and the in-addr.arpa address might be what we are used to seeing..


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> Why are in-addr.arpa addresses backwards?

1 comment


Inexpensive and informative Apple related e-books:

Photos for Mac: A Take Control Crash Course

Take Control of Upgrading to El Capitan

Take Control of Numbers

Take Control of Parallels Desktop 12

Take Control of High Sierra





More Articles by © Tony Lawrence







Fri Feb 25 15:11:30 2005: 72   anonymous


Very very well explaned thank you ever so much.

------------------------


Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





There are only two hard problems in computer science: cache invalidation and naming things. (Phil Karlton)




Linux posts

Troubleshooting posts


This post tagged:

Basics

Networking

UnixWords



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode