Import bind 9.5.2 vendor sources.
[dragonfly.git] / contrib / bind-9.5.2 / bin / dig / nslookup.html
blob8009044186f6cfbccd55b39fdc6db3c9a906c0bf
1 <!--
2 - Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
3 -
4 - Permission to use, copy, modify, and/or distribute this software for any
5 - purpose with or without fee is hereby granted, provided that the above
6 - copyright notice and this permission notice appear in all copies.
7 -
8 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 - PERFORMANCE OF THIS SOFTWARE.
15 -->
16 <!-- $Id: nslookup.html,v 1.21.150.1 2009/07/11 01:43:27 tbox Exp $ -->
17 <html>
18 <head>
19 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
20 <title>nslookup</title>
21 <meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
22 </head>
23 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
24 <a name="id2476276"></a><div class="titlepage"></div>
25 <div class="refnamediv">
26 <h2>Name</h2>
27 <p>nslookup &#8212; query Internet name servers interactively</p>
28 </div>
29 <div class="refsynopsisdiv">
30 <h2>Synopsis</h2>
31 <div class="cmdsynopsis"><p><code class="command">nslookup</code> [<code class="option">-option</code>] [name | -] [server]</p></div>
32 </div>
33 <div class="refsect1" lang="en">
34 <a name="id2543355"></a><h2>DESCRIPTION</h2>
35 <p><span><strong class="command">Nslookup</strong></span>
36 is a program to query Internet domain name servers. <span><strong class="command">Nslookup</strong></span>
37 has two modes: interactive and non-interactive. Interactive mode allows
38 the user to query name servers for information about various hosts and
39 domains or to print a list of hosts in a domain. Non-interactive mode
41 used to print just the name and requested information for a host or
42 domain.
43 </p>
44 </div>
45 <div class="refsect1" lang="en">
46 <a name="id2543371"></a><h2>ARGUMENTS</h2>
47 <p>
48 Interactive mode is entered in the following cases:
49 </p>
50 <div class="orderedlist"><ol type="a">
51 <li><p>
52 when no arguments are given (the default name server will be used)
53 </p></li>
54 <li><p>
55 when the first argument is a hyphen (-) and the second argument is
56 the host name or Internet address of a name server.
57 </p></li>
58 </ol></div>
59 <p>
60 </p>
61 <p>
62 Non-interactive mode is used when the name or Internet address of the
63 host to be looked up is given as the first argument. The optional second
64 argument specifies the host name or address of a name server.
65 </p>
66 <p>
67 Options can also be specified on the command line if they precede the
68 arguments and are prefixed with a hyphen. For example, to
69 change the default query type to host information, and the initial
70 timeout to 10 seconds, type:
71 </p>
72 <div class="informalexample"><pre class="programlisting">
73 nslookup -query=hinfo -timeout=10
74 </pre></div>
75 <p>
76 </p>
77 </div>
78 <div class="refsect1" lang="en">
79 <a name="id2543413"></a><h2>INTERACTIVE COMMANDS</h2>
80 <div class="variablelist"><dl>
81 <dt><span class="term"><code class="constant">host</code> [<span class="optional">server</span>]</span></dt>
82 <dd>
83 <p>
84 Look up information for host using the current default server or
85 using server, if specified. If host is an Internet address and
86 the query type is A or PTR, the name of the host is returned.
87 If host is a name and does not have a trailing period, the
88 search list is used to qualify the name.
89 </p>
90 <p>
91 To look up a host not in the current domain, append a period to
92 the name.
93 </p>
94 </dd>
95 <dt><span class="term"><code class="constant">server</code> <em class="replaceable"><code>domain</code></em></span></dt>
96 <dd><p></p></dd>
97 <dt><span class="term"><code class="constant">lserver</code> <em class="replaceable"><code>domain</code></em></span></dt>
98 <dd><p>
99 Change the default server to <em class="replaceable"><code>domain</code></em>; <code class="constant">lserver</code> uses the initial
100 server to look up information about <em class="replaceable"><code>domain</code></em>, while <code class="constant">server</code> uses
101 the current default server. If an authoritative answer can't be
102 found, the names of servers that might have the answer are
103 returned.
104 </p></dd>
105 <dt><span class="term"><code class="constant">root</code></span></dt>
106 <dd><p>
107 not implemented
108 </p></dd>
109 <dt><span class="term"><code class="constant">finger</code></span></dt>
110 <dd><p>
111 not implemented
112 </p></dd>
113 <dt><span class="term"><code class="constant">ls</code></span></dt>
114 <dd><p>
115 not implemented
116 </p></dd>
117 <dt><span class="term"><code class="constant">view</code></span></dt>
118 <dd><p>
119 not implemented
120 </p></dd>
121 <dt><span class="term"><code class="constant">help</code></span></dt>
122 <dd><p>
123 not implemented
124 </p></dd>
125 <dt><span class="term"><code class="constant">?</code></span></dt>
126 <dd><p>
127 not implemented
128 </p></dd>
129 <dt><span class="term"><code class="constant">exit</code></span></dt>
130 <dd><p>
131 Exits the program.
132 </p></dd>
133 <dt><span class="term"><code class="constant">set</code>
134 <em class="replaceable"><code>keyword[<span class="optional">=value</span>]</code></em></span></dt>
135 <dd>
137 This command is used to change state information that affects
138 the lookups. Valid keywords are:
139 </p>
140 <div class="variablelist"><dl>
141 <dt><span class="term"><code class="constant">all</code></span></dt>
142 <dd><p>
143 Prints the current values of the frequently used
144 options to <span><strong class="command">set</strong></span>.
145 Information about the current default
146 server and host is also printed.
147 </p></dd>
148 <dt><span class="term"><code class="constant">class=</code><em class="replaceable"><code>value</code></em></span></dt>
149 <dd>
151 Change the query class to one of:
152 </p>
153 <div class="variablelist"><dl>
154 <dt><span class="term"><code class="constant">IN</code></span></dt>
155 <dd><p>
156 the Internet class
157 </p></dd>
158 <dt><span class="term"><code class="constant">CH</code></span></dt>
159 <dd><p>
160 the Chaos class
161 </p></dd>
162 <dt><span class="term"><code class="constant">HS</code></span></dt>
163 <dd><p>
164 the Hesiod class
165 </p></dd>
166 <dt><span class="term"><code class="constant">ANY</code></span></dt>
167 <dd><p>
168 wildcard
169 </p></dd>
170 </dl></div>
172 The class specifies the protocol group of the information.
174 </p>
176 (Default = IN; abbreviation = cl)
177 </p>
178 </dd>
179 <dt><span class="term"><code class="constant">
180 <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>debug</code></span></dt>
181 <dd>
183 Turn on or off the display of the full response packet and
184 any intermediate response packets when searching.
185 </p>
187 (Default = nodebug; abbreviation = [<span class="optional">no</span>]deb)
188 </p>
189 </dd>
190 <dt><span class="term"><code class="constant">
191 <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>d2</code></span></dt>
192 <dd>
194 Turn debugging mode on or off. This displays more about
195 what nslookup is doing.
196 </p>
198 (Default = nod2)
199 </p>
200 </dd>
201 <dt><span class="term"><code class="constant">domain=</code><em class="replaceable"><code>name</code></em></span></dt>
202 <dd><p>
203 Sets the search list to <em class="replaceable"><code>name</code></em>.
204 </p></dd>
205 <dt><span class="term"><code class="constant">
206 <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>search</code></span></dt>
207 <dd>
209 If the lookup request contains at least one period but
210 doesn't end with a trailing period, append the domain
211 names in the domain search list to the request until an
212 answer is received.
213 </p>
215 (Default = search)
216 </p>
217 </dd>
218 <dt><span class="term"><code class="constant">port=</code><em class="replaceable"><code>value</code></em></span></dt>
219 <dd>
221 Change the default TCP/UDP name server port to <em class="replaceable"><code>value</code></em>.
222 </p>
224 (Default = 53; abbreviation = po)
225 </p>
226 </dd>
227 <dt><span class="term"><code class="constant">querytype=</code><em class="replaceable"><code>value</code></em></span></dt>
228 <dd><p></p></dd>
229 <dt><span class="term"><code class="constant">type=</code><em class="replaceable"><code>value</code></em></span></dt>
230 <dd>
232 Change the type of the information query.
233 </p>
235 (Default = A; abbreviations = q, ty)
236 </p>
237 </dd>
238 <dt><span class="term"><code class="constant">
239 <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>recurse</code></span></dt>
240 <dd>
242 Tell the name server to query other servers if it does not
243 have the
244 information.
245 </p>
247 (Default = recurse; abbreviation = [no]rec)
248 </p>
249 </dd>
250 <dt><span class="term"><code class="constant">retry=</code><em class="replaceable"><code>number</code></em></span></dt>
251 <dd><p>
252 Set the number of retries to number.
253 </p></dd>
254 <dt><span class="term"><code class="constant">timeout=</code><em class="replaceable"><code>number</code></em></span></dt>
255 <dd><p>
256 Change the initial timeout interval for waiting for a
257 reply to number seconds.
258 </p></dd>
259 <dt><span class="term"><code class="constant">
260 <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>vc</code></span></dt>
261 <dd>
263 Always use a virtual circuit when sending requests to the
264 server.
265 </p>
267 (Default = novc)
268 </p>
269 </dd>
270 <dt><span class="term"><code class="constant">
271 <em class="replaceable"><code>[<span class="optional">no</span>]</code></em>fail</code></span></dt>
272 <dd>
274 Try the next nameserver if a nameserver responds with
275 SERVFAIL or a referral (nofail) or terminate query
276 (fail) on such a response.
277 </p>
279 (Default = nofail)
280 </p>
281 </dd>
282 </dl></div>
284 </p>
285 </dd>
286 </dl></div>
287 </div>
288 <div class="refsect1" lang="en">
289 <a name="id2546279"></a><h2>FILES</h2>
290 <p><code class="filename">/etc/resolv.conf</code>
291 </p>
292 </div>
293 <div class="refsect1" lang="en">
294 <a name="id2546291"></a><h2>SEE ALSO</h2>
295 <p><span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
296 <span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
297 <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.
298 </p>
299 </div>
300 <div class="refsect1" lang="en">
301 <a name="id2546325"></a><h2>Author</h2>
303 Andrew Cherenson
304 </p>
305 </div>
306 </div></body>
307 </html>