DNS cache and hosts file ignored
- From: Caleb Lyness <CalebLyness@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 2 Jun 2006 05:41:02 -0700
Hello everyone,
I have a nice new installation of Window XP Pro 64. SP 1 (v2003).
My problem can be stated rather simply as: My hosts file is being completely
ignored by the DNS client.
The Hosts file is valid (name and content) and located in the correct
folders. The registery settings are correctly set to find the hosts file. I
have read the tech manuels on Microsofts web site looking for any hidden
gotchas. Nothing strange there, and indeed they reflect my understand of how
my domain names should be resolved
Here are some links to the resource I have been using
http://www.microsoft.com/technet/itsolutions/network/deploy/
depovg/tcpip2k.mspx
http://www.microsoft.com/technet/itsolutions/network/evaluat
e/technol/tcpipfund/tcpipfund_ch07.mspx
Right, so now I will draw your attention to the following text from the
above resource (give or take some typos):
This file maps host names to IP addresses. For TCP/IP for Windows XP and
Windows Server 2003, the contents of the Hosts file are loaded into the DNS
client resolver cache.
And then then a little further down some comments about the dns client
resolver are made, which I have summerised/hacked out as follows:
The DNS Client Resolver Cache
The DNS client resolver cache stores entries for both successful and
unsuccessful DNS name resolutions.
* The contents of the cache are built dynamically from the Hosts file
and from DNS queries.
* DNS query entries are kept only for the Time to Live (TTL) period.
* Hosts file entries do not have a TTL and are kept until the entry is
removed from the Hosts file.
The ipconfig /displaydns command can be used to view the contents of the DNS
client resolver cache and ipconfig /flushdns flushes the cache and refreshes
the DNS client resolver cache with just the entries in the Hosts file.
The documenation is quite clear. I flushed the cache and then listed the
contents on the 64 bit PC. The cache was empty. I did the same thing on
another machine, and their the cache contained the hosts file, as promised.
After some more googling I came across a wikipedia entry which stated the
following (give or take a few edits):
Windows XP SP2, and perhaps other versions, appears to ignore the hosts file
if the "DNS Client" service is running. One workaround is to stop the DNS
Cache service. To preserve this setting across reboots ensure that the
service is reconfigured to start manually. (Being a good sport, I added some
text to the entry)
The strange thing is that the 2nd machine I tested on, is an XP SP2
installation... Further, when I turn off this service as suggested, my hosts
file works as expected.
So the question is what is going on here? Is this a bug? Or am I missing
some magic settings that will make dns caching read the hosts file as
promissed in the docs?
When I searched the forum for similar topics I read that some one had the
reverse problem. i.e. when the cache was turned off resolving failed. Which
make sense to me... go figure.
Any ideas?
.
- Follow-Ups:
- Re: DNS cache and hosts file ignored
- From: Daniel Crichton
- Re: DNS cache and hosts file ignored
- From: POSITRON
- Re: DNS cache and hosts file ignored
- Prev by Date: Re: File Sharing breaks while "in use" (Normal)
- Next by Date: Re: Connecting to a Domain while retaining settings
- Previous by thread: Re: File Sharing breaks while "in use" (Normal)
- Next by thread: Re: DNS cache and hosts file ignored
- Index(es):
Relevant Pages
|