Merge from vendor branch FILE:
[dragonfly.git] / contrib / bind-9.3 / bin / dig / host.1
1 .\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
2 .\" Copyright (C) 2000-2002 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.1.4.7 2005/10/13 02:33:43 marka Exp $
17 .\"
18 .hy 0
19 .ad l
20 .\" ** You probably do not want to edit this file directly **
21 .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
22 .\" Instead of manually editing it, you probably should edit the DocBook XML
23 .\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
24 .TH "HOST" "1" "Jun 30, 2000" "BIND9" "BIND9"
25 .\" disable hyphenation
26 .nh
27 .\" disable justification (adjust text to left margin only)
28 .ad l
29 .SH "NAME"
30 host \- DNS lookup utility
31 .SH "SYNOPSIS"
32 .HP 5
33 \fBhost\fR [\fB\-aCdlnrTwv\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-N\ \fR\fB\fIndots\fR\fR] [\fB\-R\ \fR\fB\fInumber\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-W\ \fR\fB\fIwait\fR\fR] [\fB\-4\fR] [\fB\-6\fR] {name} [server]
34 .SH "DESCRIPTION"
35 .PP
36 \fBhost\fR
37 is a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses and vice versa. When no arguments or options are given,
38 \fBhost\fR
39 prints a short summary of its command line arguments and options.
40 .PP
41 \fIname\fR
42 is the domain name that is to be looked up. It can also be a dotted\-decimal IPv4 address or a colon\-delimited IPv6 address, in which case
43 \fBhost\fR
44 will by default perform a reverse lookup for that address.
45 \fIserver\fR
46 is an optional argument which is either the name or IP address of the name server that
47 \fBhost\fR
48 should query instead of the server or servers listed in
49 \fI/etc/resolv.conf\fR.
50 .PP
51 The
52 \fB\-a\fR
53 (all) option is equivalent to setting the
54 \fB\-v\fR
55 option and asking
56 \fBhost\fR
57 to make a query of type ANY.
58 .PP
59 When the
60 \fB\-C\fR
61 option is used,
62 \fBhost\fR
63 will attempt to display the SOA records for zone
64 \fIname\fR
65 from all the listed authoritative name servers for that zone. The list of name servers is defined by the NS records that are found for the zone.
66 .PP
67 The
68 \fB\-c\fR
69 option instructs to make a DNS query of class
70 \fIclass\fR. This can be used to lookup Hesiod or Chaosnet class resource records. The default class is IN (Internet).
71 .PP
72 Verbose output is generated by
73 \fBhost\fR
74 when the
75 \fB\-d\fR
76 or
77 \fB\-v\fR
78 option is used. The two options are equivalent. They have been provided for backwards compatibility. In previous versions, the
79 \fB\-d\fR
80 option switched on debugging traces and
81 \fB\-v\fR
82 enabled verbose output.
83 .PP
84 List mode is selected by the
85 \fB\-l\fR
86 option. This makes
87 \fBhost\fR
88 perform a zone transfer for zone
89 \fIname\fR. Transfer the zone printing out the NS, PTR and address records (A/AAAA). If combined with
90 \fB\-a\fR
91 all records will be printed.
92 .PP
93 The
94 \fB\-i\fR
95 option specifies that reverse lookups of IPv6 addresses should use the IP6.INT domain as defined in RFC1886. The default is to use IP6.ARPA.
96 .PP
97 The
98 \fB\-N\fR
99 option sets the number of dots that have to be in
100 \fIname\fR
101 for it to be considered absolute. The default value is that defined using the ndots statement in
102 \fI/etc/resolv.conf\fR, or 1 if no ndots statement is present. Names with fewer dots are interpreted as relative names and will be searched for in the domains listed in the
103 \fBsearch\fR
104 or
105 \fBdomain\fR
106 directive in
107 \fI/etc/resolv.conf\fR.
108 .PP
109 The number of UDP retries for a lookup can be changed with the
110 \fB\-R\fR
111 option.
112 \fInumber\fR
113 indicates how many times
114 \fBhost\fR
115 will repeat a query that does not get answered. The default number of retries is 1. If
116 \fInumber\fR
117 is negative or zero, the number of retries will default to 1.
118 .PP
119 Non\-recursive queries can be made via the
120 \fB\-r\fR
121 option. Setting this option clears the
122 \fBRD\fR
123 \(em recursion desired \(em bit in the query which
124 \fBhost\fR
125 makes. This should mean that the name server receiving the query will not attempt to resolve
126 \fIname\fR. The
127 \fB\-r\fR
128 option enables
129 \fBhost\fR
130 to mimic the behaviour of a name server by making non\-recursive queries and expecting to receive answers to those queries that are usually referrals to other name servers.
131 .PP
132 By default
133 \fBhost\fR
134 uses UDP when making queries. The
135 \fB\-T\fR
136 option makes it use a TCP connection when querying the name server. TCP will be automatically selected for queries that require it, such as zone transfer (AXFR) requests.
137 .PP
138 The
139 \fB\-4\fR
140 option forces
141 \fBhost\fR
142 to only use IPv4 query transport. The
143 \fB\-6\fR
144 option forces
145 \fBhost\fR
146 to only use IPv6 query transport.
147 .PP
148 The
149 \fB\-t\fR
150 option is used to select the query type.
151 \fItype\fR
152 can be any recognised query type: CNAME, NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
153 \fBhost\fR
154 automatically selects an appropriate query type. By default it looks for A records, but if the
155 \fB\-C\fR
156 option was given, queries will be made for SOA records, and if
157 \fIname\fR
158 is a dotted\-decimal IPv4 address or colon\-delimited IPv6 address,
159 \fBhost\fR
160 will query for PTR records. If a query type of IXFR is chosen the starting serial number can be specified by appending an equal followed by the starting serial number (e.g. \-t IXFR=12345678).
161 .PP
162 The time to wait for a reply can be controlled through the
163 \fB\-W\fR
164 and
165 \fB\-w\fR
166 options. The
167 \fB\-W\fR
168 option makes
169 \fBhost\fR
170 wait for
171 \fIwait\fR
172 seconds. If
173 \fIwait\fR
174 is less than one, the wait interval is set to one second. When the
175 \fB\-w\fR
176 option is used,
177 \fBhost\fR
178 will effectively wait forever for a reply. The time to wait for a response will be set to the number of seconds given by the hardware's maximum value for an integer quantity.
179 .SH "FILES"
180 .PP
181 \fI/etc/resolv.conf\fR
182 .SH "SEE ALSO"
183 .PP
184 \fBdig\fR(1),
185 \fBnamed\fR(8).