man.host.html revision 82d13321f4dcc79a9aec992c7a1c4aaff8983ada
0ea2cddb8715a770e646895e16b7b8085f49167cChristian Maeder - Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
306763c67bb99228487345b32ab8c5c6cd41f23cChristian Maeder - Copyright (C) 2000-2003 Internet Software Consortium.
dbc98cd8a9a829e020cfa0a9f3aff89de75caaa9Christian Maeder - Permission to use, copy, modify, and/or distribute this software for any
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu - purpose with or without fee is hereby granted, provided that the above
306763c67bb99228487345b32ab8c5c6cd41f23cChristian Maeder - copyright notice and this permission notice appear in all copies.
306763c67bb99228487345b32ab8c5c6cd41f23cChristian Maeder - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
306763c67bb99228487345b32ab8c5c6cd41f23cChristian Maeder - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9929f81562adecc8aafaefb14a0159afcf4a3351Christian Maeder - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
e6d40133bc9f858308654afb1262b8b483ec5922Till Mossakowski - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
d543cf2bb0c810781625c76fe135476d46270d88Till Mossakowski - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
1921826503a6c342d31a646e513e6250d8c28128Christian Maeder - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
9929f81562adecc8aafaefb14a0159afcf4a3351Christian Maeder - PERFORMANCE OF THIS SOFTWARE.
c200224a127278d54634ca4a5079591cb989aaf3Christian Maeder<!-- $Id: man.host.html,v 1.147 2010/08/12 01:14:29 tbox Exp $ -->
8b66de47c89e252c907c8ed3a5ccd16dbccbfb3eChristian Maeder<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
72204f862232e7e51b0207bba020c1d781fa7798Christian Maeder<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
8bb80c9684e905de8dcfcfb1291542677e7d77b6Christian Maeder<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
8bb80c9684e905de8dcfcfb1291542677e7d77b6Christian Maeder<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
8bb80c9684e905de8dcfcfb1291542677e7d77b6Christian Maeder<link rel="prev" href="man.dig.html" title="dig">
7e965be3566555e4d59954ea0f2a71db93b0b87cChristian Maeder<link rel="next" href="man.dnssec-dsfromkey.html" title="dnssec-dsfromkey">
74f3e694edeaaf8add16f3e4769927ef17fbcbf6Christian Maeder<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
1d9dc6dfc2d65f34926ea78f108ace72a209010cChristian Maeder<table width="100%" summary="Navigation header">
b7ad19a5692654e58d649c432caaf870e12e72a6Ewaryst Schulz<tr><th colspan="3" align="center">host</th></tr>
dbc98cd8a9a829e020cfa0a9f3aff89de75caaa9Christian Maeder<a accesskey="p" href="man.dig.html">Prev</a>�</td>
dbc98cd8a9a829e020cfa0a9f3aff89de75caaa9Christian Maeder<th width="60%" align="center">Manual pages</th>
863d4b011d04907325f3eed8e89975e38603cb05Christian Maeder<td width="20%" align="right">�<a accesskey="n" href="man.dnssec-dsfromkey.html">Next</a>
dbc98cd8a9a829e020cfa0a9f3aff89de75caaa9Christian Maeder<a name="man.host"></a><div class="titlepage"></div>
142fd5dd7fcfa170f08b2a0ab232859428f6e3c2Christian Maeder<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>
610e0e84ed0edeed51cc4cb3bb769e30ea723578Christian Maeder<a name="id2609516"></a><h2>DESCRIPTION</h2>
6842db903edc81c887da002342153795124d9bacChristian Maeder<p><span><strong class="command">host</strong></span>
97dc615bc3ce381eaa3e75cc23dfc3c4b566d9a0Jonathan von Schroeder is a simple utility for performing DNS lookups.
97dc615bc3ce381eaa3e75cc23dfc3c4b566d9a0Jonathan von Schroeder It is normally used to convert names to IP addresses and vice versa.
67f09e0fddea50c48620c011b6d001cffe565de6Ewaryst Schulz When no arguments or options are given,
67f09e0fddea50c48620c011b6d001cffe565de6Ewaryst Schulz <span><strong class="command">host</strong></span>
67f09e0fddea50c48620c011b6d001cffe565de6Ewaryst Schulz prints a short summary of its command line arguments and options.
dbc98cd8a9a829e020cfa0a9f3aff89de75caaa9Christian Maeder<p><em class="parameter"><code>name</code></em> is the domain name that is to be
abae78eb5f549814bc82c5cbb376add6f5092a0dChristian Maeder up. It can also be a dotted-decimal IPv4 address or a colon-delimited
2eb84fc82d3ffa9116bc471fda3742bd9e5a24bbChristian Maeder IPv6 address, in which case <span><strong class="command">host</strong></span> will by
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder perform a reverse lookup for that address.
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder <em class="parameter"><code>server</code></em> is an optional argument which
454e560c7c5b89cbc11b925133254025a730568aChristian Maeder the name or IP address of the name server that <span><strong class="command">host</strong></span>
80165d62acd4644f062affcd5968ebed7b5b4b51Christian Maeder should query instead of the server or servers listed in
f2c9ecaa586248abeabf1d3e689ef9f38866176eChristian Maeder <code class="filename">/etc/resolv.conf</code>.
5b71e10bb55c6e9e6f694bf3dc4a1dba2639205dJonathan von Schroeder The <code class="option">-a</code> (all) option is equivalent to setting the
f2c9ecaa586248abeabf1d3e689ef9f38866176eChristian Maeder <code class="option">-v</code> option and asking <span><strong class="command">host</strong></span> to make
f2c9ecaa586248abeabf1d3e689ef9f38866176eChristian Maeder a query of type ANY.
97dc615bc3ce381eaa3e75cc23dfc3c4b566d9a0Jonathan von Schroeder When the <code class="option">-C</code> option is used, <span><strong class="command">host</strong></span>
72204f862232e7e51b0207bba020c1d781fa7798Christian Maeder will attempt to display the SOA records for zone
97dc615bc3ce381eaa3e75cc23dfc3c4b566d9a0Jonathan von Schroeder <em class="parameter"><code>name</code></em> from all the listed
97dc615bc3ce381eaa3e75cc23dfc3c4b566d9a0Jonathan von Schroeder authoritative name
6197538e436eddfb51f56a434522d110ee8cc9e7Thiemo Wiedemeyer servers for that zone. The list of name servers is defined by the NS
97dc615bc3ce381eaa3e75cc23dfc3c4b566d9a0Jonathan von Schroeder records that are found for the zone.
0f91fad5a495831940b05d6312f335e93307b5fcChristian Maeder The <code class="option">-c</code> option instructs to make a DNS query of class
97dc615bc3ce381eaa3e75cc23dfc3c4b566d9a0Jonathan von Schroeder <em class="parameter"><code>class</code></em>. This can be used to lookup
0f91fad5a495831940b05d6312f335e93307b5fcChristian Maeder Chaosnet class resource records. The default class is IN (Internet).
38e1eb31abba6916f7d69ab6b392990caf516133Christian Maeder Verbose output is generated by <span><strong class="command">host</strong></span> when
67f09e0fddea50c48620c011b6d001cffe565de6Ewaryst Schulz <code class="option">-d</code> or <code class="option">-v</code> option is used. The two
67f09e0fddea50c48620c011b6d001cffe565de6Ewaryst Schulz options are equivalent. They have been provided for backwards
67f09e0fddea50c48620c011b6d001cffe565de6Ewaryst Schulz compatibility. In previous versions, the <code class="option">-d</code> option
67f09e0fddea50c48620c011b6d001cffe565de6Ewaryst Schulz switched on debugging traces and <code class="option">-v</code> enabled verbose
67f09e0fddea50c48620c011b6d001cffe565de6Ewaryst Schulz List mode is selected by the <code class="option">-l</code> option. This makes
67f09e0fddea50c48620c011b6d001cffe565de6Ewaryst Schulz <span><strong class="command">host</strong></span> perform a zone transfer for zone
38e1eb31abba6916f7d69ab6b392990caf516133Christian Maeder <em class="parameter"><code>name</code></em>. Transfer the zone printing out
67f09e0fddea50c48620c011b6d001cffe565de6Ewaryst Schulz and address records (A/AAAA). If combined with <code class="option">-a</code>
67f09e0fddea50c48620c011b6d001cffe565de6Ewaryst Schulz all records will be printed.
67f09e0fddea50c48620c011b6d001cffe565de6Ewaryst Schulz option specifies that reverse lookups of IPv6 addresses should
38e1eb31abba6916f7d69ab6b392990caf516133Christian Maeder use the IP6.INT domain as defined in RFC1886.
67f09e0fddea50c48620c011b6d001cffe565de6Ewaryst Schulz The default is to use IP6.ARPA.
90d891c57bb3995a1373f1b80a314a43b22f6f31Christian Maeder The <code class="option">-N</code> option sets the number of dots that have to be
90d891c57bb3995a1373f1b80a314a43b22f6f31Christian Maeder in <em class="parameter"><code>name</code></em> for it to be considered
ee6c3786dd0021b2b4f54195f35ad4b01d33f1ceChristian Maeder absolute. The
ee6c3786dd0021b2b4f54195f35ad4b01d33f1ceChristian Maeder default value is that defined using the ndots statement in
ee6c3786dd0021b2b4f54195f35ad4b01d33f1ceChristian Maeder <code class="filename">/etc/resolv.conf</code>, or 1 if no ndots
ee6c3786dd0021b2b4f54195f35ad4b01d33f1ceChristian Maeder present. Names with fewer dots are interpreted as relative names and
90d891c57bb3995a1373f1b80a314a43b22f6f31Christian Maeder will be searched for in the domains listed in the <span class="type">search</span>
8b66de47c89e252c907c8ed3a5ccd16dbccbfb3eChristian Maeder or <span class="type">domain</span> directive in
8b66de47c89e252c907c8ed3a5ccd16dbccbfb3eChristian Maeder <code class="filename">/etc/resolv.conf</code>.
c200224a127278d54634ca4a5079591cb989aaf3Christian Maeder The number of UDP retries for a lookup can be changed with the
c200224a127278d54634ca4a5079591cb989aaf3Christian Maeder <code class="option">-R</code> option. <em class="parameter"><code>number</code></em>
c200224a127278d54634ca4a5079591cb989aaf3Christian Maeder how many times <span><strong class="command">host</strong></span> will repeat a query
c200224a127278d54634ca4a5079591cb989aaf3Christian Maeder not get answered. The default number of retries is 1. If
c200224a127278d54634ca4a5079591cb989aaf3Christian Maeder <em class="parameter"><code>number</code></em> is negative or zero, the
76ddd8b95e4377fb64a48fa8b2ce5a618f2b03e4Christian Maeder retries will default to 1.
bfa2726dc5831ba946f412ae03ad9f7665b6b7d6Christian Maeder Non-recursive queries can be made via the <code class="option">-r</code> option.
bfa2726dc5831ba946f412ae03ad9f7665b6b7d6Christian Maeder Setting this option clears the <span class="type">RD</span> — recursion
bfa2726dc5831ba946f412ae03ad9f7665b6b7d6Christian Maeder desired — bit in the query which <span><strong class="command">host</strong></span> makes.
97c9d39efee30883aa578294c46506ff8a9478c8Christian Maeder This should mean that the name server receiving the query will not
72204f862232e7e51b0207bba020c1d781fa7798Christian Maeder attempt to resolve <em class="parameter"><code>name</code></em>. The
72204f862232e7e51b0207bba020c1d781fa7798Christian Maeder <code class="option">-r</code> option enables <span><strong class="command">host</strong></span>
72204f862232e7e51b0207bba020c1d781fa7798Christian Maeder the behavior of a name server by making non-recursive queries and
72204f862232e7e51b0207bba020c1d781fa7798Christian Maeder expecting to receive answers to those queries that are usually
72204f862232e7e51b0207bba020c1d781fa7798Christian Maeder referrals to other name servers.
1b4341f3429c9acbb3addc1237a39e50ee5e4dd3Christian Maeder By default, <span><strong class="command">host</strong></span> uses UDP when making
1b4341f3429c9acbb3addc1237a39e50ee5e4dd3Christian Maeder <code class="option">-T</code> option makes it use a TCP connection when querying
1b4341f3429c9acbb3addc1237a39e50ee5e4dd3Christian Maeder the name server. TCP will be automatically selected for queries that
1b4341f3429c9acbb3addc1237a39e50ee5e4dd3Christian Maeder require it, such as zone transfer (AXFR) requests.
1b4341f3429c9acbb3addc1237a39e50ee5e4dd3Christian Maeder The <code class="option">-4</code> option forces <span><strong class="command">host</strong></span> to only
6f90543eeea95fb7982c4dcb183382bee1a24e17Christian Maeder use IPv4 query transport. The <code class="option">-6</code> option forces
1b4341f3429c9acbb3addc1237a39e50ee5e4dd3Christian Maeder <span><strong class="command">host</strong></span> to only use IPv6 query transport.
7e965be3566555e4d59954ea0f2a71db93b0b87cChristian Maeder The <code class="option">-t</code> option is used to select the query type.
7e965be3566555e4d59954ea0f2a71db93b0b87cChristian Maeder <em class="parameter"><code>type</code></em> can be any recognized query
7e965be3566555e4d59954ea0f2a71db93b0b87cChristian Maeder NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
7e965be3566555e4d59954ea0f2a71db93b0b87cChristian Maeder <span><strong class="command">host</strong></span> automatically selects an appropriate
7e965be3566555e4d59954ea0f2a71db93b0b87cChristian Maeder type. By default, it looks for A, AAAA, and MX records, but if the
7e965be3566555e4d59954ea0f2a71db93b0b87cChristian Maeder <code class="option">-C</code> option was given, queries will be made for SOA
7e965be3566555e4d59954ea0f2a71db93b0b87cChristian Maeder records, and if <em class="parameter"><code>name</code></em> is a
7e965be3566555e4d59954ea0f2a71db93b0b87cChristian Maeder dotted-decimal IPv4
7e965be3566555e4d59954ea0f2a71db93b0b87cChristian Maeder address or colon-delimited IPv6 address, <span><strong class="command">host</strong></span> will
7e965be3566555e4d59954ea0f2a71db93b0b87cChristian Maeder query for PTR records. If a query type of IXFR is chosen the starting
92494a941714233bcd640425aa50d3cf4859d7ebChristian Maeder serial number can be specified by appending an equal followed by the
92494a941714233bcd640425aa50d3cf4859d7ebChristian Maeder starting serial number (e.g. -t IXFR=12345678).
92494a941714233bcd640425aa50d3cf4859d7ebChristian Maeder The time to wait for a reply can be controlled through the
92494a941714233bcd640425aa50d3cf4859d7ebChristian Maeder <code class="option">-W</code> and <code class="option">-w</code> options. The
7e965be3566555e4d59954ea0f2a71db93b0b87cChristian Maeder <code class="option">-W</code> option makes <span><strong class="command">host</strong></span>
74f3e694edeaaf8add16f3e4769927ef17fbcbf6Christian Maeder <em class="parameter"><code>wait</code></em> seconds. If <em class="parameter"><code>wait</code></em>
74f3e694edeaaf8add16f3e4769927ef17fbcbf6Christian Maeder is less than one, the wait interval is set to one second. When the
74f3e694edeaaf8add16f3e4769927ef17fbcbf6Christian Maeder <code class="option">-w</code> option is used, <span><strong class="command">host</strong></span>
74f3e694edeaaf8add16f3e4769927ef17fbcbf6Christian Maeder effectively wait forever for a reply. The time to wait for a response
74f3e694edeaaf8add16f3e4769927ef17fbcbf6Christian Maeder will be set to the number of seconds given by the hardware's maximum
abae78eb5f549814bc82c5cbb376add6f5092a0dChristian Maeder value for an integer quantity.
abae78eb5f549814bc82c5cbb376add6f5092a0dChristian Maeder The <code class="option">-s</code> option tells <span><strong class="command">host</strong></span>
abae78eb5f549814bc82c5cbb376add6f5092a0dChristian Maeder <span class="emphasis"><em>not</em></span> to send the query to the next nameserver
1d9dc6dfc2d65f34926ea78f108ace72a209010cChristian Maeder if any server responds with a SERVFAIL response, which is the
1d9dc6dfc2d65f34926ea78f108ace72a209010cChristian Maeder reverse of normal stub resolver behavior.
76ddd8b95e4377fb64a48fa8b2ce5a618f2b03e4Christian Maeder The <code class="option">-m</code> can be used to set the memory usage debugging
76ddd8b95e4377fb64a48fa8b2ce5a618f2b03e4Christian Maeder <em class="parameter"><code>record</code></em>, <em class="parameter"><code>usage</code></em> and
76ddd8b95e4377fb64a48fa8b2ce5a618f2b03e4Christian Maeder <em class="parameter"><code>trace</code></em>.
1d9dc6dfc2d65f34926ea78f108ace72a209010cChristian Maeder<a name="id2610167"></a><h2>IDN SUPPORT</h2>
1d9dc6dfc2d65f34926ea78f108ace72a209010cChristian Maeder If <span><strong class="command">host</strong></span> has been built with IDN (internationalized
1d9dc6dfc2d65f34926ea78f108ace72a209010cChristian Maeder domain name) support, it can accept and display non-ASCII domain names.
b7ad19a5692654e58d649c432caaf870e12e72a6Ewaryst Schulz <span><strong class="command">host</strong></span> appropriately converts character encoding of
b7ad19a5692654e58d649c432caaf870e12e72a6Ewaryst Schulz domain name before sending a request to DNS server or displaying a
b7ad19a5692654e58d649c432caaf870e12e72a6Ewaryst Schulz reply from the server.
76ddd8b95e4377fb64a48fa8b2ce5a618f2b03e4Christian Maeder If you'd like to turn off the IDN support for some reason, defines
76ddd8b95e4377fb64a48fa8b2ce5a618f2b03e4Christian Maeder the <code class="envar">IDN_DISABLE</code> environment variable.
76ddd8b95e4377fb64a48fa8b2ce5a618f2b03e4Christian Maeder The IDN support is disabled if the variable is set when
76ddd8b95e4377fb64a48fa8b2ce5a618f2b03e4Christian Maeder <span><strong class="command">host</strong></span> runs.
f73b65c5bf13039687a758173a894c527b95bddaChristian Maeder<p><code class="filename">/etc/resolv.conf</code>
3c8d067accf18572352351ec42ff905c7297a8a5Christian Maeder<p><span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
4072adb8c5d2c86123e8e1c1918263968f187829Christian Maeder <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.
2dc26996d32244796c48c71fe44413c8ebf8bbc9Christian Maeder<table width="100%" summary="Navigation footer">
8b66de47c89e252c907c8ed3a5ccd16dbccbfb3eChristian Maeder<a accesskey="p" href="man.dig.html">Prev</a>�</td>
2dc26996d32244796c48c71fe44413c8ebf8bbc9Christian Maeder<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch10.html">Up</a></td>
7e4157a70efe2acab30dbe5079bba6db90923785Christian Maeder<td width="40%" align="right">�<a accesskey="n" href="man.dnssec-dsfromkey.html">Next</a>
9929f81562adecc8aafaefb14a0159afcf4a3351Christian Maeder<td width="40%" align="left" valign="top">dig�</td>
38e1eb31abba6916f7d69ab6b392990caf516133Christian Maeder<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
38e1eb31abba6916f7d69ab6b392990caf516133Christian Maeder<td width="40%" align="right" valign="top">�<span class="application">dnssec-dsfromkey</span>