

The safest method is to save the file using quotes, “lmhosts” to assure no extensions are added. Be careful if using a text editor like NotePad as it will add a. If you are planning on using this file it needs to be saved without a file extension – lmhosts. The LMHosts file in it’s default form, is named lmhosts.sam The.The catch is there are a few gotcha’s you need to be aware of:

If DNS is configured on the host and client machines there should be no need of static text files for resolving names, but it does work well, and many folks uses them as a dependable simple solution. The primary use today for an LMHosts file, is for name resolution over a VPN. This is usually due to the fact that they have some very simple, but specific requirements, for them to work at all. Most people are familiar with these files, but are often frustrated when they do not work as expected. Both are simple text files that match names to IP addresses, and are very easy to create and implement. In an age where DNS dominates your network both locally and throughout the Internet, these two files are seldom ever used, but they can be very useful in a few situations.

The Hosts file, used for DNS name resolution, and the LMHosts.sam file used for NetBIOS name resolution. There are two files in the %systemroot%\system32\drivers\etc directory that can be used for name resolution. I have done so in hopes that it may be helpful to some folk, and also it will be useful in and upcoming post regarding Hyper-V configuration and management. The following is a repost from an older blog of mine. Though simple text files, the syntax used is critical. Though rare, there still is an occational need or advantage to using Hosts and LMHosts files.
