Midtown Computer Systems Enterprise

Convenient web based access to our favorite computer related Usenet groups.
MCSE.MS is not affiliated with Microsoft corporation, Cisco corporation, Oracle, CompTIA or any other vendor.
Check our Computer Hardware forum | Database help forum | Cell Phones reviews

Go Back  MCSE > Microsoft software reviews > Windows 2000 review > DNS
This is Interesting: Free Computer Magazines Now Free shipping to

DNS microsoft.public.win2000.dns

 
 
Thread Tools Display Modes
  #1  
Old 08-25-04, 11:07 AM
Rick Mortensen
Why is hosts file not being used?
I have a couple of applications that rely upon the hosts
file in WIN2K. Through much head banging I have come to
the conclusion that W2K is not using the hosts file (I
have read and investigated the articles on hosts file
corruption with no positive results). This may be due to
a recent software installation and/or security update that
made a registry change. The trouble is I don't know which
software and what the change was...

I have searched the entire registry for 'hosts' both on
the problem machine and a machine that doesn't have the
problem. Neither produced any registry items that seemed
to relate to the problem.

The question is: Where is the use of the hosts file
configurable? I assume it will be found in the registry
somewhere but where and what is it supposed to look like
(vs. what it may look like now).

Thanks in advance..
  #2  
Old 08-25-04, 11:07 AM
Vaya
Re: Why is hosts file not being used?

"Rick Mortensen" <anonymous@discussions.microsoft.com> wrote in message
news:d1fd01c48aa7$0b2d5bb0$a601280a@phx.gbl...
> I have a couple of applications that rely upon the hosts
> file in WIN2K. Through much head banging I have come to
> the conclusion that W2K is not using the hosts file (I
> have read and investigated the articles on hosts file
> corruption with no positive results). This may be due to
> a recent software installation and/or security update that
> made a registry change. The trouble is I don't know which
> software and what the change was...
>
> I have searched the entire registry for 'hosts' both on
> the problem machine and a machine that doesn't have the
> problem. Neither produced any registry items that seemed
> to relate to the problem.
>
> The question is: Where is the use of the hosts file
> configurable? I assume it will be found in the registry
> somewhere but where and what is it supposed to look like
> (vs. what it may look like now).
>
> Thanks in advance..



Check the advanced TCP/IP settings. You can check the field "enable LMHOSTS
lookup".

Vaya.


  #3  
Old 08-25-04, 11:07 AM
Steve Parry [MVP]
Re: Why is hosts file not being used?
Rick Mortensen wrote:
> I have a couple of applications that rely upon the hosts
> file in WIN2K. Through much head banging I have come to
> the conclusion that W2K is not using the hosts file (I
> have read and investigated the articles on hosts file
> corruption with no positive results). This may be due to
> a recent software installation and/or security update that
> made a registry change. The trouble is I don't know which
> software and what the change was...
>
> I have searched the entire registry for 'hosts' both on
> the problem machine and a machine that doesn't have the
> problem. Neither produced any registry items that seemed
> to relate to the problem.
>
> The question is: Where is the use of the hosts file
> configurable? I assume it will be found in the registry
> somewhere but where and what is it supposed to look like
> (vs. what it may look like now).
>
> Thanks in advance..


Check in Internet Explorer to see if the machine is set up to use a
proxy server, I seem to recall this can bypass the HOSTS file

--
Steve Parry BA (Hons) MCP MVP

http://mvp.support.microsoft.com/
http://www.gwynfryn.co.uk



  #4  
Old 08-25-04, 11:07 AM
Rick Mortensen
Re: Why is hosts file not being used?
Steve,

Thanks for the suggestion but this is outside IE. Ping
doesn't use IE proxy info and still needs to get an IP for
a hostname (i.e. the hosts file) before it can 'ping'.

Consider the following hosts entry (with a CR after the
last entry):
192.168.1.1 testing

Regardless of the validity of the IP address ping is
supposed to go lookup the IP address if it isn't found in
DNS (not sure of the order for MS.... DNS-hosts or hosts-
DNS) and attempt to 'ping' it. Here is the response:

C:\WINNT\system32\drivers\etc>ping testing
Unknown host testing.

Thanks again...
>-----Original Message-----

....Stuff Deleted...
>Check in Internet Explorer to see if the machine is set

up to use a
>proxy server, I seem to recall this can bypass the HOSTS

file
>
>--
>Steve Parry BA (Hons) MCP MVP
>
>http://mvp.support.microsoft.com/
>http://www.gwynfryn.co.uk
>
>
>
>.
>

  #5  
Old 08-25-04, 08:08 PM
Doug Sherman [MVP]
Re: Why is hosts file not being used?
You can try creating EnableDns here:

HKLM\SYSTEM\CurrentControlSet\Services\Netbt\Param eters

see:
http://www.microsoft.com/windows2000...c_imp_wcug.asp

However, this should not be necessary. If you have edited/created a hosts
file with notepad, it may have been saved as hosts.txt. If this is the
case, rename it to remove the file extension.

Doug Sherman
MCSE Win2k/NT4.0, MCSA, MCP+I, MVP

"Rick Mortensen" <anonymous@discussions.microsoft.com> wrote in message
news:d1fd01c48aa7$0b2d5bb0$a601280a@phx.gbl...
> I have a couple of applications that rely upon the hosts
> file in WIN2K. Through much head banging I have come to
> the conclusion that W2K is not using the hosts file (I
> have read and investigated the articles on hosts file
> corruption with no positive results). This may be due to
> a recent software installation and/or security update that
> made a registry change. The trouble is I don't know which
> software and what the change was...
>
> I have searched the entire registry for 'hosts' both on
> the problem machine and a machine that doesn't have the
> problem. Neither produced any registry items that seemed
> to relate to the problem.
>
> The question is: Where is the use of the hosts file
> configurable? I assume it will be found in the registry
> somewhere but where and what is it supposed to look like
> (vs. what it may look like now).
>
> Thanks in advance..



  #6  
Old 08-25-04, 08:08 PM
Steven L Umbach
Re: Why is hosts file not being used?
If you run AdAware on your computer it should display your hosts file and alert you
to changes to the hosts file or it's default location as some spyware or viruses will
modify both. The hosts file must not have an extension to it which users commonly add
when they save it.

http://www.download.com/3000-2094-10...ml?legacy=cnet

The registry key that tells the operating system where the hosts file is located is
shown below from the follwing link. --- Steve

http://www.microsoft.com/technet/its...g/tcpip2k.mspx

HKEY_LOCAL_MACHINE
\SYSTEM
\CurrentControlSet
\Services:
\Tcpip
\Parameters

DatabasePath
Key: Tcpip\Parameters

Value Type: REG_EXPAND_SZ-Character string

Valid Range: A valid Windows NT file path

Default:: %SystemRoot%\system32\drivers\etc

Description: This parameter specifies the path to the standard Internet database
files (Hosts, Lmhosts, Network, Protocols, Services). It is used by the Windows
Sockets interface.


"Rick Mortensen" <anonymous@discussions.microsoft.com> wrote in message
news:d1fd01c48aa7$0b2d5bb0$a601280a@phx.gbl...
>I have a couple of applications that rely upon the hosts
> file in WIN2K. Through much head banging I have come to
> the conclusion that W2K is not using the hosts file (I
> have read and investigated the articles on hosts file
> corruption with no positive results). This may be due to
> a recent software installation and/or security update that
> made a registry change. The trouble is I don't know which
> software and what the change was...
>
> I have searched the entire registry for 'hosts' both on
> the problem machine and a machine that doesn't have the
> problem. Neither produced any registry items that seemed
> to relate to the problem.
>
> The question is: Where is the use of the hosts file
> configurable? I assume it will be found in the registry
> somewhere but where and what is it supposed to look like
> (vs. what it may look like now).
>
> Thanks in advance..



  #7  
Old 08-25-04, 08:08 PM
Rick Mortensen
Re: Why is hosts file not being used?
Doug,

I tried this after reading and reading and reading... I
tried it with the value being set to both 0 and 1. There
are two interesting things I found reading the article you
list below:

1. This seems to be related to netbios although at this
level it should not matter since it appears netbios just
happens to use the hosts file too.

2. The second thing that caught my attention as the very
name suggests it is to turn on and off DNS; not the use of
the hosts file. The article actually says it controls
both things but it only has two settings so I wonder how
that works....


>-----Original Message-----
>You can try creating EnableDns here:
>
>HKLM\SYSTEM\CurrentControlSet\Services\Netbt\Para meters
>
>see:
>http://www.microsoft.com/windows2000...nfo/reskit/en-

us/default.asp?url=/windows2000/techinfo/reskit/en-
us/cnet/cnbc_imp_wcug.asp
>
>However, this should not be necessary. If you have

edited/created a hosts
>file with notepad, it may have been saved as hosts.txt.

If this is the
>case, rename it to remove the file extension.
>
>Doug Sherman
>MCSE Win2k/NT4.0, MCSA, MCP+I, MVP
>
>"Rick Mortensen" <anonymous@discussions.microsoft.com>

wrote in message[vbcol=seagreen]
>news:d1fd01c48aa7$0b2d5bb0$a601280a@phx.gbl...
to[vbcol=seagreen]
that[vbcol=seagreen]
which[vbcol=seagreen]
seemed
>
>
>.
>

  #8  
Old 08-25-04, 08:08 PM
Rick Mortensen
Re: Why is hosts file not being used?
Thank Steve,

I found all this on Microsoft's web (been searching for
two days). I already have AdAware with all the current
updates; it didn't find anything and yes the hosts file is
named 'hosts'.

My head is getting a flat spot from banging it on the
wall. The next and most painful move I do my best to
avoid is starting to look like it would take less time
than fixing this... Format and re-load... Ouch!

Thanks for your help.
Rick
>-----Original Message-----
>If you run AdAware on your computer it should display

your hosts file and alert you
>to changes to the hosts file or it's default location as

some spyware or viruses will
>modify both. The hosts file must not have an extension to

it which users commonly add
>when they save it.
>
>http://www.download.com/3000-2094-10045910.html?

legacy=cnet
>
>The registry key that tells the operating system where

the hosts file is located is
>shown below from the follwing link. --- Steve
>
>http://www.microsoft.com/technet/its.../network/deplo

y/depovg/tcpip2k.mspx
>
>HKEY_LOCAL_MACHINE
> \SYSTEM
> \CurrentControlSet
> \Services:
> \Tcpip
> \Parameters
>
>DatabasePath
>Key: Tcpip\Parameters
>
>Value Type: REG_EXPAND_SZ-Character string
>
>Valid Range: A valid Windows NT file path
>
>Default:: %SystemRoot%\system32\drivers\etc
>
>Description: This parameter specifies the path to the

standard Internet database
>files (Hosts, Lmhosts, Network, Protocols, Services). It

is used by the Windows
>Sockets interface.
>


  #9  
Old 08-25-04, 08:08 PM
Ace Fekay [MVP]
Re: Why is hosts file not being used?
In news:01aa01c48adf$3e67d9f0$a601280a@phx.gbl,
Rick Mortensen <anonymous@discussions.microsoft.com> made a post then I
commented below
> Thank Steve,
>
> I found all this on Microsoft's web (been searching for
> two days). I already have AdAware with all the current
> updates; it didn't find anything and yes the hosts file is
> named 'hosts'.
>
> My head is getting a flat spot from banging it on the
> wall. The next and most painful move I do my best to
> avoid is starting to look like it would take less time
> than fixing this... Format and re-load... Ouch!
>
> Thanks for your help.


When you run an ipconfig /displaydns, what do you see?

Then run an ipconfig /flushdns, then run a /displaydns again. What you
*should* see is two entries for localhost, and whatever entries you may have
entered in the hosts file.

Curious, how did you determine that its not using the hosts file? How are
you testing it? Pinging? Web address?

--
Regards,
Ace

Please direct all replies ONLY to the Microsoft public newsgroups
so all can benefit.

This posting is provided "AS-IS" with no warranties or guarantees
and confers no rights.

Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT, MVP
Microsoft Windows MVP - Windows Server - Directory Services

Security Is Like An Onion, It Has Layers
HAM AND EGGS: A day's work for a chicken;
A lifetime commitment for a pig.
--
=================================


  #10  
Old 08-27-04, 08:08 PM
Rick Mortensen
Re: Why is hosts file not being used?
Thanks Ace,

ipconfig /displaydns shows everything in the cache; after
clearing it (ipconfig /flushdns) it comes up empty.

Yes I have been testing the hosts file with ping; read
several MS articles regarding a <CR> after the last entry
so I even made sure that was in there. I replaced the
hosts file with a known working copy from another machine
incase there was some corruption not showing up in notepad.

After not really getting the direction I had hoped from
here (this appears to be really deep) I engaged MS Support
and while it is slow it appears they at least are looking
in the right direction. I am starting to suspect one of
the files associated with winsock was either replaced or
corrupted somehow. Everything I check against another
WIN2K PC in the registry appears to be correct...

Feel free to keep posting your thoughts though; you might
beat them to it and while it isn't a race I would like to
get this machine back to health without reloading
Windows...

Thanks

Rick

;>
>When you run an ipconfig /displaydns, what do you see?
>
>Then run an ipconfig /flushdns, then run a /displaydns

again. What you
>*should* see is two entries for localhost, and whatever

entries you may have
>entered in the hosts file.
>
>Curious, how did you determine that its not using the

hosts file? How are
>you testing it? Pinging? Web address?
>
>--
>Regards,
>Ace
>


 


Popular forums
A+ (A Plus) Windows 2000 Active directory Exchange 2000 information store
Network+ Windows XP Security Exchange 2000 server administration
MCSE .NET Web services SQL Server
Cisco certification ASP .NET SQL 2000 Programming
Windows 2000 Registry .NET XML Viruses


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:18 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright MCSE braindumps 2003-2006