Unsolved
This post is more than 5 years old
8 Posts
0
93020
November 22nd, 2003 01:00
Hosts File Not Working- Can Ping IP Address but not Hostname
I have a brand new Inspiron 600M with XP Pro. I added an entry to my Hosts file for a server I wish to access by name rather than by IP address. The entry looks like this:
100.100.30.4 unix4
I hit enter after this line in the Hosts file, and I save it from Notepad with no extension.
I can ping the IP address just fine, but when I ping unix4 by name, it cannot resolve the name.
I have searched the MS Knowledge base and this forum extensively, I am not finding anything to solve the problem. I did see the thread from Ian Ogilvie where he ultimately found the corrupt registry entry for TCPiP paramter DataBasePath. I checked my entry for this and it was OK. It was actually in lowercase, whereas my pathname is in uppercase, I tried changing that but it did not fix the problem.
Please help me figure out when my awesome new notebook doesn't access my Hosts file!
Thanks for any input or ideas in advance,
Jake


jakep1970
8 Posts
0
November 22nd, 2003 01:00
OK, I just noticed something VERY odd, which makes me think a virus is to blame. There is a file called "quotes" in my WINDOWS\SYSTEM32\DRIVERS\ETC directory. I contains a bunch of literary quotes. I surely didn't put it there, and this machine is two days old. Off to do a live update-- though that was the FIRST thing I did, after installing the Windows Updates!
I'll post back if this finds anything or fixes the problem.
msgale
2 Intern
•
2.5K Posts
0
November 22nd, 2003 04:00
gryjhnhpe
2 Intern
•
2K Posts
0
November 22nd, 2003 07:00
Ping test works , Ping 208.48.34.132 works & Ping www.test.com works.
And I was using XP without SP1 installed.
-----------
Edit:
Also added 100.100.30.4 unix4 to Hosts file & got
C:\>ping 100.100.30.4
Request timed out.
Request timed out.
Request timed out.
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
---------------------- &
C:\>ping unix4
Request timed out.
Request timed out.
Request timed out.
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
-----------------------
So the Hosts file converts unix4 OK.
And IE Address 100.100.30.4 or unix4 give after Timeout "Action canceled".
127.0.0.1 localhost
208.48.34.132 test
100.100.30.4 unix4
Message Edited by gryjhnhpe on 11-22-2003 09:33 PM
msgale
2 Intern
•
2.5K Posts
0
November 22nd, 2003 09:00
Try pinging "localhost" which is 127.0.0.1. I believe it is resokved by the hosts file. If it doesen't work then there is something wrong with the hosts file. Did you create the hosts file using "notepad" or modifying the existing one, and did "notepad" by chance make its name "hosts.txt"
jakep1970
8 Posts
0
November 22nd, 2003 11:00
To answer the questions posed:
1) I am not using DNS because I am unable to ping the DNS names server that my customer has provided with their VPN-- they admit they don't have this setup, they prefer the use of PC Anywhere. Which is why I need an explicit entry in the Hosts file. I have another laptop with Win2K Pro sitting here that can resolve the Hosts file entry just fine, and it also cannot ping the DNS server.
2) No, it didn't append .txt, I have checked that in DOS.
3) Does anybody else on XP Pro have this file called "quotes" (no extn) in their DRIVERS/ETC directory? I find this to be really odd. It has a date modified identical to all of the other files such as NETWORKS, PROTOCOL, SERVICES, etc., which is 8/29/2002 6:00AM. It certainly doesn't appear in my WIN2K Pro machines.
4) When I ping unix4, I get (after a brief delay) "Ping request could not find host unix4. Please check the name and try again." When I ping 100.100.30.4, I get:
Pinging 100.100.30.4 with 32 bytes of data:
Reply from 100.100.30.4: bytes=32 time=163ms TTL=127
Reply from 100.100.30.4: bytes=32 time=218ms TTL=127
Reply from 100.100.30.4: bytes=32 time=183ms TTL=127
Reply from 100.100.30.4: bytes=32 time=94ms TTL=127
Ping statistics for 100.100.30.4:
jakep1970
8 Posts
0
November 22nd, 2003 11:00
To answer the questions posed:
1) I am not using DNS because I am unable to ping the DNS names server that my customer has provided with their VPN-- they admit they don't have this setup, they prefer the use of PC Anywhere. Which is why I need an explicit entry in the Hosts file. I have another laptop with Win2K Pro sitting here that can resolve the Hosts file entry just fine, and it also cannot ping the DNS server.
2) No, it didn't append .txt, I have checked that in DOS.
3) Does anybody else on XP Pro have this file called "quotes" (no extn) in their DRIVERS/ETC directory? I find this to be really odd. It has a date modified identical to all of the other files such as NETWORKS, PROTOCOL, SERVICES, etc., which is 8/29/2002 6:00AM. It certainly doesn't appear in my WIN2K Pro machines.
4) When I ping unix4, I get (after a brief delay) "Ping request could not find host unix4. Please check the name and try again." When I ping 100.100.30.4, I get:
Pinging 100.100.30.4 with 32 bytes of data:
Reply from 100.100.30.4: bytes=32 time=163ms TTL=127
Reply from 100.100.30.4: bytes=32 time=218ms TTL=127
Reply from 100.100.30.4: bytes=32 time=183ms TTL=127
Reply from 100.100.30.4: bytes=32 time=94ms TTL=127
Ping statistics for 100.100.30.4:
jakep1970
8 Posts
0
November 22nd, 2003 11:00
Sorry the thing posted my note (twice) before I was done.
I get the rest of the standard correct Ping response, Packets sent = 4, Received = 4, Lost = 0, etc.
5) I did the complete virus scan with update virus files, and no infected files were found. Are there any other registry entries that would prevent the host file from being used?
6) When I ping 127.0.0.1, it again returns the successful Ping response for all four packets. When I ping localhost, it ALSO returns the successful Ping response. I just cannot ping any entry by name that I have added. I have tried adding multiple entries for uppercase and lowercase names, I have given the same ip address different names on both the same and on different lines, nothing has changed this. I have changed my TCP/iP properties to Enable NetBIOS form the default, in case that told it to use the local hosts file, but still no change.
Thanks again for any assistance!
jakep1970
8 Posts
0
November 22nd, 2003 12:00
GOT IT!
OK, after adding the 127.0.0.1 foobar entry, I also commented out all of my Hosts lines, and just had this:
127.0.0.1 localhost
#100.100.30.4 unix4 UNIX4 unix4.lcec.pwr
100.100.30.4 unix4
127.0.0.1 foobar
NOW IT WORKS!
And I can add multiple hostnames on other lines, no problem (had tried this before, it did not work). FYI, I had explicitly put in carriage returns (tried one, tried many) after my entries previously. And I had also tried individual lines with each alias-- the multiple aliases on the single line worked fine in W2KPro though/
So now I have this and it works with multiple aliases (need multiples since the intranet refers to the machine one way, and the TNSNames uses the other alias, etc.):
127.0.0.1 localhost
#100.100.30.4 unix4 UNIX4 unix4.lcec.pwr
100.100.30.4 unix4
100.100.30.4 UNIX4
100.100.30.4 unix4.lcec.pwr
127.0.0.1 foobar
Thanks everybody, thanks mgale for getting me to try the explicit test to see if ANYTHING in the host file could be resolved! This forum RULES!!!
jakep1970
8 Posts
0
November 22nd, 2003 12:00
Just to verify what I think happened:
I copied down some other entries and pasted them in-- then I noticed THAT entry didn't work. So I deleted them, and re-typed the entry in from scratch-- worked fine. I must have had a missing carriage return after one of the prior entries, which didn't show up until I physically typed in a new entry for 127.0.0.1 foobar. Most of my other tests and changes were done with copy/paste, so I must have just been propogating the problem. I had tested by cursoring after each line to see if there was a carriage return, but it never showed up.
Thanks again,
Jake
jakep1970
8 Posts
0
November 22nd, 2003 12:00
Other things to note:
1) I am on XP Pro, SP1 with Advanced Networking patch installed. (I tried unistalling this, didn't change the problem).
2) I can add 127.0.0.1 foobar after my other Host file entries of 100.100.30.4 unix, and it can resolve foobar (!).
gryjhnhpe
2 Intern
•
2K Posts
0
November 22nd, 2003 17:00