man.host.html 13 KB
Newer Older
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Mark Andrews's avatar
gregen  
Mark Andrews committed
2
<!--
Tinderbox User's avatar
Tinderbox User committed
3
 - Copyright (C) 2000-2020 Internet Systems Consortium, Inc. ("ISC")
Mark Andrews's avatar
gregen  
Mark Andrews committed
4
 - 
Tinderbox User's avatar
Tinderbox User committed
5 6 7
 - This Source Code Form is subject to the terms of the Mozilla Public
 - License, v. 2.0. If a copy of the MPL was not distributed with this
 - file, You can obtain one at http://mozilla.org/MPL/2.0/.
Mark Andrews's avatar
gregen  
Mark Andrews committed
8
-->
9
<html lang="en">
Mark Andrews's avatar
gregen  
Mark Andrews committed
10 11 12
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>host</title>
Tinderbox User's avatar
Tinderbox User committed
13
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
Evan Hunt's avatar
Evan Hunt committed
14
<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
Tinderbox User's avatar
Tinderbox User committed
15
<link rel="up" href="Bv9ARM.ch13.html" title="Manual pages">
Tinderbox User's avatar
Tinderbox User committed
16
<link rel="prev" href="man.mdig.html" title="mdig">
Tinderbox User's avatar
Tinderbox User committed
17
<link rel="next" href="man.delv.html" title="delv">
Mark Andrews's avatar
gregen  
Mark Andrews committed
18 19 20 21 22 23 24
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">host</th></tr>
<tr>
<td width="20%" align="left">
Tinderbox User's avatar
Tinderbox User committed
25
<a accesskey="p" href="man.mdig.html">Prev</a> </td>
Mark Andrews's avatar
gregen  
Mark Andrews committed
26
<th width="60%" align="center">Manual pages</th>
Tinderbox User's avatar
Tinderbox User committed
27
<td width="20%" align="right"> <a accesskey="n" href="man.delv.html">Next</a>
Mark Andrews's avatar
gregen  
Mark Andrews committed
28 29 30 31 32
</td>
</tr>
</table>
<hr>
</div>
Tinderbox User's avatar
Tinderbox User committed
33
<div class="refentry">
Mark Andrews's avatar
gregen  
Mark Andrews committed
34
<a name="man.host"></a><div class="titlepage"></div>
Tinderbox User's avatar
Tinderbox User committed
35 36 37 38 39 40
  
  

  

  <div class="refnamediv">
Mark Andrews's avatar
gregen  
Mark Andrews committed
41
<h2>Name</h2>
Tinderbox User's avatar
Tinderbox User committed
42 43 44 45
<p>
    host
     &#8212; DNS lookup utility
  </p>
Mark Andrews's avatar
gregen  
Mark Andrews committed
46
</div>
Tinderbox User's avatar
Tinderbox User committed
47 48 49 50

  

  <div class="refsynopsisdiv">
Mark Andrews's avatar
gregen  
Mark Andrews committed
51
<h2>Synopsis</h2>
Tinderbox User's avatar
Tinderbox User committed
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
    <div class="cmdsynopsis"><p>
      <code class="command">host</code> 
       [<code class="option">-aCdlnrsTUwv</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">-p <em class="replaceable"><code>port</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>]
      ]
       [<code class="option">-v</code>]
       [<code class="option">-V</code>]
       {name}
       [server]
    </p></div>
  </div>

  <div class="refsection">
Tinderbox User's avatar
Tinderbox User committed
74
<a name="id-1.14.4.7"></a><h2>DESCRIPTION</h2>
Tinderbox User's avatar
Tinderbox User committed
75 76 77


    <p><span class="command"><strong>host</strong></span>
Mark Andrews's avatar
gregen  
Mark Andrews committed
78 79 80
      is a simple utility for performing DNS lookups.
      It is normally used to convert names to IP addresses and vice versa.
      When no arguments or options are given,
Evan Hunt's avatar
Evan Hunt committed
81
      <span class="command"><strong>host</strong></span>
Mark Andrews's avatar
gregen  
Mark Andrews committed
82 83
      prints a short summary of its command line arguments and options.
    </p>
Tinderbox User's avatar
Tinderbox User committed
84 85

    <p><em class="parameter"><code>name</code></em> is the domain name that is to be
Mark Andrews's avatar
gregen  
Mark Andrews committed
86 87
      looked
      up.  It can also be a dotted-decimal IPv4 address or a colon-delimited
Evan Hunt's avatar
Evan Hunt committed
88
      IPv6 address, in which case <span class="command"><strong>host</strong></span> will by
Mark Andrews's avatar
gregen  
Mark Andrews committed
89 90 91 92
      default
      perform a reverse lookup for that address.
      <em class="parameter"><code>server</code></em> is an optional argument which
      is either
Evan Hunt's avatar
Evan Hunt committed
93
      the name or IP address of the name server that <span class="command"><strong>host</strong></span>
Mark Andrews's avatar
gregen  
Mark Andrews committed
94 95 96
      should query instead of the server or servers listed in
      <code class="filename">/etc/resolv.conf</code>.
    </p>
Tinderbox User's avatar
Tinderbox User committed
97 98 99 100

  </div>

  <div class="refsection">
Tinderbox User's avatar
Tinderbox User committed
101
<a name="id-1.14.4.8"></a><h2>OPTIONS</h2>
Tinderbox User's avatar
Tinderbox User committed
102 103

    <div class="variablelist"><dl class="variablelist">
Tinderbox User's avatar
Tinderbox User committed
104
<dt><span class="term">-4</span></dt>
Tinderbox User's avatar
Tinderbox User committed
105 106
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
107 108
	    Use IPv4 only for query transport.
	    See also the <code class="option">-6</code> option.
Tinderbox User's avatar
Tinderbox User committed
109 110
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
111
<dt><span class="term">-6</span></dt>
Tinderbox User's avatar
Tinderbox User committed
112 113
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
114 115
	    Use IPv6 only for query transport.
	    See also the <code class="option">-4</code> option.
Tinderbox User's avatar
Tinderbox User committed
116 117
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
118
<dt><span class="term">-a</span></dt>
Tinderbox User's avatar
Tinderbox User committed
119 120
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
121
	    "All". The <code class="option">-a</code> option is normally equivalent
Tinderbox User's avatar
Tinderbox User committed
122
	    to <code class="option">-v -t <code class="literal">ANY</code></code>.
Tinderbox User's avatar
Tinderbox User committed
123 124
	    It also affects the behaviour of the <code class="option">-l</code>
	    list zone option.
Tinderbox User's avatar
Tinderbox User committed
125 126
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
127
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
Tinderbox User's avatar
Tinderbox User committed
128 129
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
130 131
	    Query class: This can be used to lookup HS (Hesiod) or CH
	    (Chaosnet) class resource records. The default class is IN
Tinderbox User's avatar
Tinderbox User committed
132
	    (Internet).
Tinderbox User's avatar
Tinderbox User committed
133 134
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
135
<dt><span class="term">-C</span></dt>
Tinderbox User's avatar
Tinderbox User committed
136 137
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
138 139 140 141 142
	    Check consistency: <span class="command"><strong>host</strong></span> will query the
	    SOA records for zone <em class="parameter"><code>name</code></em> from all
	    the listed authoritative name servers for that zone. The
	    list of name servers is defined by the NS records that are
	    found for the zone.
Tinderbox User's avatar
Tinderbox User committed
143 144
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
145
<dt><span class="term">-d</span></dt>
Tinderbox User's avatar
Tinderbox User committed
146 147
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
148 149
	    Print debugging traces.
	    Equivalent to the <code class="option">-v</code> verbose option.
Tinderbox User's avatar
Tinderbox User committed
150 151
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
152
<dt><span class="term">-i</span></dt>
Tinderbox User's avatar
Tinderbox User committed
153 154
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
155 156 157 158
	    Obsolete.
	    Use the IP6.INT domain for reverse lookups of IPv6
	    addresses as defined in RFC1886 and deprecated in RFC4159.
	    The default is to use IP6.ARPA as specified in RFC3596.
Tinderbox User's avatar
Tinderbox User committed
159 160
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
161 162
<dt><span class="term">-l</span></dt>
<dd>
Tinderbox User's avatar
Tinderbox User committed
163
	  <p>
Tinderbox User's avatar
Tinderbox User committed
164
	    List zone:
Tinderbox User's avatar
Tinderbox User committed
165
	    The <span class="command"><strong>host</strong></span> command performs a zone transfer of
Tinderbox User's avatar
Tinderbox User committed
166 167 168
	    zone <em class="parameter"><code>name</code></em> and prints out the NS,
	    PTR and address records (A/AAAA).
	  </p>
Tinderbox User's avatar
Tinderbox User committed
169
	  <p>
Tinderbox User's avatar
Tinderbox User committed
170
	    Together, the <code class="option">-l -a</code>
Tinderbox User's avatar
Tinderbox User committed
171 172
	    options print all records in the zone.
	  </p>
Tinderbox User's avatar
Tinderbox User committed
173
	</dd>
Tinderbox User's avatar
Tinderbox User committed
174
<dt><span class="term">-N <em class="replaceable"><code>ndots</code></em></span></dt>
Tinderbox User's avatar
Tinderbox User committed
175 176
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
177 178 179 180 181 182 183 184 185
	    The number of dots that have to be
	    in <em class="parameter"><code>name</code></em> for it to be considered
	    absolute. The default value is that defined using the
	    ndots statement in <code class="filename">/etc/resolv.conf</code>,
	    or 1 if no ndots statement is present. Names with fewer
	    dots are interpreted as relative names and will be
	    searched for in the domains listed in
	    the <span class="type">search</span> or <span class="type">domain</span> directive
	    in <code class="filename">/etc/resolv.conf</code>.
Tinderbox User's avatar
Tinderbox User committed
186 187 188 189 190 191 192 193
	  </p>
	</dd>
<dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
<dd>
	  <p>
	    Specify the port on the server to query.  The default is 53.
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
194
<dt><span class="term">-r</span></dt>
Tinderbox User's avatar
Tinderbox User committed
195 196
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
197
	    Non-recursive query:
Tinderbox User's avatar
Tinderbox User committed
198 199 200 201
	    Setting this option clears the RD (recursion desired) bit
	    in the query. This should mean that the name server
	    receiving the query will not attempt to
	    resolve <em class="parameter"><code>name</code></em>.
Tinderbox User's avatar
Tinderbox User committed
202 203 204 205 206
	    The <code class="option">-r</code> option
	    enables <span class="command"><strong>host</strong></span> to mimic the behavior of a
	    name server by making non-recursive queries and expecting
	    to receive answers to those queries that can be
	    referrals to other name servers.
Tinderbox User's avatar
Tinderbox User committed
207 208
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
209
<dt><span class="term">-R <em class="replaceable"><code>number</code></em></span></dt>
Tinderbox User's avatar
Tinderbox User committed
210 211
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
212 213 214 215 216
	    Number of retries for UDP queries:
	    If <em class="parameter"><code>number</code></em> is negative or zero, the
	    number of retries will default to 1. The default value is
	    1, or the value of the <em class="parameter"><code>attempts</code></em>
	    option in <code class="filename">/etc/resolv.conf</code>, if set.
Tinderbox User's avatar
Tinderbox User committed
217 218
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
219
<dt><span class="term">-s</span></dt>
Tinderbox User's avatar
Tinderbox User committed
220 221
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
222 223 224 225
	    Do <span class="emphasis"><em>not</em></span> send the query to the next
	    nameserver if any server responds with a SERVFAIL
	    response, which is the reverse of normal stub resolver
	    behavior.
Tinderbox User's avatar
Tinderbox User committed
226 227
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
228 229
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
<dd>
Tinderbox User's avatar
Tinderbox User committed
230
	  <p>
Tinderbox User's avatar
Tinderbox User committed
231
	    Query type:
Tinderbox User's avatar
Tinderbox User committed
232
	    The <em class="parameter"><code>type</code></em> argument can be any
Tinderbox User's avatar
Tinderbox User committed
233 234
	    recognized query type: CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc.
	  </p>
Tinderbox User's avatar
Tinderbox User committed
235
	  <p>
Tinderbox User's avatar
Tinderbox User committed
236 237 238 239 240 241 242 243 244 245
	    When no query type is specified, <span class="command"><strong>host</strong></span>
	    automatically selects an appropriate query type. By default, it
	    looks for A, AAAA, and MX records.
	    If the <code class="option">-C</code> option is given, queries will
	    be made for SOA records.
	    If <em class="parameter"><code>name</code></em> is a dotted-decimal IPv4
	    address or colon-delimited IPv6
	    address, <span class="command"><strong>host</strong></span> will query for PTR
	    records.
	  </p>
Tinderbox User's avatar
Tinderbox User committed
246
	  <p>
Tinderbox User's avatar
Tinderbox User committed
247 248 249
	    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
Tinderbox User's avatar
Tinderbox User committed
250
	    (like <code class="option">-t <code class="literal">IXFR=12345678</code></code>).
Tinderbox User's avatar
Tinderbox User committed
251
	  </p>
Tinderbox User's avatar
Tinderbox User committed
252
	</dd>
Tinderbox User's avatar
Tinderbox User committed
253 254 255
<dt>
<span class="term">-T, </span><span class="term">-U</span>
</dt>
Tinderbox User's avatar
Tinderbox User committed
256 257
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
258
	    TCP/UDP:
Tinderbox User's avatar
Tinderbox User committed
259 260 261 262
	    By default, <span class="command"><strong>host</strong></span> uses UDP when making
	    queries. The <code class="option">-T</code> option makes it use a TCP
	    connection when querying the name server. TCP will be
	    automatically selected for queries that require it, such
Tinderbox User's avatar
Tinderbox User committed
263 264
	    as zone transfer (AXFR) requests.  Type ANY queries default
	    to TCP but can be forced to UDP initially using <code class="option">-U</code>.
Tinderbox User's avatar
Tinderbox User committed
265 266
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
267
<dt><span class="term">-m <em class="replaceable"><code>flag</code></em></span></dt>
Tinderbox User's avatar
Tinderbox User committed
268 269
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
270 271 272 273 274
	    Memory usage debugging: the flag can
	    be <em class="parameter"><code>record</code></em>, <em class="parameter"><code>usage</code></em>,
	    or <em class="parameter"><code>trace</code></em>. You can specify
	    the <code class="option">-m</code> option more than once to set
	    multiple flags.
Tinderbox User's avatar
Tinderbox User committed
275 276
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
277
<dt><span class="term">-v</span></dt>
Tinderbox User's avatar
Tinderbox User committed
278 279
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
280 281 282 283
	    Verbose output.
	    Equivalent to the <code class="option">-d</code> debug option.
	    Verbose output can also be enabled by setting
	    the <em class="parameter"><code>debug</code></em> option
Tinderbox User's avatar
Tinderbox User committed
284
	    in <code class="filename">/etc/resolv.conf</code>.
Tinderbox User's avatar
Tinderbox User committed
285 286
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
287
<dt><span class="term">-V</span></dt>
Tinderbox User's avatar
Tinderbox User committed
288 289
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
290
	    Print the version number and exit.
Tinderbox User's avatar
Tinderbox User committed
291 292
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
293
<dt><span class="term">-w</span></dt>
Tinderbox User's avatar
Tinderbox User committed
294 295
<dd>
	  <p>
Tinderbox User's avatar
Tinderbox User committed
296
	    Wait forever: The query timeout is set to the maximum possible.
Tinderbox User's avatar
Tinderbox User committed
297
	    See also the <code class="option">-W</code> option.
Tinderbox User's avatar
Tinderbox User committed
298 299
	  </p>
	</dd>
Tinderbox User's avatar
Tinderbox User committed
300 301
<dt><span class="term">-W <em class="replaceable"><code>wait</code></em></span></dt>
<dd>
Tinderbox User's avatar
Tinderbox User committed
302
	  <p>
Tinderbox User's avatar
Tinderbox User committed
303
	    Timeout: Wait for up to <em class="parameter"><code>wait</code></em>
Tinderbox User's avatar
Tinderbox User committed
304 305 306
	    seconds for a reply. If <em class="parameter"><code>wait</code></em> is
	    less than one, the wait interval is set to one second.
	  </p>
Tinderbox User's avatar
Tinderbox User committed
307
	  <p>
Tinderbox User's avatar
Tinderbox User committed
308 309 310 311 312 313
	    By default, <span class="command"><strong>host</strong></span> will wait for 5
	    seconds for UDP responses and 10 seconds for TCP
	    connections. These defaults can be overridden by
	    the <em class="parameter"><code>timeout</code></em> option
	    in <code class="filename">/etc/resolv.conf</code>.
	  </p>
Tinderbox User's avatar
Tinderbox User committed
314
	  <p>
Tinderbox User's avatar
Tinderbox User committed
315 316
	    See also the <code class="option">-w</code> option.
	  </p>
Tinderbox User's avatar
Tinderbox User committed
317
	</dd>
Tinderbox User's avatar
Tinderbox User committed
318
</dl></div>
Tinderbox User's avatar
Tinderbox User committed
319 320 321 322

  </div>

  <div class="refsection">
Tinderbox User's avatar
Tinderbox User committed
323
<a name="id-1.14.4.9"></a><h2>IDN SUPPORT</h2>
Tinderbox User's avatar
Tinderbox User committed
324 325

    <p>
Evan Hunt's avatar
Evan Hunt committed
326
      If <span class="command"><strong>host</strong></span> has been built with IDN (internationalized
Tinderbox User's avatar
Tinderbox User committed
327
      domain name) support, it can accept and display non-ASCII domain names.
Evan Hunt's avatar
Evan Hunt committed
328
      <span class="command"><strong>host</strong></span> appropriately converts character encoding of
Mark Andrews's avatar
regen  
Mark Andrews committed
329 330 331 332 333
      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 <code class="envar">IDN_DISABLE</code> environment variable.
      The IDN support is disabled if the variable is set when
Evan Hunt's avatar
Evan Hunt committed
334
      <span class="command"><strong>host</strong></span> runs.
Mark Andrews's avatar
regen  
Mark Andrews committed
335
    </p>
Tinderbox User's avatar
Tinderbox User committed
336 337 338
  </div>

  <div class="refsection">
Tinderbox User's avatar
Tinderbox User committed
339
<a name="id-1.14.4.10"></a><h2>FILES</h2>
Tinderbox User's avatar
Tinderbox User committed
340 341

    <p><code class="filename">/etc/resolv.conf</code>
Mark Andrews's avatar
gregen  
Mark Andrews committed
342
    </p>
Tinderbox User's avatar
Tinderbox User committed
343 344 345
  </div>

  <div class="refsection">
Tinderbox User's avatar
Tinderbox User committed
346
<a name="id-1.14.4.11"></a><h2>SEE ALSO</h2>
Tinderbox User's avatar
Tinderbox User committed
347 348 349 350 351 352 353

    <p><span class="citerefentry">
        <span class="refentrytitle">dig</span>(1)
      </span>,
      <span class="citerefentry">
        <span class="refentrytitle">named</span>(8)
      </span>.
Mark Andrews's avatar
gregen  
Mark Andrews committed
354
    </p>
Tinderbox User's avatar
Tinderbox User committed
355 356
  </div>

Mark Andrews's avatar
gregen  
Mark Andrews committed
357 358 359 360 361 362
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
Tinderbox User's avatar
Tinderbox User committed
363
<a accesskey="p" href="man.mdig.html">Prev</a> </td>
Tinderbox User's avatar
Tinderbox User committed
364
<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch13.html">Up</a></td>
Tinderbox User's avatar
Tinderbox User committed
365
<td width="40%" align="right"> <a accesskey="n" href="man.delv.html">Next</a>
Mark Andrews's avatar
gregen  
Mark Andrews committed
366 367 368
</td>
</tr>
<tr>
Tinderbox User's avatar
Tinderbox User committed
369 370
<td width="40%" align="left" valign="top">
<span class="application">mdig</span> </td>
Mark Andrews's avatar
gregen  
Mark Andrews committed
371
<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
Tinderbox User's avatar
Tinderbox User committed
372
<td width="40%" align="right" valign="top"> delv</td>
Mark Andrews's avatar
gregen  
Mark Andrews committed
373 374 375
</tr>
</table>
</div>
Tinderbox User's avatar
Tinderbox User committed
376
<p xmlns:db="http://docbook.org/ns/docbook" style="text-align: center;">BIND 9.11.21 (Extended Support Version)</p>
Mark Andrews's avatar
gregen  
Mark Andrews committed
377 378
</body>
</html>