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, 2013, 2014 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. Neither the name of the University nor the names of its contributors
34 - may be used to endorse or promote products derived from this software
35 - without specific prior written permission.
37 - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
38 - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
39 - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
40 - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
41 - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
42 - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
43 - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
44 - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
45 - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
46 - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
52 <date>Jun 30, 2000</date>
56 <refentrytitle>nslookup</refentrytitle>
57 <manvolnum>1</manvolnum>
58 <refmiscinfo>BIND9</refmiscinfo>
62 <refname>nslookup</refname>
63 <refpurpose>query Internet name servers interactively</refpurpose>
75 <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
81 <command>nslookup</command>
82 <arg><option>-option</option></arg>
83 <arg choice="opt">name | -</arg>
84 <arg choice="opt">server</arg>
89 <title>DESCRIPTION</title>
90 <para><command>Nslookup</command>
91 is a program to query Internet domain name servers. <command>Nslookup</command>
92 has two modes: interactive and non-interactive. Interactive mode allows
93 the user to query name servers for information about various hosts and
94 domains or to print a list of hosts in a domain. Non-interactive mode
96 used to print just the name and requested information for a host or
102 <title>ARGUMENTS</title>
104 Interactive mode is entered in the following cases:
105 <orderedlist numeration="loweralpha">
108 when no arguments are given (the default name server will be used)
113 when the first argument is a hyphen (-) and the second argument is
114 the host name or Internet address of a name server.
121 Non-interactive mode is used when the name or Internet address of the
122 host to be looked up is given as the first argument. The optional second
123 argument specifies the host name or address of a name server.
127 Options can also be specified on the command line if they precede the
128 arguments and are prefixed with a hyphen. For example, to
129 change the default query type to host information, and the initial
130 timeout to 10 seconds, type:
131 <!-- <informalexample> produces bad nroff. -->
133 nslookup -query=hinfo -timeout=10
135 <!-- </informalexample> -->
141 <title>INTERACTIVE COMMANDS</title>
144 <term><constant>host</constant> <optional>server</optional></term>
147 Look up information for host using the current default server or
148 using server, if specified. If host is an Internet address and
149 the query type is A or PTR, the name of the host is returned.
150 If host is a name and does not have a trailing period, the
151 search list is used to qualify the name.
155 To look up a host not in the current domain, append a period to
162 <term><constant>server</constant> <replaceable class="parameter">domain</replaceable></term>
168 <term><constant>lserver</constant> <replaceable class="parameter">domain</replaceable></term>
171 Change the default server to <replaceable>domain</replaceable>; <constant>lserver</constant> uses the initial
172 server to look up information about <replaceable>domain</replaceable>, while <constant>server</constant> uses
173 the current default server. If an authoritative answer can't be
174 found, the names of servers that might have the answer are
181 <term><constant>root</constant></term>
190 <term><constant>finger</constant></term>
199 <term><constant>ls</constant></term>
208 <term><constant>view</constant></term>
217 <term><constant>help</constant></term>
226 <term><constant>?</constant></term>
235 <term><constant>exit</constant></term>
244 <term><constant>set</constant>
245 <replaceable>keyword<optional>=value</optional></replaceable></term>
248 This command is used to change state information that affects
249 the lookups. Valid keywords are:
252 <term><constant>all</constant></term>
255 Prints the current values of the frequently used
256 options to <command>set</command>.
257 Information about the current default
258 server and host is also printed.
264 <term><constant>class=</constant><replaceable>value</replaceable></term>
267 Change the query class to one of:
270 <term><constant>IN</constant></term>
278 <term><constant>CH</constant></term>
286 <term><constant>HS</constant></term>
294 <term><constant>ANY</constant></term>
302 The class specifies the protocol group of the information.
306 (Default = IN; abbreviation = cl)
313 <replaceable><optional>no</optional></replaceable>debug</constant></term>
316 Turn on or off the display of the full response packet and
317 any intermediate response packets when searching.
320 (Default = nodebug; abbreviation = <optional>no</optional>deb)
327 <replaceable><optional>no</optional></replaceable>d2</constant></term>
330 Turn debugging mode on or off. This displays more about
331 what nslookup is doing.
340 <term><constant>domain=</constant><replaceable>name</replaceable></term>
343 Sets the search list to <replaceable>name</replaceable>.
350 <replaceable><optional>no</optional></replaceable>search</constant></term>
353 If the lookup request contains at least one period but
354 doesn't end with a trailing period, append the domain
355 names in the domain search list to the request until an
365 <term><constant>port=</constant><replaceable>value</replaceable></term>
368 Change the default TCP/UDP name server port to <replaceable>value</replaceable>.
371 (Default = 53; abbreviation = po)
377 <term><constant>querytype=</constant><replaceable>value</replaceable></term>
384 <term><constant>type=</constant><replaceable>value</replaceable></term>
387 Change the type of the information query.
390 (Default = A; abbreviations = q, ty)
397 <replaceable><optional>no</optional></replaceable>recurse</constant></term>
400 Tell the name server to query other servers if it does not
405 (Default = recurse; abbreviation = [no]rec)
411 <term><constant>ndots=</constant><replaceable>number</replaceable></term>
414 Set the number of dots (label separators) in a domain
415 that will disable searching. Absolute names always
422 <term><constant>retry=</constant><replaceable>number</replaceable></term>
425 Set the number of retries to number.
431 <term><constant>timeout=</constant><replaceable>number</replaceable></term>
434 Change the initial timeout interval for waiting for a
435 reply to number seconds.
442 <replaceable><optional>no</optional></replaceable>vc</constant></term>
445 Always use a virtual circuit when sending requests to the
456 <replaceable><optional>no</optional></replaceable>fail</constant></term>
459 Try the next nameserver if a nameserver responds with
460 SERVFAIL or a referral (nofail) or terminate query
461 (fail) on such a response.
478 <para><filename>/etc/resolv.conf</filename>
483 <title>SEE ALSO</title>
485 <refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
488 <refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
491 <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
497 <title>Author</title>