Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

From (Solaris 11.1 with current patches, m4000 128GB) syslog:

Jun 17 10:06:14 sun-m4k-03 sendmail[4993]: [ID 702911 mail.warning] gethostbyaddr(10.128.4.50) failed: 1

The ip is valid from the commandline:

ping 10.128.4.50
10.128.4.50 is alive

nslookup appears to reverse the octets when doing a lookup:

 nslookup 10.128.4.50
Server:         10.128.8.18
Address:        10.128.8.18#53

** server can't find 50.4.128.10.in-addr.arpa.: NXDOMAIN

Tried a search on the internet - no luck

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

This is correct. Reverse DNS lookups are performed by querying the PTR record for the IP address in the .in-addr.arpa domain. DNS names have the least significant/least broad component first, so octets of the IP address, which are written with the most significant/most broad component first, are put in the reverse order so that each class of network can have a DNS zones.

If you want to support reverse DNS lookups on private IP addresses, you will have to configure a zone for 10.in-addr.arpa. to hold the PTR record for 50.4.128.10.in-addr.arpa..

share|improve this answer
    
@WarrenYoung Yes, I know it has to do with DNS zones, but the order in which they are written was originally an arbitrary design decision. Had DNS been designed to use the opposite order, like Java classes, then your example hostname would be com.mycompany.www.server456, the rDNS lookup name for 10.128.4.50 would be .arpa.in-addr.10.128.4.50, and URLs would have all elements going from broader to more specific identifiers. –  depquid Jun 18 '13 at 16:26
    
@WarrenYoung You're right. In my mind, the metaphorical ordering concept extends to the components of DNS names, but since it's not a byte-ordering issue, I see how my use of the term 'endian' was confusing. I have edited my answer to remove it. –  depquid Jun 18 '13 at 16:49
    
I've removed my comments. –  Warren Young Jun 18 '13 at 16:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.