Merge from vendor branch CVS:
[dragonfly.git] / contrib / bind-9.2.4rc7 / bin / dig / host.html
1 <!--
2  - Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
3  - Copyright (C) 2000, 2001, 2003  Internet Software Consortium.
4  -
5  - Permission to use, copy, modify, and distribute this software for any
6  - purpose with or without fee is hereby granted, provided that the above
7  - copyright notice and this permission notice appear in all copies.
8  -
9  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11  - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15  - PERFORMANCE OF THIS SOFTWARE.
16 -->
17
18 <!-- $Id: host.html,v 1.4.2.2 2004/03/15 04:44:38 marka Exp $ -->
19
20 <HTML
21 ><HEAD
22 ><TITLE
23 >host</TITLE
24 ><META
25 NAME="GENERATOR"
26 CONTENT="Modular DocBook HTML Stylesheet Version 1.73
27 "></HEAD
28 ><BODY
29 CLASS="REFENTRY"
30 BGCOLOR="#FFFFFF"
31 TEXT="#000000"
32 LINK="#0000FF"
33 VLINK="#840084"
34 ALINK="#0000FF"
35 ><H1
36 ><A
37 NAME="AEN1"
38 >host</A
39 ></H1
40 ><DIV
41 CLASS="REFNAMEDIV"
42 ><A
43 NAME="AEN8"
44 ></A
45 ><H2
46 >Name</H2
47 >host&nbsp;--&nbsp;DNS lookup utility</DIV
48 ><DIV
49 CLASS="REFSYNOPSISDIV"
50 ><A
51 NAME="AEN11"
52 ></A
53 ><H2
54 >Synopsis</H2
55 ><P
56 ><B
57 CLASS="COMMAND"
58 >host</B
59 >  [<TT
60 CLASS="OPTION"
61 >-aCdlnrTwv</TT
62 >] [<TT
63 CLASS="OPTION"
64 >-c <TT
65 CLASS="REPLACEABLE"
66 ><I
67 >class</I
68 ></TT
69 ></TT
70 >] [<TT
71 CLASS="OPTION"
72 >-N <TT
73 CLASS="REPLACEABLE"
74 ><I
75 >ndots</I
76 ></TT
77 ></TT
78 >] [<TT
79 CLASS="OPTION"
80 >-R <TT
81 CLASS="REPLACEABLE"
82 ><I
83 >number</I
84 ></TT
85 ></TT
86 >] [<TT
87 CLASS="OPTION"
88 >-t <TT
89 CLASS="REPLACEABLE"
90 ><I
91 >type</I
92 ></TT
93 ></TT
94 >] [<TT
95 CLASS="OPTION"
96 >-W <TT
97 CLASS="REPLACEABLE"
98 ><I
99 >wait</I
100 ></TT
101 ></TT
102 >] {name} [server]</P
103 ></DIV
104 ><DIV
105 CLASS="REFSECT1"
106 ><A
107 NAME="AEN33"
108 ></A
109 ><H2
110 >DESCRIPTION</H2
111 ><P
112 ><B
113 CLASS="COMMAND"
114 >host</B
115 >
116 is a simple utility for performing DNS lookups.
117 It is normally used to convert names to IP addresses and vice versa.
118 When no arguments or options are given,
119 <B
120 CLASS="COMMAND"
121 >host</B
122 >
123 prints a short summary of its command line arguments and options.</P
124 ><P
125 ><TT
126 CLASS="PARAMETER"
127 ><I
128 >name</I
129 ></TT
130 > is the domain name that is to be looked
131 up.  It can also be a dotted-decimal IPv4 address or a colon-delimited
132 IPv6 address, in which case <B
133 CLASS="COMMAND"
134 >host</B
135 > will by default
136 perform a reverse lookup for that address.
137 <TT
138 CLASS="PARAMETER"
139 ><I
140 >server</I
141 ></TT
142 > is an optional argument which is either
143 the name or IP address of the name server that <B
144 CLASS="COMMAND"
145 >host</B
146 >
147 should query instead of the server or servers listed in
148 <TT
149 CLASS="FILENAME"
150 >/etc/resolv.conf</TT
151 >.</P
152 ><P
153 >The <TT
154 CLASS="OPTION"
155 >-a</TT
156 > (all) option is equivalent to setting the
157 <TT
158 CLASS="OPTION"
159 >-v</TT
160 > option and asking <B
161 CLASS="COMMAND"
162 >host</B
163 > to make
164 a query of type ANY.</P
165 ><P
166 >When the <TT
167 CLASS="OPTION"
168 >-C</TT
169 > option is used, <B
170 CLASS="COMMAND"
171 >host</B
172 >
173 will attempt to display the SOA records for zone
174 <TT
175 CLASS="PARAMETER"
176 ><I
177 >name</I
178 ></TT
179 > from all the listed authoritative name
180 servers for that zone.  The list of name servers is defined by the NS
181 records that are found for the zone.</P
182 ><P
183 >The <TT
184 CLASS="OPTION"
185 >-c</TT
186 > option instructs to make a DNS query of class
187 <TT
188 CLASS="PARAMETER"
189 ><I
190 >class</I
191 ></TT
192 >.  This can be used to lookup Hesiod or
193 Chaosnet class resource records.  The default class is IN (Internet).</P
194 ><P
195 >Verbose output is generated by <B
196 CLASS="COMMAND"
197 >host</B
198 > when the
199 <TT
200 CLASS="OPTION"
201 >-d</TT
202 > or <TT
203 CLASS="OPTION"
204 >-v</TT
205 > option is used.  The two
206 options are equivalent.  They have been provided for backwards
207 compatibility.  In previous versions, the <TT
208 CLASS="OPTION"
209 >-d</TT
210 > option
211 switched on debugging traces and <TT
212 CLASS="OPTION"
213 >-v</TT
214 > enabled verbose
215 output.</P
216 ><P
217 >List mode is selected by the <TT
218 CLASS="OPTION"
219 >-l</TT
220 > option.  This makes
221 <B
222 CLASS="COMMAND"
223 >host</B
224 > perform a zone transfer for zone
225 <TT
226 CLASS="PARAMETER"
227 ><I
228 >name</I
229 ></TT
230 >.  The argument is provided for
231 compatibility with older implementations.  This option is equivalent
232 to making a query of type AXFR.</P
233 ><P
234 >The <TT
235 CLASS="OPTION"
236 >-n</TT
237 >
238 option specifies that reverse lookups of IPv6 addresses should
239 use the IP6.INT domain and "nibble" labels as defined in RFC1886.
240 The default is to use IP6.ARPA and binary labels as defined in RFC2874.</P
241 ><P
242 >The <TT
243 CLASS="OPTION"
244 >-N</TT
245 > option sets the number of dots that have to be
246 in <TT
247 CLASS="PARAMETER"
248 ><I
249 >name</I
250 ></TT
251 > for it to be considered absolute.  The
252 default value is that defined using the ndots statement in
253 <TT
254 CLASS="FILENAME"
255 >/etc/resolv.conf</TT
256 >, or 1 if no ndots statement is
257 present.  Names with fewer dots are interpreted as relative names and
258 will be searched for in the domains listed in the <SPAN
259 CLASS="TYPE"
260 >search</SPAN
261 >
262 or <SPAN
263 CLASS="TYPE"
264 >domain</SPAN
265 > directive in
266 <TT
267 CLASS="FILENAME"
268 >/etc/resolv.conf</TT
269 >.</P
270 ><P
271 >The number of UDP retries for a lookup can be changed with the
272 <TT
273 CLASS="OPTION"
274 >-R</TT
275 > option.  <TT
276 CLASS="PARAMETER"
277 ><I
278 >number</I
279 ></TT
280 > indicates
281 how many times <B
282 CLASS="COMMAND"
283 >host</B
284 > will repeat a query that does
285 not get answered.  The default number of retries is 1.  If
286 <TT
287 CLASS="PARAMETER"
288 ><I
289 >number</I
290 ></TT
291 > is negative or zero, the number of
292 retries will default to 1.</P
293 ><P
294 >Non-recursive queries can be made via the <TT
295 CLASS="OPTION"
296 >-r</TT
297 > option.
298 Setting this option clears the <SPAN
299 CLASS="TYPE"
300 >RD</SPAN
301 > &mdash; recursion
302 desired &mdash; bit in the query which <B
303 CLASS="COMMAND"
304 >host</B
305 > makes.
306 This should mean that the name server receiving the query will not
307 attempt to resolve <TT
308 CLASS="PARAMETER"
309 ><I
310 >name</I
311 ></TT
312 >.  The
313 <TT
314 CLASS="OPTION"
315 >-r</TT
316 > option enables <B
317 CLASS="COMMAND"
318 >host</B
319 > to mimic
320 the behaviour of a name server by making non-recursive queries and
321 expecting to receive answers to those queries that are usually
322 referrals to other name servers.</P
323 ><P
324 >By default <B
325 CLASS="COMMAND"
326 >host</B
327 > uses UDP when making queries.  The
328 <TT
329 CLASS="OPTION"
330 >-T</TT
331 > option makes it use a TCP connection when querying
332 the name server.  TCP will be automatically selected for queries that
333 require it, such as zone transfer (AXFR) requests.</P
334 ><P
335 >The <TT
336 CLASS="OPTION"
337 >-t</TT
338 > option is used to select the query type.
339 <TT
340 CLASS="PARAMETER"
341 ><I
342 >type</I
343 ></TT
344 > can be any recognised query type: CNAME,
345 NS, SOA, SIG, KEY, AXFR, etc.  When no query type is specified,
346 <B
347 CLASS="COMMAND"
348 >host</B
349 > automatically selects an appropriate query
350 type.  By default it looks for A records, but if the
351 <TT
352 CLASS="OPTION"
353 >-C</TT
354 > option was given, queries will be made for SOA
355 records, and if <TT
356 CLASS="PARAMETER"
357 ><I
358 >name</I
359 ></TT
360 > is a dotted-decimal IPv4
361 address or colon-delimited IPv6 address, <B
362 CLASS="COMMAND"
363 >host</B
364 > will
365 query for PTR records.</P
366 ><P
367 >The time to wait for a reply can be controlled through the
368 <TT
369 CLASS="OPTION"
370 >-W</TT
371 > and <TT
372 CLASS="OPTION"
373 >-w</TT
374 > options.  The
375 <TT
376 CLASS="OPTION"
377 >-W</TT
378 > option makes <B
379 CLASS="COMMAND"
380 >host</B
381 > wait for
382 <TT
383 CLASS="PARAMETER"
384 ><I
385 >wait</I
386 ></TT
387 > seconds.  If <TT
388 CLASS="PARAMETER"
389 ><I
390 >wait</I
391 ></TT
392 >
393 is less than one, the wait interval is set to one second.  When the
394 <TT
395 CLASS="OPTION"
396 >-w</TT
397 > option is used, <B
398 CLASS="COMMAND"
399 >host</B
400 > will
401 effectively wait forever for a reply.  The time to wait for a response
402 will be set to the number of seconds given by the hardware's maximum
403 value for an integer quantity.</P
404 ></DIV
405 ><DIV
406 CLASS="REFSECT1"
407 ><A
408 NAME="AEN105"
409 ></A
410 ><H2
411 >FILES</H2
412 ><P
413 ><TT
414 CLASS="FILENAME"
415 >/etc/resolv.conf</TT
416 ></P
417 ></DIV
418 ><DIV
419 CLASS="REFSECT1"
420 ><A
421 NAME="AEN109"
422 ></A
423 ><H2
424 >SEE ALSO</H2
425 ><P
426 ><SPAN
427 CLASS="CITEREFENTRY"
428 ><SPAN
429 CLASS="REFENTRYTITLE"
430 >dig</SPAN
431 >(1)</SPAN
432 >,
433 <SPAN
434 CLASS="CITEREFENTRY"
435 ><SPAN
436 CLASS="REFENTRYTITLE"
437 >named</SPAN
438 >(8)</SPAN
439 >.</P
440 ></DIV
441 ></BODY
442 ></HTML
443 >