[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Strange DNS lookup characteristics



I am experiencing a strange problem where my system is looking up the DNS
servers before the hosts file when I refer to local names. I have cut my hosts
file down to the most basic hosts file that one can have (127.0.0.1	      
localhost) and when I type 'telnet localhost' it still thinks it needs to
lookup the request on the DNS server. /etc/nsswitch.conf has been set to query
the hosts file before the dns server, so that is not where the problem lies.  

I have made two interesting observations. First, if I type "ping localhost"
everything goes as expected, likewise if I type 'ftp localhost'.  It seems to
be telnet which is causing the problem (and the same happens I send or receive
mail to the local ipop3d or exim daemons)

Second is that if I remove the word 'dns' from /etc/nsswitch.conf, or if I
remove the name server entries from /etc/resolv.conf, everything goes as
planned (apart from the obvious problem that I now can't query anything APART
from the hosts file!)

Any help is greatly appreciated
Richard




Reply to: