]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/blob - contrib/bind9/bin/dig/nslookup.docbook
Update to version 9.6-ESV-R6, the latest from ISC, which contains numerous
[FreeBSD/stable/8.git] / contrib / bind9 / bin / dig / nslookup.docbook
1 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2                "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3                [<!ENTITY mdash "&#8212;">]>
4 <!--
5  - Copyright (C) 2004-2007, 2010, 2012  Internet Systems Consortium, Inc. ("ISC")
6  -
7  - Permission to use, copy, modify, and/or distribute this software for any
8  - purpose with or without fee is hereby granted, provided that the above
9  - copyright notice and this permission notice appear in all copies.
10  -
11  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
12  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13  - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
16  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  - PERFORMANCE OF THIS SOFTWARE.
18 -->
19
20 <!-- $Id$ -->
21 <!--
22  - Copyright (c) 1985, 1989
23  -    The Regents of the University of California.  All rights reserved.
24  -
25  - Redistribution and use in source and binary forms, with or without
26  - modification, are permitted provided that the following conditions
27  - are met:
28  - 1. Redistributions of source code must retain the above copyright
29  -    notice, this list of conditions and the following disclaimer.
30  - 2. Redistributions in binary form must reproduce the above copyright
31  -    notice, this list of conditions and the following disclaimer in the
32  -    documentation and/or other materials provided with the distribution.
33  - 3. All advertising materials mentioning features or use of this software
34  -    must display the following acknowledgement:
35  -     This product includes software developed by the University of
36  -     California, Berkeley and its contributors.
37  - 4. Neither the name of the University nor the names of its contributors
38  -    may be used to endorse or promote products derived from this software
39  -    without specific prior written permission.
40  -
41  - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
42  - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43  - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44  - ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
45  - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46  - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47  - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48  - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49  - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50  - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51  - SUCH DAMAGE.
52 -->
53 <refentry>
54
55   <refentryinfo>
56     <date>Jun 30, 2000</date>
57   </refentryinfo>
58
59   <refmeta>
60     <refentrytitle>nslookup</refentrytitle>
61     <manvolnum>1</manvolnum>
62     <refmiscinfo>BIND9</refmiscinfo>
63   </refmeta>
64
65   <refnamediv>
66     <refname>nslookup</refname>
67     <refpurpose>query Internet name servers interactively</refpurpose>
68   </refnamediv>
69
70   <docinfo>
71     <copyright>
72       <year>2004</year>
73       <year>2005</year>
74       <year>2006</year>
75       <year>2007</year>
76       <year>2010</year>
77       <year>2012</year>
78       <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
79     </copyright>
80   </docinfo>
81
82   <refsynopsisdiv>
83     <cmdsynopsis>
84       <command>nslookup</command>
85       <arg><option>-option</option></arg>
86       <arg choice="opt">name | -</arg>
87       <arg choice="opt">server</arg>
88     </cmdsynopsis>
89   </refsynopsisdiv>
90
91   <refsect1>
92     <title>DESCRIPTION</title>
93     <para><command>Nslookup</command>
94       is a program to query Internet domain name servers.  <command>Nslookup</command>
95       has two modes: interactive and non-interactive.  Interactive mode allows
96       the user to query name servers for information about various hosts and
97       domains or to print a list of hosts in a domain.  Non-interactive mode
98       is
99       used to print just the name and requested information for a host or
100       domain.
101     </para>
102   </refsect1>
103
104   <refsect1>
105     <title>ARGUMENTS</title>
106     <para>
107       Interactive mode is entered in the following cases:
108       <orderedlist numeration="loweralpha">
109         <listitem>
110           <para>
111             when no arguments are given (the default name server will be used)
112           </para>
113         </listitem>
114         <listitem>
115           <para>
116             when the first argument is a hyphen (-) and the second argument is
117             the host name or Internet address of a name server.
118           </para>
119         </listitem>
120       </orderedlist>
121     </para>
122
123     <para>
124       Non-interactive mode is used when the name or Internet address of the
125       host to be looked up is given as the first argument. The optional second
126       argument specifies the host name or address of a name server.
127     </para>
128
129     <para>
130       Options can also be specified on the command line if they precede the
131       arguments and are prefixed with a hyphen.  For example, to
132       change the default query type to host information, and the initial
133       timeout to 10 seconds, type:
134       <!-- <informalexample> produces bad nroff. -->
135         <programlisting>
136 nslookup -query=hinfo  -timeout=10
137 </programlisting>
138       <!-- </informalexample> -->
139     </para>
140
141   </refsect1>
142
143   <refsect1>
144     <title>INTERACTIVE COMMANDS</title>
145     <variablelist>
146       <varlistentry>
147         <term><constant>host</constant> <optional>server</optional></term>
148         <listitem>
149           <para>
150             Look up information for host using the current default server or
151             using server, if specified.  If host is an Internet address and
152             the query type is A or PTR, the name of the host is returned.
153             If host is a name and does not have a trailing period, the
154             search list is used to qualify the name.
155           </para>
156
157           <para>
158             To look up a host not in the current domain, append a period to
159             the name.
160           </para>
161         </listitem>
162       </varlistentry>
163
164       <varlistentry>
165         <term><constant>server</constant> <replaceable class="parameter">domain</replaceable></term>
166         <listitem>
167           <para/>
168         </listitem>
169       </varlistentry>
170       <varlistentry>
171         <term><constant>lserver</constant> <replaceable class="parameter">domain</replaceable></term>
172         <listitem>
173           <para>
174             Change the default server to <replaceable>domain</replaceable>; <constant>lserver</constant> uses the initial
175             server to look up information about <replaceable>domain</replaceable>, while <constant>server</constant> uses
176             the current default server.  If an authoritative answer can't be
177             found, the names of servers that might have the answer are
178             returned.
179           </para>
180         </listitem>
181       </varlistentry>
182
183       <varlistentry>
184         <term><constant>root</constant></term>
185         <listitem>
186           <para>
187             not implemented
188           </para>
189         </listitem>
190       </varlistentry>
191
192       <varlistentry>
193         <term><constant>finger</constant></term>
194         <listitem>
195           <para>
196             not implemented
197           </para>
198         </listitem>
199       </varlistentry>
200
201       <varlistentry>
202         <term><constant>ls</constant></term>
203         <listitem>
204           <para>
205             not implemented
206           </para>
207         </listitem>
208       </varlistentry>
209
210       <varlistentry>
211         <term><constant>view</constant></term>
212         <listitem>
213           <para>
214             not implemented
215           </para>
216         </listitem>
217       </varlistentry>
218
219       <varlistentry>
220         <term><constant>help</constant></term>
221         <listitem>
222           <para>
223             not implemented
224           </para>
225         </listitem>
226       </varlistentry>
227
228       <varlistentry>
229         <term><constant>?</constant></term>
230         <listitem>
231           <para>
232             not implemented
233           </para>
234         </listitem>
235       </varlistentry>
236
237       <varlistentry>
238         <term><constant>exit</constant></term>
239         <listitem>
240           <para>
241             Exits the program.
242           </para>
243         </listitem>
244       </varlistentry>
245
246       <varlistentry>
247         <term><constant>set</constant>
248           <replaceable>keyword<optional>=value</optional></replaceable></term>
249         <listitem>
250           <para>
251             This command is used to change state information that affects
252             the lookups.  Valid keywords are:
253             <variablelist>
254               <varlistentry>
255                 <term><constant>all</constant></term>
256                 <listitem>
257                   <para>
258                     Prints the current values of the frequently used
259                     options to <command>set</command>.
260                     Information about the  current default
261                     server and host is also printed.
262                   </para>
263                 </listitem>
264               </varlistentry>
265
266               <varlistentry>
267                 <term><constant>class=</constant><replaceable>value</replaceable></term>
268                 <listitem>
269                   <para>
270                     Change the query class to one of:
271                     <variablelist>
272                       <varlistentry>
273                         <term><constant>IN</constant></term>
274                         <listitem>
275                           <para>
276                             the Internet class
277                           </para>
278                         </listitem>
279                       </varlistentry>
280                       <varlistentry>
281                         <term><constant>CH</constant></term>
282                         <listitem>
283                           <para>
284                             the Chaos class
285                           </para>
286                         </listitem>
287                       </varlistentry>
288                       <varlistentry>
289                         <term><constant>HS</constant></term>
290                         <listitem>
291                           <para>
292                             the Hesiod class
293                           </para>
294                         </listitem>
295                       </varlistentry>
296                       <varlistentry>
297                         <term><constant>ANY</constant></term>
298                         <listitem>
299                           <para>
300                             wildcard
301                           </para>
302                         </listitem>
303                       </varlistentry>
304                     </variablelist>
305                     The class specifies the protocol group of the information.
306
307                   </para>
308                   <para>
309                     (Default = IN; abbreviation = cl)
310                   </para>
311                 </listitem>
312               </varlistentry>
313
314               <varlistentry>
315                 <term><constant>
316                     <replaceable><optional>no</optional></replaceable>debug</constant></term>
317                 <listitem>
318                   <para>
319                     Turn on or off the display of the full response packet and
320                     any intermediate response packets when searching.
321                   </para>
322                   <para>
323                     (Default = nodebug; abbreviation = <optional>no</optional>deb)
324                   </para>
325                 </listitem>
326               </varlistentry>
327
328               <varlistentry>
329                 <term><constant>
330                     <replaceable><optional>no</optional></replaceable>d2</constant></term>
331                 <listitem>
332                   <para>
333                     Turn debugging mode on or off.  This displays more about
334                     what nslookup is doing.
335                   </para>
336                   <para>
337                     (Default = nod2)
338                   </para>
339                 </listitem>
340               </varlistentry>
341
342               <varlistentry>
343                 <term><constant>domain=</constant><replaceable>name</replaceable></term>
344                 <listitem>
345                   <para>
346                     Sets the search list to <replaceable>name</replaceable>.
347                   </para>
348                 </listitem>
349               </varlistentry>
350
351               <varlistentry>
352                 <term><constant>
353                     <replaceable><optional>no</optional></replaceable>search</constant></term>
354                 <listitem>
355                   <para>
356                     If the lookup request contains at least one period but
357                     doesn't end with a trailing period, append the domain
358                     names in the domain search list to the request until an
359                     answer is received.
360                   </para>
361                   <para>
362                     (Default = search)
363                   </para>
364                 </listitem>
365               </varlistentry>
366
367               <varlistentry>
368                 <term><constant>port=</constant><replaceable>value</replaceable></term>
369                 <listitem>
370                   <para>
371                     Change the default TCP/UDP name server port to <replaceable>value</replaceable>.
372                   </para>
373                   <para>
374                     (Default = 53; abbreviation = po)
375                   </para>
376                 </listitem>
377               </varlistentry>
378
379               <varlistentry>
380                 <term><constant>querytype=</constant><replaceable>value</replaceable></term>
381                 <listitem>
382                   <para/>
383                 </listitem>
384               </varlistentry>
385
386               <varlistentry>
387                 <term><constant>type=</constant><replaceable>value</replaceable></term>
388                 <listitem>
389                   <para>
390                     Change the type of the information query.
391                   </para>
392                   <para>
393                     (Default = A; abbreviations = q, ty)
394                   </para>
395                 </listitem>
396               </varlistentry>
397
398               <varlistentry>
399                 <term><constant>
400                     <replaceable><optional>no</optional></replaceable>recurse</constant></term>
401                 <listitem>
402                   <para>
403                     Tell the name server to query other servers if it does not
404                     have the
405                     information.
406                   </para>
407                   <para>
408                     (Default = recurse; abbreviation = [no]rec)
409                   </para>
410                 </listitem>
411               </varlistentry>
412
413               <varlistentry>
414                 <term><constant>retry=</constant><replaceable>number</replaceable></term>
415                 <listitem>
416                   <para>
417                     Set the number of retries to number.
418                   </para>
419                 </listitem>
420               </varlistentry>
421
422               <varlistentry>
423                 <term><constant>timeout=</constant><replaceable>number</replaceable></term>
424                 <listitem>
425                   <para>
426                     Change the initial timeout interval for waiting for a
427                     reply to number seconds.
428                   </para>
429                 </listitem>
430               </varlistentry>
431
432               <varlistentry>
433                 <term><constant>
434                     <replaceable><optional>no</optional></replaceable>vc</constant></term>
435                 <listitem>
436                   <para>
437                     Always use a virtual circuit when sending requests to the
438                     server.
439                   </para>
440                   <para>
441                     (Default = novc)
442                   </para>
443                 </listitem>
444               </varlistentry>
445
446               <varlistentry>
447                 <term><constant>
448                     <replaceable><optional>no</optional></replaceable>fail</constant></term>
449                 <listitem>
450                   <para>
451                     Try the next nameserver if a nameserver responds with
452                     SERVFAIL or a referral (nofail) or terminate query
453                     (fail) on such a response.
454                   </para>
455                   <para>
456                     (Default = nofail)
457                   </para>
458                 </listitem>
459               </varlistentry>
460
461             </variablelist>
462           </para>
463         </listitem>
464       </varlistentry>
465     </variablelist>
466   </refsect1>
467
468   <refsect1>
469     <title>FILES</title>
470     <para><filename>/etc/resolv.conf</filename>
471     </para>
472   </refsect1>
473
474   <refsect1>
475     <title>SEE ALSO</title>
476     <para><citerefentry>
477         <refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
478       </citerefentry>,
479       <citerefentry>
480         <refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
481       </citerefentry>,
482       <citerefentry>
483         <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
484       </citerefentry>.
485     </para>
486   </refsect1>
487
488   <refsect1>
489     <title>Author</title>
490     <para>
491       Andrew Cherenson
492     </para>
493   </refsect1>
494 </refentry><!--
495  - Local variables:
496  - mode: sgml
497  - End:
498 -->