System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
This article was previously published under Q314108
For a Microsoft Windows 2000 version of this article,
see
180094
(http://support.microsoft.com/kb/180094/EN-US/
)
.
There may be instances when you experience name resolution
issues on your TCP/IP-based network and you need to use an LMHOSTS file to
resolve NetBIOS names. This article describes how to create an LMHOSTS file to
aid in name resolution and domain validation.
Use the following steps to create a correctly formatted
LMHOSTS file:
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\Etc
Note 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.
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.
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:
# IP Address "123456789012345*7890"
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 \.
For additional information, click the article
number below to view the article in the Microsoft Knowledge Base:
163409
(http://support.microsoft.com/kb/163409/EN-US/
)
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 -R
Note 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 -c
Note 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.
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 -1
For additional information, click the article
number below to view the article in the Microsoft Knowledge Base:
180099
(http://support.microsoft.com/kb/180099/EN-US/
)
Troubleshooting LMHOSTS Name Resolution Issues