host.1 7.76 KB
Newer Older
Tinderbox User's avatar
Tinderbox User committed
1
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
Rob Austein's avatar
regen  
Rob Austein committed
2
.\" 
Tinderbox User's avatar
Tinderbox User committed
3 4 5
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
.\" file, You can obtain one at http://mozilla.org/MPL/2.0/.
Rob Austein's avatar
regen  
Rob Austein committed
6
.\"
Rob Austein's avatar
regen  
Rob Austein committed
7 8
.hy 0
.ad l
Tinderbox User's avatar
Tinderbox User committed
9
'\" t
Mark Andrews's avatar
regen  
Mark Andrews committed
10 11
.\"     Title: host
.\"    Author: 
Tinderbox User's avatar
Tinderbox User committed
12
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
Tinderbox User's avatar
Tinderbox User committed
13
.\"      Date: 2009-01-20
Mark Andrews's avatar
regen  
Mark Andrews committed
14
.\"    Manual: BIND9
Tinderbox User's avatar
Tinderbox User committed
15 16
.\"    Source: ISC
.\"  Language: English
Mark Andrews's avatar
regen  
Mark Andrews committed
17
.\"
Tinderbox User's avatar
Tinderbox User committed
18 19 20 21 22 23 24 25 26 27 28 29 30
.TH "HOST" "1" "2009\-01\-20" "ISC" "BIND9"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
Mark Andrews's avatar
regen  
Mark Andrews committed
31 32 33 34
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
Tinderbox User's avatar
Tinderbox User committed
35 36 37
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
Mark Andrews's avatar
regen  
Mark Andrews committed
38
.SH "NAME"
39
host \- DNS lookup utility
Rob Austein's avatar
regen  
Rob Austein committed
40
.SH "SYNOPSIS"
Tinderbox User's avatar
Tinderbox User committed
41
.HP \w'\fBhost\fR\ 'u
Tinderbox User's avatar
Tinderbox User committed
42
\fBhost\fR [\fB\-aACdlnrsTUwv\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\-m\ \fR\fB\fIflag\fR\fR] [[\fB\-4\fR] | [\fB\-6\fR]] [\fB\-v\fR] [\fB\-V\fR] {name} [server]
43 44
.SH "DESCRIPTION"
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
45
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
46
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,
Mark Andrews's avatar
regen  
Mark Andrews committed
47
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
48
prints a short summary of its command line arguments and options\&.
Mark Andrews's avatar
regen  
Mark Andrews committed
49 50
.PP
\fIname\fR
Tinderbox User's avatar
Tinderbox User committed
51
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
Mark Andrews's avatar
regen  
Mark Andrews committed
52
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
53
will by default perform a reverse lookup for that address\&.
Mark Andrews's avatar
regen  
Mark Andrews committed
54 55 56 57
\fIserver\fR
is an optional argument which is either the name or IP address of the name server that
\fBhost\fR
should query instead of the server or servers listed in
Tinderbox User's avatar
Tinderbox User committed
58
/etc/resolv\&.conf\&.
Tinderbox User's avatar
Tinderbox User committed
59
.SH "OPTIONS"
Mark Andrews's avatar
regen  
Mark Andrews committed
60
.PP
Tinderbox User's avatar
Tinderbox User committed
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
\-4
.RS 4
Use IPv4 only for query transport\&. See also the
\fB\-6\fR
option\&.
.RE
.PP
\-6
.RS 4
Use IPv6 only for query transport\&. See also the
\fB\-4\fR
option\&.
.RE
.PP
\-a
.RS 4
"All"\&. The
Mark Andrews's avatar
regen  
Mark Andrews committed
78
\fB\-a\fR
Tinderbox User's avatar
Tinderbox User committed
79
option is normally equivalent to
Tinderbox User's avatar
Tinderbox User committed
80
\fB\-v \-t \fR\fBANY\fR\&. It also affects the behaviour of the
Tinderbox User's avatar
Tinderbox User committed
81 82 83
\fB\-l\fR
list zone option\&.
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
84
.PP
Tinderbox User's avatar
Tinderbox User committed
85 86 87 88 89 90 91 92 93
\-A
.RS 4
"Almost all"\&. The
\fB\-A\fR
option is equivalent to
\fB\-a\fR
except RRSIG, NSEC, and NSEC3 records are omitted from the output\&.
.RE
.PP
Tinderbox User's avatar
Tinderbox User committed
94 95
\-c \fIclass\fR
.RS 4
Tinderbox User's avatar
Tinderbox User committed
96
Query class: This can be used to lookup HS (Hesiod) or CH (Chaosnet) class resource records\&. The default class is IN (Internet)\&.
Tinderbox User's avatar
Tinderbox User committed
97 98 99 100 101
.RE
.PP
\-C
.RS 4
Check consistency:
Mark Andrews's avatar
regen  
Mark Andrews committed
102
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
103
will query the SOA records for zone
Mark Andrews's avatar
regen  
Mark Andrews committed
104
\fIname\fR
Tinderbox User's avatar
Tinderbox User committed
105
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\&.
Tinderbox User's avatar
Tinderbox User committed
106
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
107
.PP
Tinderbox User's avatar
Tinderbox User committed
108 109 110
\-d
.RS 4
Print debugging traces\&. Equivalent to the
Mark Andrews's avatar
regen  
Mark Andrews committed
111
\fB\-v\fR
Tinderbox User's avatar
Tinderbox User committed
112 113
verbose option\&.
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
114
.PP
Tinderbox User's avatar
Tinderbox User committed
115 116 117 118
\-i
.RS 4
Obsolete\&. Use the IP6\&.INT domain for reverse lookups of IPv6 addresses as defined in RFC1886 and deprecated in RFC4159\&. The default is to use IP6\&.ARPA as specified in RFC3596\&.
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
119
.PP
Tinderbox User's avatar
Tinderbox User committed
120 121 122 123
\-l
.RS 4
List zone: The
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
124
command performs a zone transfer of zone
Tinderbox User's avatar
Tinderbox User committed
125 126 127 128
\fIname\fR
and prints out the NS, PTR and address records (A/AAAA)\&.
.sp
Together, the
Tinderbox User's avatar
Tinderbox User committed
129
\fB\-l \-a\fR
Tinderbox User's avatar
Tinderbox User committed
130 131
options print all records in the zone\&.
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
132
.PP
Tinderbox User's avatar
Tinderbox User committed
133 134 135
\-N \fIndots\fR
.RS 4
The number of dots that have to be in
Mark Andrews's avatar
regen  
Mark Andrews committed
136
\fIname\fR
Tinderbox User's avatar
Tinderbox User committed
137 138
for it to be considered absolute\&. The default value is that defined using the ndots statement in
/etc/resolv\&.conf, 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
Mark Andrews's avatar
regen  
Mark Andrews committed
139 140 141 142
\fBsearch\fR
or
\fBdomain\fR
directive in
Tinderbox User's avatar
Tinderbox User committed
143
/etc/resolv\&.conf\&.
Tinderbox User's avatar
Tinderbox User committed
144
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
145
.PP
Tinderbox User's avatar
Tinderbox User committed
146 147
\-r
.RS 4
Tinderbox User's avatar
Tinderbox User committed
148
Non\-recursive query: Setting this option clears the RD (recursion desired) bit in the query\&. This should mean that the name server receiving the query will not attempt to resolve
Tinderbox User's avatar
Tinderbox User committed
149 150 151
\fIname\fR\&. The
\fB\-r\fR
option enables
Mark Andrews's avatar
regen  
Mark Andrews committed
152
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
153 154 155 156 157 158
to mimic the behavior of a name server by making non\-recursive queries and expecting to receive answers to those queries that can be referrals to other name servers\&.
.RE
.PP
\-R \fInumber\fR
.RS 4
Number of retries for UDP queries: If
Mark Andrews's avatar
regen  
Mark Andrews committed
159
\fInumber\fR
Tinderbox User's avatar
Tinderbox User committed
160
is negative or zero, the number of retries will default to 1\&. The default value is 1, or the value of the
Tinderbox User's avatar
Tinderbox User committed
161 162
\fIattempts\fR
option in
Tinderbox User's avatar
Tinderbox User committed
163
/etc/resolv\&.conf, if set\&.
Tinderbox User's avatar
Tinderbox User committed
164
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
165
.PP
Tinderbox User's avatar
Tinderbox User committed
166 167 168 169 170 171 172 173 174
\-s
.RS 4
Do
\fInot\fR
send the query to the next nameserver if any server responds with a SERVFAIL response, which is the reverse of normal stub resolver behavior\&.
.RE
.PP
\-t \fItype\fR
.RS 4
Tinderbox User's avatar
Tinderbox User committed
175
Query type: The
Tinderbox User's avatar
Tinderbox User committed
176 177 178 179
\fItype\fR
argument can be any recognized query type: CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc\&.
.sp
When no query type is specified,
Mark Andrews's avatar
regen  
Mark Andrews committed
180
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
181 182 183 184 185
automatically selects an appropriate query type\&. By default, it looks for A, AAAA, and MX records\&. If the
\fB\-C\fR
option is given, queries will be made for SOA records\&. If
\fIname\fR
is a dotted\-decimal IPv4 address or colon\-delimited IPv6 address,
Mark Andrews's avatar
regen  
Mark Andrews committed
186
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
187 188
will query for PTR records\&.
.sp
Tinderbox User's avatar
Tinderbox User committed
189 190
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 (like
\fB\-t \fR\fBIXFR=12345678\fR)\&.
Tinderbox User's avatar
Tinderbox User committed
191
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
192
.PP
Tinderbox User's avatar
Tinderbox User committed
193
\-T, \-U
Tinderbox User's avatar
Tinderbox User committed
194
.RS 4
Tinderbox User's avatar
Tinderbox User committed
195
TCP/UDP: By default,
Mark Andrews's avatar
regen  
Mark Andrews committed
196
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
197
uses UDP when making queries\&. The
Mark Andrews's avatar
regen  
Mark Andrews committed
198
\fB\-T\fR
Tinderbox User's avatar
Tinderbox User committed
199 200
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\&. Type ANY queries default to TCP but can be forced to UDP initially using
\fB\-U\fR\&.
Tinderbox User's avatar
Tinderbox User committed
201
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
202
.PP
Tinderbox User's avatar
Tinderbox User committed
203 204 205 206 207 208 209 210 211
\-m \fIflag\fR
.RS 4
Memory usage debugging: the flag can be
\fIrecord\fR,
\fIusage\fR, or
\fItrace\fR\&. You can specify the
\fB\-m\fR
option more than once to set multiple flags\&.
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
212
.PP
Tinderbox User's avatar
Tinderbox User committed
213 214 215 216 217 218
\-v
.RS 4
Verbose output\&. Equivalent to the
\fB\-d\fR
debug option\&. Verbose output can also be enabled by setting the
\fIdebug\fR
Tinderbox User's avatar
Tinderbox User committed
219 220
option in
/etc/resolv\&.conf\&.
Tinderbox User's avatar
Tinderbox User committed
221
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
222
.PP
Tinderbox User's avatar
Tinderbox User committed
223 224 225 226 227 228 229
\-V
.RS 4
Print the version number and exit\&.
.RE
.PP
\-w
.RS 4
Tinderbox User's avatar
Tinderbox User committed
230
Wait forever: The query timeout is set to the maximum possible\&. See also the
Mark Andrews's avatar
regen  
Mark Andrews committed
231
\fB\-W\fR
Tinderbox User's avatar
Tinderbox User committed
232 233 234 235 236
option\&.
.RE
.PP
\-W \fIwait\fR
.RS 4
Tinderbox User's avatar
Tinderbox User committed
237
Timeout: Wait for up to
Mark Andrews's avatar
regen  
Mark Andrews committed
238
\fIwait\fR
Tinderbox User's avatar
Tinderbox User committed
239
seconds for a reply\&. If
Mark Andrews's avatar
regen  
Mark Andrews committed
240
\fIwait\fR
Tinderbox User's avatar
Tinderbox User committed
241 242 243
is less than one, the wait interval is set to one second\&.
.sp
By default,
Tinderbox User's avatar
Tinderbox User committed
244
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
245
will wait for 5 seconds for UDP responses and 10 seconds for TCP connections\&. These defaults can be overridden by the
Tinderbox User's avatar
Tinderbox User committed
246 247
\fItimeout\fR
option in
Tinderbox User's avatar
Tinderbox User committed
248
/etc/resolv\&.conf\&.
Tinderbox User's avatar
Tinderbox User committed
249 250 251 252 253
.sp
See also the
\fB\-w\fR
option\&.
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
254 255
.SH "IDN SUPPORT"
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
256 257
If
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
258
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
Mark Andrews's avatar
regen  
Mark Andrews committed
259
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
260
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, defines the
Mark Andrews's avatar
regen  
Mark Andrews committed
261
\fBIDN_DISABLE\fR
Tinderbox User's avatar
Tinderbox User committed
262
environment variable\&. The IDN support is disabled if the variable is set when
Mark Andrews's avatar
regen  
Mark Andrews committed
263
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
264
runs\&.
265 266
.SH "FILES"
.PP
Tinderbox User's avatar
Tinderbox User committed
267
/etc/resolv\&.conf
268 269
.SH "SEE ALSO"
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
270
\fBdig\fR(1),
Tinderbox User's avatar
Tinderbox User committed
271 272 273 274
\fBnamed\fR(8)\&.
.SH "AUTHOR"
.PP
\fBInternet Systems Consortium, Inc\&.\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
275
.SH "COPYRIGHT"
Mark Andrews's avatar
regen  
Mark Andrews committed
276
.br
Tinderbox User's avatar
Tinderbox User committed
277
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
Mark Andrews's avatar
regen  
Mark Andrews committed
278
.br