Web Hosting Talk







View Full Version : resolv.conf question


pita
01-07-2002, 02:17 PM
I'm setting up a dedicated box and the current resolv.conf has the following lines in it:

nameserver x.x.x.x
search

What does the search line do? I have only seen the search line with a doman listed after it.

allan
01-07-2002, 02:26 PM
Originally posted by pita

nameserver x.x.x.x
search

What does the search line do? I have only seen the search line with a doman listed after it.

The domain name(s) listed on the search line tell the machine to try to find a match within one of those domains if it receives input without the "."

For example, if your resolve.conf file looks like this:

nameserver 192.168.100.2
search example.com

and you type:

ping foo

from the server command line.

The server will try to find a match for foo.example.com before telling you it is unable to resolve the host.

Craig
01-07-2002, 02:27 PM
man resolv.conf

...
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 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 un*til a match is found. Note that this process may be slow and will generate a lot of network traffic if the servers for the listed domains are not local, and that queries will 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.
...


man is your friend ;)

C.