Discussion:
How can I search multiple domains in resolv.conf?
(too old to reply)
n***@gmail.com
2005-07-01 14:10:43 UTC
Permalink
Hi,

in my resolv.conf I have

domain domain1.com domain2.com
nameserver 192.168.20.61
nameserver ...

It works. But is this correct? I couldn't find it on the man page or
anywhere else. Thanks.
Barry Margolin
2005-07-02 00:07:38 UTC
Permalink
Post by n***@gmail.com
Hi,
in my resolv.conf I have
domain domain1.com domain2.com
nameserver 192.168.20.61
nameserver ...
It works. But is this correct? I couldn't find it on the man page or
anywhere else. Thanks.
You can only put one domain after "domain". If you want multiple
domains, use "search" instead:

search domain1.com domain2.com
--
Barry Margolin, ***@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
Gregory Hicks
2005-07-02 01:43:31 UTC
Permalink
X-TN-Interface: 209.99.127.20
Subject: Re: How can I search multiple domains in resolv.conf?
Date: Fri, 01 Jul 2005 20:07:38 -0400
Post by n***@gmail.com
Hi,
in my resolv.conf I have
domain domain1.com domain2.com
nameserver 192.168.20.61
nameserver ...
It works. But is this correct? I couldn't find it on the man page
or
Post by n***@gmail.com
anywhere else. Thanks.
You can only put one domain after "domain". If you want multiple
search domain1.com domain2.com
But if you do this, remember that whichever directive (search/domain)
comes second is the one that is used. The other is ignored.

eg:
domain example.com
search localhost. local.host.

The domain statement is ignored.

eg:
search localhost. local.host.
domain example.com

Here, the search is ignored.
--
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
---------------------------------------------------------------------
Gregory Hicks | Principal Systems Engineer
Cadence Design Systems | Direct: 408.576.3609
555 River Oaks Pkwy M/S 6B1 | Fax: 408.894.3479
San Jose, CA 95134 | Internet: ***@cadence.com

I am perfectly capable of learning from my mistakes. I will surely
learn a great deal today.

"A democracy is a sheep and two wolves deciding on what to have for
lunch. Freedom is a well armed sheep contesting the results of the
decision." - Benjamin Franklin

"The best we can hope for concerning the people at large is that they
be properly armed." --Alexander Hamilton
Barry Margolin
2005-07-02 05:08:36 UTC
Permalink
Post by Gregory Hicks
X-TN-Interface: 209.99.127.20
Subject: Re: How can I search multiple domains in resolv.conf?
Date: Fri, 01 Jul 2005 20:07:38 -0400
Post by n***@gmail.com
Hi,
in my resolv.conf I have
domain domain1.com domain2.com
nameserver 192.168.20.61
nameserver ...
It works. But is this correct? I couldn't find it on the man page
or
Post by n***@gmail.com
anywhere else. Thanks.
You can only put one domain after "domain". If you want multiple
search domain1.com domain2.com
But if you do this, remember that whichever directive (search/domain)
comes second is the one that is used. The other is ignored.
That's why I said "instead" rather than "in addition to". There's no
reason to have both in the resolv.conf file, since one will be ignored.
So rather than try to remember whether it uses the first or the second,
just get rid of the one you don't want.
--
Barry Margolin, ***@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
Loading...