host.docbook revision 704e6c8876907aac0bf7380effca8bca400d4acd
431a83fb29482c5170b3e4026e59bb14849a6707Tinderbox User<!ENTITY mdash "—">]>
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington - Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington - This Source Code Form is subject to the terms of the Mozilla Public
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington - License, v. 2.0. If a copy of the MPL was not distributed with this
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington - file, You can obtain one at http://mozilla.org/MPL/2.0/.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews<!-- Converted by db4-upgrade version 1.0 -->
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="man.host">
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington <refentryinfo>
328e0fee6b6c91c258e5ce36eb70f5e017a85af2Mark Andrews <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </refentryinfo>
368aedf188d7c7782cae8a5ce2a978be47b5a764Evan Hunt <refnamediv>
5cd7e9d4db393c314dd1a761c52d2cb3a4da9b72Andreas Gustafsson <refpurpose>DNS lookup utility</refpurpose>
7332e47e11ceb87928f801b925269aa6a91838b1David Lawrence </refnamediv>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <refsynopsisdiv>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <arg choice="opt" rep="norepeat"><option>-aCdlnrsTwv</option></arg>
3dfc806ddf433d0569340d9c4ccc5af8ec41a27bBrian Wellington <arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <arg choice="opt" rep="norepeat"><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <arg choice="opt" rep="norepeat"><option>-R <replaceable class="parameter">number</replaceable></option></arg>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <arg choice="opt" rep="norepeat"><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <arg choice="opt" rep="norepeat"><option>-m <replaceable class="parameter">flag</replaceable></option></arg>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <arg choice="opt" rep="norepeat"><option>-4</option></arg>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <arg choice="opt" rep="norepeat"><option>-6</option></arg>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <arg choice="opt" rep="norepeat"><option>-v</option></arg>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <arg choice="opt" rep="norepeat"><option>-V</option></arg>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <arg choice="req" rep="norepeat">name</arg>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <arg choice="opt" rep="norepeat">server</arg>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </cmdsynopsis>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </refsynopsisdiv>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <refsection><info><title>DESCRIPTION</title></info>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington is a simple utility for performing DNS lookups.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington It is normally used to convert names to IP addresses and vice versa.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington When no arguments or options are given,
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington prints a short summary of its command line arguments and options.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <para><parameter>name</parameter> is the domain name that is to be
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington up. It can also be a dotted-decimal IPv4 address or a colon-delimited
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington IPv6 address, in which case <command>host</command> will by
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington perform a reverse lookup for that address.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <parameter>server</parameter> is an optional argument which
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington the name or IP address of the name server that <command>host</command>
72ddc4cef9c6a6de53aae530dea1ddbb90631131Mark Andrews should query instead of the server or servers listed in
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </refsection>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <refsection><info><title>OPTIONS</title></info>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <variablelist>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Use IPv4 only for query transport.
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrews </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
532989b206894bdaf6de6cb883d2e31169c4bfacAndreas Gustafsson Use IPv6 only for query transport.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </varlistentry>
091329e690b20755aa80b86cc7389d25c5d32c9bBrian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington "All". The <option>-a</option> option is normally equivalent
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington to <option>-v -t <literal>ANY</literal></option>.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington It also affects the behaviour of the <option>-l</option>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington list zone option.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <term>-c <replaceable class="parameter">class</replaceable></term>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Query class: This can be used to lookup HS (Hesiod) or CH
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington (Chaosnet) class resource records. The default class is IN
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Check consistency: <command>host</command> will query the
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington SOA records for zone <parameter>name</parameter> from all
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington the listed authoritative name servers for that zone. The
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington list of name servers is defined by the NS records that are
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington found for the zone.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </varlistentry>
3a0da183bb40bd120698102b20b61ef12665c09bMark Andrews <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Print debugging traces.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Equivalent to the <option>-v</option> verbose option.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Use the IP6.INT domain for reverse lookups of IPv6
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington addresses as defined in RFC1886 and deprecated in RFC4159.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington The default is to use IP6.ARPA as specified in RFC3596.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington The <command>host</command> command performs a zone transfer of
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington zone <parameter>name</parameter> and prints out the NS,
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington options print all records in the zone.
32d248107a5bc92b4bf9fc77deaa55b3da969ba2Andreas Gustafsson </varlistentry>
ed3418751ebdf7de397df76753dae97851d2bdf9Brian Wellington <varlistentry>
ed3418751ebdf7de397df76753dae97851d2bdf9Brian Wellington <term>-N <replaceable class="parameter">ndots</replaceable></term>
32d248107a5bc92b4bf9fc77deaa55b3da969ba2Andreas Gustafsson The number of dots that have to be
ed3418751ebdf7de397df76753dae97851d2bdf9Brian Wellington in <parameter>name</parameter> for it to be considered
ed3418751ebdf7de397df76753dae97851d2bdf9Brian Wellington absolute. The default value is that defined using the
ed3418751ebdf7de397df76753dae97851d2bdf9Brian Wellington ndots statement in <filename>/etc/resolv.conf</filename>,
ed3418751ebdf7de397df76753dae97851d2bdf9Brian Wellington or 1 if no ndots statement is present. Names with fewer
ed3418751ebdf7de397df76753dae97851d2bdf9Brian Wellington dots are interpreted as relative names and will be
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrews searched for in the domains listed in
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrews the <type>search</type> or <type>domain</type> directive
32d248107a5bc92b4bf9fc77deaa55b3da969ba2Andreas Gustafsson </varlistentry>
32d248107a5bc92b4bf9fc77deaa55b3da969ba2Andreas Gustafsson <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Non-recursive query:
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Setting this option clears the RD (recursion desired) bit
32d248107a5bc92b4bf9fc77deaa55b3da969ba2Andreas Gustafsson in the query. This should mean that the name server
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington receiving the query will not attempt to
32d248107a5bc92b4bf9fc77deaa55b3da969ba2Andreas Gustafsson enables <command>host</command> to mimic the behavior of a
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington name server by making non-recursive queries and expecting
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington to receive answers to those queries that can be
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington referrals to other name servers.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <term>-R <replaceable class="parameter">number</replaceable></term>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Number of retries for UDP queries:
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington If <parameter>number</parameter> is negative or zero, the
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington number of retries will default to 1. The default value is
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington 1, or the value of the <parameter>attempts</parameter>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington option in <filename>/etc/resolv.conf</filename>, if set.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Do <emphasis>not</emphasis> send the query to the next
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington nameserver if any server responds with a SERVFAIL
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington response, which is the reverse of normal stub resolver
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <term>-t <replaceable class="parameter">type</replaceable></term>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington The <parameter>type</parameter> argument can be any
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington recognized query type: CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington When no query type is specified, <command>host</command>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington automatically selects an appropriate query type. By default, it
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington looks for A, AAAA, and MX records.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington If the <option>-C</option> option is given, queries will
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington be made for SOA records.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington If <parameter>name</parameter> is a dotted-decimal IPv4
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington address or colon-delimited IPv6
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington address, <command>host</command> will query for PTR
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington If a query type of IXFR is chosen the starting serial
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington number can be specified by appending an equal followed by
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington the starting serial number
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington (like <option>-t <literal>IXFR=12345678</literal></option>).
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington By default, <command>host</command> uses UDP when making
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington queries. The <option>-T</option> option makes it use a TCP
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington connection when querying the name server. TCP will be
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington automatically selected for queries that require it, such
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington as zone transfer (AXFR) requests.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <term>-m <replaceable class="parameter">flag</replaceable></term>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Memory usage debugging: the flag can
091329e690b20755aa80b86cc7389d25c5d32c9bBrian Wellington be <parameter>record</parameter>, <parameter>usage</parameter>,
091329e690b20755aa80b86cc7389d25c5d32c9bBrian Wellington or <parameter>trace</parameter>. You can specify
091329e690b20755aa80b86cc7389d25c5d32c9bBrian Wellington the <option>-m</option> option more than once to set
091329e690b20755aa80b86cc7389d25c5d32c9bBrian Wellington multiple flags.
091329e690b20755aa80b86cc7389d25c5d32c9bBrian Wellington </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Verbose output.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Equivalent to the <option>-d</option> debug option.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Verbose output can also be enabled by setting
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Print the version number and exit.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington Wait forever: The query timeout is set to the maximum possible.
2c2be89824d3899591d34c26adb155da6a993ce3Evan Hunt </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <varlistentry>
72ddc4cef9c6a6de53aae530dea1ddbb90631131Mark Andrews <term>-W <replaceable class="parameter">wait</replaceable></term>
72ddc4cef9c6a6de53aae530dea1ddbb90631131Mark Andrews Timeout: Wait for up to <parameter>wait</parameter>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington seconds for a reply. If <parameter>wait</parameter> is
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington less than one, the wait interval is set to one second.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington By default, <command>host</command> will wait for 5
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt seconds for UDP responses and 10 seconds for TCP
c2da4f9d8a153ffeb2b659541130abef2d586789Brian Wellington connections. These defaults can be overridden by
091329e690b20755aa80b86cc7389d25c5d32c9bBrian Wellington </varlistentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </variablelist>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </refsection>
c2da4f9d8a153ffeb2b659541130abef2d586789Brian Wellington <refsection><info><title>IDN SUPPORT</title></info>
c2da4f9d8a153ffeb2b659541130abef2d586789Brian Wellington If <command>host</command> has been built with IDN (internationalized
c2da4f9d8a153ffeb2b659541130abef2d586789Brian Wellington domain name) support, it can accept and display non-ASCII domain names.
c2da4f9d8a153ffeb2b659541130abef2d586789Brian Wellington <command>host</command> appropriately converts character encoding of
c2da4f9d8a153ffeb2b659541130abef2d586789Brian Wellington domain name before sending a request to DNS server or displaying a
c2da4f9d8a153ffeb2b659541130abef2d586789Brian Wellington reply from the server.
c2da4f9d8a153ffeb2b659541130abef2d586789Brian Wellington If you'd like to turn off the IDN support for some reason, defines
c2da4f9d8a153ffeb2b659541130abef2d586789Brian Wellington the <envar>IDN_DISABLE</envar> environment variable.
e851ea826066ac5a5b01c2c23218faa0273a12e8Evan Hunt The IDN support is disabled if the variable is set when
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt </refsection>
c2da4f9d8a153ffeb2b659541130abef2d586789Brian Wellington <refsection><info><title>FILES</title></info>
c298583db573a329f37d43301d8c3c812500ac85Mark Andrews </refsection>
c298583db573a329f37d43301d8c3c812500ac85Mark Andrews <refsection><info><title>SEE ALSO</title></info>
c2da4f9d8a153ffeb2b659541130abef2d586789Brian Wellington <refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
c2da4f9d8a153ffeb2b659541130abef2d586789Brian Wellington </citerefentry>,
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <citerefentry>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </citerefentry>.
1b4e6163bed546ca7f8ad186f3eabfebacc36bc1Brian Wellington </refsection>