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