d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
c32570b3191fdfb38a65567b8bb729fdb42ff847Tinderbox User - Copyright (C) 2004-2007, 2010, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - This Source Code Form is subject to the terms of the Mozilla Public
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - License, v. 2.0. If a copy of the MPL was not distributed with this
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - file, You can obtain one at http://mozilla.org/MPL/2.0/.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User<a name="man.nslookup"></a><div class="titlepage"></div>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User — query Internet name servers interactively
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <p><span class="command"><strong>Nslookup</strong></span>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User is a program to query Internet domain name servers. <span class="command"><strong>Nslookup</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein has two modes: interactive and non-interactive. Interactive mode allows
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the user to query name servers for information about various hosts and
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein domains or to print a list of hosts in a domain. Non-interactive mode
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein used to print just the name and requested information for a host or
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Interactive mode is entered in the following cases:
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<div class="orderedlist"><ol class="orderedlist" type="a">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein when no arguments are given (the default name server will be used)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein when the first argument is a hyphen (-) and the second argument is
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the host name or Internet address of a name server.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Non-interactive mode is used when the name or Internet address of the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein host to be looked up is given as the first argument. The optional second
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein argument specifies the host name or address of a name server.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Options can also be specified on the command line if they precede the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein arguments and are prefixed with a hyphen. For example, to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein change the default query type to host information, and the initial
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein timeout to 10 seconds, type:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinnslookup -query=hinfo -timeout=10
b46346eb3026ba4bebc093bc93cfe159131e541eTinderbox User The <code class="option">-version</code> option causes
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User <span class="command"><strong>nslookup</strong></span> to print the version
b46346eb3026ba4bebc093bc93cfe159131e541eTinderbox User number and immediately exits.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<a name="id-1.9"></a><h2>INTERACTIVE COMMANDS</h2>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <div class="variablelist"><dl class="variablelist">
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews<dt><span class="term"><code class="constant">host</code> [<span class="optional">server</span>]</span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Look up information for host using the current default server or
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein using server, if specified. If host is an Internet address and
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the query type is A or PTR, the name of the host is returned.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein If host is a name and does not have a trailing period, the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein search list is used to qualify the name.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein To look up a host not in the current domain, append a period to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">server</code> <em class="replaceable"><code>domain</code></em></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">lserver</code> <em class="replaceable"><code>domain</code></em></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Change the default server to <em class="replaceable"><code>domain</code></em>; <code class="constant">lserver</code> uses the initial
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein server to look up information about <em class="replaceable"><code>domain</code></em>, while <code class="constant">server</code> uses
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the current default server. If an authoritative answer can't be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein found, the names of servers that might have the answer are
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">root</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein not implemented
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">finger</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein not implemented
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">ls</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein not implemented
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">view</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein not implemented
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">help</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein not implemented
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">?</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein not implemented
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">exit</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Exits the program.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">set</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="replaceable"><code>keyword[<span class="optional">=value</span>]</code></em></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein This command is used to change state information that affects
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the lookups. Valid keywords are:
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<div class="variablelist"><dl class="variablelist">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">all</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Prints the current values of the frequently used
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User options to <span class="command"><strong>set</strong></span>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Information about the current default
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein server and host is also printed.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">class=</code><em class="replaceable"><code>value</code></em></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Change the query class to one of:
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<div class="variablelist"><dl class="variablelist">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">IN</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the Internet class
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">CH</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the Chaos class
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">HS</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the Hesiod class
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">ANY</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The class specifies the protocol group of the information.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein (Default = IN; abbreviation = cl)
c32570b3191fdfb38a65567b8bb729fdb42ff847Tinderbox User<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>debug</code></span></dt>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews Turn on or off the display of the full response packet and
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews any intermediate response packets when searching.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein (Default = nodebug; abbreviation = [<span class="optional">no</span>]deb)
c32570b3191fdfb38a65567b8bb729fdb42ff847Tinderbox User<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>d2</code></span></dt>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews Turn debugging mode on or off. This displays more about
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark Andrews what nslookup is doing.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein (Default = nod2)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">domain=</code><em class="replaceable"><code>name</code></em></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Sets the search list to <em class="replaceable"><code>name</code></em>.
c32570b3191fdfb38a65567b8bb729fdb42ff847Tinderbox User<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>search</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein If the lookup request contains at least one period but
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein doesn't end with a trailing period, append the domain
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein names in the domain search list to the request until an
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein answer is received.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein (Default = search)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">port=</code><em class="replaceable"><code>value</code></em></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Change the default TCP/UDP name server port to <em class="replaceable"><code>value</code></em>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein (Default = 53; abbreviation = po)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">querytype=</code><em class="replaceable"><code>value</code></em></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">type=</code><em class="replaceable"><code>value</code></em></span></dt>
3b4098640dd85040270f39b9a5ee5e22de99d3d6Mark Andrews Change the type of the information query.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein (Default = A; abbreviations = q, ty)
c32570b3191fdfb38a65567b8bb729fdb42ff847Tinderbox User<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>recurse</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Tell the name server to query other servers if it does not
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein information.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein (Default = recurse; abbreviation = [no]rec)
c986916269e0d9ca0a31efb62ff5ac06938815dbTinderbox User<dt><span class="term"><code class="constant">ndots=</code><em class="replaceable"><code>number</code></em></span></dt>
c986916269e0d9ca0a31efb62ff5ac06938815dbTinderbox User Set the number of dots (label separators) in a domain
c986916269e0d9ca0a31efb62ff5ac06938815dbTinderbox User that will disable searching. Absolute names always
c986916269e0d9ca0a31efb62ff5ac06938815dbTinderbox User stop searching.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">retry=</code><em class="replaceable"><code>number</code></em></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Set the number of retries to number.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">timeout=</code><em class="replaceable"><code>number</code></em></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Change the initial timeout interval for waiting for a
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein reply to number seconds.
c32570b3191fdfb38a65567b8bb729fdb42ff847Tinderbox User<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>vc</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Always use a virtual circuit when sending requests to the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein (Default = novc)
c32570b3191fdfb38a65567b8bb729fdb42ff847Tinderbox User<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>fail</code></span></dt>
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews Try the next nameserver if a nameserver responds with
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews SERVFAIL or a referral (nofail) or terminate query
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews (fail) on such a response.
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews (Default = nofail)
4206bb139c83dae2a8b59b7782031ccd40439aaaTinderbox User <span class="command"><strong>nslookup</strong></span> returns with an exit status of 1
4206bb139c83dae2a8b59b7782031ccd40439aaaTinderbox User if any query failed, and 0 otherwise.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <p><code class="filename">/etc/resolv.conf</code>