Read this whole guide offline with no ads, for a very low price!
Click Here!
Use coupon code "certiguide" to save 20%!
(Expires 2004/12/31)

NEW! Network+ N11-003 2005 Beta Exam Study Guide - Just $9!
Get It Here!

Custom Search







Table Of Contents  CertiGuide to Network+
 9  Chapter 0101:  TCP/IP
      9  V  Name Resolution

Previous Topic/Section
Hosts File
Previous Page
Pages in Current Topic/Section
1
Next Page
Limitations of Static Mapping
Next Topic/Section

LMHOSTS

When Microsoft needed a similar name-to-IP address mapping solution, but required more functionality than was in HOSTS for specifying attributes such as MS network domain servers, they started with the HOSTS file format, and extended it into LMHOSTS. The LM stands for OS/2’s LAN Manager, the name of the Microsoft networking solution at the time (OS/2 was the parent of Windows NT).

The LMHOSTS file is bit more intelligent than the HOSTS file. Its extended keywords are specified by the # symbol followed by a keyword. For example, #PRE in an LMHOSTS file preloads the file into memory. So to preload a file into memory, it looks like #PRE LMHOST-FILENAME. A second predefined key is the #DOM call. This in combination with #PRE preloads MS domain names, for efficient name resolution.

Note the following tip when reviewing the sample LMHOSTS file.

LMHOSTS

Net BIOS
names are how MS domains are distributed with a LMHOSTS file. This type of a file is a superset of the HOSTS file. They are only available on MS based networks. This file type uses the # sign for comment.


The following is an example LMHOSTS FILE:

# Copyright © 1993-1995 Microsoft Corp.
#
# This is a sample LMHOSTS file used by the Microsoft TCP/IP for Windows
# NT.
#
# This file contains the mappings of IP addresses to NT computer names
# (Net BIOS) names. Each entry should be kept on an individual line.
# The IP address should be placed in the first column followed by the
# corresponding computer name. The address and the computer name
# Should be separated by at least one space or tab. The “#” character
# is generally used to denote the start of a comment (see the exceptions
# below).
#
# This file is compatible with Microsoft LAN Manager 2.x TCP/IP LMHOST
# files and offers the following extensions:
#
# #PRE
# #DOM:<domain>
# #INCLUDE <filename>
# #BEGIN_ALTERNATE
# #END_ALTERNATE
# \0xnn (non-printing character support)
#
# Following any entry in the file with the characters “#PRE”
# will cause the entry to be preloaded into the name cache. By
# default, entries are not preloaded, but are parsed only after
# dynamic name resolution fails.
#
# Following an entry with the “#DOM:<domain>” tag will
# associate the entry with the domain specified by <domain>.
# This affects how the browser and logon services behave in
# TCP/IP environments. To preload the host name associated with
# #DOM entry, it is necessary to also add a #PRE to the line.
# The <domain> is always preloaded although it will not be
# shown when the name cache is viewed.
#
# Specifying “#INCLUDE <filename>” will force the RFC NetBIOS
# (NBT) software to seek the specified <filename> and parse it
# as if it were local. <filename> is generally a UNC-based
# name, allowing a centralized LMHosts file to be maintained
# on a server. It is ALWAYS necessary to provide a mapping
# for the IP address of the server prior to the #INCLUDE.
# This mapping must use the #PRE directive. In addition the
# share “public” in the example below must be in the
# LanManServer list of “NullSessionShares” in order for client
# machines to be able to read the LMHosts file successfully.
# This key is under
# \machine\system\currentcontrolset\services\lanmanserver\parameters\nullsessionshares
# in the registry. Simply add “public” to the list found there.
#
# The #BEGIN_ and #END_ALTERNATE keywords allow multiple
# #INCLUDE statements to be grouped together. Any single
# successful include will cause the group to succeed.
#
# Finally, non-printing characters can be embedded in mappings
# by first surrounding the NetBIOS name in quotations, then
# using the \0xnn notation to specify a hex value for a
# non-printing character.
#
# The following example illustrates all of these extensions:
#
# 102.54.94.97 rhino #PRE #DOM:networking #net group’s DC
# 102.54.94.102 “appname \0x14” #special app server
# 102.54.94.123 popular #PRE #source server
# 102.54.94.117 localsrv #PRE #needed for the include
#
# #BEGIN_ALTERNATE
# #INCLUDE \\ localsrv\public\lmhosts
# #INCLUDE \\ rhino\public\lmhosts
# #END_ALTERNATE
#
# In the above example, the “appname” server contains a special
# character in its name, the “popular” and “localsrv’ server
# names are preloaded, and the “rhino” server name is specified
# so it can be used to later #INCLUDE a centrally maintained
# lmhosts file if the “localsrv” system is unavailable.
#
# Note that the whole file is parsed including comments on each
# lookup, so keeping the number of comments to a minimum will
# improve performance. Therefore it is not advisable to simply
# add LMHOST file entries onto the end of this file.

Previous Topic/Section
Hosts File
Previous Page
Pages in Current Topic/Section
1
Next Page
Limitations of Static Mapping
Next Topic/Section

If you find CertiGuide.com useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider buying an inexpensive PDF equivalent of the CertiGuide to Network+ from StudyExam4Less.com. (Use coupon code "certiguide" by December 31, 2004 to save 20%!) Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

CertiGuide for Network+ (http://www.CertiGuide.com/netplus/) on CertiGuide.com
Version 1.0 - Version Date: November 7, 2004

Adapted with permission from a work created by Tcat Houser and Helen O’Boyle.
CertiGuide.com Version © Copyright 2004 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.