Operating System - HP-UX
1819504 Members
2971 Online
109603 Solutions
New Discussion юеВ

Search or Domain in /etc/resolv.conf ??

 
SOLVED
Go to solution
Stuart Abramson_2
Honored Contributor

Search or Domain in /etc/resolv.conf ??

Our DNS team maintains the WABTEC DNS on Wintel Servers.

We run /etc/resolv.conf on our servers as "DNS clients". We DON'T run "named"
on our servers.

About a month ago, (I thought) they asked me to change our /etc/resolv.conf to
look like this:

# cat resolv.conf
search wabtec.com wcc.wabtec.com wab.wabtec.com wab.wabco-rail.com
nameserver 172.20.203.21 # wccnts001.wabtec.com
nameserver 172.20.203.22 # wccnts002.wabtec.com
#nameserver 166.109.1.3 # ns.digex.com


They changed our registed domain name from "wabco-rail.com" to "wabtec.com".

Now they tell me, no, they meant that I should put both a search and a domain
statement in the resolv.conf, like this:

# cat resolv.conf
domain wcc.wabtec.com
search wabtec.com wcc.wabtec.com wab.wabtec.com wab.wabco-rail.com
nameserver 172.20.203.21 # wccnts001.wabtec.com
nameserver 172.20.203.22 # wccnts002.wabtec.com
#nameserver 166.109.1.3 # ns.digex.com

Do I want to do that? Is it legal?
4 REPLIES 4
Brian Bergstrand
Honored Contributor

Re: Search or Domain in /etc/resolv.conf ??

There is no need to do it, since your search list already specifies the domain. If you have/want to add the domain, then just remove it from the search list. The search list is appended to the domain.

HTH.
Michael Steele_2
Honored Contributor

Re: Search or Domain in /etc/resolv.conf ??

Here you go:

domain - The domain entry is needed only when the local system's host name (as returned by the hostname command) is not a domain name, and the search option is not configured.

search - The first domain in the search list must be the local domain.

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90685/B2355-90685_top.html&con=/hpux/onlinedocs/B2355-90685/00/00/26-con.html&toc=/hpux/onlinedocs/B2355-90685/00/00/26-toc.html&searchterms=resolv.conf&queryid=20020109-113052
Support Fatherhood - Stop Family Law
Hai Nguyen_1
Honored Contributor

Re: Search or Domain in /etc/resolv.conf ??

Stuart,

search and domain are mutually exclusive. In other word, if you use search then do not use domain and vice versa. If you choose to use search, the first domain in the search list must be the local domain. man resolv.conf for more info.

Hai
Hai Nguyen_1
Honored Contributor
Solution

Re: Search or Domain in /etc/resolv.conf ??

Stuart,

I filter some info in the man page resolv.conf for you

....
Search list for host-name lookup. If the search option is not used the search list will contain only the the local domain name. The search list can be changed by listing the desired domain search path following the search keyword with spaces or tabs separating the names. Most resolver queries will be attempted using each component of the search path in turn until a match is found. Note that this process may be slow and generates a lot of network traffic if the servers for the listed domains are not local, and that queries time out if no server is available for one of the domains.

The search list is currently limited to six domains with a total of 256 characters. The first domain in the search list must be the local domain for short names to work properly in various files (such as .rhosts and inetd.sec)
.....
The domain and search keywords are mutually exclusive. If more than one instance of these keywords is present, the last instance overrides.
...

Hai