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