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