host.docbook revision 938440694b33cd752e9e4b71a526368b4811c177
7f007e36bec06aba6b3a0f84a64f2abf99edfcd8gstein<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
23ce412bd50a47accab4dd26019b78810bbf46ebtrawick "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj [<!ENTITY mdash "—">]>
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj - Copyright (C) 2004, 2005, 2007-2009, 2014 Internet Systems Consortium, Inc. ("ISC")
8f5dca296674091bd47a7846d0cc16ce5bbc272ejerenkrantz - Copyright (C) 2000-2002 Internet Software Consortium.
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz - Permission to use, copy, modify, and/or distribute this software for any
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz - purpose with or without fee is hereby granted, provided that the above
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb - copyright notice and this permission notice appear in all copies.
ab71b233b3a36489e44a7b061c48293be0b17788jwoolley - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
571760de5e60c0b459cb11be45507b923cd023eejwoolley - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
571760de5e60c0b459cb11be45507b923cd023eejwoolley - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
9180a5933673ffb1af633c255ceee029340f3b1erbb - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
bcb6e1be6041dfeb549c8ea8d37f97ad4e90a0c3rbb - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
9bd71e35f5d26d26d23fe3a677401828e842ed72wrowe - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2900ab946a2d76b73a14cebfe2985d253f01c967stoddard - PERFORMANCE OF THIS SOFTWARE.
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein <refentryinfo>
6f6f4a4bca281779d196acbdd5c017bb90858305trawick </refentryinfo>
af4c982a7cf4515f124935f99a329744035fc699slive <refnamediv>
af4c982a7cf4515f124935f99a329744035fc699slive </refnamediv>
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj <copyright>
976501adbc040220270f7d1d77c4b8373033be69wrowe <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
976501adbc040220270f7d1d77c4b8373033be69wrowe </copyright>
976501adbc040220270f7d1d77c4b8373033be69wrowe <copyright>
bf9acc131271d18db51d30ace549d3c3b6a2b9fbrbb </copyright>
bf9acc131271d18db51d30ace549d3c3b6a2b9fbrbb </docinfo>
bf9acc131271d18db51d30ace549d3c3b6a2b9fbrbb <refsynopsisdiv>
bf9acc131271d18db51d30ace549d3c3b6a2b9fbrbb <cmdsynopsis>
b84f66c93f820824b1d5455181f55598b766319cwrowe <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
b84f66c93f820824b1d5455181f55598b766319cwrowe <arg><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
b84f66c93f820824b1d5455181f55598b766319cwrowe <arg><option>-R <replaceable class="parameter">number</replaceable></option></arg>
b84f66c93f820824b1d5455181f55598b766319cwrowe <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
b84f66c93f820824b1d5455181f55598b766319cwrowe <arg><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick <arg><option>-m <replaceable class="parameter">flag</replaceable></option></arg>
976501adbc040220270f7d1d77c4b8373033be69wrowe </cmdsynopsis>
dc96a5e6f9af3c514df4c61ab9468fcf97f9846fwrowe </refsynopsisdiv>
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard is a simple utility for performing DNS lookups.
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard It is normally used to convert names to IP addresses and vice versa.
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard When no arguments or options are given,
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard prints a short summary of its command line arguments and options.
38b116de532efb28defc6a0aaa71fb8c46487190gstein <para><parameter>name</parameter> is the domain name that is to be
38b116de532efb28defc6a0aaa71fb8c46487190gstein up. It can also be a dotted-decimal IPv4 address or a colon-delimited
38b116de532efb28defc6a0aaa71fb8c46487190gstein IPv6 address, in which case <command>host</command> will by
38b116de532efb28defc6a0aaa71fb8c46487190gstein perform a reverse lookup for that address.
38b116de532efb28defc6a0aaa71fb8c46487190gstein <parameter>server</parameter> is an optional argument which
abf9f8824312153040e1ee588a50058c67a4081ajerenkrantz the name or IP address of the name server that <command>host</command>
abf9f8824312153040e1ee588a50058c67a4081ajerenkrantz should query instead of the server or servers listed in
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz The <option>-a</option> (all) option is equivalent to setting the
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz <option>-v</option> option and asking <command>host</command> to make
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz a query of type ANY.
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz When the <option>-C</option> option is used, <command>host</command>
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz will attempt to display the SOA records for zone
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz authoritative name
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz servers for that zone. The list of name servers is defined by the NS
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz records that are found for the zone.
38b116de532efb28defc6a0aaa71fb8c46487190gstein The <option>-c</option> option instructs to make a DNS query of class
38b116de532efb28defc6a0aaa71fb8c46487190gstein <parameter>class</parameter>. This can be used to lookup
38b116de532efb28defc6a0aaa71fb8c46487190gstein Chaosnet class resource records. The default class is IN (Internet).
38b116de532efb28defc6a0aaa71fb8c46487190gstein Verbose output is generated by <command>host</command> when
38b116de532efb28defc6a0aaa71fb8c46487190gstein <option>-d</option> or <option>-v</option> option is used. The two
e2979c854f6ff7c056d75f6f1ae49767ce3b6d37jerenkrantz options are equivalent. They have been provided for backwards
e2979c854f6ff7c056d75f6f1ae49767ce3b6d37jerenkrantz compatibility. In previous versions, the <option>-d</option> option
38b116de532efb28defc6a0aaa71fb8c46487190gstein switched on debugging traces and <option>-v</option> enabled verbose
28a8a81ca24adf72631caa248b2d37a8f0f645c2aaron List mode is selected by the <option>-l</option> option. This makes
28a8a81ca24adf72631caa248b2d37a8f0f645c2aaron <command>host</command> perform a zone transfer for zone
28a8a81ca24adf72631caa248b2d37a8f0f645c2aaron <parameter>name</parameter>. Transfer the zone printing out
28a8a81ca24adf72631caa248b2d37a8f0f645c2aaron the NS, PTR
28a8a81ca24adf72631caa248b2d37a8f0f645c2aaron and address records (A/AAAA). If combined with <option>-a</option>
28a8a81ca24adf72631caa248b2d37a8f0f645c2aaron all records will be printed.
f53df16c9cfebf5cbf9e3c4e929f8f8bc8f66d71jerenkrantz option specifies that reverse lookups of IPv6 addresses should
e04911e1869585acf01ee0876c2752afbc91af71jerenkrantz use the IP6.INT domain as defined in RFC1886.
e04911e1869585acf01ee0876c2752afbc91af71jerenkrantz The default is to use IP6.ARPA.
b84f66c93f820824b1d5455181f55598b766319cwrowe The <option>-N</option> option sets the number of dots that have to be
b84f66c93f820824b1d5455181f55598b766319cwrowe in <parameter>name</parameter> for it to be considered
b84f66c93f820824b1d5455181f55598b766319cwrowe absolute. The
7fe18c15b669db9d191859695901dc4fcf3829dawrowe default value is that defined using the ndots statement in
7fe18c15b669db9d191859695901dc4fcf3829dawrowe <filename>/etc/resolv.conf</filename>, or 1 if no ndots
7fe18c15b669db9d191859695901dc4fcf3829dawrowe statement is
7fe18c15b669db9d191859695901dc4fcf3829dawrowe present. Names with fewer dots are interpreted as relative names and
b84f66c93f820824b1d5455181f55598b766319cwrowe will be searched for in the domains listed in the <type>search</type>
809cf6f87f7a07b348f6d69961834923bc16313egstein The number of UDP retries for a lookup can be changed with the
410912d9cb56a09a74f8655647ed9e81d49023f4gregames <option>-R</option> option. <parameter>number</parameter>
410912d9cb56a09a74f8655647ed9e81d49023f4gregames how many times <command>host</command> will repeat a query
60d567a0c2aae815ee6fc20c0d65032bea52c92cwrowe not get answered. The default number of retries is 1. If
60d567a0c2aae815ee6fc20c0d65032bea52c92cwrowe <parameter>number</parameter> is negative or zero, the
60d567a0c2aae815ee6fc20c0d65032bea52c92cwrowe retries will default to 1.
60d567a0c2aae815ee6fc20c0d65032bea52c92cwrowe Non-recursive queries can be made via the <option>-r</option> option.
60d567a0c2aae815ee6fc20c0d65032bea52c92cwrowe Setting this option clears the <type>RD</type> — recursion
60d567a0c2aae815ee6fc20c0d65032bea52c92cwrowe desired — bit in the query which <command>host</command> makes.
7239216999e746bb4fc7671621becea33c5c1c87stoddard This should mean that the name server receiving the query will not
d180ec1b29106f4fec480ef7fcdb04df078010cerse <option>-r</option> option enables <command>host</command>
3913a3b7e7c72ea11d05da36275db39c2dc39b68jwoolley the behavior of a name server by making non-recursive queries and
3913a3b7e7c72ea11d05da36275db39c2dc39b68jwoolley expecting to receive answers to those queries that are usually
3913a3b7e7c72ea11d05da36275db39c2dc39b68jwoolley referrals to other name servers.
3913a3b7e7c72ea11d05da36275db39c2dc39b68jwoolley By default, <command>host</command> uses UDP when making
5fcdb40a60e9819e5fb192f7ea97a4c29d350ecbjerenkrantz queries. The
5fcdb40a60e9819e5fb192f7ea97a4c29d350ecbjerenkrantz <option>-T</option> option makes it use a TCP connection when querying
5fcdb40a60e9819e5fb192f7ea97a4c29d350ecbjerenkrantz the name server. TCP will be automatically selected for queries that
5fcdb40a60e9819e5fb192f7ea97a4c29d350ecbjerenkrantz require it, such as zone transfer (AXFR) requests.
d180ec1b29106f4fec480ef7fcdb04df078010cerse The <option>-4</option> option forces <command>host</command> to only
e32adabcbf3bf5b69ba2e8b163b971839efc94dbtrawick use IPv4 query transport. The <option>-6</option> option forces
23ce412bd50a47accab4dd26019b78810bbf46ebtrawick <command>host</command> to only use IPv6 query transport.
49facccad3f5c3e9e49311487b5069699c3bf3fdjwoolley The <option>-t</option> option is used to select the query type.
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard <parameter>type</parameter> can be any recognized query
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard type: CNAME,
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard <command>host</command> automatically selects an appropriate
1b9744b72f26e9a0e935f9c08d49feb1fcce72f9jwoolley type. By default, it looks for A, AAAA, and MX records, but if the
1b9744b72f26e9a0e935f9c08d49feb1fcce72f9jwoolley <option>-C</option> option was given, queries will be made for SOA
1b9744b72f26e9a0e935f9c08d49feb1fcce72f9jwoolley dotted-decimal IPv4
1b9744b72f26e9a0e935f9c08d49feb1fcce72f9jwoolley address or colon-delimited IPv6 address, <command>host</command> will
1b9744b72f26e9a0e935f9c08d49feb1fcce72f9jwoolley query for PTR records. If a query type of IXFR is chosen the starting
1b9744b72f26e9a0e935f9c08d49feb1fcce72f9jwoolley serial number can be specified by appending an equal followed by the
1b9744b72f26e9a0e935f9c08d49feb1fcce72f9jwoolley starting serial number (e.g. -t IXFR=12345678).
19cbe4d7b7c931723e7249de6829bf965a1fee72stoddard The time to wait for a reply can be controlled through the
93db592309ba9e5ab230f67611a2c74fece9cdb2marc <option>-W</option> and <option>-w</option> options. The
93db592309ba9e5ab230f67611a2c74fece9cdb2marc <option>-W</option> option makes <command>host</command>
93db592309ba9e5ab230f67611a2c74fece9cdb2marc <parameter>wait</parameter> seconds. If <parameter>wait</parameter>
93db592309ba9e5ab230f67611a2c74fece9cdb2marc is less than one, the wait interval is set to one second. When the
93db592309ba9e5ab230f67611a2c74fece9cdb2marc <option>-w</option> option is used, <command>host</command>
b187d568e1507d75139ebc13ca945b38fc05d55cstoddard effectively wait forever for a reply. The time to wait for a response
b187d568e1507d75139ebc13ca945b38fc05d55cstoddard will be set to the number of seconds given by the hardware's maximum
b187d568e1507d75139ebc13ca945b38fc05d55cstoddard value for an integer quantity.
8bed76428f56e5c643174a2d6807c3f18016af5cbjh The <option>-s</option> option tells <command>host</command>
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddard <emphasis>not</emphasis> to send the query to the next nameserver
d2f8b010487ffa990a9c268df5a25579e7291bcdrbb if any server responds with a SERVFAIL response, which is the
d2f8b010487ffa990a9c268df5a25579e7291bcdrbb reverse of normal stub resolver behavior.
0bff2f28ef945280c17099c142126178a78e1e54manoj The <option>-m</option> can be used to set the memory usage debugging
0bff2f28ef945280c17099c142126178a78e1e54manoj <parameter>record</parameter>, <parameter>usage</parameter> and
9c09943bad734ebd5c7cc10bd6d63b75c4c6e056stoddard </refsect1>
ff849e4163ed879288f0df15f78b6c9d278ec804fanf <refsect1>
447c6ce3ff08073c44f6785d5256271fcb877512wrowe If <command>host</command> has been built with IDN (internationalized
447c6ce3ff08073c44f6785d5256271fcb877512wrowe domain name) support, it can accept and display non-ASCII domain names.
447c6ce3ff08073c44f6785d5256271fcb877512wrowe <command>host</command> appropriately converts character encoding of
7fe18c15b669db9d191859695901dc4fcf3829dawrowe domain name before sending a request to DNS server or displaying a
7fe18c15b669db9d191859695901dc4fcf3829dawrowe reply from the server.
7fe18c15b669db9d191859695901dc4fcf3829dawrowe If you'd like to turn off the IDN support for some reason, defines
7fe18c15b669db9d191859695901dc4fcf3829dawrowe The IDN support is disabled if the variable is set when
20db975063c58c8fadf72656a8cbd869554e6bfbwrowe </refsect1>
dd4713dc5b186f4d1be7b88f86608fdb84cbe5d5gstein <refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
0eb7ca6cf812d98c534661ac474e873a32bf6325gstein </citerefentry>,
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein <citerefentry>
8d07897b52e3b7055874501f8a499e75800db206gstein <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
8d07897b52e3b7055874501f8a499e75800db206gstein </citerefentry>.
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick </refsect1>
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein - Local variables:
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein - mode: sgml