|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
/ect/resolv.conf on obsd
reader
newsguy.com
Date: Mon Feb 20 2006 - 12:19:05 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Running current on a home lan of several computers.
Running bind-9.3.2 (not on the obsd box)
Trying to understand the various ways of using keywords in
/etc/resolv.conf.
On my setup the obsd box resolv.conf looks like:
domain local.net0
nameserver 192.168.0.4 # local lan name server
nameserver 192.168.0.20 # linked to IPs nameservers
lookup file bind
local.net0 is my home lan domain.
From reading `man resolv.conf' It sounds like the last line above
aught to make my resolver look at /etc/hosts before querying the
nameserver. However I'm not really sure what this passage in man page
is saying exactly:
lookup This keyword is used by the library routines gethostbyname(3)
and gethostbyaddr(3). It specifies which databases should be
searched, and the order to do so. The legal space-separated
values are:
bind Use the Domain Name server by querying named(8).
file Search for entries in /etc/hosts.
yp Talk to the YP system if ypbind(8) is running.
If the lookup keyword is not used in the system's resolv.conf
file then the assumed order is bind file. Furthermore, if
the system's resolv.conf file does not exist, then the only
database used is file.
Its not clear to me there if a hostname that is not in the home domain
would come under the `lookup' rule.
What I'm after here is to be able to use short names for a remote
domain that I have accounts in. So I thought if I put their names in
/etc/hosts then I could use their short names at the command line.
hosts contains (amongst others):
some.remote.com NNN.NNN.NN.NNN some
With resolv.conf set as shown, typing:
nslookup some
Gets me a host in japan completely unrelated to what I have in hosts.
I can get the desired result by putting a line like this:
search local.net0 some.com
In resolv.conf
Then typing short names of `some.com' domain hosts works as expected.
The draw back is that with that method I generate what is really
unnecessary nameserver traffic to and from the remote domain.
I thought by using the `lookup' keyword as above I could get the same
result without generating unneeded traffic. But it does not behave
that way. Apparantly I'm not understanding what it really does.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]