]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bind9/bin/dig/host.html
This commit was generated by cvs2svn to compensate for changes in r151970,
[FreeBSD/FreeBSD.git] / contrib / bind9 / bin / dig / host.html
1 <!--
2  - Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
3  - Copyright (C) 2000-2002  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.1.4.6 2004/08/22 23:38:58 marka Exp $ -->
19
20 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
21 <HTML
22 ><HEAD
23 ><TITLE
24 >host</TITLE
25 ><META
26 NAME="GENERATOR"
27 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></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 ></A
39 >host</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 >  [<VAR
60 CLASS="OPTION"
61 >-aCdlnrTwv</VAR
62 >] [<VAR
63 CLASS="OPTION"
64 >-c <VAR
65 CLASS="REPLACEABLE"
66 >class</VAR
67 ></VAR
68 >] [<VAR
69 CLASS="OPTION"
70 >-N <VAR
71 CLASS="REPLACEABLE"
72 >ndots</VAR
73 ></VAR
74 >] [<VAR
75 CLASS="OPTION"
76 >-R <VAR
77 CLASS="REPLACEABLE"
78 >number</VAR
79 ></VAR
80 >] [<VAR
81 CLASS="OPTION"
82 >-t <VAR
83 CLASS="REPLACEABLE"
84 >type</VAR
85 ></VAR
86 >] [<VAR
87 CLASS="OPTION"
88 >-W <VAR
89 CLASS="REPLACEABLE"
90 >wait</VAR
91 ></VAR
92 >] [<VAR
93 CLASS="OPTION"
94 >-4</VAR
95 >] [<VAR
96 CLASS="OPTION"
97 >-6</VAR
98 >] {name} [server]</P
99 ></DIV
100 ><DIV
101 CLASS="REFSECT1"
102 ><A
103 NAME="AEN37"
104 ></A
105 ><H2
106 >DESCRIPTION</H2
107 ><P
108 ><B
109 CLASS="COMMAND"
110 >host</B
111 >
112 is a simple utility for performing DNS lookups.
113 It is normally used to convert names to IP addresses and vice versa.
114 When no arguments or options are given,
115 <B
116 CLASS="COMMAND"
117 >host</B
118 >
119 prints a short summary of its command line arguments and options.</P
120 ><P
121 ><VAR
122 CLASS="PARAMETER"
123 >name</VAR
124 > is the domain name that is to be looked
125 up.  It can also be a dotted-decimal IPv4 address or a colon-delimited
126 IPv6 address, in which case <B
127 CLASS="COMMAND"
128 >host</B
129 > will by default
130 perform a reverse lookup for that address.
131 <VAR
132 CLASS="PARAMETER"
133 >server</VAR
134 > is an optional argument which is either
135 the name or IP address of the name server that <B
136 CLASS="COMMAND"
137 >host</B
138 >
139 should query instead of the server or servers listed in
140 <TT
141 CLASS="FILENAME"
142 >/etc/resolv.conf</TT
143 >.</P
144 ><P
145 >The <VAR
146 CLASS="OPTION"
147 >-a</VAR
148 > (all) option is equivalent to setting the
149 <VAR
150 CLASS="OPTION"
151 >-v</VAR
152 > option and asking <B
153 CLASS="COMMAND"
154 >host</B
155 > to make
156 a query of type ANY.</P
157 ><P
158 >When the <VAR
159 CLASS="OPTION"
160 >-C</VAR
161 > option is used, <B
162 CLASS="COMMAND"
163 >host</B
164 >
165 will attempt to display the SOA records for zone
166 <VAR
167 CLASS="PARAMETER"
168 >name</VAR
169 > from all the listed authoritative name
170 servers for that zone.  The list of name servers is defined by the NS
171 records that are found for the zone.</P
172 ><P
173 >The <VAR
174 CLASS="OPTION"
175 >-c</VAR
176 > option instructs to make a DNS query of class
177 <VAR
178 CLASS="PARAMETER"
179 >class</VAR
180 >.  This can be used to lookup Hesiod or
181 Chaosnet class resource records.  The default class is IN (Internet).</P
182 ><P
183 >Verbose output is generated by <B
184 CLASS="COMMAND"
185 >host</B
186 > when the
187 <VAR
188 CLASS="OPTION"
189 >-d</VAR
190 > or <VAR
191 CLASS="OPTION"
192 >-v</VAR
193 > option is used.  The two
194 options are equivalent.  They have been provided for backwards
195 compatibility.  In previous versions, the <VAR
196 CLASS="OPTION"
197 >-d</VAR
198 > option
199 switched on debugging traces and <VAR
200 CLASS="OPTION"
201 >-v</VAR
202 > enabled verbose
203 output.</P
204 ><P
205 >List mode is selected by the <VAR
206 CLASS="OPTION"
207 >-l</VAR
208 > option.  This makes
209 <B
210 CLASS="COMMAND"
211 >host</B
212 > perform a zone transfer for zone
213 <VAR
214 CLASS="PARAMETER"
215 >name</VAR
216 >.  Transfer the zone printing out the NS, PTR
217 and address records (A/AAAA).  If combined with <VAR
218 CLASS="OPTION"
219 >-a</VAR
220 >
221 all records will be printed.  </P
222 ><P
223 >The <VAR
224 CLASS="OPTION"
225 >-i</VAR
226 >
227 option specifies that reverse lookups of IPv6 addresses should
228 use the IP6.INT domain as defined in RFC1886.
229 The default is to use IP6.ARPA.</P
230 ><P
231 >The <VAR
232 CLASS="OPTION"
233 >-N</VAR
234 > option sets the number of dots that have to be
235 in <VAR
236 CLASS="PARAMETER"
237 >name</VAR
238 > for it to be considered absolute.  The
239 default value is that defined using the ndots statement in
240 <TT
241 CLASS="FILENAME"
242 >/etc/resolv.conf</TT
243 >, or 1 if no ndots statement is
244 present.  Names with fewer dots are interpreted as relative names and
245 will be searched for in the domains listed in the <SPAN
246 CLASS="TYPE"
247 >search</SPAN
248 >
249 or <SPAN
250 CLASS="TYPE"
251 >domain</SPAN
252 > directive in
253 <TT
254 CLASS="FILENAME"
255 >/etc/resolv.conf</TT
256 >.</P
257 ><P
258 >The number of UDP retries for a lookup can be changed with the
259 <VAR
260 CLASS="OPTION"
261 >-R</VAR
262 > option.  <VAR
263 CLASS="PARAMETER"
264 >number</VAR
265 > indicates
266 how many times <B
267 CLASS="COMMAND"
268 >host</B
269 > will repeat a query that does
270 not get answered.  The default number of retries is 1.  If
271 <VAR
272 CLASS="PARAMETER"
273 >number</VAR
274 > is negative or zero, the number of
275 retries will default to 1.</P
276 ><P
277 >Non-recursive queries can be made via the <VAR
278 CLASS="OPTION"
279 >-r</VAR
280 > option.
281 Setting this option clears the <SPAN
282 CLASS="TYPE"
283 >RD</SPAN
284 > &mdash; recursion
285 desired &mdash; bit in the query which <B
286 CLASS="COMMAND"
287 >host</B
288 > makes.
289 This should mean that the name server receiving the query will not
290 attempt to resolve <VAR
291 CLASS="PARAMETER"
292 >name</VAR
293 >.  The
294 <VAR
295 CLASS="OPTION"
296 >-r</VAR
297 > option enables <B
298 CLASS="COMMAND"
299 >host</B
300 > to mimic
301 the behaviour of a name server by making non-recursive queries and
302 expecting to receive answers to those queries that are usually
303 referrals to other name servers.</P
304 ><P
305 >By default <B
306 CLASS="COMMAND"
307 >host</B
308 > uses UDP when making queries.  The
309 <VAR
310 CLASS="OPTION"
311 >-T</VAR
312 > option makes it use a TCP connection when querying
313 the name server.  TCP will be automatically selected for queries that
314 require it, such as zone transfer (AXFR) requests.</P
315 ><P
316 >The <VAR
317 CLASS="OPTION"
318 >-4</VAR
319 > option forces <B
320 CLASS="COMMAND"
321 >host</B
322 > to only
323 use IPv4 query transport.  The <VAR
324 CLASS="OPTION"
325 >-6</VAR
326 > option forces
327 <B
328 CLASS="COMMAND"
329 >host</B
330 > to only use IPv6 query transport.</P
331 ><P
332 >The <VAR
333 CLASS="OPTION"
334 >-t</VAR
335 > option is used to select the query type.
336 <VAR
337 CLASS="PARAMETER"
338 >type</VAR
339 > can be any recognised query type: CNAME,
340 NS, SOA, SIG, KEY, AXFR, etc.  When no query type is specified,
341 <B
342 CLASS="COMMAND"
343 >host</B
344 > automatically selects an appropriate query
345 type.  By default it looks for A records, but if the
346 <VAR
347 CLASS="OPTION"
348 >-C</VAR
349 > option was given, queries will be made for SOA
350 records, and if <VAR
351 CLASS="PARAMETER"
352 >name</VAR
353 > is a dotted-decimal IPv4
354 address or colon-delimited IPv6 address, <B
355 CLASS="COMMAND"
356 >host</B
357 > will
358 query for PTR records.  If a query type of IXFR is chosen the starting
359 serial number can be specified by appending an equal followed by the
360 starting serial number (e.g. -t IXFR=12345678).</P
361 ><P
362 >The time to wait for a reply can be controlled through the
363 <VAR
364 CLASS="OPTION"
365 >-W</VAR
366 > and <VAR
367 CLASS="OPTION"
368 >-w</VAR
369 > options.  The
370 <VAR
371 CLASS="OPTION"
372 >-W</VAR
373 > option makes <B
374 CLASS="COMMAND"
375 >host</B
376 > wait for
377 <VAR
378 CLASS="PARAMETER"
379 >wait</VAR
380 > seconds.  If <VAR
381 CLASS="PARAMETER"
382 >wait</VAR
383 >
384 is less than one, the wait interval is set to one second.  When the
385 <VAR
386 CLASS="OPTION"
387 >-w</VAR
388 > option is used, <B
389 CLASS="COMMAND"
390 >host</B
391 > will
392 effectively wait forever for a reply.  The time to wait for a response
393 will be set to the number of seconds given by the hardware's maximum
394 value for an integer quantity.</P
395 ></DIV
396 ><DIV
397 CLASS="REFSECT1"
398 ><A
399 NAME="AEN115"
400 ></A
401 ><H2
402 >FILES</H2
403 ><P
404 ><TT
405 CLASS="FILENAME"
406 >/etc/resolv.conf</TT
407 ></P
408 ></DIV
409 ><DIV
410 CLASS="REFSECT1"
411 ><A
412 NAME="AEN119"
413 ></A
414 ><H2
415 >SEE ALSO</H2
416 ><P
417 ><SPAN
418 CLASS="CITEREFENTRY"
419 ><SPAN
420 CLASS="REFENTRYTITLE"
421 >dig</SPAN
422 >(1)</SPAN
423 >,
424 <SPAN
425 CLASS="CITEREFENTRY"
426 ><SPAN
427 CLASS="REFENTRYTITLE"
428 >named</SPAN
429 >(8)</SPAN
430 >.</P
431 ></DIV
432 ></BODY
433 ></HTML
434 >