What is domain and search in /etc/resolv.conf

I see something like below, can someone explain me what is 'domain' and 'search' and how it affects the domain name resolution. Thanks!
bash-3.2$ cat /etc/resolv.conf 
domain blr.corp.company.com
search blr.corp.company.com
nameserver 10.66.80.110
nameserver 10.66.80.111

Open in new window

beer9Asked:
Who is Participating?
 
TintinConnect With a Mentor Commented:
As an example, say you have

search x.example.com y.example.com

then when you do a lookup with a fully qualified domain name, eg:

nslookup server

The search line tells that it should first lookup

server.x.example.com

and if nothing is found, search

server.y.example.com
0
 
omarfaridConnect With a Mentor Commented:
when users are not typing FQDN then the search domains will be tried along with the domains names in search clause

from man page:

"The domain and search keywords are mutually exclusive. If more than one instance of these keywords is present, the last instance takes precedence."

http://docs.sun.com/app/docs/doc/816-5174/resolv.conf-4?a=view
0
 
Hanno P.S.Connect With a Mentor IT Consultant and Infrastructure ArchitectCommented:
"search" and "domain" is basically the same. You should only use one or the other.
If you have both in your file, the last entry takes precedence.
If you have no "domain" (or "search") entry, the system will determine your domain
from you systems's name: Everything following the first dot will be considered your
domain name. If there is no dot, the root domain "." will be assumed.
0
 
beer9Author Commented:
Thank you :-)
0
All Courses

From novice to tech pro — start learning today.