Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

LMhost - how to create one.

Posted on 2006-10-24
16
896 Views
Last Modified: 2013-11-13

4 PCs in a workgroup.

To speed access up someone said use LMhosts. (xp pro pcs)  I read years ago this is a file that refers fixed ip - to mac address or something like this.  
 
Is an LM host file a good idea?
Where does the LM hosts files go?




0
Comment
Question by:worded
  • 7
  • 5
  • 4
16 Comments
 
LVL 16

Assisted Solution

by:gurutc
gurutc earned 250 total points
ID: 17794858
Hi worded,

In a workgroup you don't need lmhosts normally, that's more domain oriented, but it still helps.  You want to edit it and also hosts.  

First, make sure all your machines have a fixed IP.

Go to c:\windows\system32\drivers\etc

In this folder you'll see hosts.sam and lmhosts.sam

The .sam means sample.

Open each of these files and add a line for each workstation that looks like this:

192.168.0.101  Station1

Where the IP is the address of Station1 or whatever each machine is called and the name is that machine's name.

Then do a Save As for these files, naming them without the .sam part and also change the save as type from text to all files.

Check to see that you now have a hosts and lmhosts files without the .sam extension.  

This will speed up browsing on your small network.

Good Luck!
- gurutc

Moderation in All Things, Especially Moderation.
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 250 total points
ID: 17794911
The LMHOSTS file is best used in this way if you preload the details by adding #PRE to the end of the line, e.g.

192.168.0.101                 pcname                #PRE

But on a small network name resolution should work fine with standard NetBIOS broadcast methods.  For 2000/XP I just to tend to put the entries in HOSTS which is for resolcing TCP/IP addresses whereas LMHOSTS is for NetBIOS names.  The LMHOSTS file usage can also be turned off - go to the properties of tcpip in the properties of your LAN card in network control panel... there is a checkbox in there to enable LMHOSTS lookup.

As said above, Make sure when you save - as the file you select "All files" not "Text files" in the File Type box as otherwise it is likely to add  .TXT to the end. If it is shows as a notepad file or opens straight in notepad when you double click it then the name is wrong -- a filename without an extension will always ask for which application to load it with.

You can test it is working by putting the WRONG address in one of the files against a host, e.g.

1.1.1.1        dummy

then

PING dummy

and if the hosts / lmhosts is working then it will try looking for 1.1.1.1 and timeout.

Steve
0
 

Author Comment

by:worded
ID: 17794974

"For 2000/XP I just to tend to put the entries in HOSTS which is for resolving TCP/IP addresses"

>How do you do that?


One of the PCs is very slow and the "server" sometimes egg times in the group, only sometimes when its being accessed.
Im thinking its got something to do with all this perhaps.
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 43

Expert Comment

by:Steve Knight
ID: 17795041
I very much doubt slowness would be caused by this.  Once the computer has resolved the address for a workstation or server it is cached.   The HOSTS table entry is the file called HOSTS in the same folder as suggested for the LMHOSTS file above.
0
 

Author Comment

by:worded
ID: 17795054


ok thanks,

Would you suggest make all IPs static or just the "server" in the workgroup?
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17795193
Four four PC's yes I probably would make them static and enter their addresses in HOSTS.  Any more andI'd have a DHCP server, probably the internet router for a small network giving out the addresses and DNS server and default gateway options ... You have to way up possible misconfiguration in static and relative difficulty in changing if needed against a fault with your dhcp server taking the lot offline.... Your choice really and again for four hosts not difficult to amend if needed.
0
 

Author Comment

by:worded
ID: 17795827


Im thinking static is better ......... Pcs are all in the one room.

0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17795891
Agreed.
0
 
LVL 16

Assisted Solution

by:gurutc
gurutc earned 250 total points
ID: 17795898
I'm with you guys, static in this small situation is best

- gurutc
0
 
LVL 16

Assisted Solution

by:gurutc
gurutc earned 250 total points
ID: 17795961
Here's another thing you can do that will help.

Under Control Panel open up Network Connections.  Go to the network connection properties on each pc and then the TCPIP properties.  Click the Advanced button.  Click the DNS tab.  Then uncheck the box for Register this connection's addresses in DNS. Click OK and then click OK again.  Now look to see if QoS Packet Scheduler is enabled.  If so, uncheck it.  Then Click the Close button.

The network connections windows should still be open.  If not, reopen it.  Then click Advanced at the top and choose Advanced Settings.  In the listing of Connections make sure your main connection for your small network is at the top of the list.  If not, highlight it and use the arrows to move it to the top.

These small things may help.

- gurutc
0
 

Author Comment

by:worded
ID: 17799885
Well heres the result after an exhausting day.

I went into "my network places" and found a load of spurious connections from over the years and deleted the lot.
Changed the server share to no space main_pc_docs
Right clicked my computer - map a drive and put the ip address fo the server in. \\192.168.1.100\main_pc_docs
Q>I didn’t go for the net use command as after using it I found no drive letter in my computer > anyone know why?

It worked like a dream, at least for now!
They want the PCs cross linked to each others my docs - but I want to see a stable system for at least one working day.

I didnt do the hosts file yet but will test it. - presume it goes on every PC?
Will try this suggestion above
xxx.xxx.x.xxx                 pcname                #PRE
 
All told my bacon is saved - thanks for everything so far! I like fixing things ...... or should I say we?

Q> Lastly is it risky changing host file remotely, i.e. I may connection during it?
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17801137
Q> Lastly is it risky changing host file remotely, i.e. I may connection during it?

None at all.  If it doesn't work change it back, you'll  have the same access as before and machine will have the same IP
0
 

Author Comment

by:worded
ID: 17962052


I will be reverting back to this issue next week and will report back then
0
 
LVL 16

Expert Comment

by:gurutc
ID: 17964181
Cool to hear about your job security.  This site's made my job a lot more secure too!

- gurutc
0
 

Author Comment

by:worded
ID: 18176021


Static IP addreses - done on all 4 pcs – thanks that helped.

At home - I just tested the hosts file, works well – thanks.  
(ignoring the lmhosts as its an XP pro workgroup
x 4 pcs – I hope this is good advise)

I found this ap useful for gathering ip and hostnames …. its free if < 10 hosts
http://www.komodolabs.com/   The XP firewall has to be off to get the IPs.

So I accurately amend the hosts file + each computer gets the same amends (i.e. including it own details …….. no harm it reconfirmed it own details?)

So  …….
xxx.xxx.x.xx2              hostname               #PRE
xxx.xxx.x.xx3              hostname               #PRE
xxx.xxx.x.xx4              hostname               #PRE
xxx.xxx.x.xx5              hostname               #PRE

Topology - 3 of the pcss are wireless and the "server" on the work group is hard wired to the router.

They are complaining of "really slow access" vague but I will be there tomorrow creating amended host files.

There is a share on the "server" / main PC that they all access.

They have big excel docs on it with pics e.g. 20 meg files.  (work around, I will tell them to save locally and resave to share when complete.)

Will 4 of them working on a share with these files seriously affect a wireless G network?
(Ive installed a linksys WRT300n, but Ive G cards as the Ns are expensive, I have one N PCMCIA to test tomorrow)

>>>>>>>>>>> Heres my question.

How can I test bottle necks / network traffic? e.g if all of them have big files open.
Outlook is crashing ….. Ive it set to keep a copy on server and they all collect (sometimes called a multidrop – not exchange)

How can I text the speed of the G cards versus the N?
I need to diagnose whats wrong with the network speed.

For the moment wired is not an option.

Thanks in advance for all the advise so far.

0
 

Author Comment

by:worded
ID: 18185331



Its been a long year and the resolve has been opening up a bottle of red wine.

Ive pinged
Ive host filed
Ive static ip ed

Thanks for all the help.

The users are 4 females and with a few days off my wounds will heal.

Happy Christmas to you all ............




0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Worried about if Apple can protect your documents, photos, and everything else that gets stored in iCloud? Read on to find out what Apple really uses to make things secure.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question