Looking Up Machines with nmblookup

Looking Up Machines with nmblookup

One of the utilities in the basic Samba installation is nmblookup, which is a NetBIOS equivalent to nslookup. The primary purpose of the utility is to resolve NetBIOS names into IP addresses. Typical usages are as follows :

$ nmblookup KEARNEY
querying KEARNEY on 192.168.0.255
192.168.0.19 KEARNEY<00>
$ nmblookup -M -
querying __MSBROWSE__ on 192.168.0.255
192.168.0.11 __MSBROWSE__<01>
$ nmblookup -A 192.168.0.19
Looking up status of 192.168.0.19
received 5 names
KEARNEY <00> - M <ACTIVE>
CURTIS <00> - <GROUP> M <ACTIVE>
KEARNEY <03> - M <ACTIVE>
KEARNEY <20> - M <ACTIVE>
CURTIS <1e> - <GROUP> M <ACTIVE>
num_good_sends=0 num_good_receives=0

The first example looks up the named machine by doing a subnet broadcast (as can be seen from the .255 address). The response shows the IP address, NetBIOS name , and resource-type byte for KEARNEY. If the Windows network has a WINS server, you can specify a direct request with the -U <ip-address> option. The second example is a shortcut for looking up the domain master browser, while the third example performs a status inquiry on an IP address rather than on a NetBIOS name.

nmblookup has many more modes of operation. As usual, consult the man page for more information.

 



Multitool Linux. Practical Uses for Open Source Software
Multitool Linux: Practical Uses for Open Source Software
ISBN: 0201734206
EAN: 2147483647
Year: 2002
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net