Share via


Nbtstat is designed to help troubleshoot NetBIOS name resolution problems. When a network is functioning normally, NetBIOS over TCP/IP (NetBT) resolves NetBIOS names to IP addresses. It does this through several options for NetBIOS name resolution, including local cache lookup, WINS server query, broadcast, LMHOSTS lookup, Hosts lookup, and DNS server query.

The nbtstat command removes and corrects preloaded entries using a number of case-sensitive switches. The nbtstat - a <name>** command performs a NetBIOS adapter status command on the computer name specified by < name> . The adapter status command returns the local NetBIOS name table for that computer as well as the MAC address of the adapter card. The nbtstat -A < IP address > command performs the same function using a target IP address rather than a name.

The nbtstat - c option shows the contents of the NetBIOS name cache, which contains NetBIOS name-to-IP address mappings.

nbtstat -n displays the names that have been registered locally on the system by NetBIOS applications such as the server and redirector.

The nbtstat -r command displays the count of all NetBIOS names resolved by broadcast and by querying a WINS server. The nbtstat -R command purges the name cache and reloads all #PRE entries from the LMHOSTS file. #PRE entries are the LMHOSTS name entries that are preloaded into the cache. For more information about the LMHOSTS file, see the appendix "LMHOSTS Files" in this book.

Nbtstat -RR sends name release packets to the WINS server and starts a refresh, thus re-registering all names with the name server without having to reboot. This is a new option in Windows NT 4.0 with Service Pack 4 as well as in Windows 2000.

You can use nbtstat -S to list the current NetBIOS sessions and their status, including statistics. Sample output looks like this:

C:\>nbtstat -S

Local Area Connection:

Node IpAddress: [] Scope Id: []

NetBIOS Connection Table

Local Name State In/Out Remote Host Input Output


TESTPC1 <00> Connected Out 6MB 5MB

TESTPC1 <00> Connected Out 108KB 116KB

TESTPC1 <00> Connected Out 299KB 19KB

TESTPC1 <00> Connected Out 324KB 19KB

TESTPC1 <03> Listening

Finally, nbtstat -s provides a similar set of session listings, but provides the remote computer names, rather than their IP addresses.


The options for the Nbtstat command are case sensitive.

The Nbtstat switches are listed in Table 3.4.

Table 3.4 Nbtstat Switches




-a < name >

adapter status

Returns the NetBIOS name table and MAC address of the address card for the computer name specified.

-A < IP address >

Adapter status

Lists the same information as -a when given the target's IP address.



Lists the contents of the NetBIOS name cache.

[ Number ]


Typing a numerical value tells Nbtstat to redisplay selected statistics each interval seconds, pausing between each display. Press Ctrl+C to stop redisplaying statistics.



Displays the names registered locally by NetBIOS applications such as the server and redirector.



Displays a count of all names resolved by broadcast or WINS server.



Purges the name cache and reloads all #PRE entries from LMHOSTS.



Releases and reregisters all names with the name server.



Lists the NetBIOS sessions table converting destination IP addresses to computer NetBIOS names.



Lists the current NetBIOS sessions and their status, with the IP address.



Displays this list.