Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 925
  • Last Modified:

LMhost - how to create one.


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
worded
Asked:
worded
  • 7
  • 5
  • 4
4 Solutions
 
gurutcCommented:
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
 
Steve KnightIT ConsultancyCommented:
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
 
wordedAuthor Commented:

"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
Who's Defending Your Organization from Threats?

Protecting against advanced threats requires an IT dream team – a well-oiled machine of people and solutions working together to defend your organization. Download our resource kit today to learn more about the tools you need to build you IT Dream Team!

 
Steve KnightIT ConsultancyCommented:
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
 
wordedAuthor Commented:


ok thanks,

Would you suggest make all IPs static or just the "server" in the workgroup?
0
 
Steve KnightIT ConsultancyCommented:
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
 
wordedAuthor Commented:


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

0
 
Steve KnightIT ConsultancyCommented:
Agreed.
0
 
gurutcCommented:
I'm with you guys, static in this small situation is best

- gurutc
0
 
gurutcCommented:
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
 
wordedAuthor Commented:
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
 
Steve KnightIT ConsultancyCommented:
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
 
wordedAuthor Commented:


I will be reverting back to this issue next week and will report back then
0
 
gurutcCommented:
Cool to hear about your job security.  This site's made my job a lot more secure too!

- gurutc
0
 
wordedAuthor Commented:


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
 
wordedAuthor Commented:



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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 7
  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now