The LAN Manager (LM) host table is used to associate NetBIOS names to IP addresses, so you can use NetBIOS applications over TCP/IP. Creating an LM host table is optional for using NetBIOS over TCP/IP, and unnecessary if you are not using NetBIOS applications.
If you are using NetBIOS over TCP/IP, check with your network administrator to find out if there are WINS servers on your network that you can use to resolve NetBIOS names to IP addresses. WINS servers are easier to use and more reliable than LM host tables, because you must manually maintain every entry in your LM host table.
The LM host table is only used after broadcasts and WINS servers are searched, if you use them. However, any entries that you preload in the NBT cache from the LM host table are found before broadcasts are issued or WINS servers are searched, which can help performance for accessing frequently used hosts.
Incorrect entries in this table can prevent you from sharing information with the incorrectly mapped machine.
This section includes:
You can create an LM host table or modify an existing one by using a text editor, like NotePad or WordPad, or by using the LM Host Table tab in the Configuration Utility. An editor is easier to use than the LM Host Table tab if you are adding or modifying several entries.
The file name for the LM host table is LMHOSTS. It resides in the directory in which you installed Windows. Microsoft includes a sample LMHOSTS file called LMHOSTS.SAM. You can copy this file to LMHOSTS and use it as the basis for your LM host table. When you save the file, be sure to save it as a plain text file with no file extension.
Ask your network administrator for the NetBIOS-name-to-IP-address mappings that you should have in your LM host table.
The following sections are:
Each record in the LM host table uses the format:
IP-Address NetBIOS-name #Flags #Description
For example, an entry for a NetBIOS name with a special character might look like this:
"appname \0x14"
The \ character is an escape character, and indicates that the following characters count as one character. There are 8 spaces between the 7-character appname and the 1 special character, which makes the NetBIOS name 16 characters.
Include this flag if you want this entry preloaded into the NBT cache when you boot your workstation. The NBT cache is the first place Cisco TCP/IP Suite looks when resolving NetBIOS names to IP addresses, so preloading frequently used entries can help performance.
If the entry is for a NetBIOS domain controller, used to log into a LAN Manager domain, include #DOM and enter the name of the NetBIOS domain into which you want to log. The sequence of entries for domain controllers is significant. Windows attempts to log into the first domain controller it comes to in the LM host table. If it cannot log into the first domain, it tries to log into the next domain it finds in the LM host table. Ask your network administrator for more information about the LAN Manager domain controllers on your network.
These three flags are used to include one or more shared LM host tables. These flags stand alone; they do not include an IP address or NetBIOS name in the same record, although they can take a description.
An optional description of the entry. The # character indicates the beginning of the description. You can also use # to put comment lines in the LM host table. NetBIOS over TCP/IP ignores anything that comes after the # character, although it does recognize the previously mentioned special flags.
Here are some examples of LM host table entries:
192.168.240.56 Dogwood #PRE #DOM:marketing #domain controller
192.168.240.57 Daisy #second machine
Read the LMHOSTS.SAM file in the Windows installation directory for more information on formatting these entries, and to see more examples.
If your site has a centralized LM host table, you can use it by including the #INCLUDE flag in the LMHOSTS file in the Windows installation directory. "Adding or Modifying Entries in the LM Host Table" on page 193 explains how to create and edit the LMHOSTS file, and explains the format of entries in the file.
The #INCLUDE statement uses the format:
#INCLUDE unc-filename
where unc-filename is the name of the shared LMHOSTS file in the universal naming convention. The universal naming convention identifies the machine, drive, directory, and file name of the shared LM host table. For example, to include the LMHOSTS file on the server named desktop, volume named sys, directory named public, use:
#INCLUDE \\desktop\sys\public\lmhosts
If your site keeps more than one LMHOSTS file, and these files are copies of each other, you can conditionally load the LMHOSTS file that is on the first available server. This allows you to account for a server being unavailable when you try to use a NetBIOS application. Use the #BEGIN_ALTERNATE, #INCLUDE, and #END_ALTERNATE flags to create a structure like this:
#BEGIN_ALTERNATE
#INCLUDE \\desktop\sys\public\lmhosts
#INCLUDE \\marketing\sys\public\lmhosts
#END_ALTERNATE
In this example, the LMHOSTS file on desktop is used unless desktop is unavailable, in which case the marketing server is tried.
You can include comments on these statements. The comment must follow the statement, remain on the same line as the statement, and be preceded by the # character.
The entries in LMHOSTS are processed from top down. For example, if your #INCLUDE statements are near the top of LMHOSTS, the shared LMHOSTS files are searched before the remainder of your LMHOSTS file is searched. Once a match is found, the search stops.
For #INCLUDE to be processed correctly, you must ensure that:
HKEY_LOCAL_MACHINE\system\currentcontrolset \services\lanmanserver\parameters \nullsessionshares
HTML file generated May 15, 1996.