294N/A<!
DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 787N/A [<!ENTITY mdash "—">]>
789N/A - Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC") 789N/A - Copyright (C) 2000-2002 Internet Software Consortium. 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. 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 <
date>January 20, 2009</
date>
789N/A <
refentrytitle>host</
refentrytitle>
789N/A <
manvolnum>1</
manvolnum>
789N/A <
refmiscinfo>BIND9</
refmiscinfo>
911N/A <
refname>host</
refname>
911N/A <
refpurpose>DNS lookup utility</
refpurpose>
294N/A <
holder>Internet Systems Consortium, Inc. ("ISC")</
holder>
789N/A <
holder>Internet Software Consortium.</
holder>
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>
789N/A <
title>DESCRIPTION</
title>
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><
parameter>name</
parameter> is the domain name that is to be
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 perform a reverse lookup for that address.
294N/A <
parameter>server</
parameter> is an optional argument which
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
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
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 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 The <
option>-c</
option> option instructs to make a DNS query of class
787N/A <
parameter>class</
parameter>. This can be used to lookup
294N/A Chaosnet class resource records. The default class is IN (Internet).
294N/A Verbose output is generated by <
command>host</
command> when
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 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 and address records (
A/
AAAA). If combined with <
option>-a</
option>
911N/A all records will be printed.
911N/A The <
option>-i</
option>
869N/A option specifies that reverse lookups of IPv6 addresses should
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 default value is that defined using the ndots statement in
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 The number of UDP retries for a lookup can be changed with the
789N/A <
option>-R</
option> option. <
parameter>number</
parameter>
877N/A how many times <
command>host</
command> will repeat a query
877N/A not get answered. The default number of retries is 1. If
869N/A <
parameter>number</
parameter> is negative or zero, the
868N/A retries will default to 1.
868N/A Non-recursive queries can be made via the <
option>-r</
option> option.
789N/A Setting this option clears the <
type>RD</
type> — recursion
911N/A desired — 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>
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.
872N/A By default, <
command>host</
command> uses UDP when making
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.
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 The <
option>-t</
option> option is used to select the query type.
870N/A <
parameter>type</
parameter> can be any recognized query
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 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 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).
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 <
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 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.
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.
869N/A The <
option>-m</
option> can be used to set the memory usage debugging
869N/A <
parameter>record</
parameter>, <
parameter>usage</
parameter> and
869N/A <
parameter>trace</
parameter>.
294N/A <
title>IDN SUPPORT</
title>
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 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.
789N/A <
title>SEE ALSO</
title>
789N/A <
refentrytitle>dig</
refentrytitle><
manvolnum>1</
manvolnum>
789N/A <
refentrytitle>named</
refentrytitle><
manvolnum>8</
manvolnum>