[SunHELP] Bind 9.2.3

ssandau at gwi.net ssandau at gwi.net
Tue May 25 13:38:45 CDT 2004

>>>From the man page for resolv.conf(4) on Solaris 8 and 9:
>     "The domain and search keywords are  mutually  exclusive.  If
>     more  than  one  instance  of these keywords is present, the
>     last instance takes precedence"
> Change "takes precedence" to "wins" for the RedHat 9 man page. Other
> UNIXes may be different.
>>>Hi Lara ,
>>>yeh ur right .. basically both "Domain" and "Search"
>>options are same
>>>(either needs to be mentioned in the resolv.conf file and NOT both).
>>That's not correct.  You can have both domain and search entries.
>>DOMAIN identifies the domain to which this host belongs (and
>>which, implicitly, should be searched first for unqualified
>>hostnames).  SEARCH specifies additional domains which should
>>*also* be searched fro unqualified hostnames if they are not
>>found in DOMAIN.
>>For instance, our hosts have DOMAIN set to babcom.com.  The
>>SEARCH directive causes them to also search caerllewys.net
>>(and, at times in the past, latt.net, londonbelow.net and
>>novylen.net as well).

I had always thought that the above description was just how resolv.conf 
worked. Evidently though, the presence of a "search" line after a 
"domain" line does indeed overwrite the info in the "domain" line at 
least as far as lookups are concerned. (I did some quick testing on 
Solaris 9 04/02, and on Slackware Linux 8.1.)

However, if you want to search multiple domains as described above (and 
as I need to do in most places I work) you *need* the "search" line. 
"search" and "domain" are not the same thing.

It is possible that the domain line at the beginning of resolv.conf will 
do something else, but that's not clear from the man page. Other system 
functions are supposedly used to determine the local domain name if the 
"domain" entry is not present.

So, now I'll have "search" and "nameserver" entries in my resolv.conf 
and probably leave out the "domain" line...


More information about the SunHELP mailing list