man.host.html revision 49853562e29e3813e49c251cde132d7be6a6475e
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User - Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
71cef386fae61275b03e203825680b39fedaa8c6Tinderbox User - Copyright (C) 2000-2003 Internet Software Consortium.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - Permission to use, copy, modify, and/or distribute this software for any
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - purpose with or without fee is hereby granted, provided that the above
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - copyright notice and this permission notice appear in all copies.
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User - PERFORMANCE OF THIS SOFTWARE.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<!-- $Id: man.host.html,v 1.142 2010/02/25 11:13:37 tbox Exp $ -->
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<link rel="prev" href="man.dig.html" title="dig">
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<link rel="next" href="man.dnssec-dsfromkey.html" title="dnssec-dsfromkey">
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<table width="100%" summary="Navigation header">
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<tr><th colspan="3" align="center">host</th></tr>
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<a accesskey="p" href="man.dig.html">Prev</a>�</td>
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<th width="60%" align="center">Manual pages</th>
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<td width="20%" align="right">�<a accesskey="n" href="man.dnssec-dsfromkey.html">Next</a>
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<a name="man.host"></a><div class="titlepage"></div>
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<div class="cmdsynopsis"><p><code class="command">host</code> [<code class="option">-aCdlnrsTwv</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-N <em class="replaceable"><code>ndots</code></em></code>] [<code class="option">-R <em class="replaceable"><code>number</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-W <em class="replaceable"><code>wait</code></em></code>] [<code class="option">-m <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] {name} [server]</p></div>
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<p><span><strong class="command">host</strong></span>
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User is a simple utility for performing DNS lookups.
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User It is normally used to convert names to IP addresses and vice versa.
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User When no arguments or options are given,
dec590a3deb8e87380a8bd3a77d535dba3729bf6Tinderbox User <span><strong class="command">host</strong></span>
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User prints a short summary of its command line arguments and options.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User<p><em class="parameter"><code>name</code></em> is the domain name that is to be
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User up. It can also be a dotted-decimal IPv4 address or a colon-delimited
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User IPv6 address, in which case <span><strong class="command">host</strong></span> will by
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User perform a reverse lookup for that address.
dec590a3deb8e87380a8bd3a77d535dba3729bf6Tinderbox User <em class="parameter"><code>server</code></em> is an optional argument which
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User the name or IP address of the name server that <span><strong class="command">host</strong></span>
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User should query instead of the server or servers listed in
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <code class="filename">/etc/resolv.conf</code>.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User The <code class="option">-a</code> (all) option is equivalent to setting the
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <code class="option">-v</code> option and asking <span><strong class="command">host</strong></span> to make
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User a query of type ANY.
dec590a3deb8e87380a8bd3a77d535dba3729bf6Tinderbox User When the <code class="option">-C</code> option is used, <span><strong class="command">host</strong></span>
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User will attempt to display the SOA records for zone
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <em class="parameter"><code>name</code></em> from all the listed
dec590a3deb8e87380a8bd3a77d535dba3729bf6Tinderbox User authoritative name
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User servers for that zone. The list of name servers is defined by the NS
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User records that are found for the zone.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User The <code class="option">-c</code> option instructs to make a DNS query of class
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <em class="parameter"><code>class</code></em>. This can be used to lookup
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User Chaosnet class resource records. The default class is IN (Internet).
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User Verbose output is generated by <span><strong class="command">host</strong></span> when
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <code class="option">-d</code> or <code class="option">-v</code> option is used. The two
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User options are equivalent. They have been provided for backwards
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt compatibility. In previous versions, the <code class="option">-d</code> option
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User switched on debugging traces and <code class="option">-v</code> enabled verbose
ad8f23aed6c75f94f238c1f23f4e17515d28eb55Tinderbox User List mode is selected by the <code class="option">-l</code> option. This makes
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span><strong class="command">host</strong></span> perform a zone transfer for zone
ad8f23aed6c75f94f238c1f23f4e17515d28eb55Tinderbox User <em class="parameter"><code>name</code></em>. Transfer the zone printing out
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User and address records (A/AAAA). If combined with <code class="option">-a</code>
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User all records will be printed.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User option specifies that reverse lookups of IPv6 addresses should
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User use the IP6.INT domain as defined in RFC1886.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User The default is to use IP6.ARPA.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User The <code class="option">-N</code> option sets the number of dots that have to be
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User in <em class="parameter"><code>name</code></em> for it to be considered
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User absolute. The
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User default value is that defined using the ndots statement in
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <code class="filename">/etc/resolv.conf</code>, or 1 if no ndots
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User present. Names with fewer dots are interpreted as relative names and
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User will be searched for in the domains listed in the <span class="type">search</span>
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User or <span class="type">domain</span> directive in
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <code class="filename">/etc/resolv.conf</code>.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User The number of UDP retries for a lookup can be changed with the
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <code class="option">-R</code> option. <em class="parameter"><code>number</code></em>
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User how many times <span><strong class="command">host</strong></span> will repeat a query
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User not get answered. The default number of retries is 1. If
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <em class="parameter"><code>number</code></em> is negative or zero, the
10b865e9187fc77cae02f106ddcc9e03eecdfe06Tinderbox User retries will default to 1.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User Non-recursive queries can be made via the <code class="option">-r</code> option.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User Setting this option clears the <span class="type">RD</span> — recursion
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User desired — bit in the query which <span><strong class="command">host</strong></span> makes.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User This should mean that the name server receiving the query will not
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User attempt to resolve <em class="parameter"><code>name</code></em>. The
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <code class="option">-r</code> option enables <span><strong class="command">host</strong></span>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User the behavior of a name server by making non-recursive queries and
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User expecting to receive answers to those queries that are usually
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User referrals to other name servers.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User By default, <span><strong class="command">host</strong></span> uses UDP when making
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User <code class="option">-T</code> option makes it use a TCP connection when querying
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User the name server. TCP will be automatically selected for queries that
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User require it, such as zone transfer (AXFR) requests.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User The <code class="option">-4</code> option forces <span><strong class="command">host</strong></span> to only
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User use IPv4 query transport. The <code class="option">-6</code> option forces
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <span><strong class="command">host</strong></span> to only use IPv6 query transport.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User The <code class="option">-t</code> option is used to select the query type.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <em class="parameter"><code>type</code></em> can be any recognized query
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <span><strong class="command">host</strong></span> automatically selects an appropriate
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User type. By default, it looks for A, AAAA, and MX records, but if the
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <code class="option">-C</code> option was given, queries will be made for SOA
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User records, and if <em class="parameter"><code>name</code></em> is a
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User dotted-decimal IPv4
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User address or colon-delimited IPv6 address, <span><strong class="command">host</strong></span> will
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User query for PTR records. If a query type of IXFR is chosen the starting
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User serial number can be specified by appending an equal followed by the
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User starting serial number (e.g. -t IXFR=12345678).
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User The time to wait for a reply can be controlled through the
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <code class="option">-W</code> and <code class="option">-w</code> options. The
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <code class="option">-W</code> option makes <span><strong class="command">host</strong></span>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <em class="parameter"><code>wait</code></em> seconds. If <em class="parameter"><code>wait</code></em>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User is less than one, the wait interval is set to one second. When the
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <code class="option">-w</code> option is used, <span><strong class="command">host</strong></span>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User effectively wait forever for a reply. The time to wait for a response
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User will be set to the number of seconds given by the hardware's maximum
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User value for an integer quantity.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User The <code class="option">-s</code> option tells <span><strong class="command">host</strong></span>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <span class="emphasis"><em>not</em></span> to send the query to the next nameserver
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User if any server responds with a SERVFAIL response, which is the
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User reverse of normal stub resolver behavior.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User The <code class="option">-m</code> can be used to set the memory usage debugging
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <em class="parameter"><code>record</code></em>, <em class="parameter"><code>usage</code></em> and
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <em class="parameter"><code>trace</code></em>.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User If <span><strong class="command">host</strong></span> has been built with IDN (internationalized
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User domain name) support, it can accept and display non-ASCII domain names.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <span><strong class="command">host</strong></span> appropriately converts character encoding of
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User domain name before sending a request to DNS server or displaying a
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User reply from the server.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User If you'd like to turn off the IDN support for some reason, defines
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User the <code class="envar">IDN_DISABLE</code> environment variable.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User The IDN support is disabled if the variable is set when
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User <span><strong class="command">host</strong></span> runs.