nmblookup
Resolve NetBIOS names to IP addresses
TLDR
Find hosts in the local network with SMB shares
Find hosts in the local network with SMB shares run by SAMBA
SYNOPSIS
nmblookup [-S] [-R] [-d debuglevel] [-v] [-n netname] [-h] [-W workgroup] [-O output code] [-M master browser] [-T] [-U username%password]
PARAMETERS
-S
Perform a NetBIOS name query to get the IP address of a server.
-R
Use broadcasting rather than contacting the WINS server.
-d debuglevel
Set the debug level.
-v
Enable verbose output.
-n netname
NetBIOS name for the query.
-h
Display help message.
-W workgroup
NetBIOS workgroup name.
-O output code
Set output code.
-M master browser
Set the master browser.
-T
Truncate name to 15 characters.
-U username%password
Use the specified username and password to connect.
<name>
The NetBIOS name to query.
DESCRIPTION
nmblookup is a command-line tool for querying NetBIOS names, primarily used in Samba environments. It sends NetBIOS name query requests to a specified server or broadcasts on the local network. It is used to resolve NetBIOS names to IP addresses, and can also retrieve the NetBIOS name of an IP address. This tool is essential for troubleshooting NetBIOS name resolution issues and verifying the proper configuration of Samba or Windows networking.
CAVEATS
nmblookup relies on NetBIOS over TCP/IP (NBT) which is an older protocol and may not be enabled in modern networks. It may not work reliably in environments where NetBIOS is disabled or filtered.
<B>USAGE EXAMPLES</B>
Lookup the IP address of a NetBIOS name:
nmblookup MYSERVER
Lookup the NetBIOS name of an IP Address:
nmblookup -A 192.168.1.100
HISTORY
nmblookup has been a part of the Samba suite since its early development. It was created to provide a utility for querying NetBIOS names, mirroring functionality found in Windows operating systems. Over time, it has remained an essential tool for administrators managing Samba-based networks and interacting with Windows file sharing.
SEE ALSO
smbclient(1), nbtstat(1)