nslookup.html revision 3b4098640dd85040270f39b9a5ee5e22de99d3d6
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley - Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews - Permission to use, copy, modify, and distribute this software for any
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews - purpose with or without fee is hereby granted, provided that the above
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews - copyright notice and this permission notice appear in all copies.
15a44745412679c30a6d022733925af70a38b715David Lawrence - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
15a44745412679c30a6d022733925af70a38b715David Lawrence - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15a44745412679c30a6d022733925af70a38b715David Lawrence - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15a44745412679c30a6d022733925af70a38b715David Lawrence - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15a44745412679c30a6d022733925af70a38b715David Lawrence - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15a44745412679c30a6d022733925af70a38b715David Lawrence - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15a44745412679c30a6d022733925af70a38b715David Lawrence - PERFORMANCE OF THIS SOFTWARE.
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<!-- $Id: nslookup.html,v 1.13 2006/01/06 01:55:38 marka Exp $ -->
ecd3b66f8c4544a55dd44fddda7c7134b936cd3bJames Brister<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
854d0238dbc2908490197984b3b9d558008a53dfMark Andrews<a name="id2463728"></a><div class="titlepage"></div>
59a6d9effd893036e39e14e775e1c98b0cd22388Andreas Gustafsson<p>nslookup — query Internet name servers interactively</p>
59a6d9effd893036e39e14e775e1c98b0cd22388Andreas Gustafsson<div class="cmdsynopsis"><p><code class="command">nslookup</code> [<code class="option">-option</code>] [name | -] [server]</p></div>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<p><span><strong class="command">Nslookup</strong></span>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews is a program to query Internet domain name servers. <span><strong class="command">Nslookup</strong></span>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews has two modes: interactive and non-interactive. Interactive mode allows
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews the user to query name servers for information about various hosts and
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews domains or to print a list of hosts in a domain. Non-interactive mode
96594ea32eecb2b75dd0e588f5491079328ce339Andreas Gustafsson used to print just the name and requested information for a host or
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence Interactive mode is entered in the following cases:
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews when no arguments are given (the default name server will be used)
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews when the first argument is a hyphen (-) and the second argument is
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews the host name or Internet address of a name server.
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews Non-interactive mode is used when the name or Internet address of the
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews host to be looked up is given as the first argument. The optional second
6e482e595d2b04e65f17851626a61a82efc4bd12David Lawrence argument specifies the host name or address of a name server.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence Options can also be specified on the command line if they precede the
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews arguments and are prefixed with a hyphen. For example, to
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews change the default query type to host information, and the initial
19c5c23ef6e38965949c996592bd92478da0612cMark Andrews timeout to 10 seconds, type:
19c5c23ef6e38965949c996592bd92478da0612cMark Andrews<div class="informalexample"><pre class="programlisting">
19c5c23ef6e38965949c996592bd92478da0612cMark Andrewsnslookup -query=hinfo -timeout=10
19c5c23ef6e38965949c996592bd92478da0612cMark Andrews<a name="id2526042"></a><h2>INTERACTIVE COMMANDS</h2>
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence<dt><span class="term">host [<span class="optional">server</span>]</span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews Look up information for host using the current default server or
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews using server, if specified. If host is an Internet address and
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews the query type is A or PTR, the name of the host is returned.
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff If host is a name and does not have a trailing period, the
6d12fdf96621801e80f3f4c2a8a569fe48766a20David Lawrence search list is used to qualify the name.
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews To look up a host not in the current domain, append a period to
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">server</code> <em class="replaceable"><code>domain</code></em></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">lserver</code> <em class="replaceable"><code>domain</code></em></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews Change the default server to <em class="replaceable"><code>domain</code></em>; <code class="constant">lserver</code> uses the initial
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews server to look up information about <em class="replaceable"><code>domain</code></em>, while <code class="constant">server</code> uses
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews the current default server. If an authoritative answer can't be
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson found, the names of servers that might have the answer are
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">root</code></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews not implemented
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">finger</code></span></dt>
5436ac555325d888c822f6be8c4fe69d2343d827Andreas Gustafsson not implemented
a1f16c81a1e54f52745f64555e6affa0add44173David Lawrence<dt><span class="term"><code class="constant">ls</code></span></dt>
5436ac555325d888c822f6be8c4fe69d2343d827Andreas Gustafsson not implemented
5436ac555325d888c822f6be8c4fe69d2343d827Andreas Gustafsson<dt><span class="term"><code class="constant">view</code></span></dt>
a1f16c81a1e54f52745f64555e6affa0add44173David Lawrence not implemented
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">help</code></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews not implemented
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">?</code></span></dt>
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff not implemented
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">exit</code></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews Exits the program.
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">set</code>
ecd3b66f8c4544a55dd44fddda7c7134b936cd3bJames Brister <em class="replaceable"><code>keyword[<span class="optional">=value</span>]</code></em></span></dt>
1ef8965366d91e02a4672c35a187d30aa4a4c72cMark Andrews This command is used to change state information that affects
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews the lookups. Valid keywords are:
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence<dt><span class="term"><code class="constant">all</code></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews Prints the current values of the frequently used
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews options to <span><strong class="command">set</strong></span>.
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews Information about the current default
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews server and host is also printed.
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">class=</code><em class="replaceable"><code>value</code></em></span></dt>
6d12fdf96621801e80f3f4c2a8a569fe48766a20David Lawrence Change the query class to one of:
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">IN</code></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews the Internet class
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">CH</code></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews the Chaos class
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">HS</code></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews the Hesiod class
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">ANY</code></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews The class specifies the protocol group of the information.
d981ca645597116d227a48bf37cc5edc061c854dBob Halley (Default = IN; abbreviation = cl)
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>debug</code></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews Turn debugging mode on. A lot more information is
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews printed about the packet sent to the server and the
41aad56b6cc458cbf7b8483576d990a77ae9bac2Andreas Gustafsson resulting answer.
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews (Default = nodebug; abbreviation = [<span class="optional">no</span>]deb)
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>d2</code></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews Turn debugging mode on. A lot more information is
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews printed about the packet sent to the server and the
373ce67419680a398ba3dc51a14a486caaf0afb0Mark Andrews resulting answer.
373ce67419680a398ba3dc51a14a486caaf0afb0Mark Andrews (Default = nod2)
373ce67419680a398ba3dc51a14a486caaf0afb0Mark Andrews<dt><span class="term"><code class="constant">domain=</code><em class="replaceable"><code>name</code></em></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews Sets the search list to <em class="replaceable"><code>name</code></em>.
6d12fdf96621801e80f3f4c2a8a569fe48766a20David Lawrence<dt><span class="term"><code class="constant">
9281e7aa775026dc47c01745fdcc438645146877Mark Andrews <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>search</code></span></dt>
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews If the lookup request contains at least one period but
9281e7aa775026dc47c01745fdcc438645146877Mark Andrews doesn't end with a trailing period, append the domain
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews names in the domain search list to the request until an
9281e7aa775026dc47c01745fdcc438645146877Mark Andrews answer is received.
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews (Default = search)
9281e7aa775026dc47c01745fdcc438645146877Mark Andrews<dt><span class="term"><code class="constant">port=</code><em class="replaceable"><code>value</code></em></span></dt>
9281e7aa775026dc47c01745fdcc438645146877Mark Andrews Change the default TCP/UDP name server port to <em class="replaceable"><code>value</code></em>.
9281e7aa775026dc47c01745fdcc438645146877Mark Andrews (Default = 53; abbreviation = po)
2bc0da0cd874b15593d65338ba96e90ceed13072Mark Andrews<dt><span class="term"><code class="constant">querytype=</code><em class="replaceable"><code>value</code></em></span></dt>
4529cdaedaf1a0a5f8ff89aeca510b7a4475446cBob Halley<dt><span class="term"><code class="constant">type=</code><em class="replaceable"><code>value</code></em></span></dt>
94a3bcd132e515b4baa0884ba9dd0f361d2e17bcMark Andrews Change the type of the information query.
82ca33427bdd4f3bc4ed3431e86bd810fe751674Andreas Gustafsson (Default = A; abbreviations = q, ty)
9281e7aa775026dc47c01745fdcc438645146877Mark Andrews <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>recurse</code></span></dt>
94a3bcd132e515b4baa0884ba9dd0f361d2e17bcMark Andrews Tell the name server to query other servers if it does not
d981ca645597116d227a48bf37cc5edc061c854dBob Halley (Default = recurse; abbreviation = [no]rec)
82ca33427bdd4f3bc4ed3431e86bd810fe751674Andreas Gustafsson<dt><span class="term"><code class="constant">retry=</code><em class="replaceable"><code>number</code></em></span></dt>
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff Set the number of retries to number.
d981ca645597116d227a48bf37cc5edc061c854dBob Halley<dt><span class="term"><code class="constant">timeout=</code><em class="replaceable"><code>number</code></em></span></dt>
6d12fdf96621801e80f3f4c2a8a569fe48766a20David Lawrence Change the initial timeout interval for waiting for a
e27a69f8bd9538e08f775265167ba6cc5f47c587Bob Halley reply to number seconds.
e27a69f8bd9538e08f775265167ba6cc5f47c587Bob Halley <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>vc</code></span></dt>
e27a69f8bd9538e08f775265167ba6cc5f47c587Bob Halley Always use a virtual circuit when sending requests to the
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff (Default = novc)
e27a69f8bd9538e08f775265167ba6cc5f47c587Bob Halley <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>fail</code></span></dt>
854d0238dbc2908490197984b3b9d558008a53dfMark Andrews Try the next nameserver if a nameserver responds with