1<!--
2 - Copyright (C) 2004-2007, 2010, 2013, 2014 Internet Systems Consortium, Inc. ("ISC")
3 - 
4 - Permission to use, copy, modify, and/or distribute this software for any
5 - purpose with or without fee is hereby granted, provided that the above
6 - copyright notice and this permission notice appear in all copies.
7 - 
8 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 - PERFORMANCE OF THIS SOFTWARE.
15-->
16<!-- $Id$ -->
17<html>
18<head>
19<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
20<title>nslookup</title>
21<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
22</head>
23<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
24<a name="id2476277"></a><div class="titlepage"></div>
25<div class="refnamediv">
26<h2>Name</h2>
27<p>nslookup &#8212; query Internet name servers interactively</p>
28</div>
29<div class="refsynopsisdiv">
30<h2>Synopsis</h2>
31<div class="cmdsynopsis"><p><code class="command">nslookup</code>  [<code class="option">-option</code>] [name | -] [server]</p></div>
32</div>
33<div class="refsect1" lang="en">
34<a name="id2543435"></a><h2>DESCRIPTION</h2>
35<p><span><strong class="command">Nslookup</strong></span>
36      is a program to query Internet domain name servers.  <span><strong class="command">Nslookup</strong></span>
37      has two modes: interactive and non-interactive.  Interactive mode allows
38      the user to query name servers for information about various hosts and
39      domains or to print a list of hosts in a domain.  Non-interactive mode
40      is
41      used to print just the name and requested information for a host or
42      domain.
43    </p>
44</div>
45<div class="refsect1" lang="en">
46<a name="id2543451"></a><h2>ARGUMENTS</h2>
47<p>
48      Interactive mode is entered in the following cases:
49      </p>
50<div class="orderedlist"><ol type="a">
51<li><p>
52            when no arguments are given (the default name server will be used)
53          </p></li>
54<li><p>
55            when the first argument is a hyphen (-) and the second argument is
56            the host name or Internet address of a name server.
57          </p></li>
58</ol></div>
59<p>
60    </p>
61<p>
62      Non-interactive mode is used when the name or Internet address of the
63      host to be looked up is given as the first argument. The optional second
64      argument specifies the host name or address of a name server.
65    </p>
66<p>
67      Options can also be specified on the command line if they precede the
68      arguments and are prefixed with a hyphen.  For example, to
69      change the default query type to host information, and the initial
70      timeout to 10 seconds, type:
71      
72        </p>
73<pre class="programlisting">
74nslookup -query=hinfo  -timeout=10
75</pre>
76<p>
77      
78    </p>
79</div>
80<div class="refsect1" lang="en">
81<a name="id2543495"></a><h2>INTERACTIVE COMMANDS</h2>
82<div class="variablelist"><dl>
83<dt><span class="term"><code class="constant">host</code> [<span class="optional">server</span>]</span></dt>
84<dd>
85<p>
86            Look up information for host using the current default server or
87            using server, if specified.  If host is an Internet address and
88            the query type is A or PTR, the name of the host is returned.
89            If host is a name and does not have a trailing period, the
90            search list is used to qualify the name.
91          </p>
92<p>
93            To look up a host not in the current domain, append a period to
94            the name.
95          </p>
96</dd>
97<dt><span class="term"><code class="constant">server</code> <em class="replaceable"><code>domain</code></em></span></dt>
98<dd><p></p></dd>
99<dt><span class="term"><code class="constant">lserver</code> <em class="replaceable"><code>domain</code></em></span></dt>
100<dd><p>
101            Change the default server to <em class="replaceable"><code>domain</code></em>; <code class="constant">lserver</code> uses the initial
102            server to look up information about <em class="replaceable"><code>domain</code></em>, while <code class="constant">server</code> uses
103            the current default server.  If an authoritative answer can't be
104            found, the names of servers that might have the answer are
105            returned.
106          </p></dd>
107<dt><span class="term"><code class="constant">root</code></span></dt>
108<dd><p>
109            not implemented
110          </p></dd>
111<dt><span class="term"><code class="constant">finger</code></span></dt>
112<dd><p>
113            not implemented
114          </p></dd>
115<dt><span class="term"><code class="constant">ls</code></span></dt>
116<dd><p>
117            not implemented
118          </p></dd>
119<dt><span class="term"><code class="constant">view</code></span></dt>
120<dd><p>
121            not implemented
122          </p></dd>
123<dt><span class="term"><code class="constant">help</code></span></dt>
124<dd><p>
125            not implemented
126          </p></dd>
127<dt><span class="term"><code class="constant">?</code></span></dt>
128<dd><p>
129            not implemented
130          </p></dd>
131<dt><span class="term"><code class="constant">exit</code></span></dt>
132<dd><p>
133            Exits the program.
134          </p></dd>
135<dt><span class="term"><code class="constant">set</code>
136          <em class="replaceable"><code>keyword[<span class="optional">=value</span>]</code></em></span></dt>
137<dd>
138<p>
139            This command is used to change state information that affects
140            the lookups.  Valid keywords are:
141            </p>
142<div class="variablelist"><dl>
143<dt><span class="term"><code class="constant">all</code></span></dt>
144<dd><p>
145                    Prints the current values of the frequently used
146                    options to <span><strong class="command">set</strong></span>.
147                    Information about the  current default
148                    server and host is also printed.
149                  </p></dd>
150<dt><span class="term"><code class="constant">class=</code><em class="replaceable"><code>value</code></em></span></dt>
151<dd>
152<p>
153                    Change the query class to one of:
154                    </p>
155<div class="variablelist"><dl>
156<dt><span class="term"><code class="constant">IN</code></span></dt>
157<dd><p>
158                            the Internet class
159                          </p></dd>
160<dt><span class="term"><code class="constant">CH</code></span></dt>
161<dd><p>
162                            the Chaos class
163                          </p></dd>
164<dt><span class="term"><code class="constant">HS</code></span></dt>
165<dd><p>
166                            the Hesiod class
167                          </p></dd>
168<dt><span class="term"><code class="constant">ANY</code></span></dt>
169<dd><p>
170                            wildcard
171                          </p></dd>
172</dl></div>
173<p>
174                    The class specifies the protocol group of the information.
175
176                  </p>
177<p>
178                    (Default = IN; abbreviation = cl)
179                  </p>
180</dd>
181<dt><span class="term"><code class="constant">
182                    <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>debug</code></span></dt>
183<dd>
184<p>
185		    Turn on or off the display of the full response packet and
186		    any intermediate response packets when searching.
187                  </p>
188<p>
189                    (Default = nodebug; abbreviation = [<span class="optional">no</span>]deb)
190                  </p>
191</dd>
192<dt><span class="term"><code class="constant">
193                    <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>d2</code></span></dt>
194<dd>
195<p>
196                    Turn debugging mode on or off.  This displays more about
197	            what nslookup is doing.
198                  </p>
199<p>
200                    (Default = nod2)
201                  </p>
202</dd>
203<dt><span class="term"><code class="constant">domain=</code><em class="replaceable"><code>name</code></em></span></dt>
204<dd><p>
205                    Sets the search list to <em class="replaceable"><code>name</code></em>.
206                  </p></dd>
207<dt><span class="term"><code class="constant">
208                    <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>search</code></span></dt>
209<dd>
210<p>
211                    If the lookup request contains at least one period but
212                    doesn't end with a trailing period, append the domain
213                    names in the domain search list to the request until an
214                    answer is received.
215                  </p>
216<p>
217                    (Default = search)
218                  </p>
219</dd>
220<dt><span class="term"><code class="constant">port=</code><em class="replaceable"><code>value</code></em></span></dt>
221<dd>
222<p>
223                    Change the default TCP/UDP name server port to <em class="replaceable"><code>value</code></em>.
224                  </p>
225<p>
226                    (Default = 53; abbreviation = po)
227                  </p>
228</dd>
229<dt><span class="term"><code class="constant">querytype=</code><em class="replaceable"><code>value</code></em></span></dt>
230<dd><p></p></dd>
231<dt><span class="term"><code class="constant">type=</code><em class="replaceable"><code>value</code></em></span></dt>
232<dd>
233<p>
234                    Change the type of the information query.
235                  </p>
236<p>
237                    (Default = A; abbreviations = q, ty)
238                  </p>
239</dd>
240<dt><span class="term"><code class="constant">
241                    <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>recurse</code></span></dt>
242<dd>
243<p>
244                    Tell the name server to query other servers if it does not
245                    have the
246                    information.
247                  </p>
248<p>
249                    (Default = recurse; abbreviation = [no]rec)
250                  </p>
251</dd>
252<dt><span class="term"><code class="constant">ndots=</code><em class="replaceable"><code>number</code></em></span></dt>
253<dd><p>
254		    Set the number of dots (label separators) in a domain
255		    that will disable searching.  Absolute names always
256		    stop searching.
257                  </p></dd>
258<dt><span class="term"><code class="constant">retry=</code><em class="replaceable"><code>number</code></em></span></dt>
259<dd><p>
260                    Set the number of retries to number.
261                  </p></dd>
262<dt><span class="term"><code class="constant">timeout=</code><em class="replaceable"><code>number</code></em></span></dt>
263<dd><p>
264                    Change the initial timeout interval for waiting for a
265                    reply to number seconds.
266                  </p></dd>
267<dt><span class="term"><code class="constant">
268                    <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>vc</code></span></dt>
269<dd>
270<p>
271                    Always use a virtual circuit when sending requests to the
272                    server.
273                  </p>
274<p>
275                    (Default = novc)
276                  </p>
277</dd>
278<dt><span class="term"><code class="constant">
279                    <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>fail</code></span></dt>
280<dd>
281<p>
282		    Try the next nameserver if a nameserver responds with
283		    SERVFAIL or a referral (nofail) or terminate query
284		    (fail) on such a response.
285		  </p>
286<p>
287                    (Default = nofail)
288                  </p>
289</dd>
290</dl></div>
291<p>
292          </p>
293</dd>
294</dl></div>
295</div>
296<div class="refsect1" lang="en">
297<a name="id2546309"></a><h2>FILES</h2>
298<p><code class="filename">/etc/resolv.conf</code>
299    </p>
300</div>
301<div class="refsect1" lang="en">
302<a name="id2546321"></a><h2>SEE ALSO</h2>
303<p><span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
304      <span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
305      <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.
306    </p>
307</div>
308<div class="refsect1" lang="en">
309<a name="id2546355"></a><h2>Author</h2>
310<p>
311      Andrew Cherenson
312    </p>
313</div>
314</div></body>
315</html>
316