Merge from vendor branch CVS:
[dragonfly.git] / contrib / bind-9.2.4rc7 / bin / dig / host.1
1 .\" Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
2 .\" Copyright (C) 2000-2003  Internet Software Consortium.
3 .\"
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 .\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 .\" AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 .\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 .\" PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .\" $Id: host.1,v 1.11.2.2 2004/03/15 04:44:38 marka Exp $
17 .\"
18 .TH "HOST" "1" "Jun 30, 2000" "BIND9" ""
19 .SH NAME
20 host \- DNS lookup utility
21 .SH SYNOPSIS
22 .sp
23 \fBhost\fR [ \fB-aCdlnrTwv\fR ]  [ \fB-c \fIclass\fB\fR ]  [ \fB-N \fIndots\fB\fR ]  [ \fB-R \fInumber\fB\fR ]  [ \fB-t \fItype\fB\fR ]  [ \fB-W \fIwait\fB\fR ]  \fBname\fR [ \fBserver\fR ] 
24 .SH "DESCRIPTION"
25 .PP
26 \fBhost\fR
27 is a simple utility for performing DNS lookups.
28 It is normally used to convert names to IP addresses and vice versa.
29 When no arguments or options are given,
30 \fBhost\fR
31 prints a short summary of its command line arguments and options.
32 .PP
33 \fIname\fR is the domain name that is to be looked
34 up. It can also be a dotted-decimal IPv4 address or a colon-delimited
35 IPv6 address, in which case \fBhost\fR will by default
36 perform a reverse lookup for that address.
37 \fIserver\fR is an optional argument which is either
38 the name or IP address of the name server that \fBhost\fR
39 should query instead of the server or servers listed in
40 \fI/etc/resolv.conf\fR.
41 .PP
42 The \fB-a\fR (all) option is equivalent to setting the
43 \fB-v\fR option and asking \fBhost\fR to make
44 a query of type ANY.
45 .PP
46 When the \fB-C\fR option is used, \fBhost\fR
47 will attempt to display the SOA records for zone
48 \fIname\fR from all the listed authoritative name
49 servers for that zone. The list of name servers is defined by the NS
50 records that are found for the zone.
51 .PP
52 The \fB-c\fR option instructs to make a DNS query of class
53 \fIclass\fR. This can be used to lookup Hesiod or
54 Chaosnet class resource records. The default class is IN (Internet).
55 .PP
56 Verbose output is generated by \fBhost\fR when the
57 \fB-d\fR or \fB-v\fR option is used. The two
58 options are equivalent. They have been provided for backwards
59 compatibility. In previous versions, the \fB-d\fR option
60 switched on debugging traces and \fB-v\fR enabled verbose
61 output.
62 .PP
63 List mode is selected by the \fB-l\fR option. This makes
64 \fBhost\fR perform a zone transfer for zone
65 \fIname\fR. The argument is provided for
66 compatibility with older implementations. This option is equivalent
67 to making a query of type AXFR.
68 .PP
69 The \fB-n\fR
70 option specifies that reverse lookups of IPv6 addresses should
71 use the IP6.INT domain and "nibble" labels as defined in RFC1886.
72 The default is to use IP6.ARPA and binary labels as defined in RFC2874.
73 .PP
74 The \fB-N\fR option sets the number of dots that have to be
75 in \fIname\fR for it to be considered absolute. The
76 default value is that defined using the ndots statement in
77 \fI/etc/resolv.conf\fR, or 1 if no ndots statement is
78 present. Names with fewer dots are interpreted as relative names and
79 will be searched for in the domains listed in the \fBsearch\fR
80 or \fBdomain\fR directive in
81 \fI/etc/resolv.conf\fR.
82 .PP
83 The number of UDP retries for a lookup can be changed with the
84 \fB-R\fR option. \fInumber\fR indicates
85 how many times \fBhost\fR will repeat a query that does
86 not get answered. The default number of retries is 1. If
87 \fInumber\fR is negative or zero, the number of
88 retries will default to 1.
89 .PP
90 Non-recursive queries can be made via the \fB-r\fR option.
91 Setting this option clears the \fBRD\fR \(em recursion
92 desired \(em bit in the query which \fBhost\fR makes.
93 This should mean that the name server receiving the query will not
94 attempt to resolve \fIname\fR. The
95 \fB-r\fR option enables \fBhost\fR to mimic
96 the behaviour of a name server by making non-recursive queries and
97 expecting to receive answers to those queries that are usually
98 referrals to other name servers.
99 .PP
100 By default \fBhost\fR uses UDP when making queries. The
101 \fB-T\fR option makes it use a TCP connection when querying
102 the name server. TCP will be automatically selected for queries that
103 require it, such as zone transfer (AXFR) requests.
104 .PP
105 The \fB-t\fR option is used to select the query type.
106 \fItype\fR can be any recognised query type: CNAME,
107 NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
108 \fBhost\fR automatically selects an appropriate query
109 type. By default it looks for A records, but if the
110 \fB-C\fR option was given, queries will be made for SOA
111 records, and if \fIname\fR is a dotted-decimal IPv4
112 address or colon-delimited IPv6 address, \fBhost\fR will
113 query for PTR records.
114 .PP
115 The time to wait for a reply can be controlled through the
116 \fB-W\fR and \fB-w\fR options. The
117 \fB-W\fR option makes \fBhost\fR wait for
118 \fIwait\fR seconds. If \fIwait\fR
119 is less than one, the wait interval is set to one second. When the
120 \fB-w\fR option is used, \fBhost\fR will
121 effectively wait forever for a reply. The time to wait for a response
122 will be set to the number of seconds given by the hardware's maximum
123 value for an integer quantity.
124 .SH "FILES"
125 .PP
126 \fI/etc/resolv.conf\fR
127 .SH "SEE ALSO"
128 .PP
129 \fBdig\fR(1),
130 \fBnamed\fR(8).