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