hosts and lmhosts

Google can't have any 10.x.x.x-address those are private addresses like the notorious 192.168.x.x and thus not routable :D

Check this out: http://tools.ietf.org/html/rfc1918
 

My Computer My Computer

Computer Manufacturer/Model Number
HP m8000n
OS
Windows 7 Ultimate x86
CPU
DualCore AMD Athlon 64 X2, 2600 MHz 5200+
Motherboard
Asus M2N68-LA (Narra)
Memory
Samsung 2GB DDR2
Graphics Card(s)
Onboard NVIDIA GeForce 6150SE nForce 430
Sound Card
Onboard nVIDIA nForce 6100-430 (MCP61P)
Monitor(s) Displays
Westinghouse 19" LED
Screen Resolution
1280x1024
Hard Drives
SATA II Seagate Barracuda 500GB
USB II WD Elements 500GB
USB II WD My Book 1TB
USB II WD My Book 2TB
PSU
Stock (HP)
Case
Stock (HP)
Cooling
Stock
Keyboard
Logitech Classic KB 200
Mouse
Standard HP opticle USB mouse
Google can't have any 10.x.x.x-address those are private addresses like the notorious 192.168.x.x and thus not routable :D

Check this out: RFC 1918 - Address Allocation for Private Internets

For Pete's sake, I realize this. It was simply put as an example. If he puts in 10.something into the hosts file and then pings and it resolves 10.something then he knows the host file is working as expected and DNS is not taking over.
 

My Computer My Computer

Computer Manufacturer/Model Number
Self-Built in July 2009
OS
Windows 7 Ultimate x64
CPU
Intel Q9550 2.83Ghz OC'd to 3.40Ghz
Motherboard
Gigabyte GA-EP45-UD3R rev. 1.1, F12 BIOS
Memory
8GB G.Skill PI DDR2-800, 4-4-4-12 timings
Graphics Card(s)
EVGA 1280MB Nvidia GeForce GTX570
Sound Card
Realtek ALC899A 8 channel onboard audio
Monitor(s) Displays
23" Acer x233H
Screen Resolution
1920x1080
Hard Drives
Intel X25-M 80GB Gen 2 SSD
Western Digital 1TB Caviar Black, 32MB cache. WD1001FALS
PSU
Corsair 620HX modular
Case
Antec P182
Cooling
stock
Keyboard
ABS M1 Mechanical
Mouse
Logitech G9 Laser Mouse
Internet Speed
15/2 cable modem
Other Info
Windows and Linux enthusiast. Logitech G35 Headset.
@pparks1

i didn't understand your last answer parks. i didn't catch the example either, but no harm no foul. but you have me confused insofar as dns taking over, i thought dns and hosts are playing on the same team? do you mean to say that in regard to the suggestion that there is some server side confusion with name resolution that was made earlier? excuse me, i'm not slow but the whole playing the middle diddle puts me in kilts.
 

My Computer My Computer

Computer Manufacturer/Model Number
emachines el1352g-41w
OS
7 home premium 64-bit
CPU
Athlon II X2 220 Stepping 3
Motherboard
EL1352G-41w (generic e-Machines Nvidia)
Memory
DDR3 1066MhZ 144-pin (2 gigs)
Graphics Card(s)
nvidia 6150se 256mb dedicated
Sound Card
realtek ac97 hd
Monitor(s) Displays
hp wide panel lcd 21"
Screen Resolution
1600x900
Hard Drives
1tb seagate 7200rpm barracuda external
500gb seagate 7200rpm barracuda
PSU
lite-on small form factor unit (oblong looking thing)
Case
small form factor oem
Cooling
whatever they slopped on it, a heat sink and lacking paste
Keyboard
emachines multimedia keyboard
Mouse
wired ps/2 optical
Internet Speed
don't kiss and tell
Other Info
i've had her two weeks and i need to get it upgraded!
You open a web browser, and type in www.sevenforums.com. The following is a simplification of what occurs:

Your machine looks at hosts file.
It doesn't find 7F.
It then sends a query to a DNS server.
The DNS server searches until it finds 7F.
It transmits the required information to your web browser, and you are sent to the page.

Does that help?
 

My Computer My Computer

Computer Manufacturer/Model Number
HP 6000 Pro Micro Tower
OS
W7 Professional x64
CPU
Core 2 Duo 2.93
Memory
2 GB
Graphics Card(s)
ATI Radeon 4695
Monitor(s) Displays
Two HP 17's
Hard Drives
150GB Sata Drive
Case
Tiny. Kinda cute.
Keyboard
HP Supplied. Surprisingly nice.
Mouse
Gateway Mouse from an E2610D
Internet Speed
45 mbps
i didn't understand your last answer parks. i didn't catch the example either, but no harm no foul. but you have me confused insofar as dns taking over,
If you don't have anything in your hosts file, your computer will look up the answer via a DNS server. If you have an entry for the address in question in the hosts file, it will use that.


i thought dns and hosts are playing on the same team?
DNS and hosts files do the same thing. 1 is centralized and available on the Internet for everybody to use, and one is local on your own computer that only you can use. And your computer will use an entry in the local hosts file, if 1 exists.
 

My Computer My Computer

Computer Manufacturer/Model Number
Self-Built in July 2009
OS
Windows 7 Ultimate x64
CPU
Intel Q9550 2.83Ghz OC'd to 3.40Ghz
Motherboard
Gigabyte GA-EP45-UD3R rev. 1.1, F12 BIOS
Memory
8GB G.Skill PI DDR2-800, 4-4-4-12 timings
Graphics Card(s)
EVGA 1280MB Nvidia GeForce GTX570
Sound Card
Realtek ALC899A 8 channel onboard audio
Monitor(s) Displays
23" Acer x233H
Screen Resolution
1920x1080
Hard Drives
Intel X25-M 80GB Gen 2 SSD
Western Digital 1TB Caviar Black, 32MB cache. WD1001FALS
PSU
Corsair 620HX modular
Case
Antec P182
Cooling
stock
Keyboard
ABS M1 Mechanical
Mouse
Logitech G9 Laser Mouse
Internet Speed
15/2 cable modem
Other Info
Windows and Linux enthusiast. Logitech G35 Headset.

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Bruce ... somewhere in his 40's
OS
Windows 7 Ultimate 32bit SP1
CPU
Intel(R) Core(TM)2 Quad CPU @ 2.40GHz, 2400 MHz
Motherboard
INTEL/D975XBX2
Memory
4 GB
Graphics Card(s)
ATI Radeon HD 2600 Pro
Monitor(s) Displays
Samsung SyncMaster 914v
Screen Resolution
1280 x 1024
Hard Drives
2/500GB each ... ST3500630AS ATA Device.
One is not connected
PSU
Rocketfish 700 W
Case
G.Skill Gigabyte Chassis
Keyboard
Standard PS/2 Keyboard
Mouse
Microsoft PS/2 Mouse
Internet Speed
DSL
Antivirus
Avira Internet Security
Browser
IE 11
Other Info
ATI HDMI Audio
hahaha, everyone is quite fixated on the hosts file, but the discussion is about the hosts and lmhosts files. i understand the process of the hosts file, i was trying to clarify what parks was saying because it conflicted with previous answers, and the use of syntax has bounced back and forth through replies so i need to catch up on which file repliers are referring to; so that the confusion is minimal and things don't get heated in discussion & then I become lost. apologies.

this shouldn't defer the topic, would using a proxy software like squid or tor help? tor seems to bounce your connection location data around to hide your surfing, and presumedly squid performs the exact same action, but all this talk about dns servers has me wondering if squid-cache, you see, doesn't lend to that function.

and then of course, your help is appreciated, but it doesn't help to have ms windows saying different things about hosts than the common suggestion says or other websites. wikias tend to be user interactive, which doesn't take away from their validity but it might diminish the clarity of logic. wikipedia and hosts say the same thing, but you have to admit that the mapping of addresses seems more pertinent to lmhosts, and with programs like spybot offering hosts files, msvps.org, or gorilla, stevere martin; etc. also providing hosts files which are meant as redirect entries in the hosts file, the mapping term is confusing. so i guess that means that as for the hosts file itself, i don't have to simply provide a redirect like 127.0.0.1 or 0.0.0.0 i could place accurate entries like #.#.#.# example.com which are actual address/domain combinations and it would still be correct use of the hosts.file file. so why are there hosts and lmhosts files?
 

My Computer My Computer

Computer Manufacturer/Model Number
emachines el1352g-41w
OS
7 home premium 64-bit
CPU
Athlon II X2 220 Stepping 3
Motherboard
EL1352G-41w (generic e-Machines Nvidia)
Memory
DDR3 1066MhZ 144-pin (2 gigs)
Graphics Card(s)
nvidia 6150se 256mb dedicated
Sound Card
realtek ac97 hd
Monitor(s) Displays
hp wide panel lcd 21"
Screen Resolution
1600x900
Hard Drives
1tb seagate 7200rpm barracuda external
500gb seagate 7200rpm barracuda
PSU
lite-on small form factor unit (oblong looking thing)
Case
small form factor oem
Cooling
whatever they slopped on it, a heat sink and lacking paste
Keyboard
emachines multimedia keyboard
Mouse
wired ps/2 optical
Internet Speed
don't kiss and tell
Other Info
i've had her two weeks and i need to get it upgraded!
hahaha, everyone is quite fixated on the hosts file, but the discussion is about the hosts and lmhosts files.
Do you now understand what the lmhosts file does. It's for netbios names on a Microsoft based network, either workgroup based on domain based. For example, I I could have 4 machines on the network, named "fish", "pony", "horse", and "donkey". These would ALL be the lmhosts names of these machines. So, if I wanted to access a share from any of them, I would look for their name in Network places to locate the share. But, I might run 4 websites off each of these. Perhaps "fish" hosts www.fishtanksRcool.com, and "pony" hosts www.poniesarecool.com, and "horse" hosts Horseplay.com! and finally "donkey" hosts www.donkeypunch.com". So, these fully qualified domain names would be controlled by DNS or by the hosts file.

this shouldn't defer the topic, would using a proxy software like squid or tor help?
Help to do what, what are you trying to accomplish?

so why are there hosts and lmhosts files?
Please see my answer above. The lmhosts is a lan manager hosts file. It maps netbios names on a microsoft based network. The hosts file is a hosts file and it does fully qualified domain names to IP addresses. The hosts file is like a small manually controlled copy of DNS that you put right on your own computer. But unlike DNS, you have to maintain it and know about any and all changes.

hosts and lmhosts is kinda like engines versus motors. 1 of them runs on gasoline or diesel fuel, and 1 of them runs on battery power. Both can be placed into a car allowing you to go from point A to point B. And on the Internet, you will find people that talk about the motor in their car...when in fact it's an engine. And you might find somebody discussing the engine in the radio control car, when in reality it's a motor.
 

My Computer My Computer

Computer Manufacturer/Model Number
Self-Built in July 2009
OS
Windows 7 Ultimate x64
CPU
Intel Q9550 2.83Ghz OC'd to 3.40Ghz
Motherboard
Gigabyte GA-EP45-UD3R rev. 1.1, F12 BIOS
Memory
8GB G.Skill PI DDR2-800, 4-4-4-12 timings
Graphics Card(s)
EVGA 1280MB Nvidia GeForce GTX570
Sound Card
Realtek ALC899A 8 channel onboard audio
Monitor(s) Displays
23" Acer x233H
Screen Resolution
1920x1080
Hard Drives
Intel X25-M 80GB Gen 2 SSD
Western Digital 1TB Caviar Black, 32MB cache. WD1001FALS
PSU
Corsair 620HX modular
Case
Antec P182
Cooling
stock
Keyboard
ABS M1 Mechanical
Mouse
Logitech G9 Laser Mouse
Internet Speed
15/2 cable modem
Other Info
Windows and Linux enthusiast. Logitech G35 Headset.
motors accrue mileage. engines run horsepower.

i guess that puts the two in perspective whether or not you meant to, although it's and i hate to say it, hardly from understanding a straight forward bit. lots of run around.

mileage being that hosts adds a mile (sends traffic back to loopback point) everytime x amount of feet (an ip) is reached.

the engine has x amount of pistons (domains) that translate into horsepower (ip's) <--- that ones kind of off i know. beats trying to figure out the analytical engine...

and the thing to note about when i changed my hosts.file file is this was a few days ago and it was for a brief time so (also i've reloaded the os), hopefully minimal damage happened in that period.

hosts.file is understood well enough now, and i hate being redundant so shame on me for asking: 127.0.0.1 or 0.0.0.0 or x.x.x.x is a loopback point

0.0.0.0

and it sends badwebsite.com queries to this loopback point to prevent communication reaching and data traversing to and from badwebsite.com

0.0.0.0 badwebsite.com

the real question has yet to be answered though, why doesn't an entry being made in the hosts.file file then, not prevent traffic to badwebsite.com. as stated, i placed a website on the hosts.file file in proper syntax, having (and this wasn't mentioned) 127.0.0.1 localhost NOT commented out (meaning having no comment characters before the line), yet when I entered the address into the IE address bar, traffic still went to the webpage. unless there are replications of the website so that it knows if my hosts says don't go there, go here it's the same thing with a different address but how is stupid is so stupid does going to know?

i do understand the lmhosts file now. i just don't see the purpose and that's only because I don't well understand the preload and domain functions yet. according to the file they don't serve as comments. there is no need to go into that matter here, I just want to clarify the precise roles and faults of these two files, aside from being goto statements.

thanks for all your help, sort of :)
 

My Computer My Computer

Computer Manufacturer/Model Number
emachines el1352g-41w
OS
7 home premium 64-bit
CPU
Athlon II X2 220 Stepping 3
Motherboard
EL1352G-41w (generic e-Machines Nvidia)
Memory
DDR3 1066MhZ 144-pin (2 gigs)
Graphics Card(s)
nvidia 6150se 256mb dedicated
Sound Card
realtek ac97 hd
Monitor(s) Displays
hp wide panel lcd 21"
Screen Resolution
1600x900
Hard Drives
1tb seagate 7200rpm barracuda external
500gb seagate 7200rpm barracuda
PSU
lite-on small form factor unit (oblong looking thing)
Case
small form factor oem
Cooling
whatever they slopped on it, a heat sink and lacking paste
Keyboard
emachines multimedia keyboard
Mouse
wired ps/2 optical
Internet Speed
don't kiss and tell
Other Info
i've had her two weeks and i need to get it upgraded!
hosts.file is understood well enough now, and i hate being redundant so shame on me for asking: 127.0.0.1 or 0.0.0.0 or x.x.x.x is a loopback point
The ONLY address that is a loopback address is 127.0.0.1 and that means, "THIS HOST".


0.0.0.0 badwebsite.com

the real question has yet to be answered though, why doesn't an entry being made in the hosts.file file then, not prevent traffic to badwebsite.com.
If you put that entry into a HOSTS file, it WOULD prevent you from accessing badwebsite because you would only look to 0.0.0.0 to find it...which of course it isn't there. In fact, you could practically set it to any address other than it's actual address and you would PREVENT yourself from accessing the site.


as stated, i placed a website on the hosts.file file in proper syntax, having (and this wasn't mentioned) 127.0.0.1 localhost NOT commented out (meaning having no comment characters before the line), yet when I entered the address into the IE address bar, traffic still went to the webpage.
You must have done it wrong. Try this, put this line into hosts
Code:
68.42.10.10 www.google.com
Now, open up a command line, type:
Code:
ping [URL="http://www.google.com/"]www.google.com[/URL]
. It better respond with 68.42.10.10. Now, open your web browser. Type in :
It should NOT open google.com unless I get horendously unlucky and 68.42.10.10 is in fact google.



i do understand the lmhosts file now. i just don't see the purpose
That's because there practically is NO purpose for LMHOSTS these days. It was used like 15 years ago when Windows workgroups and such weren't using DNS for name resolution. Everything more or less uses DNS or hosts files these days to accomplish the same thing that lmhosts used to do in a Windows environment. Like I said, other Operating Systems like Linux or OSX don't even use LMHOSTS files. I haven't used an lmhosts file or worked with WINS in a number of years now. It's all handled in DNS and when DNS isn't the answer, a HOSTS file.
 

My Computer My Computer

Computer Manufacturer/Model Number
Self-Built in July 2009
OS
Windows 7 Ultimate x64
CPU
Intel Q9550 2.83Ghz OC'd to 3.40Ghz
Motherboard
Gigabyte GA-EP45-UD3R rev. 1.1, F12 BIOS
Memory
8GB G.Skill PI DDR2-800, 4-4-4-12 timings
Graphics Card(s)
EVGA 1280MB Nvidia GeForce GTX570
Sound Card
Realtek ALC899A 8 channel onboard audio
Monitor(s) Displays
23" Acer x233H
Screen Resolution
1920x1080
Hard Drives
Intel X25-M 80GB Gen 2 SSD
Western Digital 1TB Caviar Black, 32MB cache. WD1001FALS
PSU
Corsair 620HX modular
Case
Antec P182
Cooling
stock
Keyboard
ABS M1 Mechanical
Mouse
Logitech G9 Laser Mouse
Internet Speed
15/2 cable modem
Other Info
Windows and Linux enthusiast. Logitech G35 Headset.
but why should i even do that, if the iterated process of hosts is to send addresses to a loopback point? if i use 127.0.0.1 google.com it will open. being that the address you give isn't google, why shouldn't it open? where is the variation, except that 127.0.0.1 is sending traffic back to a generic (like 168.192 or 192.168.x.x)... then again supposing someone is using a web server with that address on the network i just (presuming the address is bad) screwed them over. so it's like hot potatoe, and that's crap in terms of keeping a computer well maintenanced and configured. then if 127.0.0.1 is the only loopback point, it sounds more like you are saying in an office environment, you have a loopback point, don't deviate from that point in order to place our traffic into the sandbox and not screw people over. 0.0.0.0 makes sense as an alternate then, because insofar as i know there is no applicable web address for 0.0.0.0 (unless y2k was supposed to happen not because of numerical issues with time handling, but because some berkley genius didn't realize an important server was dedicated 0.0.0.0 when the protocol emerged).

i'm just saying that your example doesn't seem relevant in the same way that the hosts file is supposed to work where i can say, it's functioning because i can't look at the ip you gave and say, 'google' traffic was redirected there. did the website open then because i used 127.0.0.1 ? i don't understand that either, because my ip address is not 127.0.0.1 when i use cmd.exe to look it up with ipconfig. then again, it isn't the same when i use a live disc either. windows reports it as one number with ipconfig, and gentoo will report it as another number with ifconfig.

to fruther the discussion (if you want to call three pages on this topic that) would i then have to have a seperate machine to test if traffic is redirecting, or could i setup another disc and make it dedicated server space, and test it in that way? i'm not sure if you can 'fool' windows in that way, but i would presume because with 7 you can convert discs to dynamic although i guess that's flawed logic. I can't say whether the foolery is technically similar.

and i'm presuming by ::1 being present in the example that I can use ipv6 protocol addresses in the same way as tcp/ip/udp addresses are used respective to format?

so i suppose this is where confusion of a sort turns to frustration because i have to assume that Windows isn't (and i hope this is the correct term) enumerating internet address protocols correctly. otherwise, since my ip isn't the loopback point, i should have gotten an http error trying to direct traffic to the test entry. unless i had entered my ip in the test line, which i did not at that phase in trying to understand the hosts file function and process.
 

My Computer My Computer

Computer Manufacturer/Model Number
emachines el1352g-41w
OS
7 home premium 64-bit
CPU
Athlon II X2 220 Stepping 3
Motherboard
EL1352G-41w (generic e-Machines Nvidia)
Memory
DDR3 1066MhZ 144-pin (2 gigs)
Graphics Card(s)
nvidia 6150se 256mb dedicated
Sound Card
realtek ac97 hd
Monitor(s) Displays
hp wide panel lcd 21"
Screen Resolution
1600x900
Hard Drives
1tb seagate 7200rpm barracuda external
500gb seagate 7200rpm barracuda
PSU
lite-on small form factor unit (oblong looking thing)
Case
small form factor oem
Cooling
whatever they slopped on it, a heat sink and lacking paste
Keyboard
emachines multimedia keyboard
Mouse
wired ps/2 optical
Internet Speed
don't kiss and tell
Other Info
i've had her two weeks and i need to get it upgraded!
...make that 4 pages on the topic, it really isn't a bother to myself though...sorry if it's a nuissance on you..

i did try your example and i tried it in four ways:

googles ip
an odd ip (sorry odd ip it's just google)
my ip
and 127.0.0.1

the web browser did surf to google.com everytime. and i entered it in the address bar the exact same way it was listed in the hosts file. google.com. i used the hosts.file file, not lmhosts.sam because lmhosts is supposed to provide netbios names, and some functions regarding addresses to surf to from what i gather, and not traffic redirection.

as stated, if i enter an ip in the address bar it's producing google searches for that ip.

as a side note, can i enter addresses as http:// or https:// or ftp:// etc? or does a working hosts file strictly rely on a simple format of ya.da.com or yada.com; etc. does that syntactic form have a name like there is pnrp?
 

My Computer My Computer

Computer Manufacturer/Model Number
emachines el1352g-41w
OS
7 home premium 64-bit
CPU
Athlon II X2 220 Stepping 3
Motherboard
EL1352G-41w (generic e-Machines Nvidia)
Memory
DDR3 1066MhZ 144-pin (2 gigs)
Graphics Card(s)
nvidia 6150se 256mb dedicated
Sound Card
realtek ac97 hd
Monitor(s) Displays
hp wide panel lcd 21"
Screen Resolution
1600x900
Hard Drives
1tb seagate 7200rpm barracuda external
500gb seagate 7200rpm barracuda
PSU
lite-on small form factor unit (oblong looking thing)
Case
small form factor oem
Cooling
whatever they slopped on it, a heat sink and lacking paste
Keyboard
emachines multimedia keyboard
Mouse
wired ps/2 optical
Internet Speed
don't kiss and tell
Other Info
i've had her two weeks and i need to get it upgraded!
Do you even know what it is you are trying to do, colinearpsycho?
Because, right now this thread is nothing but a waste of time.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Alienware Aurora ALX R4
OS
Windows 10 Pro (x64)
CPU
Intel Core i7-3930K (3.2GHz - 4.5GHz)
Motherboard
Alienware Aurora-R4 x79
Memory
4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)
Graphics Card(s)
Nvidia Geforce GTX 690
Sound Card
SteelSeries Siberia Elite
Monitor(s) Displays
Dell UltraSharp U3011
Screen Resolution
2560x1600
Hard Drives
Samsung 850 Pro 256 GB, Seagate 1TB Desktop Hybrid HDD, 2x Western Digital 4TB Green HDD
PSU
875W Some Dell PSU <.<
Case
Alienware Aurora ALX
Cooling
Custom Liquid Cooling (EK CPU & GPU blocks) dual EK 480RAD
Keyboard
Logitech G710+ Mechanical
Mouse
Logitech G700s
Internet Speed
Verizon Fios (50 mbps average)
Other Info
Server: Intel NUC D54250WYK: i5-4250U, 16GB, 256 GB mSATA, Windows Server 2012 R2
i did try your example and i tried it in four ways:

googles ip
an odd ip (sorry odd ip it's just google)
my ip
and 127.0.0.1

the web browser did surf to google.com everytime. and i entered it in the address bar the exact same way it was listed in the hosts file. google.com. i used the hosts.file file,

Well, you MUST be doing something wrong. This is a fundamental process. it's as easy as 1+1=2.
And the file is simply hosts....not hosts.file

Do, these steps exactly like this;
Run command prompt as administrator.
Code:
notepad C:\windows\system32\drivers\etc\hosts
Ensure it looks like this;
Code:
# localhost name resolution is handled within DNS itself.
#    127.0.0.1       localhost
#    ::1             localhost
127.0.0.1        www.google.com
Then, from command line, run ping Google. Your results should be exactly like this;
Code:
C:\Windows\system32>ping www.google.com

Pinging www.google.com [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

And it should be noted that you have to try hitting www and then the .google.com.   If you simply put google.com...well that's a different name and it will resolve using DNS to the right thing as shown;

[QUOTE]C:\Windows\system32>ping google.com

Pinging google.com [74.125.225.17] with 32 bytes of data:
Reply from 74.125.225.17: bytes=32 time=63ms TTL=55
Reply from 74.125.225.17: bytes=32 time=61ms TTL=55
Reply from 74.125.225.17: bytes=32 time=64ms TTL=55
Reply from 74.125.225.17: bytes=32 time=64ms TTL=55

Ping statistics for 74.125.225.17:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 61ms, Maximum = 64ms, Average = 63ms

C:\Windows\system32>[/QUOTE]Now, if you put a line in C:\Windows\system32\drivers\etc\hosts as follows, it would then work;

[CODE]#    127.0.0.1       localhost
#    ::1             localhost
127.0.0.1        www.google.com
127.0.0.2        google.com
172.16.10.1        www.wackyexample.com
Watch what happens
C:\Windows\system32>ping www.google.com

Pinging www.google.com [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Windows\system32>ping google.com

Pinging google.com [127.0.0.2] with 32 bytes of data:
Reply from 127.0.0.2: bytes=32 time<1ms TTL=128
Reply from 127.0.0.2: bytes=32 time<1ms TTL=128
Reply from 127.0.0.2: bytes=32 time<1ms TTL=128
Reply from 127.0.0.2: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Windows\system32>ping www.wackyexample.com

Pinging www.wackyexample.com [172.16.10.1] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 172.16.10.1:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\Windows\system32>
Now, if I change up the hosts file to read differently, look at new results;

Code:
# localhost name resolution is handled within DNS itself.
#    127.0.0.1       localhost
#    ::1             localhost
1.1.1.1        www.google.com
1.1.2.1        google.com
1.1.3.1        www.wackyexample.whattheheck.com

C:\Windows\system32>ping www.google.com

Pinging www.google.com [1.1.1.1] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 1.1.1.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\Windows\system32>ping google.com

Pinging google.com [1.1.2.1] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 1.1.2.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\Windows\system32>ping www.wackyexample.whattheheck.com

Pinging www.wackyexample.whattheheck.com [1.1.3.1] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 1.1.3.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\Windows\system32>
C:\Windows\system32>[/CODE]Finally, if you open IE and type in
Code:
http://www.google.com
You should get a page cannot be displayed error page


Now, watch what happens as I adjust host file entries;

Code:
# localhost name resolution is handled within DNS itself.
#    127.0.0.1       localhost
#    ::1             localhost
1.1.1.1        www.google.com
1.1.2.1        google.com
1.1.3.1        www.wackyexample.whattheheck.com


C:\Windows\system32>ping www.google.com

Pinging www.google.com [1.1.1.1] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 1.1.1.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\Windows\system32>ping google.com

Pinging google.com [1.1.2.1] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 1.1.2.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\Windows\system32>ping www.wackyexample.whattheheck.com

Pinging www.wackyexample.whattheheck.com [1.1.3.1] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 1.1.3.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\Windows\system32>



Yeah, I'm throwing in the towel in this thread. I do computer systems admin stuff for a living. I manage windows servers and Linux servers and have been doing so for 12+ years. I run some of the DNS servers in our shop and have a fair amount of experience with networking overall. I cannot for the life of me, even determine what the OP is trying to accomplish or what they are doing.
 

My Computer My Computer

Computer Manufacturer/Model Number
Self-Built in July 2009
OS
Windows 7 Ultimate x64
CPU
Intel Q9550 2.83Ghz OC'd to 3.40Ghz
Motherboard
Gigabyte GA-EP45-UD3R rev. 1.1, F12 BIOS
Memory
8GB G.Skill PI DDR2-800, 4-4-4-12 timings
Graphics Card(s)
EVGA 1280MB Nvidia GeForce GTX570
Sound Card
Realtek ALC899A 8 channel onboard audio
Monitor(s) Displays
23" Acer x233H
Screen Resolution
1920x1080
Hard Drives
Intel X25-M 80GB Gen 2 SSD
Western Digital 1TB Caviar Black, 32MB cache. WD1001FALS
PSU
Corsair 620HX modular
Case
Antec P182
Cooling
stock
Keyboard
ABS M1 Mechanical
Mouse
Logitech G9 Laser Mouse
Internet Speed
15/2 cable modem
Other Info
Windows and Linux enthusiast. Logitech G35 Headset.
what's an OP? and i told you i performed those steps, they aren't working. apparently one or two of you fellers could use some time away from the terminal.
 

My Computer My Computer

Computer Manufacturer/Model Number
emachines el1352g-41w
OS
7 home premium 64-bit
CPU
Athlon II X2 220 Stepping 3
Motherboard
EL1352G-41w (generic e-Machines Nvidia)
Memory
DDR3 1066MhZ 144-pin (2 gigs)
Graphics Card(s)
nvidia 6150se 256mb dedicated
Sound Card
realtek ac97 hd
Monitor(s) Displays
hp wide panel lcd 21"
Screen Resolution
1600x900
Hard Drives
1tb seagate 7200rpm barracuda external
500gb seagate 7200rpm barracuda
PSU
lite-on small form factor unit (oblong looking thing)
Case
small form factor oem
Cooling
whatever they slopped on it, a heat sink and lacking paste
Keyboard
emachines multimedia keyboard
Mouse
wired ps/2 optical
Internet Speed
don't kiss and tell
Other Info
i've had her two weeks and i need to get it upgraded!
OP in this context means, Original Poster, you colinearpsycho.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Alienware Aurora ALX R4
OS
Windows 10 Pro (x64)
CPU
Intel Core i7-3930K (3.2GHz - 4.5GHz)
Motherboard
Alienware Aurora-R4 x79
Memory
4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)
Graphics Card(s)
Nvidia Geforce GTX 690
Sound Card
SteelSeries Siberia Elite
Monitor(s) Displays
Dell UltraSharp U3011
Screen Resolution
2560x1600
Hard Drives
Samsung 850 Pro 256 GB, Seagate 1TB Desktop Hybrid HDD, 2x Western Digital 4TB Green HDD
PSU
875W Some Dell PSU <.<
Case
Alienware Aurora ALX
Cooling
Custom Liquid Cooling (EK CPU & GPU blocks) dual EK 480RAD
Keyboard
Logitech G710+ Mechanical
Mouse
Logitech G700s
Internet Speed
Verizon Fios (50 mbps average)
Other Info
Server: Intel NUC D54250WYK: i5-4250U, 16GB, 256 GB mSATA, Windows Server 2012 R2
....

ok thanks for that information. yeah i realize i'm trialing parks patience and you might not see the logic in my asking in conversation versus reading the knowledge bases. to say it readily, the idea of tutoring someone on the topic just isn't straight forward through the internet; while i can find a tutorial, it isn't going to make me understand concretely which ip to use, or why the file is not acting according to the way that it is described in literature as as it has been described here. the simple fact for me is that it is not. i think i've put it pretty plainly, i'm not sure how expertise could alude to unclarity in explaining the issue so that i can resolve it; meaning the trouble doesn't seem amateurish as i've tried the proper syntax. so it only seems fit that i should ask someone knowledgeable, and then again if the entire trouble i'm experiencing with name resolution and/or hosts is more than just understanding the file structure of a hosts file, then it doesn't make sense to surf the internet trying to find the answer. maybe it's rude to post on a forum expericing a possible computer error, but stopping me short of i'm better than you isn't resolving a damn thing. hate to sound like a highlander who has lived in texas for twenty years, but i'd like to understand why the file isn't functioning. and the only two possible answers i can come up with, or three if you want to be concise, is that either dns just isn't resolving properly, there is a default document on the network providing redirection to newly addressed websites when a hosts entry is made (i'm not sure if that differs from a hijacking it seems more like a bypass), or there is a peripheral or interface error that is causing the trouble as an underlying factor, making the hosts file obselete (which is why i said it sounds like goto statement harmful).

i'd just like to resolve the trouble, and learn from the issue. reloading the operating system time and again for errors i might be able to solve is not productive. the entire idea behind maintaining a forum i think, and i apologize again if this is rude to you gurus, is that it is productive and ducking out the back oin the OP like this were an mmo duel is ridiculous. if that's the case, why respond? even more still, i don't intend to produce a reality ... script.... (show) and i don't see why forums for technical problem solving seem to reduce themselves to conflicts over RTFM. acquisition of and effective use of human correspondance is as a fact faster and more productive when dealing with i/o systems. i'm just trying to procure some more learned advice for myself on the matter. i'll recap again, but i'm not trying to draw out the resolution of the issues placed forth in this post:

-the hosts file syntax is correct
- i understand the function of hosts and lmhosts
- redirection function of the hosts file is somehow being thwarted

that seems to be where the resolution process has arrived.
 

My Computer My Computer

Computer Manufacturer/Model Number
emachines el1352g-41w
OS
7 home premium 64-bit
CPU
Athlon II X2 220 Stepping 3
Motherboard
EL1352G-41w (generic e-Machines Nvidia)
Memory
DDR3 1066MhZ 144-pin (2 gigs)
Graphics Card(s)
nvidia 6150se 256mb dedicated
Sound Card
realtek ac97 hd
Monitor(s) Displays
hp wide panel lcd 21"
Screen Resolution
1600x900
Hard Drives
1tb seagate 7200rpm barracuda external
500gb seagate 7200rpm barracuda
PSU
lite-on small form factor unit (oblong looking thing)
Case
small form factor oem
Cooling
whatever they slopped on it, a heat sink and lacking paste
Keyboard
emachines multimedia keyboard
Mouse
wired ps/2 optical
Internet Speed
don't kiss and tell
Other Info
i've had her two weeks and i need to get it upgraded!
- redirection function of the hosts file is somehow being thwarted

that seems to be where the resolution process has arrived.

Yes, this must be the case. Perhaps you have some malware or something else on your machine that is preventing the HOSTS file proper working. I work with hosts files every single day at work in a lab where we don't have DNS in place and I can guarantee you that what I am showing is the way that it's supposed to work.

1. Did you by any chance apply a system tweak that prevented your computer from using the HOSTS file?
2. And when you do make changes to C:\windows\system32\drivers\etc\hosts you are SAVING the file before testing, right?


Code:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>notepad C:\windows\system32\drivers\etc\hosts


# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#    127.0.0.1       localhost
#    ::1             localhost
192.168.1.1        www.google.com
192.168.1.2        www.sevenforums.com
Now, the results of a ping should come back as follows; Notice that the replies are from my router (192.168.1.1) and from my file server (192.168.1.2). These replies are NOT from the legitimate web servers which host either Google or Sevenforums. If I attempted to hit either of these pages with my web browser, they would NOT come up as the web server code for Google and Sevenforums is NOT running on either my router (192.168.1.1) or my file server (192.168.1.2).

Code:
C:\Windows\system32>ping www.google.com

Pinging www.google.com [[COLOR=Red]192.168.1.1[/COLOR]] with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time=4ms TTL=64
Reply from 192.168.1.1: bytes=32 time=4ms TTL=64
Reply from 192.168.1.1: bytes=32 time=4ms TTL=64
Reply from 192.168.1.1: bytes=32 time=5ms TTL=64

Ping statistics for 192.168.1.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 4ms, Maximum = 5ms, Average = 4ms

C:\Windows\system32>ping www.sevenforums.com

Pinging www.sevenforums.com [[COLOR=Red]192.168.1.2[/COLOR]] with 32 bytes of data:
Reply from 192.168.1.2: bytes=32 time=4ms TTL=128
Reply from 192.168.1.2: bytes=32 time=4ms TTL=128
Reply from 192.168.1.2: bytes=32 time=4ms TTL=128
Reply from 192.168.1.2: bytes=32 time=4ms TTL=128

Ping statistics for 192.168.1.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 4ms, Maximum = 4ms, Average = 4ms

C:\Windows\system32>
If you deleted the lines (or comment them out) in C:\windows\system32\drivers\etc\hosts, you should get the following legitimate addresses back from DNS as shown.
Code:
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#    127.0.0.1       localhost
#    ::1             localhost
#192.168.1.1        www.google.com
#192.168.1.2        www.sevenforums.com

C:\Windows\system32>ping www.google.com

Pinging www.l.google.com [[COLOR=Red]74.125.225.16[/COLOR]] with 32 bytes of data:
Reply from 74.125.225.16: bytes=32 time=62ms TTL=55
Reply from 74.125.225.16: bytes=32 time=65ms TTL=55
Reply from 74.125.225.16: bytes=32 time=64ms TTL=55
Reply from 74.125.225.16: bytes=32 time=64ms TTL=55

Ping statistics for 74.125.225.16:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 62ms, Maximum = 65ms, Average = 63ms

C:\Windows\system32>ping www.sevenforums.com

Pinging sevenforums.com [[COLOR=Red]74.86.171.210[/COLOR]] with 32 bytes of data:
Reply from 74.86.171.210: bytes=32 time=46ms TTL=113
Reply from 74.86.171.210: bytes=32 time=42ms TTL=113
Reply from 74.86.171.210: bytes=32 time=41ms TTL=113
Reply from 74.86.171.210: bytes=32 time=43ms TTL=113

Ping statistics for 74.86.171.210:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 41ms, Maximum = 46ms, Average = 43ms

C:\Windows\system32>
Now, if you want to see what DNS says the proper addresses are, you can use nslookup from command line as shown below; (note: you can also see that sevenforums has a legitiate ipv6 address :) )

Code:
C:\Windows\system32>nslookup
Default Server:  vnsc-bak.sys.gtei.net
Address:  4.2.2.2

> www.google.com
Server:  vnsc-bak.sys.gtei.net
Address:  4.2.2.2

Non-authoritative answer:
Name:    www.l.google.com
Addresses:  74.125.225.17
          74.125.225.18
          74.125.225.19
          74.125.225.20
          74.125.225.16
Aliases:  www.google.com

> www.sevenforums.com
Server:  vnsc-bak.sys.gtei.net
Address:  4.2.2.2

Non-authoritative answer:
Name:    sevenforums.com
Addresses:  2607:f0d0:1003:7b::2
          74.86.171.210
Aliases:  www.sevenforums.com
I really hope this helps.
 

My Computer My Computer

Computer Manufacturer/Model Number
Self-Built in July 2009
OS
Windows 7 Ultimate x64
CPU
Intel Q9550 2.83Ghz OC'd to 3.40Ghz
Motherboard
Gigabyte GA-EP45-UD3R rev. 1.1, F12 BIOS
Memory
8GB G.Skill PI DDR2-800, 4-4-4-12 timings
Graphics Card(s)
EVGA 1280MB Nvidia GeForce GTX570
Sound Card
Realtek ALC899A 8 channel onboard audio
Monitor(s) Displays
23" Acer x233H
Screen Resolution
1920x1080
Hard Drives
Intel X25-M 80GB Gen 2 SSD
Western Digital 1TB Caviar Black, 32MB cache. WD1001FALS
PSU
Corsair 620HX modular
Case
Antec P182
Cooling
stock
Keyboard
ABS M1 Mechanical
Mouse
Logitech G9 Laser Mouse
Internet Speed
15/2 cable modem
Other Info
Windows and Linux enthusiast. Logitech G35 Headset.
alas

the syntax for hosts is

loopback friendly name resolution for the domain domain ip

that syntax is working sufficiently to block redirection to webpages. when i entered bleeping copmuter, (which i had made a few entries previously) MSE found and removed a hosts hijacker. :(

this is how i have lmhosts structured, the example is unclear and the terminology has me at odds.

site ip friendly name resolution #includes

i'm sure that format is working, at least it's what the file says to us, but i don't understand the #Include \\file. Does this cause lmhosts to query another file, run it as a script/batch, or start a program?
#Include C:\Windows\System32\drivers\etc\hosts
 

My Computer My Computer

Computer Manufacturer/Model Number
emachines el1352g-41w
OS
7 home premium 64-bit
CPU
Athlon II X2 220 Stepping 3
Motherboard
EL1352G-41w (generic e-Machines Nvidia)
Memory
DDR3 1066MhZ 144-pin (2 gigs)
Graphics Card(s)
nvidia 6150se 256mb dedicated
Sound Card
realtek ac97 hd
Monitor(s) Displays
hp wide panel lcd 21"
Screen Resolution
1600x900
Hard Drives
1tb seagate 7200rpm barracuda external
500gb seagate 7200rpm barracuda
PSU
lite-on small form factor unit (oblong looking thing)
Case
small form factor oem
Cooling
whatever they slopped on it, a heat sink and lacking paste
Keyboard
emachines multimedia keyboard
Mouse
wired ps/2 optical
Internet Speed
don't kiss and tell
Other Info
i've had her two weeks and i need to get it upgraded!
Leave lmhosts alone.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Alienware Aurora ALX R4
OS
Windows 10 Pro (x64)
CPU
Intel Core i7-3930K (3.2GHz - 4.5GHz)
Motherboard
Alienware Aurora-R4 x79
Memory
4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)
Graphics Card(s)
Nvidia Geforce GTX 690
Sound Card
SteelSeries Siberia Elite
Monitor(s) Displays
Dell UltraSharp U3011
Screen Resolution
2560x1600
Hard Drives
Samsung 850 Pro 256 GB, Seagate 1TB Desktop Hybrid HDD, 2x Western Digital 4TB Green HDD
PSU
875W Some Dell PSU <.<
Case
Alienware Aurora ALX
Cooling
Custom Liquid Cooling (EK CPU & GPU blocks) dual EK 480RAD
Keyboard
Logitech G710+ Mechanical
Mouse
Logitech G700s
Internet Speed
Verizon Fios (50 mbps average)
Other Info
Server: Intel NUC D54250WYK: i5-4250U, 16GB, 256 GB mSATA, Windows Server 2012 R2
Back
Top