Configuring SMS to Work on Workgroup Computers and Computers in Other Domains (LMHOSTS)

As described in the previous post the lab environment includes multiple forests, domains and workgroup computers.  One of the nice things about SMS 2003 is the fact that once the SMS Client has been installed on a system, you "own" that system and can manage it from that day forward.  In the previous post, we discussed how to use a logon script to install the SMS Advanced Client.  In this post we will discuss how to configure computers that are not located within the same domain as the SMS server to be able to find the SMS Management Point (MP) and Server Locator Point (SLP).

All Windows operating systems since Windows 2000 rely on DNS for name resolution.  A clients still have WINS installed to support some legacy applications but most do not.  An LMHOSTS file is similar to a HOSTS file.  A HOST files is used to map DNS hosts names to IP addresses.  An LMHOSTS file is used to map NetBIOS names to IP addresses.   NetBIOS names differ from DNS names because you can have different types of NetBIOS names (e,g, domain, workstation service etc.).  The LMHOSTS files is placed in the same folder as the HOSTS file (%WINDIR%\System32\Drivers\Etc).

An example of the LMHOSTS file is shown below.  Copy the code below into Notepad and save the file as LMHOSTS (no extension) to the "%WINDIR%\System32\Drivers\Etc" folder.  Customize the entries to match your environment.  When you see the pound (#) sign in an LMHOSTS file it is usually followed by a comment unless it is followed by one of the special directives such as PRE< DOM, INCLUDE etc.  The PRE directive loads the entires into the NetBIOS name cache on startup.  The DOM directive is used to indicated a domain name.  The INCLUDE directive is used to include another LMHOSTS file.

In the sample file below the first three lines are comments.  The fourth line pre-loads the domain name where the SMS servers is located and provides the IP address of a DC in that domain.  The next line provides the name and IP address of the SMS server (SMSSERVER1).  The next line provides the name of the SMS Server Locator Point (SMS_SLP) and the line that follows defines the Management Point (MP_C01).  Notice the entries for the SLP/MP look very different from the others.  The "\01xa" is a NetBIOS suffix and there must be exactly 15 characters between the the first quote and the backslash.  For the SMS_SLP line on change the IP address to the IP of the computer hosting the SMS SLP role.  For the MP, change the IP and change the SMS site code in the file from C01 to the site code of your SMS site.

<------------------------------ BEGIN LMHOSTS ----------------------------------->

# LAB LMHOSTS File
#REVISION: 2
#DATE: 10/17/2008
192.168.101.143     DC01         #PRE #DOM:LABDOMAIN1  # Lab Domain DC
192.168.101.141    SMSSVR1 #PRE
192.168.101.141   "SMS_SLP        \0x1A" #PRE
192.168.101.141   "MP_C01         \0x1A" #PRE  

<------------------------------    END LMHOSTS ----------------------------------->

 When you start using LMHOST files you quickly realize that trying to manage the content of these files on multiple computers because a big pain real fast.  If you need to make a change, you need to update every file with the change.  Fortunately the #INCLUDE directive discussed earlier enables you to use a centralized LMHOSTS file.  In our lab environment we created a share on the SMS server named "SMSLMHOST" and placed the first LMHOSTS file shown above there.  The LMHOSTS file shown below was placed on the computers that needed a LMHOSTS.  There are two entries shown.  The first one provides the name/IP of the SMS server and the second directs the client to read the master LMHOSTS file stored on the server.

 <------------------------------   BEGIN LMHOSTS ----------------------------------->

192.168.101.141 SMS1 #PRE
#INCLUDE \\SMSSVR1\SMSLMHOSTS\lmhosts

<------------------------------    END LMHOSTS ----------------------------------->

REFERENCE

NetBIOS Suffixes (16th Character of the NetBIOS Name)
https://support.microsoft.com/default.aspx/kb/163409/

HOWTO: Assign SMS Advanced Client to the Isolated Secondary Site
https://support.microsoft.com/kb/555853

LMHOSTS File Information and Predefined Keywords
https://support.microsoft.com/kb/102725

Domain Browsing with TCP/IP and LMHOSTS Files
https://support.microsoft.com/kb/150800

Chapter 10 - Using LMHOSTS Files
https://www.microsoft.com/resources/documentation/windowsnt/4/server/reskit/en-us/net/sur_lmh.mspx?mfr=true