]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bind9/bin/dig/host.docbook
This commit was generated by cvs2svn to compensate for changes in r153667,
[FreeBSD/FreeBSD.git] / contrib / bind9 / bin / dig / host.docbook
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <!--
3  - Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
4  - Copyright (C) 2000-2002  Internet Software Consortium.
5  -
6  - Permission to use, copy, modify, and distribute this software for any
7  - purpose with or without fee is hereby granted, provided that the above
8  - copyright notice and this permission notice appear in all copies.
9  -
10  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12  - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  - PERFORMANCE OF THIS SOFTWARE.
17 -->
18
19 <!-- $Id: host.docbook,v 1.2.2.2.4.5 2004/04/13 01:26:26 marka Exp $ -->
20
21 <refentry>
22
23 <refentryinfo>
24 <date>Jun 30, 2000</date>
25 </refentryinfo>
26
27 <refmeta>
28 <refentrytitle>host</refentrytitle>
29 <manvolnum>1</manvolnum>
30 <refmiscinfo>BIND9</refmiscinfo>
31 </refmeta>
32
33 <refnamediv>
34 <refname>host</refname>
35 <refpurpose>DNS lookup utility</refpurpose>
36 </refnamediv>
37
38 <refsynopsisdiv>
39 <cmdsynopsis>
40   <command>host</command>
41   <arg><option>-aCdlnrTwv</option></arg>
42   <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
43   <arg><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
44   <arg><option>-R <replaceable class="parameter">number</replaceable></option></arg>
45   <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
46   <arg><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
47   <arg><option>-4</option></arg>
48   <arg><option>-6</option></arg>
49   <arg choice=req>name</arg>
50   <arg choice=opt>server</arg>
51 </cmdsynopsis>
52 </refsynopsisdiv>
53
54 <refsect1>
55 <title>DESCRIPTION</title>
56 <para>
57 <command>host</command>
58 is a simple utility for performing DNS lookups.
59 It is normally used to convert names to IP addresses and vice versa.
60 When no arguments or options are given,
61 <command>host</command>
62 prints a short summary of its command line arguments and options.
63 </para>
64
65 <para>
66 <parameter>name</parameter> is the domain name that is to be looked
67 up.  It can also be a dotted-decimal IPv4 address or a colon-delimited
68 IPv6 address, in which case <command>host</command> will by default
69 perform a reverse lookup for that address.
70 <parameter>server</parameter> is an optional argument which is either
71 the name or IP address of the name server that <command>host</command>
72 should query instead of the server or servers listed in
73 <filename>/etc/resolv.conf</filename>.
74 </para>
75
76 <para>
77 The <option>-a</option> (all) option is equivalent to setting the
78 <option>-v</option> option and asking <command>host</command> to make
79 a query of type ANY.
80 </para>
81
82 <para>
83 When the <option>-C</option> option is used, <command>host</command>
84 will attempt to display the SOA records for zone
85 <parameter>name</parameter> from all the listed authoritative name
86 servers for that zone.  The list of name servers is defined by the NS
87 records that are found for the zone.
88 </para>
89
90 <para>
91 The <option>-c</option> option instructs to make a DNS query of class
92 <parameter>class</parameter>.  This can be used to lookup Hesiod or
93 Chaosnet class resource records.  The default class is IN (Internet).
94 </para>
95
96 <para>
97 Verbose output is generated by <command>host</command> when the
98 <option>-d</option> or <option>-v</option> option is used.  The two
99 options are equivalent.  They have been provided for backwards
100 compatibility.  In previous versions, the <option>-d</option> option
101 switched on debugging traces and <option>-v</option> enabled verbose
102 output.
103 </para>
104
105 <para>
106 List mode is selected by the <option>-l</option> option.  This makes
107 <command>host</command> perform a zone transfer for zone
108 <parameter>name</parameter>.  Transfer the zone printing out the NS, PTR
109 and address records (A/AAAA).  If combined with <option>-a</option>
110 all records will be printed.  
111 </para>
112
113 <para>
114 The <option>-i</option>
115 option specifies that reverse lookups of IPv6 addresses should
116 use the IP6.INT domain as defined in RFC1886.
117 The default is to use IP6.ARPA.
118 </para>
119
120 <para>
121 The <option>-N</option> option sets the number of dots that have to be
122 in <parameter>name</parameter> for it to be considered absolute.  The
123 default value is that defined using the ndots statement in
124 <filename>/etc/resolv.conf</filename>, or 1 if no ndots statement is
125 present.  Names with fewer dots are interpreted as relative names and
126 will be searched for in the domains listed in the <type>search</type>
127 or <type>domain</type> directive in
128 <filename>/etc/resolv.conf</filename>.
129 </para>
130
131 <para>
132 The number of UDP retries for a lookup can be changed with the
133 <option>-R</option> option.  <parameter>number</parameter> indicates
134 how many times <command>host</command> will repeat a query that does
135 not get answered.  The default number of retries is 1.  If
136 <parameter>number</parameter> is negative or zero, the number of
137 retries will default to 1.
138 </para>
139
140 <para>
141 Non-recursive queries can be made via the <option>-r</option> option.
142 Setting this option clears the <type>RD</type> &mdash; recursion
143 desired &mdash; bit in the query which <command>host</command> makes.
144 This should mean that the name server receiving the query will not
145 attempt to resolve <parameter>name</parameter>.  The
146 <option>-r</option> option enables <command>host</command> to mimic
147 the behaviour of a name server by making non-recursive queries and
148 expecting to receive answers to those queries that are usually
149 referrals to other name servers.
150 </para>
151
152 <para>
153 By default <command>host</command> uses UDP when making queries.  The
154 <option>-T</option> option makes it use a TCP connection when querying
155 the name server.  TCP will be automatically selected for queries that
156 require it, such as zone transfer (AXFR) requests.
157 </para>
158
159 <para>
160 The <option>-4</option> option forces <command>host</command> to only
161 use IPv4 query transport.  The <option>-6</option> option forces
162 <command>host</command> to only use IPv6 query transport.
163 </para>
164
165 <para>
166 The <option>-t</option> option is used to select the query type.
167 <parameter>type</parameter> can be any recognised query type: CNAME,
168 NS, SOA, SIG, KEY, AXFR, etc.  When no query type is specified,
169 <command>host</command> automatically selects an appropriate query
170 type.  By default it looks for A records, but if the
171 <option>-C</option> option was given, queries will be made for SOA
172 records, and if <parameter>name</parameter> is a dotted-decimal IPv4
173 address or colon-delimited IPv6 address, <command>host</command> will
174 query for PTR records.  If a query type of IXFR is chosen the starting
175 serial number can be specified by appending an equal followed by the
176 starting serial number (e.g. -t IXFR=12345678).
177 </para>
178
179 <para>
180 The time to wait for a reply can be controlled through the
181 <option>-W</option> and <option>-w</option> options.  The
182 <option>-W</option> option makes <command>host</command> wait for
183 <parameter>wait</parameter> seconds.  If <parameter>wait</parameter>
184 is less than one, the wait interval is set to one second.  When the
185 <option>-w</option> option is used, <command>host</command> will
186 effectively wait forever for a reply.  The time to wait for a response
187 will be set to the number of seconds given by the hardware's maximum
188 value for an integer quantity.
189 </para>
190
191 </refsect1>
192
193 <refsect1>
194 <title>FILES</title>
195 <para>
196 <filename>/etc/resolv.conf</filename>
197 </para>
198 </refsect1>
199
200 <refsect1>
201 <title>SEE ALSO</title>
202 <para>
203 <citerefentry>
204 <refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
205 </citerefentry>,
206 <citerefentry>
207 <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
208 </citerefentry>.
209 </para>
210
211 </refsect1>
212 </refentry>