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