Merge branch 'vendor/GCC44'
[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.8 2006/06/29 13:02:30 marka Exp $
17 .\"
18 .hy 0
19 .ad l
20 .\"     Title: host
21 .\"    Author: 
22 .\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
23 .\"      Date: Jun 30, 2000
24 .\"    Manual: BIND9
25 .\"    Source: BIND9
26 .\"
27 .TH "HOST" "1" "Jun 30, 2000" "BIND9" "BIND9"
28 .\" disable hyphenation
29 .nh
30 .\" disable justification (adjust text to left margin only)
31 .ad l
32 .SH "NAME"
33 host \- DNS lookup utility
34 .SH "SYNOPSIS"
35 .HP 5
36 \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]
37 .SH "DESCRIPTION"
38 .PP
39 \fBhost\fR
40 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,
41 \fBhost\fR
42 prints a short summary of its command line arguments and options.
43 .PP
44 \fIname\fR
45 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
46 \fBhost\fR
47 will by default perform a reverse lookup for that address.
48 \fIserver\fR
49 is an optional argument which is either the name or IP address of the name server that
50 \fBhost\fR
51 should query instead of the server or servers listed in
52 \fI/etc/resolv.conf\fR.
53 .PP
54 The
55 \fB\-a\fR
56 (all) option is equivalent to setting the
57 \fB\-v\fR
58 option and asking
59 \fBhost\fR
60 to make a query of type ANY.
61 .PP
62 When the
63 \fB\-C\fR
64 option is used,
65 \fBhost\fR
66 will attempt to display the SOA records for zone
67 \fIname\fR
68 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.
69 .PP
70 The
71 \fB\-c\fR
72 option instructs to make a DNS query of class
73 \fIclass\fR. This can be used to lookup Hesiod or Chaosnet class resource records. The default class is IN (Internet).
74 .PP
75 Verbose output is generated by
76 \fBhost\fR
77 when the
78 \fB\-d\fR
79 or
80 \fB\-v\fR
81 option is used. The two options are equivalent. They have been provided for backwards compatibility. In previous versions, the
82 \fB\-d\fR
83 option switched on debugging traces and
84 \fB\-v\fR
85 enabled verbose output.
86 .PP
87 List mode is selected by the
88 \fB\-l\fR
89 option. This makes
90 \fBhost\fR
91 perform a zone transfer for zone
92 \fIname\fR. Transfer the zone printing out the NS, PTR and address records (A/AAAA). If combined with
93 \fB\-a\fR
94 all records will be printed.
95 .PP
96 The
97 \fB\-i\fR
98 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.
99 .PP
100 The
101 \fB\-N\fR
102 option sets the number of dots that have to be in
103 \fIname\fR
104 for it to be considered absolute. The default value is that defined using the ndots statement in
105 \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
106 \fBsearch\fR
107 or
108 \fBdomain\fR
109 directive in
110 \fI/etc/resolv.conf\fR.
111 .PP
112 The number of UDP retries for a lookup can be changed with the
113 \fB\-R\fR
114 option.
115 \fInumber\fR
116 indicates how many times
117 \fBhost\fR
118 will repeat a query that does not get answered. The default number of retries is 1. If
119 \fInumber\fR
120 is negative or zero, the number of retries will default to 1.
121 .PP
122 Non\-recursive queries can be made via the
123 \fB\-r\fR
124 option. Setting this option clears the
125 \fBRD\fR
126 \(em recursion desired \(em bit in the query which
127 \fBhost\fR
128 makes. This should mean that the name server receiving the query will not attempt to resolve
129 \fIname\fR. The
130 \fB\-r\fR
131 option enables
132 \fBhost\fR
133 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.
134 .PP
135 By default
136 \fBhost\fR
137 uses UDP when making queries. The
138 \fB\-T\fR
139 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.
140 .PP
141 The
142 \fB\-4\fR
143 option forces
144 \fBhost\fR
145 to only use IPv4 query transport. The
146 \fB\-6\fR
147 option forces
148 \fBhost\fR
149 to only use IPv6 query transport.
150 .PP
151 The
152 \fB\-t\fR
153 option is used to select the query type.
154 \fItype\fR
155 can be any recognised query type: CNAME, NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
156 \fBhost\fR
157 automatically selects an appropriate query type. By default it looks for A records, but if the
158 \fB\-C\fR
159 option was given, queries will be made for SOA records, and if
160 \fIname\fR
161 is a dotted\-decimal IPv4 address or colon\-delimited IPv6 address,
162 \fBhost\fR
163 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).
164 .PP
165 The time to wait for a reply can be controlled through the
166 \fB\-W\fR
167 and
168 \fB\-w\fR
169 options. The
170 \fB\-W\fR
171 option makes
172 \fBhost\fR
173 wait for
174 \fIwait\fR
175 seconds. If
176 \fIwait\fR
177 is less than one, the wait interval is set to one second. When the
178 \fB\-w\fR
179 option is used,
180 \fBhost\fR
181 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.
182 .SH "FILES"
183 .PP
184 \fI/etc/resolv.conf\fR
185 .SH "SEE ALSO"
186 .PP
187 \fBdig\fR(1),
188 \fBnamed\fR(8).
189 .SH "COPYRIGHT"
190 Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")