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