my hosts file ignored on win2003 server, Please HELP

T

tiraman

Hi,

i have a big probelm in last few days which i can't resolve.

i defined some site lets say cnn under my hosts file but when i am
doing ping to the cnn i am getting the real site and not the 127.0.0.1.
here is my host
127.0.0.1 www.cnn.com

but, i tried to ping the site, browser the site with IE and it always
took me to the right site.

i checked the following things,
1. the extension of the hosts file - was nothing.
2. the path under the registry key DataBasePath was ok - lead to the
hosts folder %SystemRoot%\System32\drivers\etc
3. i used a file monitor on the etc folder and when i ping to cnn
nothing happen under the File monitor but when i get into the folder
the file monitor show me the operations i did.
4. i tried to ipconfig /release or flushdns or registerdns and almost
any thing i found in the net but still have the same problem.

so, as far as i can see it, my hosts file is ignored.

PLEASE ADVISE

Thanks.
 
F

foleyl

Hey Tiraman,

The priority for looking up Names and IP Address on Server 2003 is
actually DNS first. So that would be why your HOSTS file went
un-accessed.

Luckily you can change the Priority order, this can be done by running
regedit.

Once in regedit, goto the key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Add a new REG_DWORD, with a name of DnsNbtLookupOrder and give a value
of 1.

This should now use HOSTS before DNS.

Let me know if this has worked.

Many Thanks,
Luke
 
C

Chuck

Hey Tiraman,

The priority for looking up Names and IP Address on Server 2003 is
actually DNS first. So that would be why your HOSTS file went
un-accessed.

Luckily you can change the Priority order, this can be done by running
regedit.

Once in regedit, goto the key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Add a new REG_DWORD, with a name of DnsNbtLookupOrder and give a value
of 1.

This should now use HOSTS before DNS.

Let me know if this has worked.

Many Thanks,
Luke

Luke,

All of the references about the DnsNbtLookupOrder value seem to indicate that it
can be used to select DNS vs NetBIOS for name resolution, not for Hosts vs DNS
server.
<http://support.microsoft.com/kb/139270>
<http://support.microsoft.com/kb/216470>

Do you have any references which explain this value further?
 
F

foleyl

Hey,

True, but...

If the Value is set to 1 then it uses NetBIOS over IP first, and then
futher down the list is the HOSTS file, before DNS.

As the "www.cnn.com" was being resolved by DNS then this should have to
resort to the HOSTS file because none of the other options will resolve
this.

Many Thanks,
Luke
 
T

tiraman

Hey Luke,
First let me thank you for your help.
i did what you wrote and it didn't solve the problem.
i did also few other things that i found on the net.
i changed the value for this key to be the highest and lowest among the
other keys and it still not solved my problem.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider\HostsPriority

hope that you have some other solutions for me :)

Thanks,
Tiraman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top