LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This 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


Reply
  Search this Thread
Old 04-14-2010, 02:41 PM   #1
mfitzpat
LQ Newbie
 
Registered: Feb 2004
Location: Boston, MA
Distribution: Centos
Posts: 27

Rep: Reputation: 15
multiple domains in resolv.conf


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:

http://www.linuxquestions.org/questi...le-dns-643610/

My /etc/resolv.conf:

domain spartans
nameserver 172.20.0.1
nameserver 128.197.253.183
nameserver 128.197.253.120
options domain-name "bu.edu"


I can resolve hosts in the spartan domain, but not the bu.edu domain

hecate:/etc> host userB.spartans
userB.spartans has address 172.20.0.3

hecate:/etc> host morta.bu.edu
Host morta.bu.edu not found: 3(NXDOMAIN)

My nsswitch.conf file has the following:
hosts: files dns

/etc/hosts file also lists the hosts/ip's


Seems like I am missing a directive or the order of the directives is overwriting something..

Any help/advice appreciated.
Thanks
mef
 
Old 04-14-2010, 02:53 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
It should just be:
Code:
search spartans bu.edu
nameserver 172.20.0.1
nameserver 128.197.253.183
nameserver 128.197.253.120
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.
 
Old 04-14-2010, 03:01 PM   #3
mfitzpat
LQ Newbie
 
Registered: Feb 2004
Location: Boston, MA
Distribution: Centos
Posts: 27

Original Poster
Rep: Reputation: 15
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?
 
Old 04-14-2010, 03:09 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
1 members found this post helpful.
Old 04-14-2010, 03:10 PM   #5
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by mfitzpat View Post
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?
Shouldn't it be...

Code:
search spartans
search bu.edu
nameserver 172.20.0.1
nameserver 128.197.253.183
nameserver 128.197.253.120
Each "search" is it's own line AFAIK
 
Old 04-14-2010, 03:32 PM   #6
mfitzpat
LQ Newbie
 
Registered: Feb 2004
Location: Boston, MA
Distribution: Centos
Posts: 27

Original Poster
Rep: Reputation: 15
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.

I'll have to check the my dns setup.
Thanks
 
Old 04-15-2010, 09:28 AM   #7
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by custangro View Post
Each "search" is it's own line AFAIK
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.
 
Old 04-15-2010, 09:30 AM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
the resolv.conf does not have 127.0.0.1

And the nameserver 172.20.0.1 is running dns
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.
 
1 members found this post helpful.
Old 04-15-2010, 10:25 AM   #9
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by MensaWater View Post
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:
Ahh...I've always put them on separate lines.

Learn something new everyday

-C
 
Old 04-15-2010, 01:03 PM   #10
mfitzpat
LQ Newbie
 
Registered: Feb 2004
Location: Boston, MA
Distribution: Centos
Posts: 27

Original Poster
Rep: Reputation: 15
No worries.. I figured as much.

Name resolution is working now. Thanks for your advice/help. Provided detail incase others have same issue.

I updated the named.conf file on my DNS server to forward to the bu.edu nameservers.

};
forward only;
forwarders{
128.197.253.183;
128.197.253.120;
};

restarted named

hecate:/etc> host morta
morta.bu.edu has address 128.197.129.132
hecate:/etc> host userb

my resolv.conf:
search spartans bu.edu
nameserver 172.20.0.1
nameserver 128.197.253.183
nameserver 128.197.253.120


Thanks again.
 
Old 04-15-2010, 01:15 PM   #11
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
No problem. Glad you got it working.

Don't forget to mark it SOLVED.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dhcpd.conf configure for multiple domains quasi3 Linux - Networking 4 12-11-2009 01:06 PM
[SOLVED] multiple ppp tunnels and eth0... dns priority in resolv.conf deadeyes Linux - Server 3 12-03-2009 03:15 PM
/etc/resolv.conf resolving sub-domains noir911 Linux - Server 2 02-10-2008 10:29 PM
multiple DNS entries to /etc/resolv.conf noir911 Linux - Networking 1 02-26-2007 11:43 PM
Issue with resolv.conf : Multiple DNS with two NIC's lank23 Linux - Networking 4 01-30-2007 09:38 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 01:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration