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 "—">]>
5 - Copyright (C) 2004-2007, 2010 Internet Systems Consortium, Inc. ("ISC")
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.
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.
20 <!-- $Id: nslookup.docbook,v 1.18 2010-02-22 23:49:11 tbox Exp $ -->
22 - Copyright (c) 1985, 1989
23 - The Regents of the University of California. All rights reserved.
25 - Redistribution and use in source and binary forms, with or without
26 - modification, are permitted provided that the following conditions
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.
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
56 <date>Jun 30, 2000</date>
60 <refentrytitle>nslookup</refentrytitle>
61 <manvolnum>1</manvolnum>
62 <refmiscinfo>BIND9</refmiscinfo>
66 <refname>nslookup</refname>
67 <refpurpose>query Internet name servers interactively</refpurpose>
77 <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
83 <command>nslookup</command>
84 <arg><option>-option</option></arg>
85 <arg choice="opt">name | -</arg>
86 <arg choice="opt">server</arg>
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
98 used to print just the name and requested information for a host or
104 <title>ARGUMENTS</title>
106 Interactive mode is entered in the following cases:
107 <orderedlist numeration="loweralpha">
110 when no arguments are given (the default name server will be used)
115 when the first argument is a hyphen (-) and the second argument is
116 the host name or Internet address of a name server.
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.
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. -->
135 nslookup -query=hinfo -timeout=10
137 <!-- </informalexample> -->
143 <title>INTERACTIVE COMMANDS</title>
146 <term><constant>host</constant> <optional>server</optional></term>
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.
157 To look up a host not in the current domain, append a period to
164 <term><constant>server</constant> <replaceable class="parameter">domain</replaceable></term>
170 <term><constant>lserver</constant> <replaceable class="parameter">domain</replaceable></term>
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
183 <term><constant>root</constant></term>
192 <term><constant>finger</constant></term>
201 <term><constant>ls</constant></term>
210 <term><constant>view</constant></term>
219 <term><constant>help</constant></term>
228 <term><constant>?</constant></term>
237 <term><constant>exit</constant></term>
246 <term><constant>set</constant>
247 <replaceable>keyword<optional>=value</optional></replaceable></term>
250 This command is used to change state information that affects
251 the lookups. Valid keywords are:
254 <term><constant>all</constant></term>
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.
266 <term><constant>class=</constant><replaceable>value</replaceable></term>
269 Change the query class to one of:
272 <term><constant>IN</constant></term>
280 <term><constant>CH</constant></term>
288 <term><constant>HS</constant></term>
296 <term><constant>ANY</constant></term>
304 The class specifies the protocol group of the information.
308 (Default = IN; abbreviation = cl)
315 <replaceable><optional>no</optional></replaceable>debug</constant></term>
318 Turn on or off the display of the full response packet and
319 any intermediate response packets when searching.
322 (Default = nodebug; abbreviation = <optional>no</optional>deb)
329 <replaceable><optional>no</optional></replaceable>d2</constant></term>
332 Turn debugging mode on or off. This displays more about
333 what nslookup is doing.
342 <term><constant>domain=</constant><replaceable>name</replaceable></term>
345 Sets the search list to <replaceable>name</replaceable>.
352 <replaceable><optional>no</optional></replaceable>search</constant></term>
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
367 <term><constant>port=</constant><replaceable>value</replaceable></term>
370 Change the default TCP/UDP name server port to <replaceable>value</replaceable>.
373 (Default = 53; abbreviation = po)
379 <term><constant>querytype=</constant><replaceable>value</replaceable></term>
386 <term><constant>type=</constant><replaceable>value</replaceable></term>
389 Change the type of the information query.
392 (Default = A; abbreviations = q, ty)
399 <replaceable><optional>no</optional></replaceable>recurse</constant></term>
402 Tell the name server to query other servers if it does not
407 (Default = recurse; abbreviation = [no]rec)
413 <term><constant>retry=</constant><replaceable>number</replaceable></term>
416 Set the number of retries to number.
422 <term><constant>timeout=</constant><replaceable>number</replaceable></term>
425 Change the initial timeout interval for waiting for a
426 reply to number seconds.
433 <replaceable><optional>no</optional></replaceable>vc</constant></term>
436 Always use a virtual circuit when sending requests to the
447 <replaceable><optional>no</optional></replaceable>fail</constant></term>
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.
469 <para><filename>/etc/resolv.conf</filename>
474 <title>SEE ALSO</title>
476 <refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
479 <refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
482 <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
488 <title>Author</title>