1*00b67f09SDavid van Moolenbroek<!-- 2*00b67f09SDavid van Moolenbroek - Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC") 3*00b67f09SDavid van Moolenbroek - Copyright (C) 2000-2003 Internet Software Consortium. 4*00b67f09SDavid van Moolenbroek - 5*00b67f09SDavid van Moolenbroek - Permission to use, copy, modify, and/or distribute this software for any 6*00b67f09SDavid van Moolenbroek - purpose with or without fee is hereby granted, provided that the above 7*00b67f09SDavid van Moolenbroek - copyright notice and this permission notice appear in all copies. 8*00b67f09SDavid van Moolenbroek - 9*00b67f09SDavid van Moolenbroek - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 10*00b67f09SDavid van Moolenbroek - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11*00b67f09SDavid van Moolenbroek - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 12*00b67f09SDavid van Moolenbroek - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13*00b67f09SDavid van Moolenbroek - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 14*00b67f09SDavid van Moolenbroek - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15*00b67f09SDavid van Moolenbroek - PERFORMANCE OF THIS SOFTWARE. 16*00b67f09SDavid van Moolenbroek--> 17*00b67f09SDavid van Moolenbroek<!-- $Id: man.host.html,v 1.5 2015/09/03 07:33:34 christos Exp $ --> 18*00b67f09SDavid van Moolenbroek<html> 19*00b67f09SDavid van Moolenbroek<head> 20*00b67f09SDavid van Moolenbroek<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 21*00b67f09SDavid van Moolenbroek<title>host</title> 22*00b67f09SDavid van Moolenbroek<meta name="generator" content="DocBook XSL Stylesheets V1.71.1"> 23*00b67f09SDavid van Moolenbroek<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual"> 24*00b67f09SDavid van Moolenbroek<link rel="up" href="Bv9ARM.ch13.html" title="Manual pages"> 25*00b67f09SDavid van Moolenbroek<link rel="prev" href="man.dig.html" title="dig"> 26*00b67f09SDavid van Moolenbroek<link rel="next" href="man.delv.html" title="delv"> 27*00b67f09SDavid van Moolenbroek</head> 28*00b67f09SDavid van Moolenbroek<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 29*00b67f09SDavid van Moolenbroek<div class="navheader"> 30*00b67f09SDavid van Moolenbroek<table width="100%" summary="Navigation header"> 31*00b67f09SDavid van Moolenbroek<tr><th colspan="3" align="center">host</th></tr> 32*00b67f09SDavid van Moolenbroek<tr> 33*00b67f09SDavid van Moolenbroek<td width="20%" align="left"> 34*00b67f09SDavid van Moolenbroek<a accesskey="p" href="man.dig.html">Prev</a>�</td> 35*00b67f09SDavid van Moolenbroek<th width="60%" align="center">Manual pages</th> 36*00b67f09SDavid van Moolenbroek<td width="20%" align="right">�<a accesskey="n" href="man.delv.html">Next</a> 37*00b67f09SDavid van Moolenbroek</td> 38*00b67f09SDavid van Moolenbroek</tr> 39*00b67f09SDavid van Moolenbroek</table> 40*00b67f09SDavid van Moolenbroek<hr> 41*00b67f09SDavid van Moolenbroek</div> 42*00b67f09SDavid van Moolenbroek<div class="refentry" lang="en"> 43*00b67f09SDavid van Moolenbroek<a name="man.host"></a><div class="titlepage"></div> 44*00b67f09SDavid van Moolenbroek<div class="refnamediv"> 45*00b67f09SDavid van Moolenbroek<h2>Name</h2> 46*00b67f09SDavid van Moolenbroek<p>host — DNS lookup utility</p> 47*00b67f09SDavid van Moolenbroek</div> 48*00b67f09SDavid van Moolenbroek<div class="refsynopsisdiv"> 49*00b67f09SDavid van Moolenbroek<h2>Synopsis</h2> 50*00b67f09SDavid van Moolenbroek<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>] [<code class="option">-v</code>] [<code class="option">-V</code>] {name} [server]</p></div> 51*00b67f09SDavid van Moolenbroek</div> 52*00b67f09SDavid van Moolenbroek<div class="refsect1" lang="en"> 53*00b67f09SDavid van Moolenbroek<a name="id2614302"></a><h2>DESCRIPTION</h2> 54*00b67f09SDavid van Moolenbroek<p><span><strong class="command">host</strong></span> 55*00b67f09SDavid van Moolenbroek is a simple utility for performing DNS lookups. 56*00b67f09SDavid van Moolenbroek It is normally used to convert names to IP addresses and vice versa. 57*00b67f09SDavid van Moolenbroek When no arguments or options are given, 58*00b67f09SDavid van Moolenbroek <span><strong class="command">host</strong></span> 59*00b67f09SDavid van Moolenbroek prints a short summary of its command line arguments and options. 60*00b67f09SDavid van Moolenbroek </p> 61*00b67f09SDavid van Moolenbroek<p><em class="parameter"><code>name</code></em> is the domain name that is to be 62*00b67f09SDavid van Moolenbroek looked 63*00b67f09SDavid van Moolenbroek up. It can also be a dotted-decimal IPv4 address or a colon-delimited 64*00b67f09SDavid van Moolenbroek IPv6 address, in which case <span><strong class="command">host</strong></span> will by 65*00b67f09SDavid van Moolenbroek default 66*00b67f09SDavid van Moolenbroek perform a reverse lookup for that address. 67*00b67f09SDavid van Moolenbroek <em class="parameter"><code>server</code></em> is an optional argument which 68*00b67f09SDavid van Moolenbroek is either 69*00b67f09SDavid van Moolenbroek the name or IP address of the name server that <span><strong class="command">host</strong></span> 70*00b67f09SDavid van Moolenbroek should query instead of the server or servers listed in 71*00b67f09SDavid van Moolenbroek <code class="filename">/etc/resolv.conf</code>. 72*00b67f09SDavid van Moolenbroek </p> 73*00b67f09SDavid van Moolenbroek<p> 74*00b67f09SDavid van Moolenbroek The <code class="option">-a</code> (all) option is equivalent to setting the 75*00b67f09SDavid van Moolenbroek <code class="option">-v</code> option and asking <span><strong class="command">host</strong></span> to make 76*00b67f09SDavid van Moolenbroek a query of type ANY. 77*00b67f09SDavid van Moolenbroek </p> 78*00b67f09SDavid van Moolenbroek<p> 79*00b67f09SDavid van Moolenbroek When the <code class="option">-C</code> option is used, <span><strong class="command">host</strong></span> 80*00b67f09SDavid van Moolenbroek will attempt to display the SOA records for zone 81*00b67f09SDavid van Moolenbroek <em class="parameter"><code>name</code></em> from all the listed 82*00b67f09SDavid van Moolenbroek authoritative name 83*00b67f09SDavid van Moolenbroek servers for that zone. The list of name servers is defined by the NS 84*00b67f09SDavid van Moolenbroek records that are found for the zone. 85*00b67f09SDavid van Moolenbroek </p> 86*00b67f09SDavid van Moolenbroek<p> 87*00b67f09SDavid van Moolenbroek The <code class="option">-c</code> option instructs to make a DNS query of class 88*00b67f09SDavid van Moolenbroek <em class="parameter"><code>class</code></em>. This can be used to lookup 89*00b67f09SDavid van Moolenbroek Hesiod or 90*00b67f09SDavid van Moolenbroek Chaosnet class resource records. The default class is IN (Internet). 91*00b67f09SDavid van Moolenbroek </p> 92*00b67f09SDavid van Moolenbroek<p> 93*00b67f09SDavid van Moolenbroek Verbose output is generated by <span><strong class="command">host</strong></span> when 94*00b67f09SDavid van Moolenbroek the 95*00b67f09SDavid van Moolenbroek <code class="option">-d</code> or <code class="option">-v</code> option is used. The two 96*00b67f09SDavid van Moolenbroek options are equivalent. They have been provided for backwards 97*00b67f09SDavid van Moolenbroek compatibility. In previous versions, the <code class="option">-d</code> option 98*00b67f09SDavid van Moolenbroek switched on debugging traces and <code class="option">-v</code> enabled verbose 99*00b67f09SDavid van Moolenbroek output. 100*00b67f09SDavid van Moolenbroek </p> 101*00b67f09SDavid van Moolenbroek<p> 102*00b67f09SDavid van Moolenbroek List mode is selected by the <code class="option">-l</code> option. This makes 103*00b67f09SDavid van Moolenbroek <span><strong class="command">host</strong></span> perform a zone transfer for zone 104*00b67f09SDavid van Moolenbroek <em class="parameter"><code>name</code></em>. Transfer the zone printing out 105*00b67f09SDavid van Moolenbroek the NS, PTR 106*00b67f09SDavid van Moolenbroek and address records (A/AAAA). If combined with <code class="option">-a</code> 107*00b67f09SDavid van Moolenbroek all records will be printed. 108*00b67f09SDavid van Moolenbroek </p> 109*00b67f09SDavid van Moolenbroek<p> 110*00b67f09SDavid van Moolenbroek The <code class="option">-i</code> 111*00b67f09SDavid van Moolenbroek option specifies that reverse lookups of IPv6 addresses should 112*00b67f09SDavid van Moolenbroek use the IP6.INT domain as defined in RFC1886. 113*00b67f09SDavid van Moolenbroek The default is to use IP6.ARPA. 114*00b67f09SDavid van Moolenbroek </p> 115*00b67f09SDavid van Moolenbroek<p> 116*00b67f09SDavid van Moolenbroek The <code class="option">-N</code> option sets the number of dots that have to be 117*00b67f09SDavid van Moolenbroek in <em class="parameter"><code>name</code></em> for it to be considered 118*00b67f09SDavid van Moolenbroek absolute. The 119*00b67f09SDavid van Moolenbroek default value is that defined using the ndots statement in 120*00b67f09SDavid van Moolenbroek <code class="filename">/etc/resolv.conf</code>, or 1 if no ndots 121*00b67f09SDavid van Moolenbroek statement is 122*00b67f09SDavid van Moolenbroek present. Names with fewer dots are interpreted as relative names and 123*00b67f09SDavid van Moolenbroek will be searched for in the domains listed in the <span class="type">search</span> 124*00b67f09SDavid van Moolenbroek or <span class="type">domain</span> directive in 125*00b67f09SDavid van Moolenbroek <code class="filename">/etc/resolv.conf</code>. 126*00b67f09SDavid van Moolenbroek </p> 127*00b67f09SDavid van Moolenbroek<p> 128*00b67f09SDavid van Moolenbroek The number of UDP retries for a lookup can be changed with the 129*00b67f09SDavid van Moolenbroek <code class="option">-R</code> option. <em class="parameter"><code>number</code></em> 130*00b67f09SDavid van Moolenbroek indicates 131*00b67f09SDavid van Moolenbroek how many times <span><strong class="command">host</strong></span> will repeat a query 132*00b67f09SDavid van Moolenbroek that does 133*00b67f09SDavid van Moolenbroek not get answered. The default number of retries is 1. If 134*00b67f09SDavid van Moolenbroek <em class="parameter"><code>number</code></em> is negative or zero, the 135*00b67f09SDavid van Moolenbroek number of 136*00b67f09SDavid van Moolenbroek retries will default to 1. 137*00b67f09SDavid van Moolenbroek </p> 138*00b67f09SDavid van Moolenbroek<p> 139*00b67f09SDavid van Moolenbroek Non-recursive queries can be made via the <code class="option">-r</code> option. 140*00b67f09SDavid van Moolenbroek Setting this option clears the <span class="type">RD</span> — recursion 141*00b67f09SDavid van Moolenbroek desired — bit in the query which <span><strong class="command">host</strong></span> makes. 142*00b67f09SDavid van Moolenbroek This should mean that the name server receiving the query will not 143*00b67f09SDavid van Moolenbroek attempt to resolve <em class="parameter"><code>name</code></em>. The 144*00b67f09SDavid van Moolenbroek <code class="option">-r</code> option enables <span><strong class="command">host</strong></span> 145*00b67f09SDavid van Moolenbroek to mimic 146*00b67f09SDavid van Moolenbroek the behavior of a name server by making non-recursive queries and 147*00b67f09SDavid van Moolenbroek expecting to receive answers to those queries that are usually 148*00b67f09SDavid van Moolenbroek referrals to other name servers. 149*00b67f09SDavid van Moolenbroek </p> 150*00b67f09SDavid van Moolenbroek<p> 151*00b67f09SDavid van Moolenbroek By default, <span><strong class="command">host</strong></span> uses UDP when making 152*00b67f09SDavid van Moolenbroek queries. The 153*00b67f09SDavid van Moolenbroek <code class="option">-T</code> option makes it use a TCP connection when querying 154*00b67f09SDavid van Moolenbroek the name server. TCP will be automatically selected for queries that 155*00b67f09SDavid van Moolenbroek require it, such as zone transfer (AXFR) requests. 156*00b67f09SDavid van Moolenbroek </p> 157*00b67f09SDavid van Moolenbroek<p> 158*00b67f09SDavid van Moolenbroek The <code class="option">-4</code> option forces <span><strong class="command">host</strong></span> to only 159*00b67f09SDavid van Moolenbroek use IPv4 query transport. The <code class="option">-6</code> option forces 160*00b67f09SDavid van Moolenbroek <span><strong class="command">host</strong></span> to only use IPv6 query transport. 161*00b67f09SDavid van Moolenbroek </p> 162*00b67f09SDavid van Moolenbroek<p> 163*00b67f09SDavid van Moolenbroek The <code class="option">-t</code> option is used to select the query type. 164*00b67f09SDavid van Moolenbroek <em class="parameter"><code>type</code></em> can be any recognized query 165*00b67f09SDavid van Moolenbroek type: CNAME, 166*00b67f09SDavid van Moolenbroek NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified, 167*00b67f09SDavid van Moolenbroek <span><strong class="command">host</strong></span> automatically selects an appropriate 168*00b67f09SDavid van Moolenbroek query 169*00b67f09SDavid van Moolenbroek type. By default, it looks for A, AAAA, and MX records, but if the 170*00b67f09SDavid van Moolenbroek <code class="option">-C</code> option was given, queries will be made for SOA 171*00b67f09SDavid van Moolenbroek records, and if <em class="parameter"><code>name</code></em> is a 172*00b67f09SDavid van Moolenbroek dotted-decimal IPv4 173*00b67f09SDavid van Moolenbroek address or colon-delimited IPv6 address, <span><strong class="command">host</strong></span> will 174*00b67f09SDavid van Moolenbroek query for PTR records. If a query type of IXFR is chosen the starting 175*00b67f09SDavid van Moolenbroek serial number can be specified by appending an equal followed by the 176*00b67f09SDavid van Moolenbroek starting serial number (e.g. -t IXFR=12345678). 177*00b67f09SDavid van Moolenbroek </p> 178*00b67f09SDavid van Moolenbroek<p> 179*00b67f09SDavid van Moolenbroek The time to wait for a reply can be controlled through the 180*00b67f09SDavid van Moolenbroek <code class="option">-W</code> and <code class="option">-w</code> options. The 181*00b67f09SDavid van Moolenbroek <code class="option">-W</code> option makes <span><strong class="command">host</strong></span> 182*00b67f09SDavid van Moolenbroek wait for 183*00b67f09SDavid van Moolenbroek <em class="parameter"><code>wait</code></em> seconds. If <em class="parameter"><code>wait</code></em> 184*00b67f09SDavid van Moolenbroek is less than one, the wait interval is set to one second. When the 185*00b67f09SDavid van Moolenbroek <code class="option">-w</code> option is used, <span><strong class="command">host</strong></span> 186*00b67f09SDavid van Moolenbroek will 187*00b67f09SDavid van Moolenbroek effectively wait forever for a reply. The time to wait for a response 188*00b67f09SDavid van Moolenbroek will be set to the number of seconds given by the hardware's maximum 189*00b67f09SDavid van Moolenbroek value for an integer quantity. 190*00b67f09SDavid van Moolenbroek </p> 191*00b67f09SDavid van Moolenbroek<p> 192*00b67f09SDavid van Moolenbroek The <code class="option">-s</code> option tells <span><strong class="command">host</strong></span> 193*00b67f09SDavid van Moolenbroek <span class="emphasis"><em>not</em></span> to send the query to the next nameserver 194*00b67f09SDavid van Moolenbroek if any server responds with a SERVFAIL response, which is the 195*00b67f09SDavid van Moolenbroek reverse of normal stub resolver behavior. 196*00b67f09SDavid van Moolenbroek </p> 197*00b67f09SDavid van Moolenbroek<p> 198*00b67f09SDavid van Moolenbroek The <code class="option">-m</code> can be used to set the memory usage debugging 199*00b67f09SDavid van Moolenbroek flags 200*00b67f09SDavid van Moolenbroek <em class="parameter"><code>record</code></em>, <em class="parameter"><code>usage</code></em> and 201*00b67f09SDavid van Moolenbroek <em class="parameter"><code>trace</code></em>. 202*00b67f09SDavid van Moolenbroek </p> 203*00b67f09SDavid van Moolenbroek<p> 204*00b67f09SDavid van Moolenbroek The <code class="option">-V</code> option causes <span><strong class="command">host</strong></span> 205*00b67f09SDavid van Moolenbroek to print the version number and exit. 206*00b67f09SDavid van Moolenbroek </p> 207*00b67f09SDavid van Moolenbroek</div> 208*00b67f09SDavid van Moolenbroek<div class="refsect1" lang="en"> 209*00b67f09SDavid van Moolenbroek<a name="id2614966"></a><h2>IDN SUPPORT</h2> 210*00b67f09SDavid van Moolenbroek<p> 211*00b67f09SDavid van Moolenbroek If <span><strong class="command">host</strong></span> has been built with IDN (internationalized 212*00b67f09SDavid van Moolenbroek domain name) support, it can accept and display non-ASCII domain names. 213*00b67f09SDavid van Moolenbroek <span><strong class="command">host</strong></span> appropriately converts character encoding of 214*00b67f09SDavid van Moolenbroek domain name before sending a request to DNS server or displaying a 215*00b67f09SDavid van Moolenbroek reply from the server. 216*00b67f09SDavid van Moolenbroek If you'd like to turn off the IDN support for some reason, defines 217*00b67f09SDavid van Moolenbroek the <code class="envar">IDN_DISABLE</code> environment variable. 218*00b67f09SDavid van Moolenbroek The IDN support is disabled if the variable is set when 219*00b67f09SDavid van Moolenbroek <span><strong class="command">host</strong></span> runs. 220*00b67f09SDavid van Moolenbroek </p> 221*00b67f09SDavid van Moolenbroek</div> 222*00b67f09SDavid van Moolenbroek<div class="refsect1" lang="en"> 223*00b67f09SDavid van Moolenbroek<a name="id2614995"></a><h2>FILES</h2> 224*00b67f09SDavid van Moolenbroek<p><code class="filename">/etc/resolv.conf</code> 225*00b67f09SDavid van Moolenbroek </p> 226*00b67f09SDavid van Moolenbroek</div> 227*00b67f09SDavid van Moolenbroek<div class="refsect1" lang="en"> 228*00b67f09SDavid van Moolenbroek<a name="id2615009"></a><h2>SEE ALSO</h2> 229*00b67f09SDavid van Moolenbroek<p><span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>, 230*00b67f09SDavid van Moolenbroek <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>. 231*00b67f09SDavid van Moolenbroek </p> 232*00b67f09SDavid van Moolenbroek</div> 233*00b67f09SDavid van Moolenbroek</div> 234*00b67f09SDavid van Moolenbroek<div class="navfooter"> 235*00b67f09SDavid van Moolenbroek<hr> 236*00b67f09SDavid van Moolenbroek<table width="100%" summary="Navigation footer"> 237*00b67f09SDavid van Moolenbroek<tr> 238*00b67f09SDavid van Moolenbroek<td width="40%" align="left"> 239*00b67f09SDavid van Moolenbroek<a accesskey="p" href="man.dig.html">Prev</a>�</td> 240*00b67f09SDavid van Moolenbroek<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch13.html">Up</a></td> 241*00b67f09SDavid van Moolenbroek<td width="40%" align="right">�<a accesskey="n" href="man.delv.html">Next</a> 242*00b67f09SDavid van Moolenbroek</td> 243*00b67f09SDavid van Moolenbroek</tr> 244*00b67f09SDavid van Moolenbroek<tr> 245*00b67f09SDavid van Moolenbroek<td width="40%" align="left" valign="top">dig�</td> 246*00b67f09SDavid van Moolenbroek<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td> 247*00b67f09SDavid van Moolenbroek<td width="40%" align="right" valign="top">�delv</td> 248*00b67f09SDavid van Moolenbroek</tr> 249*00b67f09SDavid van Moolenbroek</table> 250*00b67f09SDavid van Moolenbroek</div> 251*00b67f09SDavid van Moolenbroek<p style="text-align: center;">BIND 9.10.2-P4</p> 252*00b67f09SDavid van Moolenbroek</body> 253*00b67f09SDavid van Moolenbroek</html> 254