Windows 2000 does not honor HOSTS file?


I am having a tricky problem, perhaps you can help me. I am running a small network with 20 hosts. There is no domain controller, and not even a DNS server. Neither is a DHCP server. All clients use static IP addresses, and all name resolving is done through the HOSTS file on each client. At user logon the HOSTS file is copied from a network share to the %WINDIR%\system32\drivers\etc directory.

This solution is easy to administrate, and only needs a very small administrative effort. And it's working fine, save one exception... clients running Windows 2000. The operating system doesn't seem to read the hosts file there. It's working fine for Windows XP clients, but doesn't work with Windows 2000.

Does anyone know what could be the problem? I have attached a snippet of the hosts file below.

The network configuration for the clients is as follows:

IP: 192.168.3.X
DNS1: My ISP's 1st DNS
DNS2: My ISP's 2nd DNS

As said, the configuration is the same for WIndows XP and Windows 2000 clients.

If I enter ping server in Windows XP, I get:

Ping SERVER [] with 32 bytes of data: (...)

If I do the same with Windows 2000 I get:

Unknown host server.

If anyone could point me into the right direction that would be appreciated!
# Last Update: 11/17/08

Open in new window

Who is Participating?
CoronatusConnect With a Mentor Author Commented:
I already found the solution. I put spaces at the beginning of each line to indent the entries slightly, for easier recognition. Apparently Windows 2000 does not like spaces at the beginning of a line in the hosts file whereas Windows XP does. I removed the spaces and now it works. Apparently this is a bug with Windows 2000 network support.

Brian PiercePhotographerCommented:
>> This solution is easy to administrate, and only needs a very small administrative effort <<

Does not sound like it to me ! If you use an internal DNS server then admin effort is ZERO.

CoronatusAuthor Commented:
I just edit a text file and have even less administrative effort. It's easier than setting up a DNS server in my opinion. Plus, setting up a DNS server with Linux using bind or bind9 is tedious and requires time I don't have. Using a DNS server with WIndows might be easier, but I need to buy Windows Server for that, or spend time digging up some freeware solution.

Either way is more complicated than just editing a text file on a network share using notepad.
1. What happens when you enter

ping -a

2. Have you tried to flush the dns (ipconfig / flushdns)?

3. Open your TCP/IP properties, select the DNS tab and make sure there are no DNS suffixes.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.