WJCarpenter writes:
3. It sounds like the resolver is ignoring whatever you put in
/etc/hosts. You may be able to alter it's behavior by messing with
/etc/host.conf (on Linux, various other places on other UNIX
variants). That will be OK for a small number of hosts, but there is
a reason people use DNS instead of /etc/hosts, so don't overdo it.
Note that on Solaris and most Linux distributions you can set up
/etc/nsswitch.conf (I think the name means "Name Service Switch")
which will instruct the resolver whether to use /etc/hosts, DNS, or
some other methods like NIS to resolve hostnames to IP addresses. You
can specify more than one method, and specify the order in which they
are searched. Putting "files" first causes the /etc/hosts file to be
consulted before sending any DNS requests. Read the manpage for
nsswitch.conf for more info.