Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have multiple domains and nameservers that I have add to my resolv.conf to resolv hostnames on two subnets. Running Solaris10 x86. System has two Nics, each connected to a different network.
Trying to have my system resolve hosts on two different domains. I have read a post (2008) but the file details were missing:
That will allow you to search by shortname for either domain - If it finds it in spartans then it won't look in bu.edu. If it doesn't find it in spartans it will look in bu.edu.
So "host userB" and "host morta" should find userB.spartans and morta.bu.edu respectively.
However, that's not your probelm - Your problem is your name servers don't know or aren't reporting morta.bu.edu - I know this because you put in the long name and got the NXDOMAIN response:
Quote:
hecate:/etc> host morta.bu.edu
Host morta.bu.edu not found: 3(NXDOMAIN)
If you put in long name (Fully Qualified Domain Name a/k/a FQDN) as you did then it shouldn't search by short name.
Thanks... I did update the resolv.conf as you suggested and it still does not resolve short or long on the bu.edu domain.
hecate:/etc> host morta
Host morta not found: 2(SERVFAIL)
hecate:/etc> host morta.bu.edu
Host morta.bu.edu.bu.edu not found: 2(SERVFAIL)
But I can ping the system by host name:
hecate:/etc> ping morta.bu.edu
morta.bu.edu is alive
"However, that's not your probelm - Your problem is your name servers don't know or aren't reporting morta.bu.edu - I know this because you put in the long name and got the NXDOMAIN response:"
Could you point me to where should I be looking to resolve the issue?
Do you have morta.bu.edu in /etc/hosts on the system you're trying this from? If it is in /etc/hosts then ping will find it but host and nslookup won't because they only interrogate name servers.
Your response from host this time indicates the name servers still don't know the answer.
As to troubleshooting:
1) You have 127.0.0.1 in resolv.conf - Unless you're running DNS (e.g. BIND) on the local host that shouldn't be there. It just causes it to take longer to search because it has to timeout on that one before going to the next one.
2) The two nameservers you listed - one of them must be have DNS (e.g. BIND) running and report an answer for bu.edu domain or know where to refer it to. In BIND you'd need to have zone file for bu.edu and an entry in named.conf for bu.edu that tells it where the zone file is.
Thanks... I did update the resolv.conf as you suggested and it still does not resolve short or long on the bu.edu domain.
hecate:/etc> host morta
Host morta not found: 2(SERVFAIL)
hecate:/etc> host morta.bu.edu
Host morta.bu.edu.bu.edu not found: 2(SERVFAIL)
But I can ping the system by host name:
hecate:/etc> ping morta.bu.edu
morta.bu.edu is alive
"However, that's not your probelm - Your problem is your name servers don't know or aren't reporting morta.bu.edu - I know this because you put in the long name and got the NXDOMAIN response:"
Could you point me to where should I be looking to resolve the issue?
Ah... yes, the morta is in the hosts file
the resolv.conf does not have 127.0.0.1
And the nameserver 172.20.0.1 is running dns for my CentOS cluster. The named.conf file on my dns server (172.20.0.1) does not list the bu.edu domain. Interestingly, the centos systems can resolv hostnames on both domains/network with basically the same resolv.conf file.
No - you can have multiple domains specified in one search line - We have 3 in all our internal systems which include Solaris, Linux, HP-UX and SCO.
From the man page for resolv.conf on CentOS5:
Quote:
search Search list for host-name lookup.
The search list is normally determined from the local domain
name; by default, it contains only the local domain name. This
may be changed by listing the desired domain search path follow-
ing the search keyword with spaces or tabs separating the names.
Last edited by MensaWater; 04-15-2010 at 09:35 AM.
Apparently I have a mild form of dyslexia or I just wasn't paying attention. I saw your first line and somehow thought it was 127.0.0.1.
If you have others hosts using the same resolv.conf that are finding it I wonder if perhaps the issue is that you're somehow not getting to one of the nameservers from the host having the issue but are from the others. This could be due to no route to the network, blocked port (e.g. 53 for query) or random block for return packets in a firewall or iptables. Trying a ping from the host that does work and comparing to the one that doesn't might instructive. Similarly trying a "telnet <nameserver> 53" might help.
Last edited by MensaWater; 04-15-2010 at 09:40 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.