host.docbook revision 52cb865cf00db3437c33b57de0a17c807f9ba67e
1633838b8255282d10af15c5c84cee5a51466712Bob Halley<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
499b34cea04a46823d003d4c0520c8b03e8513cbBrian Wellington "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence [<!ENTITY mdash "&#8212;">]>
1633838b8255282d10af15c5c84cee5a51466712Bob Halley<!--
1633838b8255282d10af15c5c84cee5a51466712Bob Halley - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
1633838b8255282d10af15c5c84cee5a51466712Bob Halley - Copyright (C) 2000-2002 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence -
15a44745412679c30a6d022733925af70a38b715David Lawrence - Permission to use, copy, modify, and/or distribute this software for any
15a44745412679c30a6d022733925af70a38b715David Lawrence - purpose with or without fee is hereby granted, provided that the above
15a44745412679c30a6d022733925af70a38b715David Lawrence - copyright notice and this permission notice appear in all copies.
15a44745412679c30a6d022733925af70a38b715David Lawrence -
15a44745412679c30a6d022733925af70a38b715David Lawrence - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
15a44745412679c30a6d022733925af70a38b715David Lawrence - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15a44745412679c30a6d022733925af70a38b715David Lawrence - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15a44745412679c30a6d022733925af70a38b715David Lawrence - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1633838b8255282d10af15c5c84cee5a51466712Bob Halley - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2c64908ae0d5b5a1cfead295d7526e7be550d3d3Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence-->
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley<!-- $Id: host.docbook,v 1.17 2008/04/04 23:23:33 marka Exp $ -->
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley<refentry id="man.host">
904a5734375869ffb504ed8cde6b68cafadb6d64Bob Halley
e4e071ae12aee942fefc2c0a3280e402938669deBob Halley <refentryinfo>
904a5734375869ffb504ed8cde6b68cafadb6d64Bob Halley <date>Jun 30, 2000</date>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley </refentryinfo>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence <refmeta>
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence <refentrytitle>host</refentrytitle>
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence <manvolnum>1</manvolnum>
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence <refmiscinfo>BIND9</refmiscinfo>
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence </refmeta>
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence <refnamediv>
904a5734375869ffb504ed8cde6b68cafadb6d64Bob Halley <refname>host</refname>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley <refpurpose>DNS lookup utility</refpurpose>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley </refnamediv>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <docinfo>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <copyright>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <year>2004</year>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <year>2005</year>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <year>2007</year>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
bcff3198111e329e89cde7dac9d432b002477d80Mark Andrews </copyright>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <copyright>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <year>2000</year>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <year>2001</year>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <year>2002</year>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <holder>Internet Software Consortium.</holder>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington </copyright>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington </docinfo>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley
84cb41f729e2a8526300dd7a6cffaa66da5cf6cdMark Andrews <refsynopsisdiv>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <cmdsynopsis>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <command>host</command>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <arg><option>-aCdlnrsTwv</option></arg>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <arg><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <arg><option>-R <replaceable class="parameter">number</replaceable></option></arg>
618e871c2eb80021673bedf083496ccd1bf65cd0Brian Wellington <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <arg><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <arg><option>-m <replaceable class="parameter">flag</replaceable></option></arg>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <arg><option>-4</option></arg>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <arg><option>-6</option></arg>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <arg choice="req">name</arg>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <arg choice="opt">server</arg>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington </cmdsynopsis>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington </refsynopsisdiv>
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington <refsect1>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley <title>DESCRIPTION</title>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley
b55c30f2de6e1baaa3a9ba69b92f428f2c255ac3Mark Andrews <para><command>host</command>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley is a simple utility for performing DNS lookups.
308c7ad5f68301d19f023af616f62f3e7cbce632Andreas Gustafsson It is normally used to convert names to IP addresses and vice versa.
04b8111f2137a9cf9b0b71228f76b3e40ffa1173Brian Wellington When no arguments or options are given,
04b8111f2137a9cf9b0b71228f76b3e40ffa1173Brian Wellington <command>host</command>
ccad3c9ecbe8a1060ff7b407a318ccd592de536eBrian Wellington prints a short summary of its command line arguments and options.
ccad3c9ecbe8a1060ff7b407a318ccd592de536eBrian Wellington </para>
ccad3c9ecbe8a1060ff7b407a318ccd592de536eBrian Wellington
ccad3c9ecbe8a1060ff7b407a318ccd592de536eBrian Wellington <para><parameter>name</parameter> is the domain name that is to be
ccad3c9ecbe8a1060ff7b407a318ccd592de536eBrian Wellington looked
8224be5129daebea8f0f5e8be5f925679ec893f1Brian Wellington up. It can also be a dotted-decimal IPv4 address or a colon-delimited
8224be5129daebea8f0f5e8be5f925679ec893f1Brian Wellington IPv6 address, in which case <command>host</command> will by
a413f94248ceed48a6b7aaa2fa1d2401fb8b9f30Brian Wellington default
d14b749789121d9d502fa1348e9e73270e9b039fBob Halley perform a reverse lookup for that address.
63d1ef9e771b748ca9bf241dfc1f07d3730203faBob Halley <parameter>server</parameter> is an optional argument which
659175b7d430afe13b439e499442a964e2c9110fMark Andrews is either
cd02757774252fe5b92dbd59a24b34721fb49ff4Bob Halley the name or IP address of the name server that <command>host</command>
cd02757774252fe5b92dbd59a24b34721fb49ff4Bob Halley should query instead of the server or servers listed in
7b4dcbb89b71b17f5c16ca19a0e705e09509f063Bob Halley <filename>/etc/resolv.conf</filename>.
73af6575e00f8cf4942abce177f435797b9cfe41Brian Wellington </para>
322b0fb39dd1538c9f5021cd2f54d4c12684ecdbBrian Wellington
3864eb0e9a73148ac744893b5367169761184db5Mark Andrews <para>
f53e43c37f2c978ccec0b49ed829426b213f9933Bob Halley The <option>-a</option> (all) option is equivalent to setting the
afbc02482008c58af2c98000209165f6880835f7Mark Andrews <option>-v</option> option and asking <command>host</command> to make
e1f16346db02486f751c6db683fffe53c866c186Andreas Gustafsson a query of type ANY.
e1f16346db02486f751c6db683fffe53c866c186Andreas Gustafsson </para>
2ee24549b3dddd4046ee14257e1207cf2e34f29cBrian Wellington
9ac7076ebad044afb15e9e2687e3696868778538Mark Andrews <para>
6850cdd4497424c9d42ade487edfde9fb9a47de9Brian Wellington When the <option>-C</option> option is used, <command>host</command>
20a313a4581e7f85fb2ce37430a146b3538da841Mark Andrews will attempt to display the SOA records for zone
20a313a4581e7f85fb2ce37430a146b3538da841Mark Andrews <parameter>name</parameter> from all the listed
b20ee662a7c847c9ef7b96ab9e5e34543efe5c0dMark Andrews authoritative name
b55c30f2de6e1baaa3a9ba69b92f428f2c255ac3Mark Andrews servers for that zone. The list of name servers is defined by the NS
e21d199dca95aff5d50f133d6b064309e209af00Brian Wellington records that are found for the zone.
6a56be50dd11702cb65347a57894ffd96a7e3501Andreas Gustafsson </para>
1275a72e8db349ce249c84804b2b4861d33d4db7Brian Wellington
15af30dfc1c54a02d252dcf4c6f3b8759eaf0327Bob Halley <para>
15af30dfc1c54a02d252dcf4c6f3b8759eaf0327Bob Halley The <option>-c</option> option instructs to make a DNS query of class
58cbc05eb0b80510182496ad905cd407f3624dbeBrian Wellington <parameter>class</parameter>. This can be used to lookup
a93cf7e83be621d3d68f51e37121a47a70a6757bMark Andrews Hesiod or
9ac7076ebad044afb15e9e2687e3696868778538Mark Andrews Chaosnet class resource records. The default class is IN (Internet).
5ea0d11ca45bfd1ea9db8db07f18fbb02f500661Brian Wellington </para>
a9ef4854464fcc56d95f72331b6e09e9563bb5f3Andreas Gustafsson
2c64908ae0d5b5a1cfead295d7526e7be550d3d3Mark Andrews <para>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley Verbose output is generated by <command>host</command> when
2c64908ae0d5b5a1cfead295d7526e7be550d3d3Mark Andrews the
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley <option>-d</option> or <option>-v</option> option is used. The two
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley options are equivalent. They have been provided for backwards
894a2f61c9e3e51463bf21957c003d7c5636bdc5David Lawrence compatibility. In previous versions, the <option>-d</option> option
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley switched on debugging traces and <option>-v</option> enabled verbose
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley output.
894a2f61c9e3e51463bf21957c003d7c5636bdc5David Lawrence </para>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley <para>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley List mode is selected by the <option>-l</option> option. This makes
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley <command>host</command> perform a zone transfer for zone
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley <parameter>name</parameter>. Transfer the zone printing out
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley the NS, PTR
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley and address records (A/AAAA). If combined with <option>-a</option>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley all records will be printed.
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley </para>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley <para>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley The <option>-i</option>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley option specifies that reverse lookups of IPv6 addresses should
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley use the IP6.INT domain as defined in RFC1886.
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley The default is to use IP6.ARPA.
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington </para>
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley <para>
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley The <option>-N</option> option sets the number of dots that have to be
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence in <parameter>name</parameter> for it to be considered
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence absolute. The
6d12fdf96621801e80f3f4c2a8a569fe48766a20David Lawrence default value is that defined using the ndots statement in
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence <filename>/etc/resolv.conf</filename>, or 1 if no ndots
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence statement is
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence present. Names with fewer dots are interpreted as relative names and
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence will be searched for in the domains listed in the <type>search</type>
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence or <type>domain</type> directive in
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence <filename>/etc/resolv.conf</filename>.
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid Lawrence </para>
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley
904a5734375869ffb504ed8cde6b68cafadb6d64Bob Halley <para>
904a5734375869ffb504ed8cde6b68cafadb6d64Bob Halley The number of UDP retries for a lookup can be changed with the
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley <option>-R</option> option. <parameter>number</parameter>
indicates
how many times <command>host</command> will repeat a query
that does
not get answered. The default number of retries is 1. If
<parameter>number</parameter> is negative or zero, the
number of
retries will default to 1.
</para>
<para>
Non-recursive queries can be made via the <option>-r</option> option.
Setting this option clears the <type>RD</type> &mdash; recursion
desired &mdash; bit in the query which <command>host</command> makes.
This should mean that the name server receiving the query will not
attempt to resolve <parameter>name</parameter>. The
<option>-r</option> option enables <command>host</command>
to mimic
the behavior of a name server by making non-recursive queries and
expecting to receive answers to those queries that are usually
referrals to other name servers.
</para>
<para>
By default <command>host</command> uses UDP when making
queries. The
<option>-T</option> option makes it use a TCP connection when querying
the name server. TCP will be automatically selected for queries that
require it, such as zone transfer (AXFR) requests.
</para>
<para>
The <option>-4</option> option forces <command>host</command> to only
use IPv4 query transport. The <option>-6</option> option forces
<command>host</command> to only use IPv6 query transport.
</para>
<para>
The <option>-t</option> option is used to select the query type.
<parameter>type</parameter> can be any recognized query
type: CNAME,
NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
<command>host</command> automatically selects an appropriate
query
type. By default it looks for A, AAAA, and MX records, but if the
<option>-C</option> option was given, queries will be made for SOA
records, and if <parameter>name</parameter> is a
dotted-decimal IPv4
address or colon-delimited IPv6 address, <command>host</command> will
query for PTR records. If a query type of IXFR is chosen the starting
serial number can be specified by appending an equal followed by the
starting serial number (e.g. -t IXFR=12345678).
</para>
<para>
The time to wait for a reply can be controlled through the
<option>-W</option> and <option>-w</option> options. The
<option>-W</option> option makes <command>host</command>
wait for
<parameter>wait</parameter> seconds. If <parameter>wait</parameter>
is less than one, the wait interval is set to one second. When the
<option>-w</option> option is used, <command>host</command>
will
effectively wait forever for a reply. The time to wait for a response
will be set to the number of seconds given by the hardware's maximum
value for an integer quantity.
</para>
<para>
The <option>-s</option> option tells <command>host</command>
<emphasis>not</emphasis> to send the query to the next nameserver
if any server responds with a SERVFAIL response, which is the
reverse of normal stub resolver behavior.
</para>
<para>
The <option>-m</option> can be used to set the memory usage debugging
flags
<parameter>record</parameter>, <parameter>usage</parameter> and
<parameter>trace</parameter>.
</para>
</refsect1>
<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:
-->