- Using a text editor, for example, Notepad.exe or Edit.com, create a file called LMHOSTS, and then save it in the following folder:%SystemRoot%\System32\Drivers\EtcNote that the file name is LMHOSTS, with no extension. If you are using Notepad.exe, Notepad.exe may automatically append .txt. If Notepad.exe does this, rename the file, using no extension, at a command prompt.
- Add the following entries to the LMHOSTS file:
Note also that DOMAIN_NAME in this entry is case-sensitive. Make sure to use all capital letters. Replace 10.0.0.1 with the IP address of your primary domain controller (PDC), replace PDCName with the NetBIOS name of your PDC, and replace DOMAIN_NAME with the name of your Windows NT-based domain.
10.0.0.1 PDCNAME #PRE #DOM:DOMAIN_NAME
10.0.0.1 "DOMAIN_NAME \0x1b" #PRE
The correct spacing of these entries is imperative. In the line that has quotation marks ("), there must be a total of exactly 20 characters between the quotation marks. To get this total of 20 characters, type the domain name, add enough spaces to pad the domain name to 15 characters, and then add the backslash and the NetBIOS hex number that represents the service type.
The backslash should be the sixteenth character. To help you know exactly where the sixteenth character is, copy the following line to your LMHOSTS file:
Line up the quotation marks in your comment line with the quotation marks in the copied line, by adding or removing spaces from your comment line to place the \ on the sixteenth column (the column that is marked with the asterisk). Note that you must use spaces, not a tab character, after the domain name and before the \.
# IP Address "123456789012345*7890"
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:163409 NetBIOS Suffixes (16th Character of the NetBIOS Name)
- After you add the lines, save the file, and then quit the text editor.
- At a command prompt, type the following, and then press ENTER:nbtstat -RNote that the -R is case-sensitive and must be capitalized. After you enter the command, you should receive the following message:Successful purge and preload of the NBT Remote Cache Name Table.
- At a command prompt, type the following, and then press ENTER:nbtstat -cNote that the -c is also case-sensitive and must be lowercase. After you enter the command, you should receive a display similar to the following table.
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
Node IpAddress: [10.0.0.5] Scope Id: 
NetBIOS Remote Cache Name Table
Name Type Host Address Life [sec]
PDCName <03> UNIQUE 10.0.0.1 -1
PDCName <00> UNIQUE 10.0.0.1 -1
PDCName <20> UNIQUE 10.0.0.1 -1
Domain <1B> UNIQUE 10.0.0.1 -1180099 Troubleshooting LMHOSTS Name Resolution Issues
Article ID: 314108 - Last Review: Oct 23, 2008 - Revision: 1