1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 2 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" 3 [<!ENTITY mdash "—">]> 4<!-- 5 - Copyright (C) 2004-2007, 2010, 2013, 2014 Internet Systems Consortium, Inc. ("ISC") 6 - 7 - Permission to use, copy, modify, and/or distribute this software for any 8 - purpose with or without fee is hereby granted, provided that the above 9 - copyright notice and this permission notice appear in all copies. 10 - 11 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 12 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 13 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 14 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 15 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 16 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 - PERFORMANCE OF THIS SOFTWARE. 18--> 19 20<!-- $Id: nslookup.docbook,v 1.18 2010/02/22 23:49:11 tbox Exp $ --> 21<!-- 22 - Copyright (c) 1985, 1989 23 - The Regents of the University of California. All rights reserved. 24 - 25 - Redistribution and use in source and binary forms, with or without 26 - modification, are permitted provided that the following conditions 27 - are met: 28 - 1. Redistributions of source code must retain the above copyright 29 - notice, this list of conditions and the following disclaimer. 30 - 2. Redistributions in binary form must reproduce the above copyright 31 - notice, this list of conditions and the following disclaimer in the 32 - documentation and/or other materials provided with the distribution. 33 - 3. Neither the name of the University nor the names of its contributors 34 - may be used to endorse or promote products derived from this software 35 - without specific prior written permission. 36 - 37 - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 38 - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 39 - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 40 - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 41 - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 42 - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 43 - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44 - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 45 - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 46 - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 47 - SUCH DAMAGE. 48--> 49<refentry> 50 51 <refentryinfo> 52 <date>Jun 30, 2000</date> 53 </refentryinfo> 54 55 <refmeta> 56 <refentrytitle>nslookup</refentrytitle> 57 <manvolnum>1</manvolnum> 58 <refmiscinfo>BIND9</refmiscinfo> 59 </refmeta> 60 61 <refnamediv> 62 <refname>nslookup</refname> 63 <refpurpose>query Internet name servers interactively</refpurpose> 64 </refnamediv> 65 66 <docinfo> 67 <copyright> 68 <year>2004</year> 69 <year>2005</year> 70 <year>2006</year> 71 <year>2007</year> 72 <year>2010</year> 73 <year>2013</year> 74 <year>2014</year> 75 <holder>Internet Systems Consortium, Inc. ("ISC")</holder> 76 </copyright> 77 </docinfo> 78 79 <refsynopsisdiv> 80 <cmdsynopsis> 81 <command>nslookup</command> 82 <arg><option>-option</option></arg> 83 <arg choice="opt">name | -</arg> 84 <arg choice="opt">server</arg> 85 </cmdsynopsis> 86 </refsynopsisdiv> 87 88 <refsect1> 89 <title>DESCRIPTION</title> 90 <para><command>Nslookup</command> 91 is a program to query Internet domain name servers. <command>Nslookup</command> 92 has two modes: interactive and non-interactive. Interactive mode allows 93 the user to query name servers for information about various hosts and 94 domains or to print a list of hosts in a domain. Non-interactive mode 95 is 96 used to print just the name and requested information for a host or 97 domain. 98 </para> 99 </refsect1> 100 101 <refsect1> 102 <title>ARGUMENTS</title> 103 <para> 104 Interactive mode is entered in the following cases: 105 <orderedlist numeration="loweralpha"> 106 <listitem> 107 <para> 108 when no arguments are given (the default name server will be used) 109 </para> 110 </listitem> 111 <listitem> 112 <para> 113 when the first argument is a hyphen (-) and the second argument is 114 the host name or Internet address of a name server. 115 </para> 116 </listitem> 117 </orderedlist> 118 </para> 119 120 <para> 121 Non-interactive mode is used when the name or Internet address of the 122 host to be looked up is given as the first argument. The optional second 123 argument specifies the host name or address of a name server. 124 </para> 125 126 <para> 127 Options can also be specified on the command line if they precede the 128 arguments and are prefixed with a hyphen. For example, to 129 change the default query type to host information, and the initial 130 timeout to 10 seconds, type: 131 <!-- <informalexample> produces bad nroff. --> 132 <programlisting> 133nslookup -query=hinfo -timeout=10 134</programlisting> 135 <!-- </informalexample> --> 136 </para> 137 138 </refsect1> 139 140 <refsect1> 141 <title>INTERACTIVE COMMANDS</title> 142 <variablelist> 143 <varlistentry> 144 <term><constant>host</constant> <optional>server</optional></term> 145 <listitem> 146 <para> 147 Look up information for host using the current default server or 148 using server, if specified. If host is an Internet address and 149 the query type is A or PTR, the name of the host is returned. 150 If host is a name and does not have a trailing period, the 151 search list is used to qualify the name. 152 </para> 153 154 <para> 155 To look up a host not in the current domain, append a period to 156 the name. 157 </para> 158 </listitem> 159 </varlistentry> 160 161 <varlistentry> 162 <term><constant>server</constant> <replaceable class="parameter">domain</replaceable></term> 163 <listitem> 164 <para/> 165 </listitem> 166 </varlistentry> 167 <varlistentry> 168 <term><constant>lserver</constant> <replaceable class="parameter">domain</replaceable></term> 169 <listitem> 170 <para> 171 Change the default server to <replaceable>domain</replaceable>; <constant>lserver</constant> uses the initial 172 server to look up information about <replaceable>domain</replaceable>, while <constant>server</constant> uses 173 the current default server. If an authoritative answer can't be 174 found, the names of servers that might have the answer are 175 returned. 176 </para> 177 </listitem> 178 </varlistentry> 179 180 <varlistentry> 181 <term><constant>root</constant></term> 182 <listitem> 183 <para> 184 not implemented 185 </para> 186 </listitem> 187 </varlistentry> 188 189 <varlistentry> 190 <term><constant>finger</constant></term> 191 <listitem> 192 <para> 193 not implemented 194 </para> 195 </listitem> 196 </varlistentry> 197 198 <varlistentry> 199 <term><constant>ls</constant></term> 200 <listitem> 201 <para> 202 not implemented 203 </para> 204 </listitem> 205 </varlistentry> 206 207 <varlistentry> 208 <term><constant>view</constant></term> 209 <listitem> 210 <para> 211 not implemented 212 </para> 213 </listitem> 214 </varlistentry> 215 216 <varlistentry> 217 <term><constant>help</constant></term> 218 <listitem> 219 <para> 220 not implemented 221 </para> 222 </listitem> 223 </varlistentry> 224 225 <varlistentry> 226 <term><constant>?</constant></term> 227 <listitem> 228 <para> 229 not implemented 230 </para> 231 </listitem> 232 </varlistentry> 233 234 <varlistentry> 235 <term><constant>exit</constant></term> 236 <listitem> 237 <para> 238 Exits the program. 239 </para> 240 </listitem> 241 </varlistentry> 242 243 <varlistentry> 244 <term><constant>set</constant> 245 <replaceable>keyword<optional>=value</optional></replaceable></term> 246 <listitem> 247 <para> 248 This command is used to change state information that affects 249 the lookups. Valid keywords are: 250 <variablelist> 251 <varlistentry> 252 <term><constant>all</constant></term> 253 <listitem> 254 <para> 255 Prints the current values of the frequently used 256 options to <command>set</command>. 257 Information about the current default 258 server and host is also printed. 259 </para> 260 </listitem> 261 </varlistentry> 262 263 <varlistentry> 264 <term><constant>class=</constant><replaceable>value</replaceable></term> 265 <listitem> 266 <para> 267 Change the query class to one of: 268 <variablelist> 269 <varlistentry> 270 <term><constant>IN</constant></term> 271 <listitem> 272 <para> 273 the Internet class 274 </para> 275 </listitem> 276 </varlistentry> 277 <varlistentry> 278 <term><constant>CH</constant></term> 279 <listitem> 280 <para> 281 the Chaos class 282 </para> 283 </listitem> 284 </varlistentry> 285 <varlistentry> 286 <term><constant>HS</constant></term> 287 <listitem> 288 <para> 289 the Hesiod class 290 </para> 291 </listitem> 292 </varlistentry> 293 <varlistentry> 294 <term><constant>ANY</constant></term> 295 <listitem> 296 <para> 297 wildcard 298 </para> 299 </listitem> 300 </varlistentry> 301 </variablelist> 302 The class specifies the protocol group of the information. 303 304 </para> 305 <para> 306 (Default = IN; abbreviation = cl) 307 </para> 308 </listitem> 309 </varlistentry> 310 311 <varlistentry> 312 <term><constant> 313 <replaceable><optional>no</optional></replaceable>debug</constant></term> 314 <listitem> 315 <para> 316 Turn on or off the display of the full response packet and 317 any intermediate response packets when searching. 318 </para> 319 <para> 320 (Default = nodebug; abbreviation = <optional>no</optional>deb) 321 </para> 322 </listitem> 323 </varlistentry> 324 325 <varlistentry> 326 <term><constant> 327 <replaceable><optional>no</optional></replaceable>d2</constant></term> 328 <listitem> 329 <para> 330 Turn debugging mode on or off. This displays more about 331 what nslookup is doing. 332 </para> 333 <para> 334 (Default = nod2) 335 </para> 336 </listitem> 337 </varlistentry> 338 339 <varlistentry> 340 <term><constant>domain=</constant><replaceable>name</replaceable></term> 341 <listitem> 342 <para> 343 Sets the search list to <replaceable>name</replaceable>. 344 </para> 345 </listitem> 346 </varlistentry> 347 348 <varlistentry> 349 <term><constant> 350 <replaceable><optional>no</optional></replaceable>search</constant></term> 351 <listitem> 352 <para> 353 If the lookup request contains at least one period but 354 doesn't end with a trailing period, append the domain 355 names in the domain search list to the request until an 356 answer is received. 357 </para> 358 <para> 359 (Default = search) 360 </para> 361 </listitem> 362 </varlistentry> 363 364 <varlistentry> 365 <term><constant>port=</constant><replaceable>value</replaceable></term> 366 <listitem> 367 <para> 368 Change the default TCP/UDP name server port to <replaceable>value</replaceable>. 369 </para> 370 <para> 371 (Default = 53; abbreviation = po) 372 </para> 373 </listitem> 374 </varlistentry> 375 376 <varlistentry> 377 <term><constant>querytype=</constant><replaceable>value</replaceable></term> 378 <listitem> 379 <para/> 380 </listitem> 381 </varlistentry> 382 383 <varlistentry> 384 <term><constant>type=</constant><replaceable>value</replaceable></term> 385 <listitem> 386 <para> 387 Change the type of the information query. 388 </para> 389 <para> 390 (Default = A; abbreviations = q, ty) 391 </para> 392 </listitem> 393 </varlistentry> 394 395 <varlistentry> 396 <term><constant> 397 <replaceable><optional>no</optional></replaceable>recurse</constant></term> 398 <listitem> 399 <para> 400 Tell the name server to query other servers if it does not 401 have the 402 information. 403 </para> 404 <para> 405 (Default = recurse; abbreviation = [no]rec) 406 </para> 407 </listitem> 408 </varlistentry> 409 410 <varlistentry> 411 <term><constant>ndots=</constant><replaceable>number</replaceable></term> 412 <listitem> 413 <para> 414 Set the number of dots (label separators) in a domain 415 that will disable searching. Absolute names always 416 stop searching. 417 </para> 418 </listitem> 419 </varlistentry> 420 421 <varlistentry> 422 <term><constant>retry=</constant><replaceable>number</replaceable></term> 423 <listitem> 424 <para> 425 Set the number of retries to number. 426 </para> 427 </listitem> 428 </varlistentry> 429 430 <varlistentry> 431 <term><constant>timeout=</constant><replaceable>number</replaceable></term> 432 <listitem> 433 <para> 434 Change the initial timeout interval for waiting for a 435 reply to number seconds. 436 </para> 437 </listitem> 438 </varlistentry> 439 440 <varlistentry> 441 <term><constant> 442 <replaceable><optional>no</optional></replaceable>vc</constant></term> 443 <listitem> 444 <para> 445 Always use a virtual circuit when sending requests to the 446 server. 447 </para> 448 <para> 449 (Default = novc) 450 </para> 451 </listitem> 452 </varlistentry> 453 454 <varlistentry> 455 <term><constant> 456 <replaceable><optional>no</optional></replaceable>fail</constant></term> 457 <listitem> 458 <para> 459 Try the next nameserver if a nameserver responds with 460 SERVFAIL or a referral (nofail) or terminate query 461 (fail) on such a response. 462 </para> 463 <para> 464 (Default = nofail) 465 </para> 466 </listitem> 467 </varlistentry> 468 469 </variablelist> 470 </para> 471 </listitem> 472 </varlistentry> 473 </variablelist> 474 </refsect1> 475 476 <refsect1> 477 <title>FILES</title> 478 <para><filename>/etc/resolv.conf</filename> 479 </para> 480 </refsect1> 481 482 <refsect1> 483 <title>SEE ALSO</title> 484 <para><citerefentry> 485 <refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum> 486 </citerefentry>, 487 <citerefentry> 488 <refentrytitle>host</refentrytitle><manvolnum>1</manvolnum> 489 </citerefentry>, 490 <citerefentry> 491 <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum> 492 </citerefentry>. 493 </para> 494 </refsect1> 495 496 <refsect1> 497 <title>Author</title> 498 <para> 499 Andrew Cherenson 500 </para> 501 </refsect1> 502</refentry><!-- 503 - Local variables: 504 - mode: sgml 505 - End: 506--> 507