1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="nmblookup">
5 <refentrytitle>nmblookup</refentrytitle>
6 <manvolnum>1</manvolnum>
11 <refname>nmblookup</refname>
12 <refpurpose>NetBIOS over TCP/IP client used to lookup NetBIOS
18 <command>nmblookup</command>
19 <arg choice="opt">-M</arg>
20 <arg choice="opt">-R</arg>
21 <arg choice="opt">-S</arg>
22 <arg choice="opt">-r</arg>
23 <arg choice="opt">-A</arg>
24 <arg choice="opt">-h</arg>
25 <arg choice="opt">-B <broadcast address></arg>
26 <arg choice="opt">-U <unicast address></arg>
27 <arg choice="opt">-d <debug level></arg>
28 <arg choice="opt">-s <smb config file></arg>
29 <arg choice="opt">-i <NetBIOS scope></arg>
30 <arg choice="opt">-T</arg>
31 <arg choice="req">name</arg>
36 <title>DESCRIPTION</title>
38 <para>This tool is part of the <ulink url="samba.7.html">
39 Samba</ulink> suite.</para>
41 <para><command>nmblookup</command> is used to query NetBIOS names
42 and map them to IP addresses in a network using NetBIOS over TCP/IP
43 queries. The options allow the name queries to be directed at a
44 particular IP broadcast area or to a particular machine. All queries
45 are done over UDP.</para>
49 <title>OPTIONS</title>
54 <listitem><para>Searches for a master browser by looking
55 up the NetBIOS name <replaceable>name</replaceable> with a
56 type of <constant>0x1d</constant>. If <replaceable>
57 name</replaceable> is "-" then it does a lookup on the special name
58 <constant>__MSBROWSE__</constant>.</para></listitem>
63 <listitem><para>Set the recursion desired bit in the packet
64 to do a recursive lookup. This is used when sending a name
65 query to a machine running a WINS server and the user wishes
66 to query the names in the WINS server. If this bit is unset
67 the normal (broadcast responding) NetBIOS processing code
68 on a machine is used instead. See rfc1001, rfc1002 for details.
74 <listitem><para>Once the name query has returned an IP
75 address then do a node status query as well. A node status
76 query returns the NetBIOS names registered by a host.
83 <listitem><para>Try and bind to UDP port 137 to send and receive UDP
84 datagrams. The reason for this option is a bug in Windows 95
85 where it ignores the source port of the requesting packet
86 and only replies to UDP port 137. Unfortunately, on most UNIX
87 systems root privilege is needed to bind to this port, and
88 in addition, if the <ulink url="nmbd.8.html">nmbd(8)</ulink>
89 daemon is running on this machine it also binds to this port.
96 <listitem><para>Interpret <replaceable>name</replaceable> as
97 an IP Address and do a node status query on this address.</para>
105 <listitem><para>Print a help (usage) message.</para></listitem>
111 <term>-B <broadcast address></term>
112 <listitem><para>Send the query to the given broadcast address. Without
113 this option the default behavior of nmblookup is to send the
114 query to the broadcast address of the network interfaces as
115 either auto-detected or defined in the <ulink
116 url="smb.conf.5.html#INTERFACES"><parameter>interfaces</parameter>
117 </ulink> parameter of the <filename>smb.conf (5)</filename> file.
124 <term>-U <unicast address></term>
125 <listitem><para>Do a unicast query to the specified address or
126 host <replaceable>unicast address</replaceable>. This option
127 (along with the <parameter>-R</parameter> option) is needed to
128 query a WINS server.</para></listitem>
133 <term>-d <debuglevel></term>
134 <listitem><para>debuglevel is an integer from 0 to 10.</para>
136 <para>The default value if this parameter is not specified
139 <para>The higher this value, the more detail will be logged
140 about the activities of <command>nmblookup</command>. At level
141 0, only critical errors and serious warnings will be logged.</para>
143 <para>Levels above 1 will generate considerable amounts of
144 log data, and should only be used when investigating a problem.
145 Levels above 3 are designed for use only by developers and
146 generate HUGE amounts of data, most of which is extremely cryptic.</para>
148 <para>Note that specifying this parameter here will override
149 the <ulink url="smb.conf.5.html#LOGLEVEL"><parameter>
150 log level</parameter></ulink> parameter in the <filename>
151 smb.conf(5)</filename> file.</para></listitem>
155 <term>-s <smb.conf></term>
156 <listitem><para>This parameter specifies the pathname to
157 the Samba configuration file, <ulink url="smb.conf.5.html">
158 smb.conf(5)</ulink>. This file controls all aspects of
159 the Samba setup on the machine.</para></listitem>
163 <term>-i <scope></term>
164 <listitem><para>This specifies a NetBIOS scope that
165 <command>nmblookup</command> will use to communicate with when
166 generating NetBIOS names. For details on the use of NetBIOS
167 scopes, see rfc1001.txt and rfc1002.txt. NetBIOS scopes are
168 <emphasis>very</emphasis> rarely used, only set this parameter
169 if you are the system administrator in charge of all the
170 NetBIOS systems you communicate with.</para></listitem>
176 <listitem><para>This causes any IP addresses found in the
177 lookup to be looked up via a reverse DNS lookup into a
178 DNS name, and printed out before each</para>
180 <para><emphasis>IP address .... NetBIOS name</emphasis></para>
182 <para> pair that is the normal output.</para></listitem>
188 <listitem><para>This is the NetBIOS name being queried. Depending
189 upon the previous options this may be a NetBIOS name or IP address.
190 If a NetBIOS name then the different name types may be specified
191 by appending '#<type>' to the name. This name may also be
192 '*', which will return all registered names within a broadcast
193 area.</para></listitem>
200 <title>EXAMPLES</title>
202 <para><command>nmblookup</command> can be used to query
203 a WINS server (in the same way <command>nslookup</command> is
204 used to query DNS servers). To query a WINS server,
205 <command>nmblookup</command> must be called like this:</para>
207 <para><command>nmblookup -U server -R 'name'</command></para>
209 <para>For example, running :</para>
211 <para><command>nmblookup -U samba.org -R 'IRIX#1B'</command></para>
213 <para>would query the WINS server samba.org for the domain
214 master browser (1B name type) for the IRIX workgroup.</para>
218 <title>VERSION</title>
220 <para>This man page is correct for version 2.2 of
221 the Samba suite.</para>
225 <title>SEE ALSO</title>
226 <para><ulink url="nmbd.8.html"><command>nmbd(8)</command></ulink>,
227 <ulink url="samba.7.html">samba(7)</ulink>, and <ulink
228 url="smb.conf.5.html">smb.conf(5)</ulink>
233 <title>AUTHOR</title>
235 <para>The original Samba software and related utilities
236 were created by Andrew Tridgell. Samba is now developed
237 by the Samba Team as an Open Source project similar
238 to the way the Linux kernel is developed.</para>
240 <para>The original Samba man pages were written by Karl Auer.
241 The man page sources were converted to YODL format (another
242 excellent piece of Open Source software, available at
243 <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
244 ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0
245 release by Jeremy Allison. The conversion to DocBook for
246 Samba 2.2 was done by Gerald Carter</para>