大网数据广告活动
Windows排障命令

nbtstat

· 52CE 我爱测

Reference article for the nbtstat command, which displays NetBIOS over TCP/IP (NetBT) protocol statistics, NetBIOS name tables for both the local computer and remote computers, and the NetBIOS name cache.

Displays NetBIOS over TCP/IP (NetBT) protocol statistics, NetBIOS name tables for both the local computer and remote computers, and the NetBIOS name cache. This command also allows a refresh of the NetBIOS name cache and the names registered with Windows Internet Name Service (WINS). Used without parameters, this command displays Help information.

This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in Network Connections.

Syntax

nbtstat [/a <remotename>] [/A <IPaddress>] [/c] [/n] [/r] [/R] [/RR] [/s] [/S] [<interval>]
Parameters
Parameter Description
/a <remotename> Displays the NetBIOS name table of a remote computer, where remotename is the NetBIOS computer name of the remote computer. The NetBIOS name table is the list of NetBIOS names that corresponds to NetBIOS applications running on that computer.
/A <IPaddress> Displays the NetBIOS name table of a remote computer, specified by the IP address (in dotted decimal notation) of the remote computer.
/c Displays the contents of the NetBIOS name cache, the table of NetBIOS names and their resolved IP addresses.
/n Displays the NetBIOS name table of the local computer. The status of registered indicates that the name is registered either by broadcast or with a WINS server.
/r Displays NetBIOS name resolution statistics.
/R Purges the contents of the NetBIOS name cache and then reloads the pre-tagged entries from the Lmhosts file.
/RR Releases and then refreshes NetBIOS names for the local computer that is registered with WINS servers.
/s Displays NetBIOS client and server sessions, attempting to convert the destination IP address to a name.
/S Displays NetBIOS client and server sessions, listing the remote computers by destination IP address only.
<interval> Displays selected statistics, pausing the number of seconds specified in interval between each display. Press CTRL+C to stop displaying statistics. If this parameter is omitted, nbtstat prints the current configuration information only once.
/? Displays help at the command prompt.
Remarks
  • The nbtstat command-line parameters are case-sensitive.

  • The column headings generated by the nbtstat command, include:

    Heading Description
    Input The number of bytes received.
    Output The number of bytes sent.
    In/Out Whether the connection is from the computer (outbound) or from another computer to the local computer (inbound).
    Life The remaining time that a name table cache entry will live before it is purged.
    Local Name The local NetBIOS name associated with the connection.
    Remote Host The name or IP address associated with the remote computer.
    <03> The last byte of a NetBIOS name converted to hexadecimal. Each NetBIOS name is 16 characters long. This last byte often has special significance because the same name might be present several times on a computer, differing only in the last byte. For example, <20> is a space in ASCII text.
    type The type of name. A name can either be a unique name or a group name.
    Status Whether the NetBIOS service on the remote computer is running (registered) or a duplicate computer name has registered the same service (Conflict).
    State The state of NetBIOS connections.
  • The possible NetBIOS connection states, include:

    State Description
    Connected A session has been established.
    listening This endpoint is available for an inbound connection.
    Idle This endpoint has been opened but cannot receive connections.
    Connecting A session is in the connecting phase and the name-to-IP address mapping of the destination is being resolved.
    Accepting An inbound session is currently being accepted and will be connected shortly.
    Reconnecting A session is trying to reconnect (it failed to connect on the first attempt).
    Outbound A session is in the connecting phase and the TCP connection is currently being created.
    Inbound An inbound session is in the connecting phase.
    Disconnecting A session is in the process of disconnecting.
    Disconnected The local computer has issued a disconnect and it is waiting for confirmation from the remote system.

Examples

To display the NetBIOS name table of the remote computer with the NetBIOS computer name of CORP07, type:

nbtstat /a CORP07

To display the NetBIOS name table of the remote computer assigned the IP address of 10.0.0.99, type:

nbtstat /A 10.0.0.99

To display the NetBIOS name table of the local computer, type:

nbtstat /n

To display the contents of the local computer NetBIOS name cache, type:

nbtstat /c

To purge the NetBIOS name cache and reload the pre-tagged entries in the local Lmhosts file, type:

nbtstat /R

To release the NetBIOS names registered with the WINS server and re-register them, type:

nbtstat /RR

To display NetBIOS session statistics by IP address every five seconds, type:

nbtstat /S 5

Related links

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 10/16/2017
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。