LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Reverse lookup fail for another domain (https://www.linuxquestions.org/questions/linux-networking-3/reverse-lookup-fail-for-another-domain-884270/)

terencewklau 06-03-2011 01:53 AM

Reverse lookup fail for another domain
 
Hi,

I've got 2 domains:

one.domain.com
two.domain.com

This is how I've configured my resolv.conf file:

search one.domain.com two.domain.com
nameserver 1.2.3.4 #Windows 2008 dns server for one.domain.com
nameserver 1.2.3.5 #Windows 2003 dns server for two.domain.com

When I run the host command, it can resolve machines in one.domain.com using both hostname and ipaddress.

But when I run the host command for machines in two.domain.com, it only works for hostnames but not ip addresses. The result for ip addresses is:

Host 100.3.2.1.in-addr.arpa not found: 3(NXDOMAIN)

Why doesn't it try the 2nd nameserver in the resolv.conf file when resolving by ip adddress? Reverse pointers are configured for each machine in their respective domain dns servers.

O/S is Oracle VM Server 2.2.1 (similar to Red Hat). Kernel is 2.6.18-128.2.1.4.37.el5xen.

Thanks.

bathory 06-03-2011 06:47 AM

Hi,
Quote:

Reverse pointers are configured for each machine in their respective domain dns servers.
From your post, I can understand that both domains are in the same 1.2.3.x subnet.
In this case you cannot have 2 dns servers authoritative for different chunks of the same 3.2.1.in-addr.arpa reverse zone*. You need to configure one as a master for the whole reverse zone and the other as slave

*You can split the 3.2.1.in-addr.arpa zone in 2 chunks (in the master dns) and delegate the 2nd chunk (containing the records for the IPs of the 2nd domain) to the 2nd dns server. Unfortunately I don't know how you can do this in a windows dns server, but this bind configuration should let you get the idea.

Regards

terencewklau 06-03-2011 10:17 PM

Thanks for your reply. We're in the process of changing our domain name and hence the existence of 2 domains at the moment. While we migrate servers over to the new domain, I was hoping the resolv.conf file would be enough for name resolution (both forward and revers) across both domains in the short term.

The old domain would eventually disappear but in the short term, there will be linux servers in both domains (in a predominantly windows environment). I can create A records and reverse pointers for the linux servers in the new domain's dns server and then both forward and reverse lookups will work.

But I was curious how the resolv.conf file works under the hood (man page says it tries each name server in order but it only worked for name resolution and not by ip).

And if I could just tap your expertise a little further. If I add the dns record in the new domain, for example server1.one.domain.com with its relevant reverse pointer as well, but server1's network config hasn't change. Hostname is still server1.two.domain.com in both /etc/hosts and /etc/sysconfig/network, would there be any issues?

Thanks again.

bathory 06-04-2011 03:38 AM

Quote:

But I was curious how the resolv.conf file works under the hood (man page says it tries each name server in order but it only worked for name resolution and not by ip).
It tries each name server in the order they appear in resolv.conf only if there was no response from the previous one. If one nameserver responds with whatever answer, it stops querying them.

Quote:

If I add the dns record in the new domain, for example server1.one.domain.com with its relevant reverse pointer as well, but server1's network config hasn't change. Hostname is still server1.two.domain.com in both /etc/hosts and /etc/sysconfig/network, would there be any issues?
There will be issues for services running locally on server1 (if use of /etc/hosts precedes that of dns) and for other computers in your lan, that also have an entry for server1 in their hosts file.

Regards

terencewklau 06-05-2011 07:39 PM

Thanks. We don't have other server entries in the hosts file but I'll keep an eye on them. Cheers.


All times are GMT -5. The time now is 06:25 PM.