1170222Sdougb<!--
2254402Serwin - Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC")
3170222Sdougb - Copyright (C) 2000-2003 Internet Software Consortium.
4170222Sdougb - 
5204619Sdougb - Permission to use, copy, modify, and/or distribute this software for any
6170222Sdougb - purpose with or without fee is hereby granted, provided that the above
7170222Sdougb - copyright notice and this permission notice appear in all copies.
8170222Sdougb - 
9170222Sdougb - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10170222Sdougb - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11170222Sdougb - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12170222Sdougb - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13170222Sdougb - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14170222Sdougb - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15170222Sdougb - PERFORMANCE OF THIS SOFTWARE.
16170222Sdougb-->
17234010Sdougb<!-- $Id$ -->
18170222Sdougb<html>
19170222Sdougb<head>
20170222Sdougb<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21170222Sdougb<title>host</title>
22170222Sdougb<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
23170222Sdougb<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
24170222Sdougb<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
25170222Sdougb<link rel="prev" href="man.dig.html" title="dig">
26254897Serwin<link rel="next" href="man.dnssec-checkds.html" title="dnssec-checkds">
27170222Sdougb</head>
28170222Sdougb<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
29170222Sdougb<div class="navheader">
30170222Sdougb<table width="100%" summary="Navigation header">
31170222Sdougb<tr><th colspan="3" align="center">host</th></tr>
32170222Sdougb<tr>
33170222Sdougb<td width="20%" align="left">
34170222Sdougb<a accesskey="p" href="man.dig.html">Prev</a>�</td>
35170222Sdougb<th width="60%" align="center">Manual pages</th>
36254897Serwin<td width="20%" align="right">�<a accesskey="n" href="man.dnssec-checkds.html">Next</a>
37170222Sdougb</td>
38170222Sdougb</tr>
39170222Sdougb</table>
40170222Sdougb<hr>
41170222Sdougb</div>
42170222Sdougb<div class="refentry" lang="en">
43170222Sdougb<a name="man.host"></a><div class="titlepage"></div>
44170222Sdougb<div class="refnamediv">
45170222Sdougb<h2>Name</h2>
46170222Sdougb<p>host &#8212; DNS lookup utility</p>
47170222Sdougb</div>
48170222Sdougb<div class="refsynopsisdiv">
49170222Sdougb<h2>Synopsis</h2>
50170222Sdougb<div class="cmdsynopsis"><p><code class="command">host</code>  [<code class="option">-aCdlnrsTwv</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-N <em class="replaceable"><code>ndots</code></em></code>] [<code class="option">-R <em class="replaceable"><code>number</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-W <em class="replaceable"><code>wait</code></em></code>] [<code class="option">-m <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] {name} [server]</p></div>
51170222Sdougb</div>
52170222Sdougb<div class="refsect1" lang="en">
53262706Serwin<a name="id2612021"></a><h2>DESCRIPTION</h2>
54170222Sdougb<p><span><strong class="command">host</strong></span>
55170222Sdougb      is a simple utility for performing DNS lookups.
56170222Sdougb      It is normally used to convert names to IP addresses and vice versa.
57170222Sdougb      When no arguments or options are given,
58170222Sdougb      <span><strong class="command">host</strong></span>
59170222Sdougb      prints a short summary of its command line arguments and options.
60170222Sdougb    </p>
61170222Sdougb<p><em class="parameter"><code>name</code></em> is the domain name that is to be
62170222Sdougb      looked
63170222Sdougb      up.  It can also be a dotted-decimal IPv4 address or a colon-delimited
64170222Sdougb      IPv6 address, in which case <span><strong class="command">host</strong></span> will by
65170222Sdougb      default
66170222Sdougb      perform a reverse lookup for that address.
67170222Sdougb      <em class="parameter"><code>server</code></em> is an optional argument which
68170222Sdougb      is either
69170222Sdougb      the name or IP address of the name server that <span><strong class="command">host</strong></span>
70170222Sdougb      should query instead of the server or servers listed in
71170222Sdougb      <code class="filename">/etc/resolv.conf</code>.
72170222Sdougb    </p>
73170222Sdougb<p>
74170222Sdougb      The <code class="option">-a</code> (all) option is equivalent to setting the
75170222Sdougb      <code class="option">-v</code> option and asking <span><strong class="command">host</strong></span> to make
76170222Sdougb      a query of type ANY.
77170222Sdougb    </p>
78170222Sdougb<p>
79170222Sdougb      When the <code class="option">-C</code> option is used, <span><strong class="command">host</strong></span>
80170222Sdougb      will attempt to display the SOA records for zone
81170222Sdougb      <em class="parameter"><code>name</code></em> from all the listed
82170222Sdougb      authoritative name
83170222Sdougb      servers for that zone.  The list of name servers is defined by the NS
84170222Sdougb      records that are found for the zone.
85170222Sdougb    </p>
86170222Sdougb<p>
87170222Sdougb      The <code class="option">-c</code> option instructs to make a DNS query of class
88170222Sdougb      <em class="parameter"><code>class</code></em>.  This can be used to lookup
89170222Sdougb      Hesiod or
90170222Sdougb      Chaosnet class resource records.  The default class is IN (Internet).
91170222Sdougb    </p>
92170222Sdougb<p>
93170222Sdougb      Verbose output is generated by <span><strong class="command">host</strong></span> when
94170222Sdougb      the
95170222Sdougb      <code class="option">-d</code> or <code class="option">-v</code> option is used.  The two
96170222Sdougb      options are equivalent.  They have been provided for backwards
97170222Sdougb      compatibility.  In previous versions, the <code class="option">-d</code> option
98170222Sdougb      switched on debugging traces and <code class="option">-v</code> enabled verbose
99170222Sdougb      output.
100170222Sdougb    </p>
101170222Sdougb<p>
102170222Sdougb      List mode is selected by the <code class="option">-l</code> option.  This makes
103170222Sdougb      <span><strong class="command">host</strong></span> perform a zone transfer for zone
104170222Sdougb      <em class="parameter"><code>name</code></em>.  Transfer the zone printing out
105170222Sdougb      the NS, PTR
106170222Sdougb      and address records (A/AAAA).  If combined with <code class="option">-a</code>
107170222Sdougb      all records will be printed.
108170222Sdougb    </p>
109170222Sdougb<p>
110170222Sdougb      The <code class="option">-i</code>
111170222Sdougb      option specifies that reverse lookups of IPv6 addresses should
112170222Sdougb      use the IP6.INT domain as defined in RFC1886.
113170222Sdougb      The default is to use IP6.ARPA.
114170222Sdougb    </p>
115170222Sdougb<p>
116170222Sdougb      The <code class="option">-N</code> option sets the number of dots that have to be
117170222Sdougb      in <em class="parameter"><code>name</code></em> for it to be considered
118170222Sdougb      absolute.  The
119170222Sdougb      default value is that defined using the ndots statement in
120170222Sdougb      <code class="filename">/etc/resolv.conf</code>, or 1 if no ndots
121170222Sdougb      statement is
122170222Sdougb      present.  Names with fewer dots are interpreted as relative names and
123170222Sdougb      will be searched for in the domains listed in the <span class="type">search</span>
124170222Sdougb      or <span class="type">domain</span> directive in
125170222Sdougb      <code class="filename">/etc/resolv.conf</code>.
126170222Sdougb    </p>
127170222Sdougb<p>
128170222Sdougb      The number of UDP retries for a lookup can be changed with the
129170222Sdougb      <code class="option">-R</code> option.  <em class="parameter"><code>number</code></em>
130170222Sdougb      indicates
131170222Sdougb      how many times <span><strong class="command">host</strong></span> will repeat a query
132170222Sdougb      that does
133170222Sdougb      not get answered.  The default number of retries is 1.  If
134170222Sdougb      <em class="parameter"><code>number</code></em> is negative or zero, the
135170222Sdougb      number of
136170222Sdougb      retries will default to 1.
137170222Sdougb    </p>
138170222Sdougb<p>
139170222Sdougb      Non-recursive queries can be made via the <code class="option">-r</code> option.
140170222Sdougb      Setting this option clears the <span class="type">RD</span> &#8212; recursion
141170222Sdougb      desired &#8212; bit in the query which <span><strong class="command">host</strong></span> makes.
142170222Sdougb      This should mean that the name server receiving the query will not
143170222Sdougb      attempt to resolve <em class="parameter"><code>name</code></em>.  The
144170222Sdougb      <code class="option">-r</code> option enables <span><strong class="command">host</strong></span>
145170222Sdougb      to mimic
146174187Sdougb      the behavior of a name server by making non-recursive queries and
147170222Sdougb      expecting to receive answers to those queries that are usually
148170222Sdougb      referrals to other name servers.
149170222Sdougb    </p>
150170222Sdougb<p>
151193149Sdougb      By default, <span><strong class="command">host</strong></span> uses UDP when making
152170222Sdougb      queries.  The
153170222Sdougb      <code class="option">-T</code> option makes it use a TCP connection when querying
154170222Sdougb      the name server.  TCP will be automatically selected for queries that
155170222Sdougb      require it, such as zone transfer (AXFR) requests.
156170222Sdougb    </p>
157170222Sdougb<p>
158170222Sdougb      The <code class="option">-4</code> option forces <span><strong class="command">host</strong></span> to only
159170222Sdougb      use IPv4 query transport.  The <code class="option">-6</code> option forces
160170222Sdougb      <span><strong class="command">host</strong></span> to only use IPv6 query transport.
161170222Sdougb    </p>
162170222Sdougb<p>
163170222Sdougb      The <code class="option">-t</code> option is used to select the query type.
164174187Sdougb      <em class="parameter"><code>type</code></em> can be any recognized query
165170222Sdougb      type: CNAME,
166170222Sdougb      NS, SOA, SIG, KEY, AXFR, etc.  When no query type is specified,
167170222Sdougb      <span><strong class="command">host</strong></span> automatically selects an appropriate
168170222Sdougb      query
169193149Sdougb      type.  By default, it looks for A, AAAA, and MX records, but if the
170170222Sdougb      <code class="option">-C</code> option was given, queries will be made for SOA
171170222Sdougb      records, and if <em class="parameter"><code>name</code></em> is a
172170222Sdougb      dotted-decimal IPv4
173170222Sdougb      address or colon-delimited IPv6 address, <span><strong class="command">host</strong></span> will
174170222Sdougb      query for PTR records.  If a query type of IXFR is chosen the starting
175170222Sdougb      serial number can be specified by appending an equal followed by the
176170222Sdougb      starting serial number (e.g. -t IXFR=12345678).
177170222Sdougb    </p>
178170222Sdougb<p>
179170222Sdougb      The time to wait for a reply can be controlled through the
180170222Sdougb      <code class="option">-W</code> and <code class="option">-w</code> options.  The
181170222Sdougb      <code class="option">-W</code> option makes <span><strong class="command">host</strong></span>
182170222Sdougb      wait for
183170222Sdougb      <em class="parameter"><code>wait</code></em> seconds.  If <em class="parameter"><code>wait</code></em>
184170222Sdougb      is less than one, the wait interval is set to one second.  When the
185170222Sdougb      <code class="option">-w</code> option is used, <span><strong class="command">host</strong></span>
186170222Sdougb      will
187170222Sdougb      effectively wait forever for a reply.  The time to wait for a response
188170222Sdougb      will be set to the number of seconds given by the hardware's maximum
189170222Sdougb      value for an integer quantity.
190170222Sdougb    </p>
191170222Sdougb<p>
192170222Sdougb      The <code class="option">-s</code> option tells <span><strong class="command">host</strong></span> 
193170222Sdougb      <span class="emphasis"><em>not</em></span> to send the query to the next nameserver
194170222Sdougb      if any server responds with a SERVFAIL response, which is the
195174187Sdougb      reverse of normal stub resolver behavior.
196170222Sdougb    </p>
197170222Sdougb<p>
198170222Sdougb      The <code class="option">-m</code> can be used to set the memory usage debugging
199170222Sdougb      flags
200170222Sdougb      <em class="parameter"><code>record</code></em>, <em class="parameter"><code>usage</code></em> and
201170222Sdougb      <em class="parameter"><code>trace</code></em>.
202170222Sdougb    </p>
203170222Sdougb</div>
204170222Sdougb<div class="refsect1" lang="en">
205262706Serwin<a name="id2612535"></a><h2>IDN SUPPORT</h2>
206170222Sdougb<p>
207170222Sdougb      If <span><strong class="command">host</strong></span> has been built with IDN (internationalized
208170222Sdougb      domain name) support, it can accept and display non-ASCII domain names. 
209170222Sdougb      <span><strong class="command">host</strong></span> appropriately converts character encoding of
210170222Sdougb      domain name before sending a request to DNS server or displaying a
211170222Sdougb      reply from the server.
212170222Sdougb      If you'd like to turn off the IDN support for some reason, defines
213170222Sdougb      the <code class="envar">IDN_DISABLE</code> environment variable.
214170222Sdougb      The IDN support is disabled if the variable is set when
215170222Sdougb      <span><strong class="command">host</strong></span> runs.
216170222Sdougb    </p>
217170222Sdougb</div>
218170222Sdougb<div class="refsect1" lang="en">
219262706Serwin<a name="id2612564"></a><h2>FILES</h2>
220170222Sdougb<p><code class="filename">/etc/resolv.conf</code>
221170222Sdougb    </p>
222170222Sdougb</div>
223170222Sdougb<div class="refsect1" lang="en">
224262706Serwin<a name="id2612578"></a><h2>SEE ALSO</h2>
225170222Sdougb<p><span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
226170222Sdougb      <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.
227170222Sdougb    </p>
228170222Sdougb</div>
229170222Sdougb</div>
230170222Sdougb<div class="navfooter">
231170222Sdougb<hr>
232170222Sdougb<table width="100%" summary="Navigation footer">
233170222Sdougb<tr>
234170222Sdougb<td width="40%" align="left">
235170222Sdougb<a accesskey="p" href="man.dig.html">Prev</a>�</td>
236170222Sdougb<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch10.html">Up</a></td>
237254897Serwin<td width="40%" align="right">�<a accesskey="n" href="man.dnssec-checkds.html">Next</a>
238170222Sdougb</td>
239170222Sdougb</tr>
240170222Sdougb<tr>
241170222Sdougb<td width="40%" align="left" valign="top">dig�</td>
242170222Sdougb<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
243254897Serwin<td width="40%" align="right" valign="top">�<span class="application">dnssec-checkds</span>
244170222Sdougb</td>
245170222Sdougb</tr>
246170222Sdougb</table>
247170222Sdougb</div>
248170222Sdougb</body>
249170222Sdougb</html>
250