host.docbook revision 67d01dcacb2051a03377c8ec5c0e36604c17aea5
2834197ede0bfaec5b57cb1666e0c21f76408570David Lawrence<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
0ba23b0a24e0c17ee50073789704edaeeae2c360Andreas Gustafsson "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson [<!ENTITY mdash "&#8212;">]>
717e2cf05b12506b40eb03f42ea963c30c7e9f97Brian Wellington<!--
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence - Copyright (C) 2004, 2005, 2007-2009, 2014 Internet Systems Consortium, Inc. ("ISC")
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson - Copyright (C) 2000-2002 Internet Software Consortium.
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson -
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson - Permission to use, copy, modify, and/or distribute this software for any
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson - purpose with or without fee is hereby granted, provided that the above
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson - copyright notice and this permission notice appear in all copies.
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson -
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson - PERFORMANCE OF THIS SOFTWARE.
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson-->
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson<refentry id="man.host">
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <refentryinfo>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <date>January 20, 2009</date>
dbeb32261081835bb9ba44db68df5dfed0fda411Andreas Gustafsson </refentryinfo>
717e2cf05b12506b40eb03f42ea963c30c7e9f97Brian Wellington
717e2cf05b12506b40eb03f42ea963c30c7e9f97Brian Wellington <refmeta>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <refentrytitle>host</refentrytitle>
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence <manvolnum>1</manvolnum>
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson <refmiscinfo>BIND9</refmiscinfo>
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence </refmeta>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <refnamediv>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <refname>host</refname>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <refpurpose>DNS lookup utility</refpurpose>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson </refnamediv>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <docinfo>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <copyright>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <year>2004</year>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <year>2005</year>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <year>2007</year>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <year>2008</year>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <year>2009</year>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <year>2014</year>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
51b951ab2a5e45e6a3994d033fec9b68e1f07985Mark Andrews </copyright>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <copyright>
1bc9afc3313249d656abae2d298c8d84308891d0Andreas Gustafsson <year>2000</year>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <year>2001</year>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <year>2002</year>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <holder>Internet Software Consortium.</holder>
717e2cf05b12506b40eb03f42ea963c30c7e9f97Brian Wellington </copyright>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson </docinfo>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <refsynopsisdiv>
dbeb32261081835bb9ba44db68df5dfed0fda411Andreas Gustafsson <cmdsynopsis>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <command>host</command>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <arg><option>-aCdlnrsTwv</option></arg>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <arg><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <arg><option>-R <replaceable class="parameter">number</replaceable></option></arg>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <arg><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
e21d199dca95aff5d50f133d6b064309e209af00Brian Wellington <arg><option>-m <replaceable class="parameter">flag</replaceable></option></arg>
ef45c94e927e97ad0c804780a1eca59240088f60Andreas Gustafsson <arg><option>-4</option></arg>
ef45c94e927e97ad0c804780a1eca59240088f60Andreas Gustafsson <arg><option>-6</option></arg>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <arg><option>-v</option></arg>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <arg><option>-V</option></arg>
bfcdcde570be11e3d210cfdd262fae8b8e6c62ceMark Andrews <arg choice="req">name</arg>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <arg choice="opt">server</arg>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson </cmdsynopsis>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson </refsynopsisdiv>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson
7cd4c3ddd1baf5f2b204562fdba3da37c716cc78Andreas Gustafsson <refsect1>
7cd4c3ddd1baf5f2b204562fdba3da37c716cc78Andreas Gustafsson <title>DESCRIPTION</title>
19ab334c3f47db2550ff6ad13bbab67ff4090139Andreas Gustafsson
51b951ab2a5e45e6a3994d033fec9b68e1f07985Mark Andrews <para><command>host</command>
51b951ab2a5e45e6a3994d033fec9b68e1f07985Mark Andrews is a simple utility for performing DNS lookups.
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson It is normally used to convert names to IP addresses and vice versa.
cfab2f4e039052fd5c71f8de93a9510bec0581f9Andreas Gustafsson When no arguments or options are given,
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <command>host</command>
e01ecff4b1562a24e6de7e9396c60e9dffdb78ceAndreas Gustafsson prints a short summary of its command line arguments and options.
cbe5f076ba5595c3d63daa223ea373bef55561b2Andreas Gustafsson </para>
cbe5f076ba5595c3d63daa223ea373bef55561b2Andreas Gustafsson
4bc5101166ec97bf88448efb9a65da600e82040eAndreas Gustafsson <para><parameter>name</parameter> is the domain name that is to be
e240e36503adf4d2073adfee98fb17b5b9d10fddAndreas Gustafsson looked
e240e36503adf4d2073adfee98fb17b5b9d10fddAndreas Gustafsson up. It can also be a dotted-decimal IPv4 address or a colon-delimited
51b951ab2a5e45e6a3994d033fec9b68e1f07985Mark Andrews IPv6 address, in which case <command>host</command> will by
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson default
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson perform a reverse lookup for that address.
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <parameter>server</parameter> is an optional argument which
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson is either
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson the name or IP address of the name server that <command>host</command>
51b951ab2a5e45e6a3994d033fec9b68e1f07985Mark Andrews should query instead of the server or servers listed in
9fdf20d0dea288572033095995547789059d4d6bAndreas Gustafsson <filename>/etc/resolv.conf</filename>.
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson </para>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <para>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson The <option>-a</option> (all) option is equivalent to setting the
2cc3f128610eb9e42d7c386160665583b63882bfAndreas Gustafsson <option>-v</option> option and asking <command>host</command> to make
2cc3f128610eb9e42d7c386160665583b63882bfAndreas Gustafsson a query of type ANY.
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson </para>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson
88eee65d8dd3e6051d855ec9f7b375207ed40a87Andreas Gustafsson <para>
d2148c21700b9739ef125a49897288ad2636f706Andreas Gustafsson When the <option>-C</option> option is used, <command>host</command>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson will attempt to display the SOA records for zone
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <parameter>name</parameter> from all the listed
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson authoritative name
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson servers for that zone. The list of name servers is defined by the NS
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson records that are found for the zone.
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson </para>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <para>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson The <option>-c</option> option instructs to make a DNS query of class
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <parameter>class</parameter>. This can be used to lookup
4034406393893f4d07ab07b56da3541155493855Andreas Gustafsson Hesiod or
4034406393893f4d07ab07b56da3541155493855Andreas Gustafsson Chaosnet class resource records. The default class is IN (Internet).
4034406393893f4d07ab07b56da3541155493855Andreas Gustafsson </para>
4034406393893f4d07ab07b56da3541155493855Andreas Gustafsson
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <para>
c011a692803976aa5100f7a4e6a1fa8a1ea2c3f3Andreas Gustafsson Verbose output is generated by <command>host</command> when
fa3cbea8bfba19d1c11f9a6ad20f40a2c15377f0Brian Wellington the
4bc5101166ec97bf88448efb9a65da600e82040eAndreas Gustafsson <option>-d</option> or <option>-v</option> option is used. The two
e240e36503adf4d2073adfee98fb17b5b9d10fddAndreas Gustafsson options are equivalent. They have been provided for backwards
4bc5101166ec97bf88448efb9a65da600e82040eAndreas Gustafsson compatibility. In previous versions, the <option>-d</option> option
e01ecff4b1562a24e6de7e9396c60e9dffdb78ceAndreas Gustafsson switched on debugging traces and <option>-v</option> enabled verbose
2bc0dee981fd5d9c7d7d6fe67278dfafbe614bc3Andreas Gustafsson output.
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson </para>
c011a692803976aa5100f7a4e6a1fa8a1ea2c3f3Andreas Gustafsson
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <para>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson List mode is selected by the <option>-l</option> option. This makes
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <command>host</command> perform a zone transfer for zone
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence <parameter>name</parameter>. Transfer the zone printing out
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson the NS, PTR
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson and address records (A/AAAA). If combined with <option>-a</option>
4334d2e8a16c4e154e8eb6fb7c7c8e8862771c8cBrian Wellington all records will be printed.
4334d2e8a16c4e154e8eb6fb7c7c8e8862771c8cBrian Wellington </para>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <para>
d2148c21700b9739ef125a49897288ad2636f706Andreas Gustafsson The <option>-i</option>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson option specifies that reverse lookups of IPv6 addresses should
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson use the IP6.INT domain as defined in RFC1886.
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson The default is to use IP6.ARPA.
38e62f7bfbe301b4718bc9e8525bf141cc080e71Andreas Gustafsson </para>
38e62f7bfbe301b4718bc9e8525bf141cc080e71Andreas Gustafsson
717e2cf05b12506b40eb03f42ea963c30c7e9f97Brian Wellington <para>
717e2cf05b12506b40eb03f42ea963c30c7e9f97Brian Wellington The <option>-N</option> option sets the number of dots that have to be
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson in <parameter>name</parameter> for it to be considered
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson absolute. The
d2148c21700b9739ef125a49897288ad2636f706Andreas Gustafsson default value is that defined using the ndots statement in
e54683130c25e85ab63dde3e8d14578a59479825Brian Wellington <filename>/etc/resolv.conf</filename>, or 1 if no ndots
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson statement is
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson present. Names with fewer dots are interpreted as relative names and
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence will be searched for in the domains listed in the <type>search</type>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson or <type>domain</type> directive in
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <filename>/etc/resolv.conf</filename>.
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson </para>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson
4334d2e8a16c4e154e8eb6fb7c7c8e8862771c8cBrian Wellington <para>
4334d2e8a16c4e154e8eb6fb7c7c8e8862771c8cBrian Wellington The number of UDP retries for a lookup can be changed with the
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <option>-R</option> option. <parameter>number</parameter>
02da394e0c3220ca2f37c5c6258994bd3ba07993Andreas Gustafsson indicates
7eabdeaeeebf4be93de87af803d020d380eb7273Andreas Gustafsson how many times <command>host</command> will repeat a query
38e62f7bfbe301b4718bc9e8525bf141cc080e71Andreas Gustafsson that does
38e62f7bfbe301b4718bc9e8525bf141cc080e71Andreas Gustafsson not get answered. The default number of retries is 1. If
cbe5f076ba5595c3d63daa223ea373bef55561b2Andreas Gustafsson <parameter>number</parameter> is negative or zero, the
cbe5f076ba5595c3d63daa223ea373bef55561b2Andreas Gustafsson number of
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson retries will default to 1.
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson </para>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <para>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson Non-recursive queries can be made via the <option>-r</option> option.
717e2cf05b12506b40eb03f42ea963c30c7e9f97Brian Wellington Setting this option clears the <type>RD</type> &mdash; recursion
717e2cf05b12506b40eb03f42ea963c30c7e9f97Brian Wellington desired &mdash; bit in the query which <command>host</command> makes.
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson This should mean that the name server receiving the query will not
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson attempt to resolve <parameter>name</parameter>. The
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <option>-r</option> option enables <command>host</command>
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson to mimic
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson the behavior of a name server by making non-recursive queries and
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson expecting to receive answers to those queries that are usually
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson referrals to other name servers.
4334d2e8a16c4e154e8eb6fb7c7c8e8862771c8cBrian Wellington </para>
4334d2e8a16c4e154e8eb6fb7c7c8e8862771c8cBrian Wellington
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson <para>
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson By default, <command>host</command> uses UDP when making
51b951ab2a5e45e6a3994d033fec9b68e1f07985Mark Andrews queries. The
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson <option>-T</option> option makes it use a TCP connection when querying
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson the name server. TCP will be automatically selected for queries that
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson require it, such as zone transfer (AXFR) requests.
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson </para>
51b951ab2a5e45e6a3994d033fec9b68e1f07985Mark Andrews
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson <para>
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson The <option>-4</option> option forces <command>host</command> to only
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson use IPv4 query transport. The <option>-6</option> option forces
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson <command>host</command> to only use IPv6 query transport.
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson </para>
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson <para>
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence The <option>-t</option> option is used to select the query type.
4334d2e8a16c4e154e8eb6fb7c7c8e8862771c8cBrian Wellington <parameter>type</parameter> can be any recognized query
4334d2e8a16c4e154e8eb6fb7c7c8e8862771c8cBrian Wellington type: CNAME,
4334d2e8a16c4e154e8eb6fb7c7c8e8862771c8cBrian Wellington NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <command>host</command> automatically selects an appropriate
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson query
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence type. By default, it looks for A, AAAA, and MX records, but if the
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <option>-C</option> option was given, queries will be made for SOA
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson records, and if <parameter>name</parameter> is a
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson dotted-decimal IPv4
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson address or colon-delimited IPv6 address, <command>host</command> will
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson query for PTR records. If a query type of IXFR is chosen the starting
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson serial number can be specified by appending an equal followed by the
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson starting serial number (e.g. -t IXFR=12345678).
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson </para>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson
1bc9afc3313249d656abae2d298c8d84308891d0Andreas Gustafsson <para>
717e2cf05b12506b40eb03f42ea963c30c7e9f97Brian Wellington The time to wait for a reply can be controlled through the
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <option>-W</option> and <option>-w</option> options. The
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <option>-W</option> option makes <command>host</command>
fea398993b583058fb8167902eed3eedd26f464cAndreas Gustafsson wait for
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <parameter>wait</parameter> seconds. If <parameter>wait</parameter>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson is less than one, the wait interval is set to one second. When the
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <option>-w</option> option is used, <command>host</command>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson will
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson effectively wait forever for a reply. The time to wait for a response
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson will be set to the number of seconds given by the hardware's maximum
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson value for an integer quantity.
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson </para>
51b951ab2a5e45e6a3994d033fec9b68e1f07985Mark Andrews
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <para>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson The <option>-s</option> option tells <command>host</command>
7cd4c3ddd1baf5f2b204562fdba3da37c716cc78Andreas Gustafsson <emphasis>not</emphasis> to send the query to the next nameserver
7cd4c3ddd1baf5f2b204562fdba3da37c716cc78Andreas Gustafsson if any server responds with a SERVFAIL response, which is the
19ab334c3f47db2550ff6ad13bbab67ff4090139Andreas Gustafsson reverse of normal stub resolver behavior.
51b951ab2a5e45e6a3994d033fec9b68e1f07985Mark Andrews </para>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <para>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson The <option>-m</option> can be used to set the memory usage debugging
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson flags
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <parameter>record</parameter>, <parameter>usage</parameter> and
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <parameter>trace</parameter>.
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson </para>
98c7e0d8ba881f06f56716d6f7098d54643f4f2fAndreas Gustafsson
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson <para>
98c7e0d8ba881f06f56716d6f7098d54643f4f2fAndreas Gustafsson The <option>-V</option> option causes <command>host</command>
98c7e0d8ba881f06f56716d6f7098d54643f4f2fAndreas Gustafsson to print the version number and exit.
fea398993b583058fb8167902eed3eedd26f464cAndreas Gustafsson </para>
d2148c21700b9739ef125a49897288ad2636f706Andreas Gustafsson </refsect1>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson
<refsect1>
<title>IDN SUPPORT</title>
<para>
If <command>host</command> has been built with IDN (internationalized
domain name) support, it can accept and display non-ASCII domain names.
<command>host</command> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a
reply from the server.
If you'd like to turn off the IDN support for some reason, defines
the <envar>IDN_DISABLE</envar> environment variable.
The IDN support is disabled if the variable is set when
<command>host</command> runs.
</para>
</refsect1>
<refsect1>
<title>FILES</title>
<para><filename>/etc/resolv.conf</filename>
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para><citerefentry>
<refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>.
</para>
</refsect1>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->