man.host.html revision bae169ea64bf736d6ea6074c2af3d7c117079972
a7038d1a0513c8e804937ebc95fc9cb3a46c04f5Mark Andrews - Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC")
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence - Copyright (C) 2000-2003 Internet Software Consortium.
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff - Permission to use, copy, modify, and/or distribute this software for any
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff - purpose with or without fee is hereby granted, provided that the above
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence - copyright notice and this permission notice appear in all copies.
15a44745412679c30a6d022733925af70a38b715David Lawrence - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
15a44745412679c30a6d022733925af70a38b715David Lawrence - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15a44745412679c30a6d022733925af70a38b715David Lawrence - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15a44745412679c30a6d022733925af70a38b715David Lawrence - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15a44745412679c30a6d022733925af70a38b715David Lawrence - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15a44745412679c30a6d022733925af70a38b715David Lawrence - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15a44745412679c30a6d022733925af70a38b715David Lawrence - PERFORMANCE OF THIS SOFTWARE.
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff<link rel="prev" href="man.dig.html" title="dig">
ce24330566b66a5ca8522fa948fb36b94a4d6981Mark Andrews<link rel="next" href="man.dnssec-dsfromkey.html" title="dnssec-dsfromkey">
ce24330566b66a5ca8522fa948fb36b94a4d6981Mark Andrews<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff<tr><th colspan="3" align="center">host</th></tr>
7d823f705d9d3a8cb4d43fcf11249515e2845364Andreas Gustafsson<a accesskey="p" href="man.dig.html">Prev</a>�</td>
531eafa3026663020f4a2ac5587cce44341e3442Andreas Gustafsson<th width="60%" align="center">Manual pages</th>
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff<td width="20%" align="right">�<a accesskey="n" href="man.dnssec-dsfromkey.html">Next</a>
6d4886fa7430889a96dbf9b88a2a4eb6f9d04674Brian Wellington<a name="man.host"></a><div class="titlepage"></div>
ac77fece9a62537a9e0e5852498ebeda7b2978c3Bob Halley<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>
f9df80f4348ef68043903efa08299480324f4823Michael Graff<p><span><strong class="command">host</strong></span>
f9df80f4348ef68043903efa08299480324f4823Michael Graff is a simple utility for performing DNS lookups.
f9df80f4348ef68043903efa08299480324f4823Michael Graff It is normally used to convert names to IP addresses and vice versa.
f9df80f4348ef68043903efa08299480324f4823Michael Graff When no arguments or options are given,
f9df80f4348ef68043903efa08299480324f4823Michael Graff <span><strong class="command">host</strong></span>
78838d3e0cd62423c23de5503910e01884d2104bBrian Wellington prints a short summary of its command line arguments and options.
78838d3e0cd62423c23de5503910e01884d2104bBrian Wellington<p><em class="parameter"><code>name</code></em> is the domain name that is to be
1ed4ba5a1fcb6aecd1c92fdcc75c6b4bbb7cc60fMichael Sawyer up. It can also be a dotted-decimal IPv4 address or a colon-delimited
1ed4ba5a1fcb6aecd1c92fdcc75c6b4bbb7cc60fMichael Sawyer IPv6 address, in which case <span><strong class="command">host</strong></span> will by
f9df80f4348ef68043903efa08299480324f4823Michael Graff perform a reverse lookup for that address.
f9df80f4348ef68043903efa08299480324f4823Michael Graff <em class="parameter"><code>server</code></em> is an optional argument which
97e7d389d54a9e3a1ba8313ed140b04afabc7081Michael Graff the name or IP address of the name server that <span><strong class="command">host</strong></span>
f9df80f4348ef68043903efa08299480324f4823Michael Graff should query instead of the server or servers listed in
e223094b2248afa2697c531f75e6f84855638becMichael Graff <code class="filename">/etc/resolv.conf</code>.
b02262cbcd550c63f85df76edc6fff556ea5e95dMichael Graff The <code class="option">-a</code> (all) option is equivalent to setting the
b02262cbcd550c63f85df76edc6fff556ea5e95dMichael Graff <code class="option">-v</code> option and asking <span><strong class="command">host</strong></span> to make
b02262cbcd550c63f85df76edc6fff556ea5e95dMichael Graff a query of type ANY.
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer When the <code class="option">-C</code> option is used, <span><strong class="command">host</strong></span>
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer will attempt to display the SOA records for zone
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer <em class="parameter"><code>name</code></em> from all the listed
6d12fdf96621801e80f3f4c2a8a569fe48766a20David Lawrence authoritative name
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer servers for that zone. The list of name servers is defined by the NS
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer records that are found for the zone.
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer The <code class="option">-c</code> option instructs to make a DNS query of class
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer <em class="parameter"><code>class</code></em>. This can be used to lookup
58c40ca8bda08458804d7f15cf97942dea2a17acMichael Sawyer Chaosnet class resource records. The default class is IN (Internet).
58c40ca8bda08458804d7f15cf97942dea2a17acMichael Sawyer Verbose output is generated by <span><strong class="command">host</strong></span> when
58c40ca8bda08458804d7f15cf97942dea2a17acMichael Sawyer <code class="option">-d</code> or <code class="option">-v</code> option is used. The two
6d12fdf96621801e80f3f4c2a8a569fe48766a20David Lawrence options are equivalent. They have been provided for backwards
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer compatibility. In previous versions, the <code class="option">-d</code> option
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer switched on debugging traces and <code class="option">-v</code> enabled verbose
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer List mode is selected by the <code class="option">-l</code> option. This makes
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer <span><strong class="command">host</strong></span> perform a zone transfer for zone
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer <em class="parameter"><code>name</code></em>. Transfer the zone printing out
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer and address records (A/AAAA). If combined with <code class="option">-a</code>
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer all records will be printed.
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer option specifies that reverse lookups of IPv6 addresses should
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer use the IP6.INT domain as defined in RFC1886.
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer The default is to use IP6.ARPA.
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer The <code class="option">-N</code> option sets the number of dots that have to be
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer in <em class="parameter"><code>name</code></em> for it to be considered
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer absolute. The
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer default value is that defined using the ndots statement in
da5d1cf1b1aa29ae53a0427be49291b04bd60549Mark Andrews <code class="filename">/etc/resolv.conf</code>, or 1 if no ndots
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer present. Names with fewer dots are interpreted as relative names and
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer will be searched for in the domains listed in the <span class="type">search</span>
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer or <span class="type">domain</span> directive in
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer <code class="filename">/etc/resolv.conf</code>.
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer The number of UDP retries for a lookup can be changed with the
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer <code class="option">-R</code> option. <em class="parameter"><code>number</code></em>
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer how many times <span><strong class="command">host</strong></span> will repeat a query
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer not get answered. The default number of retries is 1. If
c95a89b433e42ecf9108b6c263f405fecc0d8a65Michael Sawyer <em class="parameter"><code>number</code></em> is negative or zero, the
f9df80f4348ef68043903efa08299480324f4823Michael Graff retries will default to 1.
f9df80f4348ef68043903efa08299480324f4823Michael Graff Non-recursive queries can be made via the <code class="option">-r</code> option.
f9df80f4348ef68043903efa08299480324f4823Michael Graff Setting this option clears the <span class="type">RD</span> — recursion
f9df80f4348ef68043903efa08299480324f4823Michael Graff desired — bit in the query which <span><strong class="command">host</strong></span> makes.
97e7d389d54a9e3a1ba8313ed140b04afabc7081Michael Graff This should mean that the name server receiving the query will not
f9df80f4348ef68043903efa08299480324f4823Michael Graff attempt to resolve <em class="parameter"><code>name</code></em>. The
f9df80f4348ef68043903efa08299480324f4823Michael Graff <code class="option">-r</code> option enables <span><strong class="command">host</strong></span>
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff the behavior of a name server by making non-recursive queries and
97e7d389d54a9e3a1ba8313ed140b04afabc7081Michael Graff expecting to receive answers to those queries that are usually
97e7d389d54a9e3a1ba8313ed140b04afabc7081Michael Graff referrals to other name servers.
d68838693666ba930ec4143f848c18bff2bfc244Michael Graff By default, <span><strong class="command">host</strong></span> uses UDP when making
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff <code class="option">-T</code> option makes it use a TCP connection when querying
f9df80f4348ef68043903efa08299480324f4823Michael Graff the name server. TCP will be automatically selected for queries that
f9df80f4348ef68043903efa08299480324f4823Michael Graff require it, such as zone transfer (AXFR) requests.
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff The <code class="option">-4</code> option forces <span><strong class="command">host</strong></span> to only
97e7d389d54a9e3a1ba8313ed140b04afabc7081Michael Graff use IPv4 query transport. The <code class="option">-6</code> option forces
97e7d389d54a9e3a1ba8313ed140b04afabc7081Michael Graff <span><strong class="command">host</strong></span> to only use IPv6 query transport.
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff The <code class="option">-t</code> option is used to select the query type.
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff <em class="parameter"><code>type</code></em> can be any recognized query
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
f9df80f4348ef68043903efa08299480324f4823Michael Graff <span><strong class="command">host</strong></span> automatically selects an appropriate
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff type. By default, it looks for A, AAAA, and MX records, but if the
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff <code class="option">-C</code> option was given, queries will be made for SOA
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff records, and if <em class="parameter"><code>name</code></em> is a
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff dotted-decimal IPv4
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff address or colon-delimited IPv6 address, <span><strong class="command">host</strong></span> will
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff query for PTR records. If a query type of IXFR is chosen the starting
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff serial number can be specified by appending an equal followed by the
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff starting serial number (e.g. -t IXFR=12345678).
97e7d389d54a9e3a1ba8313ed140b04afabc7081Michael Graff The time to wait for a reply can be controlled through the
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff <code class="option">-W</code> and <code class="option">-w</code> options. The
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff <code class="option">-W</code> option makes <span><strong class="command">host</strong></span>
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff <em class="parameter"><code>wait</code></em> seconds. If <em class="parameter"><code>wait</code></em>
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff is less than one, the wait interval is set to one second. When the
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff <code class="option">-w</code> option is used, <span><strong class="command">host</strong></span>
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff effectively wait forever for a reply. The time to wait for a response
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff will be set to the number of seconds given by the hardware's maximum
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff value for an integer quantity.
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence The <code class="option">-s</code> option tells <span><strong class="command">host</strong></span>
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff <span class="emphasis"><em>not</em></span> to send the query to the next nameserver
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff if any server responds with a SERVFAIL response, which is the
8c55a67a6d185de7036e39da30561a5c1637d22bAndreas Gustafsson reverse of normal stub resolver behavior.
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff The <code class="option">-m</code> can be used to set the memory usage debugging
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff <em class="parameter"><code>record</code></em>, <em class="parameter"><code>usage</code></em> and
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff <em class="parameter"><code>trace</code></em>.
f9df80f4348ef68043903efa08299480324f4823Michael Graff If <span><strong class="command">host</strong></span> has been built with IDN (internationalized
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence domain name) support, it can accept and display non-ASCII domain names.
97e7d389d54a9e3a1ba8313ed140b04afabc7081Michael Graff <span><strong class="command">host</strong></span> appropriately converts character encoding of
f9df80f4348ef68043903efa08299480324f4823Michael Graff domain name before sending a request to DNS server or displaying a
f9df80f4348ef68043903efa08299480324f4823Michael Graff reply from the server.
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff If you'd like to turn off the IDN support for some reason, defines
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff the <code class="envar">IDN_DISABLE</code> environment variable.
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff The IDN support is disabled if the variable is set when
9178881e1bf6a4b01db886b355406c8bed61cc2aMichael Graff <span><strong class="command">host</strong></span> runs.
97e7d389d54a9e3a1ba8313ed140b04afabc7081Michael Graff<p><code class="filename">/etc/resolv.conf</code>
d68838693666ba930ec4143f848c18bff2bfc244Michael Graff<p><span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
d68838693666ba930ec4143f848c18bff2bfc244Michael Graff <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.
d68838693666ba930ec4143f848c18bff2bfc244Michael Graff<table width="100%" summary="Navigation footer">
d68838693666ba930ec4143f848c18bff2bfc244Michael Graff<a accesskey="p" href="man.dig.html">Prev</a>�</td>
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch10.html">Up</a></td>
d68838693666ba930ec4143f848c18bff2bfc244Michael Graff<td width="40%" align="right">�<a accesskey="n" href="man.dnssec-dsfromkey.html">Next</a>
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff<td width="40%" align="left" valign="top">dig�</td>
d68838693666ba930ec4143f848c18bff2bfc244Michael Graff<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
d68838693666ba930ec4143f848c18bff2bfc244Michael Graff<td width="40%" align="right" valign="top">�<span class="application">dnssec-dsfromkey</span>