host.html revision 83217b5fdc70ea66fedf2ab3e9b9169c2b8a200a
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - Copyright (C) 2000-2002 Internet Software Consortium
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - Permission to use, copy, modify, and distribute this software for any
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - purpose with or without fee is hereby granted, provided that the above
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - copyright notice and this permission notice appear in all copies.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
0662ed52e814f8f08ef0e09956413a792584eddffuankg - PERFORMANCE OF THIS SOFTWARE.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<!-- $Id: host.html,v 1.15 2005/05/12 23:54:23 sra Exp $ -->
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
4fbd71b56ec5cc48f64b6bea20154bfcce857944fuankg<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<div class="cmdsynopsis"><p><code class="command">host</code> [<code class="option">-aCdlnrTwv</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>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg is a simple utility for performing DNS lookups.
16b55a35cff91315d261d1baa776138af465c4e4fuankg It is normally used to convert names to IP addresses and vice versa.
16b55a35cff91315d261d1baa776138af465c4e4fuankg When no arguments or options are given,
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg prints a short summary of its command line arguments and options.
16b55a35cff91315d261d1baa776138af465c4e4fuankg<p><em class="parameter"><code>name</code></em> is the domain name that is to be
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg up. It can also be a dotted-decimal IPv4 address or a colon-delimited
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg IPv6 address, in which case <span><strong class="command">host</strong></span> will by
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg perform a reverse lookup for that address.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <em class="parameter"><code>server</code></em> is an optional argument which
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg the name or IP address of the name server that <span><strong class="command">host</strong></span>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg should query instead of the server or servers listed in
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg The <code class="option">-a</code> (all) option is equivalent to setting the
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <code class="option">-v</code> option and asking <span><strong class="command">host</strong></span> to make
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg a query of type ANY.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg When the <code class="option">-C</code> option is used, <span><strong class="command">host</strong></span>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg will attempt to display the SOA records for zone
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <em class="parameter"><code>name</code></em> from all the listed
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg authoritative name
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg servers for that zone. The list of name servers is defined by the NS
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg records that are found for the zone.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg The <code class="option">-c</code> option instructs to make a DNS query of class
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <em class="parameter"><code>class</code></em>. This can be used to lookup
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg Chaosnet class resource records. The default class is IN (Internet).
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg Verbose output is generated by <span><strong class="command">host</strong></span> when
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <code class="option">-d</code> or <code class="option">-v</code> option is used. The two
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg options are equivalent. They have been provided for backwards
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg compatibility. In previous versions, the <code class="option">-d</code> option
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg switched on debugging traces and <code class="option">-v</code> enabled verbose
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg List mode is selected by the <code class="option">-l</code> option. This makes
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <span><strong class="command">host</strong></span> perform a zone transfer for zone
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <em class="parameter"><code>name</code></em>. Transfer the zone printing out
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg the NS, PTR
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg and address records (A/AAAA). If combined with <code class="option">-a</code>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg all records will be printed.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg option specifies that reverse lookups of IPv6 addresses should
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg use the IP6.INT domain as defined in RFC1886.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg The default is to use IP6.ARPA.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg The <code class="option">-N</code> option sets the number of dots that have to be
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg in <em class="parameter"><code>name</code></em> for it to be considered
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg absolute. The
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg default value is that defined using the ndots statement in
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <code class="filename">/etc/resolv.conf</code>, or 1 if no ndots
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg statement is
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg present. Names with fewer dots are interpreted as relative names and
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg will be searched for in the domains listed in the <span class="type">search</span>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg The number of UDP retries for a lookup can be changed with the
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <code class="option">-R</code> option. <em class="parameter"><code>number</code></em>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg how many times <span><strong class="command">host</strong></span> will repeat a query
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg not get answered. The default number of retries is 1. If
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <em class="parameter"><code>number</code></em> is negative or zero, the
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg retries will default to 1.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg Non-recursive queries can be made via the <code class="option">-r</code> option.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg Setting this option clears the <span class="type">RD</span> — recursion
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg desired — bit in the query which <span><strong class="command">host</strong></span> makes.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg This should mean that the name server receiving the query will not
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg attempt to resolve <em class="parameter"><code>name</code></em>. The
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <code class="option">-r</code> option enables <span><strong class="command">host</strong></span>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg the behaviour of a name server by making non-recursive queries and
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg expecting to receive answers to those queries that are usually
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg referrals to other name servers.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg By default <span><strong class="command">host</strong></span> uses UDP when making
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg queries. The
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <code class="option">-T</code> option makes it use a TCP connection when querying
0662ed52e814f8f08ef0e09956413a792584eddffuankg the name server. TCP will be automatically selected for queries that
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg require it, such as zone transfer (AXFR) requests.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg The <code class="option">-4</code> option forces <span><strong class="command">host</strong></span> to only
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg use IPv4 query transport. The <code class="option">-6</code> option forces
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <span><strong class="command">host</strong></span> to only use IPv6 query transport.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg The <code class="option">-t</code> option is used to select the query type.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <em class="parameter"><code>type</code></em> can be any recognised query
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg type: CNAME,
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
0662ed52e814f8f08ef0e09956413a792584eddffuankg <span><strong class="command">host</strong></span> automatically selects an appropriate
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg type. By default it looks for A records, but if the
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <code class="option">-C</code> option was given, queries will be made for SOA
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg records, and if <em class="parameter"><code>name</code></em> is a
0662ed52e814f8f08ef0e09956413a792584eddffuankg dotted-decimal IPv4
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg address or colon-delimited IPv6 address, <span><strong class="command">host</strong></span> will
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg query for PTR records. If a query type of IXFR is chosen the starting
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg serial number can be specified by appending an equal followed by the
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg starting serial number (e.g. -t IXFR=12345678).
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg The time to wait for a reply can be controlled through the
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <code class="option">-W</code> and <code class="option">-w</code> options. The
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <code class="option">-W</code> option makes <span><strong class="command">host</strong></span>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <em class="parameter"><code>wait</code></em> seconds. If <em class="parameter"><code>wait</code></em>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg is less than one, the wait interval is set to one second. When the
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <code class="option">-w</code> option is used, <span><strong class="command">host</strong></span>
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg effectively wait forever for a reply. The time to wait for a response
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg will be set to the number of seconds given by the hardware's maximum
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg value for an integer quantity.
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg The <code class="option">-m</code> can be used to set the memory usage debugging
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <em class="parameter"><code>record</code></em>, <em class="parameter"><code>usage</code></em> and
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg<p><span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
fc1365b60fa715841c959c6b91c7ed83884ba3fcfuankg <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.