]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/bind9/bin/dig/nslookup.docbook
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.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  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: nslookup.docbook,v 1.18 2010/02/22 23:49:11 tbox Exp $ -->
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       <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
78     </copyright>
79   </docinfo>
80
81   <refsynopsisdiv>
82     <cmdsynopsis>
83       <command>nslookup</command>
84       <arg><option>-option</option></arg>
85       <arg choice="opt">name | -</arg>
86       <arg choice="opt">server</arg>
87     </cmdsynopsis>
88   </refsynopsisdiv>
89
90   <refsect1>
91     <title>DESCRIPTION</title>
92     <para><command>Nslookup</command>
93       is a program to query Internet domain name servers.  <command>Nslookup</command>
94       has two modes: interactive and non-interactive.  Interactive mode allows
95       the user to query name servers for information about various hosts and
96       domains or to print a list of hosts in a domain.  Non-interactive mode
97       is
98       used to print just the name and requested information for a host or
99       domain.
100     </para>
101   </refsect1>
102
103   <refsect1>
104     <title>ARGUMENTS</title>
105     <para>
106       Interactive mode is entered in the following cases:
107       <orderedlist numeration="loweralpha">
108         <listitem>
109           <para>
110             when no arguments are given (the default name server will be used)
111           </para>
112         </listitem>
113         <listitem>
114           <para>
115             when the first argument is a hyphen (-) and the second argument is
116             the host name or Internet address of a name server.
117           </para>
118         </listitem>
119       </orderedlist>
120     </para>
121
122     <para>
123       Non-interactive mode is used when the name or Internet address of the
124       host to be looked up is given as the first argument. The optional second
125       argument specifies the host name or address of a name server.
126     </para>
127
128     <para>
129       Options can also be specified on the command line if they precede the
130       arguments and are prefixed with a hyphen.  For example, to
131       change the default query type to host information, and the initial
132       timeout to 10 seconds, type:
133       <!-- <informalexample> produces bad nroff. -->
134         <programlisting>
135 nslookup -query=hinfo  -timeout=10
136 </programlisting>
137       <!-- </informalexample> -->
138     </para>
139
140   </refsect1>
141
142   <refsect1>
143     <title>INTERACTIVE COMMANDS</title>
144     <variablelist>
145       <varlistentry>
146         <term><constant>host</constant> <optional>server</optional></term>
147         <listitem>
148           <para>
149             Look up information for host using the current default server or
150             using server, if specified.  If host is an Internet address and
151             the query type is A or PTR, the name of the host is returned.
152             If host is a name and does not have a trailing period, the
153             search list is used to qualify the name.
154           </para>
155
156           <para>
157             To look up a host not in the current domain, append a period to
158             the name.
159           </para>
160         </listitem>
161       </varlistentry>
162
163       <varlistentry>
164         <term><constant>server</constant> <replaceable class="parameter">domain</replaceable></term>
165         <listitem>
166           <para/>
167         </listitem>
168       </varlistentry>
169       <varlistentry>
170         <term><constant>lserver</constant> <replaceable class="parameter">domain</replaceable></term>
171         <listitem>
172           <para>
173             Change the default server to <replaceable>domain</replaceable>; <constant>lserver</constant> uses the initial
174             server to look up information about <replaceable>domain</replaceable>, while <constant>server</constant> uses
175             the current default server.  If an authoritative answer can't be
176             found, the names of servers that might have the answer are
177             returned.
178           </para>
179         </listitem>
180       </varlistentry>
181
182       <varlistentry>
183         <term><constant>root</constant></term>
184         <listitem>
185           <para>
186             not implemented
187           </para>
188         </listitem>
189       </varlistentry>
190
191       <varlistentry>
192         <term><constant>finger</constant></term>
193         <listitem>
194           <para>
195             not implemented
196           </para>
197         </listitem>
198       </varlistentry>
199
200       <varlistentry>
201         <term><constant>ls</constant></term>
202         <listitem>
203           <para>
204             not implemented
205           </para>
206         </listitem>
207       </varlistentry>
208
209       <varlistentry>
210         <term><constant>view</constant></term>
211         <listitem>
212           <para>
213             not implemented
214           </para>
215         </listitem>
216       </varlistentry>
217
218       <varlistentry>
219         <term><constant>help</constant></term>
220         <listitem>
221           <para>
222             not implemented
223           </para>
224         </listitem>
225       </varlistentry>
226
227       <varlistentry>
228         <term><constant>?</constant></term>
229         <listitem>
230           <para>
231             not implemented
232           </para>
233         </listitem>
234       </varlistentry>
235
236       <varlistentry>
237         <term><constant>exit</constant></term>
238         <listitem>
239           <para>
240             Exits the program.
241           </para>
242         </listitem>
243       </varlistentry>
244
245       <varlistentry>
246         <term><constant>set</constant>
247           <replaceable>keyword<optional>=value</optional></replaceable></term>
248         <listitem>
249           <para>
250             This command is used to change state information that affects
251             the lookups.  Valid keywords are:
252             <variablelist>
253               <varlistentry>
254                 <term><constant>all</constant></term>
255                 <listitem>
256                   <para>
257                     Prints the current values of the frequently used
258                     options to <command>set</command>.
259                     Information about the  current default
260                     server and host is also printed.
261                   </para>
262                 </listitem>
263               </varlistentry>
264
265               <varlistentry>
266                 <term><constant>class=</constant><replaceable>value</replaceable></term>
267                 <listitem>
268                   <para>
269                     Change the query class to one of:
270                     <variablelist>
271                       <varlistentry>
272                         <term><constant>IN</constant></term>
273                         <listitem>
274                           <para>
275                             the Internet class
276                           </para>
277                         </listitem>
278                       </varlistentry>
279                       <varlistentry>
280                         <term><constant>CH</constant></term>
281                         <listitem>
282                           <para>
283                             the Chaos class
284                           </para>
285                         </listitem>
286                       </varlistentry>
287                       <varlistentry>
288                         <term><constant>HS</constant></term>
289                         <listitem>
290                           <para>
291                             the Hesiod class
292                           </para>
293                         </listitem>
294                       </varlistentry>
295                       <varlistentry>
296                         <term><constant>ANY</constant></term>
297                         <listitem>
298                           <para>
299                             wildcard
300                           </para>
301                         </listitem>
302                       </varlistentry>
303                     </variablelist>
304                     The class specifies the protocol group of the information.
305
306                   </para>
307                   <para>
308                     (Default = IN; abbreviation = cl)
309                   </para>
310                 </listitem>
311               </varlistentry>
312
313               <varlistentry>
314                 <term><constant>
315                     <replaceable><optional>no</optional></replaceable>debug</constant></term>
316                 <listitem>
317                   <para>
318                     Turn on or off the display of the full response packet and
319                     any intermediate response packets when searching.
320                   </para>
321                   <para>
322                     (Default = nodebug; abbreviation = <optional>no</optional>deb)
323                   </para>
324                 </listitem>
325               </varlistentry>
326
327               <varlistentry>
328                 <term><constant>
329                     <replaceable><optional>no</optional></replaceable>d2</constant></term>
330                 <listitem>
331                   <para>
332                     Turn debugging mode on or off.  This displays more about
333                     what nslookup is doing.
334                   </para>
335                   <para>
336                     (Default = nod2)
337                   </para>
338                 </listitem>
339               </varlistentry>
340
341               <varlistentry>
342                 <term><constant>domain=</constant><replaceable>name</replaceable></term>
343                 <listitem>
344                   <para>
345                     Sets the search list to <replaceable>name</replaceable>.
346                   </para>
347                 </listitem>
348               </varlistentry>
349
350               <varlistentry>
351                 <term><constant>
352                     <replaceable><optional>no</optional></replaceable>search</constant></term>
353                 <listitem>
354                   <para>
355                     If the lookup request contains at least one period but
356                     doesn't end with a trailing period, append the domain
357                     names in the domain search list to the request until an
358                     answer is received.
359                   </para>
360                   <para>
361                     (Default = search)
362                   </para>
363                 </listitem>
364               </varlistentry>
365
366               <varlistentry>
367                 <term><constant>port=</constant><replaceable>value</replaceable></term>
368                 <listitem>
369                   <para>
370                     Change the default TCP/UDP name server port to <replaceable>value</replaceable>.
371                   </para>
372                   <para>
373                     (Default = 53; abbreviation = po)
374                   </para>
375                 </listitem>
376               </varlistentry>
377
378               <varlistentry>
379                 <term><constant>querytype=</constant><replaceable>value</replaceable></term>
380                 <listitem>
381                   <para/>
382                 </listitem>
383               </varlistentry>
384
385               <varlistentry>
386                 <term><constant>type=</constant><replaceable>value</replaceable></term>
387                 <listitem>
388                   <para>
389                     Change the type of the information query.
390                   </para>
391                   <para>
392                     (Default = A; abbreviations = q, ty)
393                   </para>
394                 </listitem>
395               </varlistentry>
396
397               <varlistentry>
398                 <term><constant>
399                     <replaceable><optional>no</optional></replaceable>recurse</constant></term>
400                 <listitem>
401                   <para>
402                     Tell the name server to query other servers if it does not
403                     have the
404                     information.
405                   </para>
406                   <para>
407                     (Default = recurse; abbreviation = [no]rec)
408                   </para>
409                 </listitem>
410               </varlistentry>
411
412               <varlistentry>
413                 <term><constant>retry=</constant><replaceable>number</replaceable></term>
414                 <listitem>
415                   <para>
416                     Set the number of retries to number.
417                   </para>
418                 </listitem>
419               </varlistentry>
420
421               <varlistentry>
422                 <term><constant>timeout=</constant><replaceable>number</replaceable></term>
423                 <listitem>
424                   <para>
425                     Change the initial timeout interval for waiting for a
426                     reply to number seconds.
427                   </para>
428                 </listitem>
429               </varlistentry>
430
431               <varlistentry>
432                 <term><constant>
433                     <replaceable><optional>no</optional></replaceable>vc</constant></term>
434                 <listitem>
435                   <para>
436                     Always use a virtual circuit when sending requests to the
437                     server.
438                   </para>
439                   <para>
440                     (Default = novc)
441                   </para>
442                 </listitem>
443               </varlistentry>
444
445               <varlistentry>
446                 <term><constant>
447                     <replaceable><optional>no</optional></replaceable>fail</constant></term>
448                 <listitem>
449                   <para>
450                     Try the next nameserver if a nameserver responds with
451                     SERVFAIL or a referral (nofail) or terminate query
452                     (fail) on such a response.
453                   </para>
454                   <para>
455                     (Default = nofail)
456                   </para>
457                 </listitem>
458               </varlistentry>
459
460             </variablelist>
461           </para>
462         </listitem>
463       </varlistentry>
464     </variablelist>
465   </refsect1>
466
467   <refsect1>
468     <title>FILES</title>
469     <para><filename>/etc/resolv.conf</filename>
470     </para>
471   </refsect1>
472
473   <refsect1>
474     <title>SEE ALSO</title>
475     <para><citerefentry>
476         <refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
477       </citerefentry>,
478       <citerefentry>
479         <refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
480       </citerefentry>,
481       <citerefentry>
482         <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
483       </citerefentry>.
484     </para>
485   </refsect1>
486
487   <refsect1>
488     <title>Author</title>
489     <para>
490       Andrew Cherenson
491     </para>
492   </refsect1>
493 </refentry><!--
494  - Local variables:
495  - mode: sgml
496  - End:
497 -->