host.docbook revision 19c7b1a0293498a3e36692c59646ed6e15ffc8d0
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<!ENTITY mdash "—">]>
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin - Copyright (C) 2004, 2005, 2007-2009, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - Copyright (C) 2000-2002 Internet Software Consortium.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin - Permission to use, copy, modify, and/or distribute this software for any
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - purpose with or without fee is hereby granted, provided that the above
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - copyright notice and this permission notice appear in all copies.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin - PERFORMANCE OF THIS SOFTWARE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<!-- Converted by db4-upgrade version 1.0 -->
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="man.host">
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <refentryinfo>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin </refentryinfo>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin </refmeta>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <refnamediv>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin </refnamediv>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <copyright>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin </copyright>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <copyright>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin </copyright>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin </docinfo>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <refsynopsisdiv>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <arg choice="opt" rep="norepeat"><option>-aCdlnrsTwv</option></arg>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <arg choice="opt" rep="norepeat"><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <arg choice="opt" rep="norepeat"><option>-R <replaceable class="parameter">number</replaceable></option></arg>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <arg choice="opt" rep="norepeat"><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <arg choice="opt" rep="norepeat"><option>-m <replaceable class="parameter">flag</replaceable></option></arg>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <arg choice="opt" rep="norepeat"><option>-4</option></arg>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <arg choice="opt" rep="norepeat"><option>-6</option></arg>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <arg choice="opt" rep="norepeat"><option>-v</option></arg>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <arg choice="opt" rep="norepeat"><option>-V</option></arg>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin </cmdsynopsis>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin </refsynopsisdiv>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin is a simple utility for performing DNS lookups.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin It is normally used to convert names to IP addresses and vice versa.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin When no arguments or options are given,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin prints a short summary of its command line arguments and options.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <para><parameter>name</parameter> is the domain name that is to be
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin up. It can also be a dotted-decimal IPv4 address or a colon-delimited
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin IPv6 address, in which case <command>host</command> will by
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin perform a reverse lookup for that address.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <parameter>server</parameter> is an optional argument which
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin the name or IP address of the name server that <command>host</command>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin should query instead of the server or servers listed in
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin The <option>-a</option> (all) option is equivalent to setting the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <option>-v</option> option and asking <command>host</command> to make
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin a query of type ANY.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin When the <option>-C</option> option is used, <command>host</command>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin will attempt to display the SOA records for zone
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin authoritative name
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin servers for that zone. The list of name servers is defined by the NS
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin records that are found for the zone.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin The <option>-c</option> option instructs to make a DNS query of class
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <parameter>class</parameter>. This can be used to lookup
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Chaosnet class resource records. The default class is IN (Internet).
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Verbose output is generated by <command>host</command> when
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <option>-d</option> or <option>-v</option> option is used. The two
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin options are equivalent. They have been provided for backwards
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin compatibility. In previous versions, the <option>-d</option> option
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin switched on debugging traces and <option>-v</option> enabled verbose
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin output. Verbose output can also be enabled by setting the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin List mode is selected by the <option>-l</option> option. This makes
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <command>host</command> perform a zone transfer for zone
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <parameter>name</parameter>. Transfer the zone printing out
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin the NS, PTR
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin and address records (A/AAAA). If combined with <option>-a</option>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin all records will be printed.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin option specifies that reverse lookups of IPv6 addresses should
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin use the IP6.INT domain as defined in RFC1886.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin The default is to use IP6.ARPA.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin The <option>-N</option> option sets the number of dots that have to be
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin absolute. The
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin default value is that defined using the ndots statement in
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <filename>/etc/resolv.conf</filename>, or 1 if no ndots
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin statement is
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin present. Names with fewer dots are interpreted as relative names and
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin will be searched for in the domains listed in the <type>search</type>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin The number of UDP retries for a lookup can be changed with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <option>-R</option> option. <parameter>number</parameter>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin how many times <command>host</command> will repeat a query
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin not get answered. If
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin retries will default to 1. The default value is 1, or
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin the value of the <parameter>attempts</parameter> option in
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Non-recursive queries can be made via the <option>-r</option> option.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin Setting this option clears the <type>RD</type> — recursion
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin desired — bit in the query which <command>host</command> makes.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin This should mean that the name server receiving the query will not
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <option>-r</option> option enables <command>host</command>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin the behavior of a name server by making non-recursive queries and
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin expecting to receive answers to those queries that are usually
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin referrals to other name servers.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin By default, <command>host</command> uses UDP when making
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin queries. The
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <option>-T</option> option makes it use a TCP connection when querying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin the name server. TCP will be automatically selected for queries that
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin require it, such as zone transfer (AXFR) requests.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin The <option>-4</option> option forces <command>host</command> to only
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin use IPv4 query transport. The <option>-6</option> option forces
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <command>host</command> to only use IPv6 query transport.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin The <option>-t</option> option is used to select the query type.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <parameter>type</parameter> can be any recognized query
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin type: CNAME,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <command>host</command> automatically selects an appropriate
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin type. By default, it looks for A, AAAA, and MX records, but if the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin <option>-C</option> option was given, queries will be made for SOA
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin dotted-decimal IPv4
starting serial number (e.g. -t IXFR=12345678).