HOSTS file

N

null

I have put a line like the following in my HOSTS file, located in
c:\windows:

127.0.0.1 www.netflix.com

The file is saved via notepad with no filename extension. When I ping or
tracert to www.netflix.com, it pings netflix's real IP address, not the
address in the HOSTS file. As an experiment, I put the same HOSTS file
in c:\windows\system32\drivers, with the same results, even after rebooting.

Anyone know how to correct this?

--
-the small one

All postings carry no guarantee or warranty, expressed or implied.
Proceed at your own risk, and perform system and data backups prior to
making changes to your system, and on a regular basis, to protect your
system.
 
R

Rob Schneider

null said:
I have put a line like the following in my HOSTS file, located in
c:\windows:

127.0.0.1 www.netflix.com

The file is saved via notepad with no filename extension. When I ping or
tracert to www.netflix.com, it pings netflix's real IP address, not the
address in the HOSTS file. As an experiment, I put the same HOSTS file
in c:\windows\system32\drivers, with the same results, even after
rebooting.

Anyone know how to correct this?

I believe the right place to put this info is in:
c:\windows\system32\drivers\etc\lmhosts ... the file name with the "lm"
is historical and relates to the term "LAN Manager" way back in the late
1980's. There's an explanation of why it's not "hosts", but I can't
remember it.
 
R

Ramesh

Try adding another entry without the www. prefix.
Also, test if any other site in HOSTS file can be ping'ed

--
Regards,
Ramesh
(e-mail address removed)


I have put a line like the following in my HOSTS file, located in
c:\windows:

127.0.0.1 www.netflix.com

The file is saved via notepad with no filename extension. When I ping or
tracert to www.netflix.com, it pings netflix's real IP address, not the
address in the HOSTS file. As an experiment, I put the same HOSTS file
in c:\windows\system32\drivers, with the same results, even after rebooting.

Anyone know how to correct this?

--
-the small one

All postings carry no guarantee or warranty, expressed or implied.
Proceed at your own risk, and perform system and data backups prior to
making changes to your system, and on a regular basis, to protect your
system.
 
N

null

Will said:
Hi Rob

The lmhosts.sam is a 'sample' file - as the extension suggests - and has nothing to do with a LAN Manager -where did you get that info from?

Will

My understanding is that the lmhosts file is for NetBIOS name resolution.

--
-the small one

All postings carry no guarantee or warranty, expressed or implied.
Proceed at your own risk, and perform system and data backups prior to
making changes to your system, and on a regular basis, to protect your
system.
 
R

Rob Schneider

Will said:
Hi Rob

The lmhosts.sam is a 'sample' file - as the extension suggests - and has nothing to do with a LAN Manager -where did you get that info from?

Will


The info comes from the dregs of my memory ... (remember that I said I
can't remember).

I also know that it just works for me. I'm happy to be proven
otherwise, or to have it explained why it *should* not work.

I know that putting the infor into hosts (or HOSTS ... which by the way
should make no difference upper/lower case as reported by others since
XP doesn't distinguish between this).

I also know that the file is called /etc/hosts in the Unix world.
 
C

CZ

Third, be sure that the very first non-commented line is 127.0.0.1
localhost

Jim:

I periodically, rename the hosts file to test that the "ping localhost" cmd
works without the lookup via the file.
It has always worked.
Have you every tried it and had it not work?
 
C

CZ

Re: HOSTS file name in all caps
See here, for example:
http://support.microsoft.com/default.aspx?scid=kb;en-us;228760
"4. Save the HOSTS file.
NOTE: This file must be upper case, and should NOT have a file name
extension. In other words, the file name should simply be HOSTS."

Jim:

That article references IIS 4.0, which is of the NT 4.0 era IIRC.
A quick trip through the MSKB did not provide additional info.

I have never had a problem with lower case, but that may be helpful when
nothing else works.
I currently use the "hosts" file to keep ZA free v3.1.395 from doing a DNS
lookup for lockup.zonelabs.com.
 
J

Jim Byrd

Hi CZ - No, that's fine. It's mostly a speed issue.

--
Please respond in the same thread.
Regards, Jim Byrd, MS-MVP



In
 
J

Jim Byrd

HI CZ - There has been some speculation that these infrequently occuring
errors may be mostly (but unfortunately not always) associated with intranet
lookups, which is somewhat borne out by that article (although the HOSTS
file is pretty far down the chain for NetBIOS resolution after the NetBIOS
cache, the WINS server, B-node broadcast and the LMHOSTS file. However, it
would be immediate for Winsock name resolution, followed by the DNS
server.). For example, I just recently had one report of going to all caps
clearing up a persistent very long term addressing problem experienced by 3
particular local nodes on a 5 node system. As you say, you've never had a
problem w/lower case - most people don't or either don't notice it if they
do. It can be essentially masked, since you can have a transient DNS
failure and you do a Refresh and the second time it works - that kind of
thing - and it's difficult to determine just how often that kind of thing
occurs and is attributable to this. It's when this starts becoming frequent
and you change to all caps and it stops that supports the need for it, and
this has happened on some occasions. One final thought - In (almost) all of
MS technical literature, it's consistently referred to as HOSTS (in caps
) including NT5.x related documentation.

--
Please respond in the same thread.
Regards, Jim Byrd, MS-MVP



In
 

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