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="opt">-f</arg>
32 <arg choice="req">name</arg>
37 <title>DESCRIPTION</title>
39 <para>This tool is part of the <ulink url="samba.7.html">
40 Samba</ulink> suite.</para>
42 <para><command>nmblookup</command> is used to query NetBIOS names
43 and map them to IP addresses in a network using NetBIOS over TCP/IP
44 queries. The options allow the name queries to be directed at a
45 particular IP broadcast area or to a particular machine. All queries
46 are done over UDP.</para>
50 <title>OPTIONS</title>
55 <listitem><para>Searches for a master browser by looking
56 up the NetBIOS name <replaceable>name</replaceable> with a
57 type of <constant>0x1d</constant>. If <replaceable>
58 name</replaceable> is "-" then it does a lookup on the special name
59 <constant>__MSBROWSE__</constant>.</para></listitem>
64 <listitem><para>Set the recursion desired bit in the packet
65 to do a recursive lookup. This is used when sending a name
66 query to a machine running a WINS server and the user wishes
67 to query the names in the WINS server. If this bit is unset
68 the normal (broadcast responding) NetBIOS processing code
69 on a machine is used instead. See rfc1001, rfc1002 for details.
75 <listitem><para>Once the name query has returned an IP
76 address then do a node status query as well. A node status
77 query returns the NetBIOS names registered by a host.
84 <listitem><para>Try and bind to UDP port 137 to send and receive UDP
85 datagrams. The reason for this option is a bug in Windows 95
86 where it ignores the source port of the requesting packet
87 and only replies to UDP port 137. Unfortunately, on most UNIX
88 systems root privilege is needed to bind to this port, and
89 in addition, if the <ulink url="nmbd.8.html">nmbd(8)</ulink>
90 daemon is running on this machine it also binds to this port.
97 <listitem><para>Interpret <replaceable>name</replaceable> as
98 an IP Address and do a node status query on this address.</para>
106 <listitem><para>Print a help (usage) message.</para></listitem>
112 <term>-B <broadcast address></term>
113 <listitem><para>Send the query to the given broadcast address. Without
114 this option the default behavior of nmblookup is to send the
115 query to the broadcast address of the network interfaces as
116 either auto-detected or defined in the <ulink
117 url="smb.conf.5.html#INTERFACES"><parameter>interfaces</parameter>
118 </ulink> parameter of the <filename>smb.conf (5)</filename> file.
125 <term>-U <unicast address></term>
126 <listitem><para>Do a unicast query to the specified address or
127 host <replaceable>unicast address</replaceable>. This option
128 (along with the <parameter>-R</parameter> option) is needed to
129 query a WINS server.</para></listitem>
134 <term>-d <debuglevel></term>
135 <listitem><para>debuglevel is an integer from 0 to 10.</para>
137 <para>The default value if this parameter is not specified
140 <para>The higher this value, the more detail will be logged
141 about the activities of <command>nmblookup</command>. At level
142 0, only critical errors and serious warnings will be logged.</para>
144 <para>Levels above 1 will generate considerable amounts of
145 log data, and should only be used when investigating a problem.
146 Levels above 3 are designed for use only by developers and
147 generate HUGE amounts of data, most of which is extremely cryptic.</para>
149 <para>Note that specifying this parameter here will override
150 the <ulink url="smb.conf.5.html#LOGLEVEL"><parameter>
151 log level</parameter></ulink> parameter in the <filename>
152 smb.conf(5)</filename> file.</para></listitem>
156 <term>-s <smb.conf></term>
157 <listitem><para>This parameter specifies the pathname to
158 the Samba configuration file, <ulink url="smb.conf.5.html">
159 smb.conf(5)</ulink>. This file controls all aspects of
160 the Samba setup on the machine.</para></listitem>
164 <term>-i <scope></term>
165 <listitem><para>This specifies a NetBIOS scope that
166 <command>nmblookup</command> will use to communicate with when
167 generating NetBIOS names. For details on the use of NetBIOS
168 scopes, see rfc1001.txt and rfc1002.txt. NetBIOS scopes are
169 <emphasis>very</emphasis> rarely used, only set this parameter
170 if you are the system administrator in charge of all the
171 NetBIOS systems you communicate with.</para></listitem>
177 <listitem><para>This causes any IP addresses found in the
178 lookup to be looked up via a reverse DNS lookup into a
179 DNS name, and printed out before each</para>
181 <para><emphasis>IP address .... NetBIOS name</emphasis></para>
183 <para> pair that is the normal output.</para></listitem>
189 Show which flags apply to the name that has been looked up. Possible
190 answers are zero or more of: Response, Authoritative,
191 Truncated, Recursion_Desired, Recursion_Available, Broadcast.
198 <listitem><para>This is the NetBIOS name being queried. Depending
199 upon the previous options this may be a NetBIOS name or IP address.
200 If a NetBIOS name then the different name types may be specified
201 by appending '#<type>' to the name. This name may also be
202 '*', which will return all registered names within a broadcast
203 area.</para></listitem>
210 <title>EXAMPLES</title>
212 <para><command>nmblookup</command> can be used to query
213 a WINS server (in the same way <command>nslookup</command> is
214 used to query DNS servers). To query a WINS server,
215 <command>nmblookup</command> must be called like this:</para>
217 <para><command>nmblookup -U server -R 'name'</command></para>
219 <para>For example, running :</para>
221 <para><command>nmblookup -U samba.org -R 'IRIX#1B'</command></para>
223 <para>would query the WINS server samba.org for the domain
224 master browser (1B name type) for the IRIX workgroup.</para>
228 <title>VERSION</title>
230 <para>This man page is correct for version 3.0 of
231 the Samba suite.</para>
235 <title>SEE ALSO</title>
236 <para><ulink url="nmbd.8.html"><command>nmbd(8)</command></ulink>,
237 <ulink url="samba.7.html">samba(7)</ulink>, and <ulink
238 url="smb.conf.5.html">smb.conf(5)</ulink>
243 <title>AUTHOR</title>
245 <para>The original Samba software and related utilities
246 were created by Andrew Tridgell. Samba is now developed
247 by the Samba Team as an Open Source project similar
248 to the way the Linux kernel is developed.</para>
250 <para>The original Samba man pages were written by Karl Auer.
251 The man page sources were converted to YODL format (another
252 excellent piece of Open Source software, available at
253 <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
254 ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0
255 release by Jeremy Allison. The conversion to DocBook for
256 Samba 2.2 was done by Gerald Carter</para>