host.1 7.51 KB
Newer Older
Tinderbox User's avatar
Tinderbox User committed
1
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2016 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\-aCdlnrsTwv\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
\-c \fIclass\fR
.RS 4
Tinderbox User's avatar
Tinderbox User committed
87
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
88 89 90 91 92
.RE
.PP
\-C
.RS 4
Check consistency:
Mark Andrews's avatar
regen  
Mark Andrews committed
93
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
94
will query the SOA records for zone
Mark Andrews's avatar
regen  
Mark Andrews committed
95
\fIname\fR
Tinderbox User's avatar
Tinderbox User committed
96
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
97
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
98
.PP
Tinderbox User's avatar
Tinderbox User committed
99 100 101
\-d
.RS 4
Print debugging traces\&. Equivalent to the
Mark Andrews's avatar
regen  
Mark Andrews committed
102
\fB\-v\fR
Tinderbox User's avatar
Tinderbox User committed
103 104
verbose option\&.
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
105
.PP
Tinderbox User's avatar
Tinderbox User committed
106 107 108 109
\-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
110
.PP
Tinderbox User's avatar
Tinderbox User committed
111 112 113 114
\-l
.RS 4
List zone: The
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
115
command performs a zone transfer of zone
Tinderbox User's avatar
Tinderbox User committed
116 117 118 119
\fIname\fR
and prints out the NS, PTR and address records (A/AAAA)\&.
.sp
Together, the
Tinderbox User's avatar
Tinderbox User committed
120
\fB\-l \-a\fR
Tinderbox User's avatar
Tinderbox User committed
121 122
options print all records in the zone\&.
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
123
.PP
Tinderbox User's avatar
Tinderbox User committed
124 125 126
\-N \fIndots\fR
.RS 4
The number of dots that have to be in
Mark Andrews's avatar
regen  
Mark Andrews committed
127
\fIname\fR
Tinderbox User's avatar
Tinderbox User committed
128 129
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
130 131 132 133
\fBsearch\fR
or
\fBdomain\fR
directive in
Tinderbox User's avatar
Tinderbox User committed
134
/etc/resolv\&.conf\&.
Tinderbox User's avatar
Tinderbox User committed
135
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
136
.PP
Tinderbox User's avatar
Tinderbox User committed
137 138
\-r
.RS 4
Tinderbox User's avatar
Tinderbox User committed
139
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
140 141 142
\fIname\fR\&. The
\fB\-r\fR
option enables
Mark Andrews's avatar
regen  
Mark Andrews committed
143
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
144 145 146 147 148 149
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
150
\fInumber\fR
Tinderbox User's avatar
Tinderbox User committed
151
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
152 153
\fIattempts\fR
option in
Tinderbox User's avatar
Tinderbox User committed
154
/etc/resolv\&.conf, if set\&.
Tinderbox User's avatar
Tinderbox User committed
155
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
156
.PP
Tinderbox User's avatar
Tinderbox User committed
157 158 159 160 161 162 163 164 165
\-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
166
Query type: The
Tinderbox User's avatar
Tinderbox User committed
167 168 169 170
\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
171
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
172 173 174 175 176
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
177
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
178 179
will query for PTR records\&.
.sp
Tinderbox User's avatar
Tinderbox User committed
180 181
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
182
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
183
.PP
Tinderbox User's avatar
Tinderbox User committed
184 185 186
\-T
.RS 4
TCP: By default,
Mark Andrews's avatar
regen  
Mark Andrews committed
187
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
188
uses UDP when making queries\&. The
Mark Andrews's avatar
regen  
Mark Andrews committed
189
\fB\-T\fR
Tinderbox User's avatar
Tinderbox User committed
190
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\&.
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 194 195 196 197 198 199 200 201
\-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
202
.PP
Tinderbox User's avatar
Tinderbox User committed
203 204 205 206 207 208
\-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
209 210
option in
/etc/resolv\&.conf\&.
Tinderbox User's avatar
Tinderbox User committed
211
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
212
.PP
Tinderbox User's avatar
Tinderbox User committed
213 214 215 216 217 218 219
\-V
.RS 4
Print the version number and exit\&.
.RE
.PP
\-w
.RS 4
Tinderbox User's avatar
Tinderbox User committed
220
Wait forever: The query timeout is set to the maximum possible\&. See also the
Mark Andrews's avatar
regen  
Mark Andrews committed
221
\fB\-W\fR
Tinderbox User's avatar
Tinderbox User committed
222 223 224 225 226
option\&.
.RE
.PP
\-W \fIwait\fR
.RS 4
Tinderbox User's avatar
Tinderbox User committed
227
Timeout: Wait for up to
Mark Andrews's avatar
regen  
Mark Andrews committed
228
\fIwait\fR
Tinderbox User's avatar
Tinderbox User committed
229
seconds for a reply\&. If
Mark Andrews's avatar
regen  
Mark Andrews committed
230
\fIwait\fR
Tinderbox User's avatar
Tinderbox User committed
231 232 233
is less than one, the wait interval is set to one second\&.
.sp
By default,
Tinderbox User's avatar
Tinderbox User committed
234
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
235
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
236 237
\fItimeout\fR
option in
Tinderbox User's avatar
Tinderbox User committed
238
/etc/resolv\&.conf\&.
Tinderbox User's avatar
Tinderbox User committed
239 240 241 242 243
.sp
See also the
\fB\-w\fR
option\&.
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
244 245
.SH "IDN SUPPORT"
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
246 247
If
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
248
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
249
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
250
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
251
\fBIDN_DISABLE\fR
Tinderbox User's avatar
Tinderbox User committed
252
environment variable\&. The IDN support is disabled if the variable is set when
Mark Andrews's avatar
regen  
Mark Andrews committed
253
\fBhost\fR
Tinderbox User's avatar
Tinderbox User committed
254
runs\&.
255 256
.SH "FILES"
.PP
Tinderbox User's avatar
Tinderbox User committed
257
/etc/resolv\&.conf
258 259
.SH "SEE ALSO"
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
260
\fBdig\fR(1),
Tinderbox User's avatar
Tinderbox User committed
261 262 263 264
\fBnamed\fR(8)\&.
.SH "AUTHOR"
.PP
\fBInternet Systems Consortium, Inc\&.\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
265
.SH "COPYRIGHT"
Mark Andrews's avatar
regen  
Mark Andrews committed
266
.br
Tinderbox User's avatar
Tinderbox User committed
267
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
Mark Andrews's avatar
regen  
Mark Andrews committed
268
.br