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.
21 - Copyright (c) 1985, 1989
22 - The Regents of the University of California. All rights reserved.
24 - Redistribution and use in source and binary forms, with or without
25 - modification, are permitted provided that the following conditions
27 - 1. Redistributions of source code must retain the above copyright
28 - notice, this list of conditions and the following disclaimer.
29 - 2. Redistributions in binary form must reproduce the above copyright
30 - notice, this list of conditions and the following disclaimer in the
31 - documentation and/or other materials provided with the distribution.
32 - 3. Neither the name of the University nor the names of its contributors
33 - may be used to endorse or promote products derived from this software
34 - without specific prior written permission.
36 - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
37 - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
38 - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
39 - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
40 - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
41 - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
42 - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
43 - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
44 - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
45 - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 <date>January 24, 2014</date>
55 <refentrytitle>nslookup</refentrytitle>
56 <manvolnum>1</manvolnum>
57 <refmiscinfo>BIND9</refmiscinfo>
61 <refname>nslookup</refname>
62 <refpurpose>query Internet name servers interactively</refpurpose>
74 <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
80 <command>nslookup</command>
81 <arg><option>-option</option></arg>
82 <arg choice="opt">name | -</arg>
83 <arg choice="opt">server</arg>
88 <title>DESCRIPTION</title>
89 <para><command>Nslookup</command>
90 is a program to query Internet domain name servers. <command>Nslookup</command>
91 has two modes: interactive and non-interactive. Interactive mode allows
92 the user to query name servers for information about various hosts and
93 domains or to print a list of hosts in a domain. Non-interactive mode
95 used to print just the name and requested information for a host or
101 <title>ARGUMENTS</title>
103 Interactive mode is entered in the following cases:
104 <orderedlist numeration="loweralpha">
107 when no arguments are given (the default name server will be used)
112 when the first argument is a hyphen (-) and the second argument is
113 the host name or Internet address of a name server.
120 Non-interactive mode is used when the name or Internet address of the
121 host to be looked up is given as the first argument. The optional second
122 argument specifies the host name or address of a name server.
126 Options can also be specified on the command line if they precede the
127 arguments and are prefixed with a hyphen. For example, to
128 change the default query type to host information, and the initial
129 timeout to 10 seconds, type:
130 <!-- <informalexample> produces bad nroff. -->
132 nslookup -query=hinfo -timeout=10
134 <!-- </informalexample> -->
137 The <option>-version</option> option causes
138 <command>nslookup</command> to print the version
139 number and immediately exits.
145 <title>INTERACTIVE COMMANDS</title>
148 <term><constant>host</constant> <optional>server</optional></term>
151 Look up information for host using the current default server or
152 using server, if specified. If host is an Internet address and
153 the query type is A or PTR, the name of the host is returned.
154 If host is a name and does not have a trailing period, the
155 search list is used to qualify the name.
159 To look up a host not in the current domain, append a period to
166 <term><constant>server</constant> <replaceable class="parameter">domain</replaceable></term>
172 <term><constant>lserver</constant> <replaceable class="parameter">domain</replaceable></term>
175 Change the default server to <replaceable>domain</replaceable>; <constant>lserver</constant> uses the initial
176 server to look up information about <replaceable>domain</replaceable>, while <constant>server</constant> uses
177 the current default server. If an authoritative answer can't be
178 found, the names of servers that might have the answer are
185 <term><constant>root</constant></term>
194 <term><constant>finger</constant></term>
203 <term><constant>ls</constant></term>
212 <term><constant>view</constant></term>
221 <term><constant>help</constant></term>
230 <term><constant>?</constant></term>
239 <term><constant>exit</constant></term>
248 <term><constant>set</constant>
249 <replaceable>keyword<optional>=value</optional></replaceable></term>
252 This command is used to change state information that affects
253 the lookups. Valid keywords are:
256 <term><constant>all</constant></term>
259 Prints the current values of the frequently used
260 options to <command>set</command>.
261 Information about the current default
262 server and host is also printed.
268 <term><constant>class=</constant><replaceable>value</replaceable></term>
271 Change the query class to one of:
274 <term><constant>IN</constant></term>
282 <term><constant>CH</constant></term>
290 <term><constant>HS</constant></term>
298 <term><constant>ANY</constant></term>
306 The class specifies the protocol group of the information.
310 (Default = IN; abbreviation = cl)
317 <replaceable><optional>no</optional></replaceable>debug</constant></term>
320 Turn on or off the display of the full response packet and
321 any intermediate response packets when searching.
324 (Default = nodebug; abbreviation = <optional>no</optional>deb)
331 <replaceable><optional>no</optional></replaceable>d2</constant></term>
334 Turn debugging mode on or off. This displays more about
335 what nslookup is doing.
344 <term><constant>domain=</constant><replaceable>name</replaceable></term>
347 Sets the search list to <replaceable>name</replaceable>.
354 <replaceable><optional>no</optional></replaceable>search</constant></term>
357 If the lookup request contains at least one period but
358 doesn't end with a trailing period, append the domain
359 names in the domain search list to the request until an
369 <term><constant>port=</constant><replaceable>value</replaceable></term>
372 Change the default TCP/UDP name server port to <replaceable>value</replaceable>.
375 (Default = 53; abbreviation = po)
381 <term><constant>querytype=</constant><replaceable>value</replaceable></term>
388 <term><constant>type=</constant><replaceable>value</replaceable></term>
391 Change the type of the information query.
394 (Default = A; abbreviations = q, ty)
401 <replaceable><optional>no</optional></replaceable>recurse</constant></term>
404 Tell the name server to query other servers if it does not
409 (Default = recurse; abbreviation = [no]rec)
415 <term><constant>ndots=</constant><replaceable>number</replaceable></term>
418 Set the number of dots (label separators) in a domain
419 that will disable searching. Absolute names always
426 <term><constant>retry=</constant><replaceable>number</replaceable></term>
429 Set the number of retries to number.
435 <term><constant>timeout=</constant><replaceable>number</replaceable></term>
438 Change the initial timeout interval for waiting for a
439 reply to number seconds.
446 <replaceable><optional>no</optional></replaceable>vc</constant></term>
449 Always use a virtual circuit when sending requests to the
460 <replaceable><optional>no</optional></replaceable>fail</constant></term>
463 Try the next nameserver if a nameserver responds with
464 SERVFAIL or a referral (nofail) or terminate query
465 (fail) on such a response.
482 <para><filename>/etc/resolv.conf</filename>
487 <title>SEE ALSO</title>
489 <refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
492 <refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
495 <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
501 <title>Author</title>