host.docbook revision 4d86cda3d7eb31578c9088c51a26643d43799533
38dc50ae00a1ea57fa41500d74f4e818747e3cefpquerna<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
c330021bf3f45cbf187fa644781e67f7e470a58awrowe - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
ecf8d72af432e53e4c0661fb99dfda8061507bfajerenkrantz - Copyright (C) 2000-2002 Internet Software Consortium.
366616a5cc6212cbf7134ccf877f965d668c6b04wrowe - Permission to use, copy, modify, and distribute this software for any
366616a5cc6212cbf7134ccf877f965d668c6b04wrowe - purpose with or without fee is hereby granted, provided that the above
366616a5cc6212cbf7134ccf877f965d668c6b04wrowe - copyright notice and this permission notice appear in all copies.
366616a5cc6212cbf7134ccf877f965d668c6b04wrowe - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
366616a5cc6212cbf7134ccf877f965d668c6b04wrowe - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
366616a5cc6212cbf7134ccf877f965d668c6b04wrowe - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
366616a5cc6212cbf7134ccf877f965d668c6b04wrowe - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
366616a5cc6212cbf7134ccf877f965d668c6b04wrowe - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
366616a5cc6212cbf7134ccf877f965d668c6b04wrowe - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
366616a5cc6212cbf7134ccf877f965d668c6b04wrowe - PERFORMANCE OF THIS SOFTWARE.
366616a5cc6212cbf7134ccf877f965d668c6b04wrowe<!-- $Id: host.docbook,v 1.7 2004/11/10 22:04:25 marka Exp $ -->
366616a5cc6212cbf7134ccf877f965d668c6b04wrowe<refentryinfo>
ecf8d72af432e53e4c0661fb99dfda8061507bfajerenkrantz</refentryinfo>
6507aa1a5709a9122f2e0b9be8bb9bd6d78715c3pquerna<refnamediv>
af4c982a7cf4515f124935f99a329744035fc699slive</refnamediv>
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe<refsynopsisdiv>
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<cmdsynopsis>
ecf8d72af432e53e4c0661fb99dfda8061507bfajerenkrantz <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe <arg><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
ecf8d72af432e53e4c0661fb99dfda8061507bfajerenkrantz <arg><option>-R <replaceable class="parameter">number</replaceable></option></arg>
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
ecf8d72af432e53e4c0661fb99dfda8061507bfajerenkrantz <arg><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe <arg><option>-m <replaceable class="parameter">flag</replaceable></option></arg>
4b62424416882687387923b3130b96241503cbe0jerenkrantz</cmdsynopsis>
5ca8e11fadb6f7a8d9d0367c1800205c99d4bcd6jerenkrantz</refsynopsisdiv>
a74ee4396fe11ffc1ca05837a59e497c905eedc3sfis a simple utility for performing DNS lookups.
a74ee4396fe11ffc1ca05837a59e497c905eedc3sfIt is normally used to convert names to IP addresses and vice versa.
a74ee4396fe11ffc1ca05837a59e497c905eedc3sfWhen no arguments or options are given,
a74ee4396fe11ffc1ca05837a59e497c905eedc3sfprints a short summary of its command line arguments and options.
027152d4123d6398caff068774c3b1e36caaa76asf<parameter>name</parameter> is the domain name that is to be looked
cdccf2ac94172d1a4a54bc2e17324e1ef682ccf3pquernaup. It can also be a dotted-decimal IPv4 address or a colon-delimited
cdccf2ac94172d1a4a54bc2e17324e1ef682ccf3pquernaIPv6 address, in which case <command>host</command> will by default
cdccf2ac94172d1a4a54bc2e17324e1ef682ccf3pquernaperform a reverse lookup for that address.
a74ee4396fe11ffc1ca05837a59e497c905eedc3sf<parameter>server</parameter> is an optional argument which is either
a74ee4396fe11ffc1ca05837a59e497c905eedc3sfthe name or IP address of the name server that <command>host</command>
a74ee4396fe11ffc1ca05837a59e497c905eedc3sfshould query instead of the server or servers listed in
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweThe <option>-a</option> (all) option is equivalent to setting the
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<option>-v</option> option and asking <command>host</command> to make
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowea query of type ANY.
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweWhen the <option>-C</option> option is used, <command>host</command>
0db0abcbe4211435c08e0c0e8f5daa278bed3524wsanchezwill attempt to display the SOA records for zone
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<parameter>name</parameter> from all the listed authoritative name
0db0abcbe4211435c08e0c0e8f5daa278bed3524wsanchezservers for that zone. The list of name servers is defined by the NS
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowerecords that are found for the zone.
bce58f79020e39e5ac5de398fe08b4f8a1e19970pgollucciThe <option>-c</option> option instructs to make a DNS query of class
62f7716b14b71603a8004434ca3536902bfb8899wrowe<parameter>class</parameter>. This can be used to lookup Hesiod or
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzChaosnet class resource records. The default class is IN (Internet).
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweVerbose output is generated by <command>host</command> when the
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<option>-d</option> or <option>-v</option> option is used. The two
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweoptions are equivalent. They have been provided for backwards
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzcompatibility. In previous versions, the <option>-d</option> option
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweswitched on debugging traces and <option>-v</option> enabled verbose
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweList mode is selected by the <option>-l</option> option. This makes
bce58f79020e39e5ac5de398fe08b4f8a1e19970pgollucci<command>host</command> perform a zone transfer for zone
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<parameter>name</parameter>. Transfer the zone printing out the NS, PTR
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweand address records (A/AAAA). If combined with <option>-a</option>
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzall records will be printed.
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweoption specifies that reverse lookups of IPv6 addresses should
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzuse the IP6.INT domain as defined in RFC1886.
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweThe default is to use IP6.ARPA.
53e66a2931d02e84628ba946055cc92e56b43db8wroweThe <option>-N</option> option sets the number of dots that have to be
53e66a2931d02e84628ba946055cc92e56b43db8wrowein <parameter>name</parameter> for it to be considered absolute. The
53e66a2931d02e84628ba946055cc92e56b43db8wrowedefault value is that defined using the ndots statement in
53e66a2931d02e84628ba946055cc92e56b43db8wrowe<filename>/etc/resolv.conf</filename>, or 1 if no ndots statement is
1b3f48fd6b1ccb8745f908e40156c5a85ca3c347jerenkrantzpresent. Names with fewer dots are interpreted as relative names and
b05930e6008f69bd323abe0c10f81f40ffd27983brianpwill be searched for in the domains listed in the <type>search</type>
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweThe number of UDP retries for a lookup can be changed with the
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<option>-R</option> option. <parameter>number</parameter> indicates
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowehow many times <command>host</command> will repeat a query that does
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowenot get answered. The default number of retries is 1. If
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<parameter>number</parameter> is negative or zero, the number of
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweretries will default to 1.
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweNon-recursive queries can be made via the <option>-r</option> option.
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweSetting this option clears the <type>RD</type> — recursion
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowedesired — bit in the query which <command>host</command> makes.
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweThis should mean that the name server receiving the query will not
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<option>-r</option> option enables <command>host</command> to mimic
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowethe behaviour of a name server by making non-recursive queries and
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweexpecting to receive answers to those queries that are usually
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowereferrals to other name servers.
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweBy default <command>host</command> uses UDP when making queries. The
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<option>-T</option> option makes it use a TCP connection when querying
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowethe name server. TCP will be automatically selected for queries that
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowerequire it, such as zone transfer (AXFR) requests.
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweThe <option>-4</option> option forces <command>host</command> to only
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweuse IPv4 query transport. The <option>-6</option> option forces
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<command>host</command> to only use IPv6 query transport.
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweThe <option>-t</option> option is used to select the query type.
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<parameter>type</parameter> can be any recognised query type: CNAME,
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweNS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<command>host</command> automatically selects an appropriate query
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowetype. By default it looks for A records, but if the
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<option>-C</option> option was given, queries will be made for SOA
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowerecords, and if <parameter>name</parameter> is a dotted-decimal IPv4
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweaddress or colon-delimited IPv6 address, <command>host</command> will
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowequery for PTR records. If a query type of IXFR is chosen the starting
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweserial number can be specified by appending an equal followed by the
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowestarting serial number (e.g. -t IXFR=12345678).
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweThe time to wait for a reply can be controlled through the
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<option>-W</option> and <option>-w</option> options. The
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<option>-W</option> option makes <command>host</command> wait for
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<parameter>wait</parameter> seconds. If <parameter>wait</parameter>
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweis less than one, the wait interval is set to one second. When the
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<option>-w</option> option is used, <command>host</command> will
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweeffectively wait forever for a reply. The time to wait for a response
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowewill be set to the number of seconds given by the hardware's maximum
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowevalue for an integer quantity.
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewroweThe <option>-m</option> can be used to set the memory usage debugging flags
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<parameter>record</parameter>, <parameter>usage</parameter> and
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<citerefentry>
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe</citerefentry>,
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<citerefentry>
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
9e86ff266f053757dd96dab7cf4bc53aaaaa583ewrowe</citerefentry>.