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