nslookup.html revision 4206bb139c83dae2a8b59b7782031ccd40439aaa
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater - Copyright (C) 2004-2007, 2010, 2013-2015 Internet Systems Consortium, Inc. ("ISC")
e999539fb3e45b2617571e0e3ecd651992291701Mark Andrews - Permission to use, copy, modify, and/or distribute this software for any
e999539fb3e45b2617571e0e3ecd651992291701Mark Andrews - purpose with or without fee is hereby granted, provided that the above
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater - copyright notice and this permission notice appear in all copies.
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater - PERFORMANCE OF THIS SOFTWARE.
56874aef380a64a2c183b7c282c3e7a361d67fa1Automatic Updater<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
04eba969cb9a54bbda2896db2067c07b2ac5ba16Automatic Updater<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews<a name="id-1"></a><div class="titlepage"></div>
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews<p>nslookup — query Internet name servers interactively</p>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<div class="cmdsynopsis"><p><code class="command">nslookup</code> [<code class="option">-option</code>] [name | -] [server]</p></div>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<p><span class="command"><strong>Nslookup</strong></span>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews is a program to query Internet domain name servers. <span class="command"><strong>Nslookup</strong></span>
bac1bc98410bd876b8d38a6de6126709a7f8cc5aAutomatic Updater has two modes: interactive and non-interactive. Interactive mode allows
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews the user to query name servers for information about various hosts and
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews domains or to print a list of hosts in a domain. Non-interactive mode
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews used to print just the name and requested information for a host or
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews Interactive mode is entered in the following cases:
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<div class="orderedlist"><ol class="orderedlist" type="a">
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews when no arguments are given (the default name server will be used)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews when the first argument is a hyphen (-) and the second argument is
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson the host name or Internet address of a name server.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Non-interactive mode is used when the name or Internet address of the
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews host to be looked up is given as the first argument. The optional second
6f046a065e5543f8cd7e2f24991c65d2372f4c8dMark Andrews argument specifies the host name or address of a name server.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews Options can also be specified on the command line if they precede the
a8644ebab678a1de66cbfaabb513651a739958afAutomatic Updater arguments and are prefixed with a hyphen. For example, to
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews change the default query type to host information, and the initial
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews timeout to 10 seconds, type:
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrewsnslookup -query=hinfo -timeout=10
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews The <code class="option">-version</code> option causes
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson <span class="command"><strong>nslookup</strong></span> to print the version
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews number and immediately exits.
2831d2c54acc60414e9ffaf5c702ba475f06754bMark Andrews<a name="id-1.9"></a><h2>INTERACTIVE COMMANDS</h2>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<div class="variablelist"><dl class="variablelist">
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater<dt><span class="term"><code class="constant">host</code> [<span class="optional">server</span>]</span></dt>
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater Look up information for host using the current default server or
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater using server, if specified. If host is an Internet address and
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater the query type is A or PTR, the name of the host is returned.
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater If host is a name and does not have a trailing period, the
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater search list is used to qualify the name.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater To look up a host not in the current domain, append a period to
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="constant">server</code> <em class="replaceable"><code>domain</code></em></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="constant">lserver</code> <em class="replaceable"><code>domain</code></em></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Change the default server to <em class="replaceable"><code>domain</code></em>; <code class="constant">lserver</code> uses the initial
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater server to look up information about <em class="replaceable"><code>domain</code></em>, while <code class="constant">server</code> uses
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater the current default server. If an authoritative answer can't be
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater found, the names of servers that might have the answer are
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater<dt><span class="term"><code class="constant">root</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater not implemented
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="constant">finger</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater not implemented
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="constant">ls</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater not implemented
96ea71632887c58a9d00f47eb318bf76b35903c3Mark Andrews<dt><span class="term"><code class="constant">view</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater not implemented
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="constant">help</code></span></dt>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews not implemented
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews<dt><span class="term"><code class="constant">?</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater not implemented
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<dt><span class="term"><code class="constant">exit</code></span></dt>
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater Exits the program.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews<dt><span class="term"><code class="constant">set</code>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews <em class="replaceable"><code>keyword[<span class="optional">=value</span>]</code></em></span></dt>
5c0fc20d6e59216d9a142409e5fdb498153aeaa5Automatic Updater This command is used to change state information that affects
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater the lookups. Valid keywords are:
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<div class="variablelist"><dl class="variablelist">
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="constant">all</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Prints the current values of the frequently used
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater options to <span class="command"><strong>set</strong></span>.
5c0fc20d6e59216d9a142409e5fdb498153aeaa5Automatic Updater Information about the current default
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater server and host is also printed.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="constant">class=</code><em class="replaceable"><code>value</code></em></span></dt>
00be0f9f61d4c6bf197d000bfa1a6b7e70ea0866Automatic Updater Change the query class to one of:
5c0fc20d6e59216d9a142409e5fdb498153aeaa5Automatic Updater<div class="variablelist"><dl class="variablelist">
04eba969cb9a54bbda2896db2067c07b2ac5ba16Automatic Updater<dt><span class="term"><code class="constant">IN</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington the Internet class
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<dt><span class="term"><code class="constant">CH</code></span></dt>
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews the Chaos class
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<dt><span class="term"><code class="constant">HS</code></span></dt>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews the Hesiod class
8ae412a86ed138263796195eed82a4716e7effcbMark Andrews<dt><span class="term"><code class="constant">ANY</code></span></dt>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews The class specifies the protocol group of the information.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews (Default = IN; abbreviation = cl)
e076d0c88be69de7c190ab924d095e69d2e11f7aAndreas Gustafsson <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>debug</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Turn on or off the display of the full response packet and
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater any intermediate response packets when searching.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews (Default = nodebug; abbreviation = [<span class="optional">no</span>]deb)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<dt><span class="term"><code class="constant">
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>d2</code></span></dt>
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews Turn debugging mode on or off. This displays more about
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington what nslookup is doing.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater (Default = nod2)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="constant">domain=</code><em class="replaceable"><code>name</code></em></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Sets the search list to <em class="replaceable"><code>name</code></em>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="constant">
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>search</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington If the lookup request contains at least one period but
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington doesn't end with a trailing period, append the domain
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington names in the domain search list to the request until an
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington answer is received.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington (Default = search)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="constant">port=</code><em class="replaceable"><code>value</code></em></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Change the default TCP/UDP name server port to <em class="replaceable"><code>value</code></em>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington (Default = 53; abbreviation = po)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="constant">querytype=</code><em class="replaceable"><code>value</code></em></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="constant">type=</code><em class="replaceable"><code>value</code></em></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Change the type of the information query.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington (Default = A; abbreviations = q, ty)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="constant">
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>recurse</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Tell the name server to query other servers if it does not
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington (Default = recurse; abbreviation = [no]rec)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="constant">ndots=</code><em class="replaceable"><code>number</code></em></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Set the number of dots (label separators) in a domain
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington that will disable searching. Absolute names always
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington stop searching.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="constant">retry=</code><em class="replaceable"><code>number</code></em></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Set the number of retries to number.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington<dt><span class="term"><code class="constant">timeout=</code><em class="replaceable"><code>number</code></em></span></dt>
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington Change the initial timeout interval for waiting for a
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington reply to number seconds.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>vc</code></span></dt>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews Always use a virtual circuit when sending requests to the
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater (Default = novc)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="constant">
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>fail</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Try the next nameserver if a nameserver responds with
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater SERVFAIL or a referral (nofail) or terminate query
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater (fail) on such a response.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater (Default = nofail)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<a name="id-1.10"></a><h2>RETURN VALUES</h2>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="command"><strong>nslookup</strong></span> returns with an exit status of 1
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington if any query failed, and 0 otherwise.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<p><code class="filename">/etc/resolv.conf</code>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<p><span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.