[table of contents][main topic of chapter][index][previous][next]
[copyright and trademarks][Preface Overview][Cisco TCP/IP Suite books]

Creating an LM Host Table

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:

Adding or Modifying Entries in the LM Host Table

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:

Record Format for LM Host Table Entries

Each record in the LM host table uses the format:



IP-Address    NetBIOS-name    #Flags    #Description

LM Host Table Examples

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.

Using a Shared LM Host Table

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:



[table of contents][main topic of chapter][index][previous][next]
[copyright and trademarks][Preface Overview][Cisco TCP/IP Suite books]

Copyright© 1995-1996 Cisco Systems, Inc. All Rights Reserved.

HTML file generated May 15, 1996.