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