Go Back   PCMech Forums > Windows Support > Windows Legacy Support (XP and earlier)

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 09-23-2002, 01:21 PM   #1
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Win2K HOSTS and LMHOSTS.SAM files

I have been fixing a minor network issue on Win2K machine involving resolving host names. It's fixed, but it got me wondering about the difference between the HOSTS file and the LMHOSTS.SAM file. Both of those seem to be pretty basic lists containing IP addresses and names. So what is the difference between the two?
doctorgonzo is offline   Reply With Quote
Old 09-23-2002, 03:14 PM   #2
Member (9 bit)
 
Join Date: Jul 2001
Location: North West England
Posts: 410
The HOSTS file was replaced by DNS and maps FQDNs to IP addresses. The LMHOSTS file was replaced by WINS and maps NetBIOS names to IP addresses. This happened due to the fact that updates required a change to the file and by the time those changes had been made the file was already out of date hence the need for a dynamic system.

However I do still use the HOSTS file for static IP addresses on the LAN as it saves a trip to the DNS server to find them as the local machine will check the HOSTS file before it checks DNS.

P.S. The .SAM extension means the file is a sample. To use the HOSTS and LMHOSTS they must have no extension
pointd is offline   Reply With Quote
Old 09-23-2002, 03:36 PM   #3
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Thanks for the explanation. The problem did relate to a server on our LAN that is not in the DNS and thus could not be found. Our DB person told us to add the IP address to the LMHOSTS file, but that wasn't working. Now I see why. I added it to the HOSTS file instead and everything is working fine.
doctorgonzo is offline   Reply With Quote
Old 09-23-2002, 03:36 PM   #4
Resident Slacker
 
homer15's Avatar
 
Join Date: Dec 2001
Location: Suisun City, California (i know, where the hell is that?!?!?)
Posts: 2,620
Quote:
Originally posted by pointd

P.S. The .SAM extension means the file is a sample. To use the HOSTS and LMHOSTS they must have no extension
no, a .sam is a ami pro text file. lmhosts.sam is a valid file that maps ip addresses to machine names.

gonz, i'm not sure if there is a difference between them, but different apps might use the files differently. y'know?
__________________
Friends help you move. REAL friends help you move bodies. - me
quite possibly the best book ever written... by me
homer15 is offline   Reply With Quote
Old 09-23-2002, 03:58 PM   #5
Member (11 bit)
 
RenegadeKing's Avatar
 
Join Date: Nov 2001
Location: Massachusetts
Posts: 1,487
The .sam at the end of LMHOSTS means that it is a sample file. pointd is right when he says you must remove the .sam extension for it to work.
__________________
"When the only tool you have is a hammer, every problem starts to look like a nail."
RenegadeKing is offline   Reply With Quote
Old 09-23-2002, 04:05 PM   #6
Resident Slacker
 
homer15's Avatar
 
Join Date: Dec 2001
Location: Suisun City, California (i know, where the hell is that?!?!?)
Posts: 2,620
sorry guys, when i looked for the use of the .sam file, i didn't look for lmhosts.sam. i see now it is a sample.
homer15 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:19 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2