dig.1 20.1 KB
Newer Older
Tinderbox User's avatar
Tinderbox User committed
1
.\" Copyright (C) 2004-2011, 2013, 2014 Internet Systems Consortium, Inc. ("ISC")
Mark Andrews's avatar
regen  
Mark Andrews committed
2
.\" Copyright (C) 2000-2003 Internet Software Consortium.
Rob Austein's avatar
regen  
Rob Austein committed
3
.\" 
Automatic Updater's avatar
regen  
Automatic Updater committed
4
.\" Permission to use, copy, modify, and/or distribute this software for any
Jim Reid's avatar
Jim Reid committed
5 6
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
Rob Austein's avatar
regen  
Rob Austein committed
7
.\" 
Mark Andrews's avatar
Mark Andrews committed
8 9
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
Rob Austein's avatar
regen  
Rob Austein committed
10
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
Mark Andrews's avatar
Mark Andrews committed
11 12 13 14
.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
Rob Austein's avatar
regen  
Rob Austein committed
15
.\"
Tinderbox User's avatar
Tinderbox User committed
16
.\" $Id$
Rob Austein's avatar
regen  
Rob Austein committed
17
.\"
Rob Austein's avatar
regen  
Rob Austein committed
18 19
.hy 0
.ad l
Automatic Updater's avatar
regen  
Automatic Updater committed
20
.\"     Title: dig
Tinderbox User's avatar
Tinderbox User committed
21 22
.\"    Author: 
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
Tinderbox User's avatar
Tinderbox User committed
23
.\"      Date: February 19, 2014
Automatic Updater's avatar
regen  
Automatic Updater committed
24 25 26
.\"    Manual: BIND9
.\"    Source: BIND9
.\"
Tinderbox User's avatar
Tinderbox User committed
27
.TH "DIG" "1" "February 19, 2014" "BIND9" "BIND9"
Automatic Updater's avatar
regen  
Automatic Updater committed
28 29 30 31 32
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
33
dig \- DNS lookup utility
Rob Austein's avatar
regen  
Rob Austein committed
34 35
.SH "SYNOPSIS"
.HP 4
Automatic Updater's avatar
regen  
Automatic Updater committed
36
\fBdig\fR [@server] [\fB\-b\ \fR\fB\fIaddress\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-f\ \fR\fB\fIfilename\fR\fR] [\fB\-k\ \fR\fB\fIfilename\fR\fR] [\fB\-m\fR] [\fB\-p\ \fR\fB\fIport#\fR\fR] [\fB\-q\ \fR\fB\fIname\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-x\ \fR\fB\fIaddr\fR\fR] [\fB\-y\ \fR\fB\fI[hmac:]\fR\fIname:key\fR\fR] [\fB\-4\fR] [\fB\-6\fR] [name] [type] [class] [queryopt...]
Rob Austein's avatar
regen  
Rob Austein committed
37 38 39
.HP 4
\fBdig\fR [\fB\-h\fR]
.HP 4
Rob Austein's avatar
regen  
Rob Austein committed
40
\fBdig\fR [global\-queryopt...] [query...]
41 42
.SH "DESCRIPTION"
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
43
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
44
(domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use
Automatic Updater's avatar
regen  
Automatic Updater committed
45
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
46 47
to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output. Other lookup tools tend to have less functionality than
\fBdig\fR.
48
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
49 50
Although
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
51
is normally used with command\-line arguments, it also has a batch mode of operation for reading lookup requests from a file. A brief summary of its command\-line arguments and options is printed when the
Automatic Updater's avatar
regen  
Automatic Updater committed
52
\fB\-h\fR
Tinderbox User's avatar
Tinderbox User committed
53
option is given. Unlike earlier versions, the BIND 9 implementation of
Automatic Updater's avatar
regen  
Automatic Updater committed
54
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
55
allows multiple lookups to be issued from the command line.
56
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
57 58 59
Unless it is told to query a specific name server,
\fBdig\fR
will try each of the servers listed in
Tinderbox User's avatar
Tinderbox User committed
60
\fI/etc/resolv.conf\fR. If no usable server addresses are found,
Tinderbox User's avatar
Tinderbox User committed
61
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
62
will send the query to the local host.
63
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
64 65
When no command line arguments or options are given,
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
66
will perform an NS query for "." (the root).
Andreas Gustafsson's avatar
Andreas Gustafsson committed
67
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
68 69 70
It is possible to set per\-user defaults for
\fBdig\fR
via
Tinderbox User's avatar
Tinderbox User committed
71
\fI${HOME}/.digrc\fR. This file is read and any options in it are applied before the command line arguments.
Mark Andrews's avatar
regen  
Mark Andrews committed
72
.PP
Tinderbox User's avatar
Tinderbox User committed
73
The IN and CH class names overlap with the IN and CH top level domain names. Either use the
Automatic Updater's avatar
regen  
Automatic Updater committed
74 75 76
\fB\-t\fR
and
\fB\-c\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
77
options to specify the type and class, use the
Automatic Updater's avatar
regen  
Automatic Updater committed
78
\fB\-q\fR
Tinderbox User's avatar
Tinderbox User committed
79
the specify the domain name, or use "IN." and "CH." when looking up these top level domains.
80 81
.SH "SIMPLE USAGE"
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
82 83 84 85 86
A typical invocation of
\fBdig\fR
looks like:
.sp
.RS 4
87 88 89
.nf
 dig @server name type 
.fi
Automatic Updater's avatar
regen  
Automatic Updater committed
90 91 92 93
.RE
.sp
where:
.PP
94
\fBserver\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
95
.RS 4
Tinderbox User's avatar
Tinderbox User committed
96
is the name or IP address of the name server to query. This can be an IPv4 address in dotted\-decimal notation or an IPv6 address in colon\-delimited notation. When the supplied
Automatic Updater's avatar
regen  
Automatic Updater committed
97 98 99
\fIserver\fR
argument is a hostname,
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
100
resolves that name before querying that name server.
Tinderbox User's avatar
Tinderbox User committed
101 102
.sp
If no
Automatic Updater's avatar
regen  
Automatic Updater committed
103 104 105 106
\fIserver\fR
argument is provided,
\fBdig\fR
consults
Tinderbox User's avatar
Tinderbox User committed
107
\fI/etc/resolv.conf\fR; if an address is found there, it queries the name server at that address. If either of the
Tinderbox User's avatar
Tinderbox User committed
108 109 110
\fB\-4\fR
or
\fB\-6\fR
Tinderbox User's avatar
Tinderbox User committed
111
options are in use, then only addresses for the corresponding transport will be tried. If no usable addresses are found,
Tinderbox User's avatar
Tinderbox User committed
112
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
113
will send the query to the local host. The reply from the name server that responds is displayed.
Automatic Updater's avatar
regen  
Automatic Updater committed
114 115
.RE
.PP
116
\fBname\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
117
.RS 4
Tinderbox User's avatar
Tinderbox User committed
118
is the name of the resource record that is to be looked up.
Automatic Updater's avatar
regen  
Automatic Updater committed
119 120
.RE
.PP
121
\fBtype\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
122
.RS 4
Tinderbox User's avatar
Tinderbox User committed
123
indicates what type of query is required \(em ANY, A, MX, SIG, etc.
Automatic Updater's avatar
regen  
Automatic Updater committed
124
\fItype\fR
Tinderbox User's avatar
Tinderbox User committed
125
can be any valid query type. If no
Automatic Updater's avatar
regen  
Automatic Updater committed
126 127 128
\fItype\fR
argument is supplied,
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
129
will perform a lookup for an A record.
Automatic Updater's avatar
regen  
Automatic Updater committed
130
.RE
131 132
.SH "OPTIONS"
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
133 134 135
The
\fB\-b\fR
option sets the source IP address of the query to
Tinderbox User's avatar
Tinderbox User committed
136
\fIaddress\fR. This must be a valid address on one of the host's network interfaces or "0.0.0.0" or "::". An optional port may be specified by appending "#<port>"
137
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
138 139
The default query class (IN for internet) is overridden by the
\fB\-c\fR
Tinderbox User's avatar
Tinderbox User committed
140
option.
Automatic Updater's avatar
regen  
Automatic Updater committed
141
\fIclass\fR
Tinderbox User's avatar
Tinderbox User committed
142
is any valid class, such as HS for Hesiod records or CH for Chaosnet records.
143
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
144 145 146 147 148
The
\fB\-f\fR
option makes
\fBdig \fR
operate in batch mode by reading a list of lookup requests to process from the file
Tinderbox User's avatar
Tinderbox User committed
149
\fIfilename\fR. The file contains a number of queries, one per line. Each entry in the file should be organized in the same way they would be presented as queries to
Automatic Updater's avatar
regen  
Automatic Updater committed
150
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
151
using the command\-line interface.
152
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
153 154
The
\fB\-m\fR
Tinderbox User's avatar
Tinderbox User committed
155
option enables memory usage debugging.
Automatic Updater's avatar
regen  
Automatic Updater committed
156
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
157 158
If a non\-standard port number is to be queried, the
\fB\-p\fR
Tinderbox User's avatar
Tinderbox User committed
159
option is used.
Automatic Updater's avatar
regen  
Automatic Updater committed
160 161 162
\fIport#\fR
is the port number that
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
163
will send its queries instead of the standard DNS port number 53. This option would be used to test a name server that has been configured to listen for queries on a non\-standard port number.
164
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
165 166 167 168
The
\fB\-4\fR
option forces
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
169
to only use IPv4 query transport. The
Automatic Updater's avatar
regen  
Automatic Updater committed
170 171 172
\fB\-6\fR
option forces
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
173
to only use IPv6 query transport.
Mark Andrews's avatar
regen  
Mark Andrews committed
174
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
175 176 177
The
\fB\-t\fR
option sets the query type to
Tinderbox User's avatar
Tinderbox User committed
178
\fItype\fR. It can be any valid query type which is supported in BIND 9. The default query type is "A", unless the
Automatic Updater's avatar
regen  
Automatic Updater committed
179
\fB\-x\fR
Tinderbox User's avatar
Tinderbox User committed
180
option is supplied to indicate a reverse lookup. A zone transfer can be requested by specifying a type of AXFR. When an incremental zone transfer (IXFR) is required,
Automatic Updater's avatar
regen  
Automatic Updater committed
181 182
\fItype\fR
is set to
Tinderbox User's avatar
Tinderbox User committed
183 184
ixfr=N. The incremental zone transfer will contain the changes made to the zone since the serial number in the zone's SOA record was
\fIN\fR.
185
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
186 187 188
The
\fB\-q\fR
option sets the query name to
Tinderbox User's avatar
Tinderbox User committed
189
\fIname\fR. This is useful to distinguish the
Automatic Updater's avatar
regen  
Automatic Updater committed
190
\fIname\fR
Tinderbox User's avatar
Tinderbox User committed
191
from other arguments.
Mark Andrews's avatar
regen  
Mark Andrews committed
192
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
193 194
Reverse lookups \(em mapping addresses to names \(em are simplified by the
\fB\-x\fR
Tinderbox User's avatar
Tinderbox User committed
195
option.
Automatic Updater's avatar
regen  
Automatic Updater committed
196
\fIaddr\fR
Tinderbox User's avatar
Tinderbox User committed
197
is an IPv4 address in dotted\-decimal notation, or a colon\-delimited IPv6 address. When this option is used, there is no need to provide the
Automatic Updater's avatar
regen  
Automatic Updater committed
198 199 200 201
\fIname\fR,
\fIclass\fR
and
\fItype\fR
Tinderbox User's avatar
Tinderbox User committed
202
arguments.
Automatic Updater's avatar
regen  
Automatic Updater committed
203 204
\fBdig\fR
automatically performs a lookup for a name like
Tinderbox User's avatar
Tinderbox User committed
205 206
11.12.13.10.in\-addr.arpa
and sets the query type and class to PTR and IN respectively. By default, IPv6 addresses are looked up using nibble format under the IP6.ARPA domain. To use the older RFC1886 method using the IP6.INT domain specify the
Automatic Updater's avatar
regen  
Automatic Updater committed
207
\fB\-i\fR
Tinderbox User's avatar
Tinderbox User committed
208
option. Bit string labels (RFC2874) are now experimental and are not attempted.
209
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
210 211 212 213
To sign the DNS queries sent by
\fBdig\fR
and their responses using transaction signatures (TSIG), specify a TSIG key file using the
\fB\-k\fR
Tinderbox User's avatar
Tinderbox User committed
214
option. You can also specify the TSIG key itself on the command line using the
Automatic Updater's avatar
regen  
Automatic Updater committed
215 216 217 218 219 220 221
\fB\-y\fR
option;
\fIhmac\fR
is the type of the TSIG, default HMAC\-MD5,
\fIname\fR
is the name of the TSIG key and
\fIkey\fR
Tinderbox User's avatar
Tinderbox User committed
222 223
is the actual key. The key is a base\-64 encoded string, typically generated by
\fBdnssec\-keygen\fR(8). Caution should be taken when using the
Automatic Updater's avatar
regen  
Automatic Updater committed
224 225 226
\fB\-y\fR
option on multi\-user systems as the key can be visible in the output from
\fBps\fR(1)
Tinderbox User's avatar
Tinderbox User committed
227 228
or in the shell's history file. When using TSIG authentication with
\fBdig\fR, the name server that is queried needs to know the key and algorithm that is being used. In BIND, this is done by providing appropriate
Automatic Updater's avatar
regen  
Automatic Updater committed
229 230 231 232
\fBkey\fR
and
\fBserver\fR
statements in
Tinderbox User's avatar
Tinderbox User committed
233
\fInamed.conf\fR.
234 235
.SH "QUERY OPTIONS"
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
236
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
237
provides a number of query options which affect the way in which lookups are made and the results displayed. Some of these set or reset flag bits in the query header, some determine which sections of the answer get printed, and others determine the timeout and retry strategies.
Automatic Updater's avatar
regen  
Automatic Updater committed
238
.PP
Tinderbox User's avatar
Tinderbox User committed
239
Each query option is identified by a keyword preceded by a plus sign (+). Some keywords set or reset an option. These may be preceded by the string
Automatic Updater's avatar
regen  
Automatic Updater committed
240
no
Tinderbox User's avatar
Tinderbox User committed
241 242
to negate the meaning of that keyword. Other keywords assign values to options like the timeout interval. They have the form
\fB+keyword=value\fR. The query options are:
Mark Andrews's avatar
regen  
Mark Andrews committed
243
.PP
244
\fB+[no]tcp\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
245
.RS 4
Tinderbox User's avatar
Tinderbox User committed
246
Use [do not use] TCP when querying name servers. The default behavior is to use UDP unless an AXFR or IXFR query is requested, in which case a TCP connection is used.
Automatic Updater's avatar
regen  
Automatic Updater committed
247 248
.RE
.PP
249
\fB+[no]vc\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
250
.RS 4
Tinderbox User's avatar
Tinderbox User committed
251
Use [do not use] TCP when querying name servers. This alternate syntax to
Automatic Updater's avatar
regen  
Automatic Updater committed
252
\fI+[no]tcp\fR
Tinderbox User's avatar
Tinderbox User committed
253
is provided for backwards compatibility. The "vc" stands for "virtual circuit".
Automatic Updater's avatar
regen  
Automatic Updater committed
254 255
.RE
.PP
256
\fB+[no]ignore\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
257
.RS 4
Tinderbox User's avatar
Tinderbox User committed
258
Ignore truncation in UDP responses instead of retrying with TCP. By default, TCP retries are performed.
Automatic Updater's avatar
regen  
Automatic Updater committed
259 260
.RE
.PP
261
\fB+domain=somename\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
262 263 264 265 266
.RS 4
Set the search list to contain the single domain
\fIsomename\fR, as if specified in a
\fBdomain\fR
directive in
Tinderbox User's avatar
Tinderbox User committed
267
\fI/etc/resolv.conf\fR, and enable search list processing as if the
Automatic Updater's avatar
regen  
Automatic Updater committed
268
\fI+search\fR
Tinderbox User's avatar
Tinderbox User committed
269
option were given.
Automatic Updater's avatar
regen  
Automatic Updater committed
270 271
.RE
.PP
272
\fB+[no]search\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
273 274
.RS 4
Use [do not use] the search list defined by the searchlist or domain directive in
Tinderbox User's avatar
Tinderbox User committed
275 276
\fIresolv.conf\fR
(if any). The search list is not used by default.
Automatic Updater's avatar
regen  
Automatic Updater committed
277 278
.RE
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
279
\fB+[no]showsearch\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
280
.RS 4
Tinderbox User's avatar
Tinderbox User committed
281
Perform [do not perform] a search showing intermediate results.
Automatic Updater's avatar
regen  
Automatic Updater committed
282 283
.RE
.PP
284
\fB+[no]defname\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
285 286 287 288 289
.RS 4
Deprecated, treated as a synonym for
\fI+[no]search\fR
.RE
.PP
290
\fB+[no]aaonly\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
291
.RS 4
Tinderbox User's avatar
Tinderbox User committed
292
Sets the "aa" flag in the query.
Automatic Updater's avatar
regen  
Automatic Updater committed
293 294
.RE
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
295
\fB+[no]aaflag\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
296 297
.RS 4
A synonym for
Tinderbox User's avatar
Tinderbox User committed
298
\fI+[no]aaonly\fR.
Automatic Updater's avatar
regen  
Automatic Updater committed
299 300
.RE
.PP
301
\fB+[no]adflag\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
302
.RS 4
Tinderbox User's avatar
Tinderbox User committed
303
Set [do not set] the AD (authentic data) bit in the query. This requests the server to return whether all of the answer and authority sections have all been validated as secure according to the security policy of the server. AD=1 indicates that all records have been validated as secure and the answer is not from a OPT\-OUT range. AD=0 indicate that some part of the answer was insecure or not validated. This bit is set by default.
Automatic Updater's avatar
regen  
Automatic Updater committed
304 305
.RE
.PP
306
\fB+[no]cdflag\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
307
.RS 4
Tinderbox User's avatar
Tinderbox User committed
308
Set [do not set] the CD (checking disabled) bit in the query. This requests the server to not perform DNSSEC validation of responses.
Automatic Updater's avatar
regen  
Automatic Updater committed
309 310
.RE
.PP
Mark Andrews's avatar
Mark Andrews committed
311
\fB+[no]cl\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
312
.RS 4
Tinderbox User's avatar
Tinderbox User committed
313
Display [do not display] the CLASS when printing the record.
Automatic Updater's avatar
regen  
Automatic Updater committed
314 315
.RE
.PP
Mark Andrews's avatar
Mark Andrews committed
316
\fB+[no]ttlid\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
317
.RS 4
Tinderbox User's avatar
Tinderbox User committed
318
Display [do not display] the TTL when printing the record.
Automatic Updater's avatar
regen  
Automatic Updater committed
319 320
.RE
.PP
Mark Andrews's avatar
Mark Andrews committed
321
\fB+[no]recurse\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
322
.RS 4
Tinderbox User's avatar
Tinderbox User committed
323
Toggle the setting of the RD (recursion desired) bit in the query. This bit is set by default, which means
Automatic Updater's avatar
regen  
Automatic Updater committed
324
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
325
normally sends recursive queries. Recursion is automatically disabled when the
Automatic Updater's avatar
regen  
Automatic Updater committed
326 327 328
\fI+nssearch\fR
or
\fI+trace\fR
Tinderbox User's avatar
Tinderbox User committed
329
query options are used.
Automatic Updater's avatar
regen  
Automatic Updater committed
330 331
.RE
.PP
332
\fB+[no]nssearch\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
333 334 335
.RS 4
When this option is set,
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
336
attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone.
Automatic Updater's avatar
regen  
Automatic Updater committed
337 338
.RE
.PP
339
\fB+[no]trace\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
340
.RS 4
Tinderbox User's avatar
Tinderbox User committed
341
Toggle tracing of the delegation path from the root name servers for the name being looked up. Tracing is disabled by default. When tracing is enabled,
Automatic Updater's avatar
regen  
Automatic Updater committed
342
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
343
makes iterative queries to resolve the name being looked up. It will follow referrals from the root servers, showing the answer from each server that was used to resolve the lookup.
Automatic Updater's avatar
Automatic Updater committed
344 345
.sp
\fB+dnssec\fR
Tinderbox User's avatar
Tinderbox User committed
346
is also set when +trace is set to better emulate the default queries from a nameserver.
Automatic Updater's avatar
regen  
Automatic Updater committed
347 348
.RE
.PP
349
\fB+[no]cmd\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
350 351 352
.RS 4
Toggles the printing of the initial comment in the output identifying the version of
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
353
and the query options that have been applied. This comment is printed by default.
Automatic Updater's avatar
regen  
Automatic Updater committed
354 355
.RE
.PP
356
\fB+[no]short\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
357
.RS 4
Tinderbox User's avatar
Tinderbox User committed
358
Provide a terse answer. The default is to print the answer in a verbose form.
Automatic Updater's avatar
regen  
Automatic Updater committed
359 360
.RE
.PP
361
\fB+[no]identify\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
362 363 364
.RS 4
Show [or do not show] the IP address and port number that supplied the answer when the
\fI+short\fR
Tinderbox User's avatar
Tinderbox User committed
365
option is enabled. If short form answers are requested, the default is not to show the source address and port number of the server that provided the answer.
Automatic Updater's avatar
regen  
Automatic Updater committed
366 367
.RE
.PP
368
\fB+[no]comments\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
369
.RS 4
Tinderbox User's avatar
Tinderbox User committed
370
Toggle the display of comment lines in the output. The default is to print comments.
Automatic Updater's avatar
regen  
Automatic Updater committed
371 372
.RE
.PP
Automatic Updater's avatar
Automatic Updater committed
373 374
\fB+[no]rrcomments\fR
.RS 4
Tinderbox User's avatar
Tinderbox User committed
375
Toggle the display of per\-record comments in the output (for example, human\-readable key information about DNSKEY records). The default is not to print record comments unless multiline mode is active.
Automatic Updater's avatar
Automatic Updater committed
376 377
.RE
.PP
Tinderbox User's avatar
Tinderbox User committed
378 379
\fB+[no]crypto\fR
.RS 4
Tinderbox User's avatar
Tinderbox User committed
380
Toggle the display of cryptographic fields in DNSSEC records. The contents of these field are unnecessary to debug most DNSSEC validation failures and removing them makes it easier to see the common failures. The default is to display the fields. When omitted they are replaced by the string "[omitted]" or in the DNSKEY case the key id is displayed as the replacement, e.g. "[ key id = value ]".
Tinderbox User's avatar
Tinderbox User committed
381 382
.RE
.PP
Automatic Updater's avatar
Automatic Updater committed
383 384 385 386 387 388
\fB+split=W\fR
.RS 4
Split long hex\- or base64\-formatted fields in resource records into chunks of
\fIW\fR
characters (where
\fIW\fR
Tinderbox User's avatar
Tinderbox User committed
389
is rounded up to the nearest multiple of 4).
Automatic Updater's avatar
Automatic Updater committed
390 391 392
\fI+nosplit\fR
or
\fI+split=0\fR
Tinderbox User's avatar
Tinderbox User committed
393
causes fields not to be split at all. The default is 56 characters, or 44 characters when multiline mode is active.
Automatic Updater's avatar
Automatic Updater committed
394 395
.RE
.PP
396
\fB+[no]stats\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
397
.RS 4
Tinderbox User's avatar
Tinderbox User committed
398
This query option toggles the printing of statistics: when the query was made, the size of the reply and so on. The default behavior is to print the query statistics.
Automatic Updater's avatar
regen  
Automatic Updater committed
399 400
.RE
.PP
401
\fB+[no]qr\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
402
.RS 4
Tinderbox User's avatar
Tinderbox User committed
403
Print [do not print] the query as it is sent. By default, the query is not printed.
Automatic Updater's avatar
regen  
Automatic Updater committed
404 405
.RE
.PP
406
\fB+[no]question\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
407
.RS 4
Tinderbox User's avatar
Tinderbox User committed
408
Print [do not print] the question section of a query when an answer is returned. The default is to print the question section as a comment.
Automatic Updater's avatar
regen  
Automatic Updater committed
409 410
.RE
.PP
411
\fB+[no]answer\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
412
.RS 4
Tinderbox User's avatar
Tinderbox User committed
413
Display [do not display] the answer section of a reply. The default is to display it.
Automatic Updater's avatar
regen  
Automatic Updater committed
414 415
.RE
.PP
416
\fB+[no]authority\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
417
.RS 4
Tinderbox User's avatar
Tinderbox User committed
418
Display [do not display] the authority section of a reply. The default is to display it.
Automatic Updater's avatar
regen  
Automatic Updater committed
419 420
.RE
.PP
421
\fB+[no]additional\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
422
.RS 4
Tinderbox User's avatar
Tinderbox User committed
423
Display [do not display] the additional section of a reply. The default is to display it.
Automatic Updater's avatar
regen  
Automatic Updater committed
424 425
.RE
.PP
426
\fB+[no]all\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
427
.RS 4
Tinderbox User's avatar
Tinderbox User committed
428
Set or clear all display flags.
Automatic Updater's avatar
regen  
Automatic Updater committed
429 430
.RE
.PP
431
\fB+time=T\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
432 433 434
.RS 4
Sets the timeout for a query to
\fIT\fR
Tinderbox User's avatar
Tinderbox User committed
435
seconds. The default timeout is 5 seconds. An attempt to set
Automatic Updater's avatar
regen  
Automatic Updater committed
436
\fIT\fR
Tinderbox User's avatar
Tinderbox User committed
437
to less than 1 will result in a query timeout of 1 second being applied.
Automatic Updater's avatar
regen  
Automatic Updater committed
438 439
.RE
.PP
Andreas Gustafsson's avatar
Andreas Gustafsson committed
440
\fB+tries=T\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
441 442 443
.RS 4
Sets the number of times to try UDP queries to server to
\fIT\fR
Tinderbox User's avatar
Tinderbox User committed
444
instead of the default, 3. If
Automatic Updater's avatar
regen  
Automatic Updater committed
445
\fIT\fR
Tinderbox User's avatar
Tinderbox User committed
446
is less than or equal to zero, the number of tries is silently rounded up to 1.
Automatic Updater's avatar
regen  
Automatic Updater committed
447 448
.RE
.PP
Andreas Gustafsson's avatar
Andreas Gustafsson committed
449
\fB+retry=T\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
450 451 452
.RS 4
Sets the number of times to retry UDP queries to server to
\fIT\fR
Tinderbox User's avatar
Tinderbox User committed
453 454
instead of the default, 2. Unlike
\fI+tries\fR, this does not include the initial query.
Automatic Updater's avatar
regen  
Automatic Updater committed
455 456
.RE
.PP
457
\fB+ndots=D\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
458 459 460 461 462
.RS 4
Set the number of dots that have to appear in
\fIname\fR
to
\fID\fR
Tinderbox User's avatar
Tinderbox User committed
463 464
for it to be considered absolute. The default value is that defined using the ndots statement in
\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
Automatic Updater's avatar
regen  
Automatic Updater committed
465 466 467 468
\fBsearch\fR
or
\fBdomain\fR
directive in
Tinderbox User's avatar
Tinderbox User committed
469
\fI/etc/resolv.conf\fR.
Automatic Updater's avatar
regen  
Automatic Updater committed
470 471
.RE
.PP
472
\fB+bufsize=B\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
473 474 475
.RS 4
Set the UDP message buffer size advertised using EDNS0 to
\fIB\fR
Tinderbox User's avatar
Tinderbox User committed
476
bytes. The maximum and minimum sizes of this buffer are 65535 and 0 respectively. Values outside this range are rounded up or down appropriately. Values other than zero will cause a EDNS query to be sent.
Automatic Updater's avatar
regen  
Automatic Updater committed
477 478
.RE
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
479
\fB+edns=#\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
480
.RS 4
Tinderbox User's avatar
Tinderbox User committed
481
Specify the EDNS version to query with. Valid values are 0 to 255. Setting the EDNS version will cause a EDNS query to be sent.
Automatic Updater's avatar
regen  
Automatic Updater committed
482
\fB+noedns\fR
Tinderbox User's avatar
Tinderbox User committed
483
clears the remembered EDNS version. EDNS is set to 0 by default.
Automatic Updater's avatar
regen  
Automatic Updater committed
484 485
.RE
.PP
486
\fB+[no]multiline\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
487
.RS 4
Tinderbox User's avatar
Tinderbox User committed
488
Print records like the SOA records in a verbose multi\-line format with human\-readable comments. The default is to print each record on a single line, to facilitate machine parsing of the
Automatic Updater's avatar
regen  
Automatic Updater committed
489
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
490
output.
Automatic Updater's avatar
regen  
Automatic Updater committed
491 492
.RE
.PP
Automatic Updater's avatar
Automatic Updater committed
493 494
\fB+[no]onesoa\fR
.RS 4
Tinderbox User's avatar
Tinderbox User committed
495
Print only one (starting) SOA record when performing an AXFR. The default is to print both the starting and ending SOA records.
Automatic Updater's avatar
Automatic Updater committed
496 497
.RE
.PP
Andreas Gustafsson's avatar
Andreas Gustafsson committed
498
\fB+[no]fail\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
499
.RS 4
Tinderbox User's avatar
Tinderbox User committed
500
Do not try the next server if you receive a SERVFAIL. The default is to not try the next server which is the reverse of normal stub resolver behavior.
Automatic Updater's avatar
regen  
Automatic Updater committed
501 502
.RE
.PP
Andreas Gustafsson's avatar
Andreas Gustafsson committed
503
\fB+[no]besteffort\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
504
.RS 4
Tinderbox User's avatar
Tinderbox User committed
505
Attempt to display the contents of messages which are malformed. The default is to not display malformed answers.
Automatic Updater's avatar
regen  
Automatic Updater committed
506 507
.RE
.PP
Andreas Gustafsson's avatar
Andreas Gustafsson committed
508
\fB+[no]dnssec\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
509
.RS 4
Tinderbox User's avatar
Tinderbox User committed
510
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO) in the OPT record in the additional section of the query.
Automatic Updater's avatar
regen  
Automatic Updater committed
511 512
.RE
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
513
\fB+[no]sigchase\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
514
.RS 4
Tinderbox User's avatar
Tinderbox User committed
515
Chase DNSSEC signature chains. Requires dig be compiled with \-DDIG_SIGCHASE.
Automatic Updater's avatar
regen  
Automatic Updater committed
516 517
.RE
.PP
Rob Austein's avatar
regen  
Rob Austein committed
518
\fB+trusted\-key=####\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
519 520
.RS 4
Specifies a file containing trusted keys to be used with
Tinderbox User's avatar
Tinderbox User committed
521
\fB+sigchase\fR. Each DNSKEY record must be on its own line.
Automatic Updater's avatar
regen  
Automatic Updater committed
522
.sp
Automatic Updater's avatar
regen  
Automatic Updater committed
523
If not specified,
Automatic Updater's avatar
regen  
Automatic Updater committed
524 525
\fBdig\fR
will look for
Tinderbox User's avatar
Tinderbox User committed
526
\fI/etc/trusted\-key.key\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
527
then
Tinderbox User's avatar
Tinderbox User committed
528 529
\fItrusted\-key.key\fR
in the current directory.
Automatic Updater's avatar
regen  
Automatic Updater committed
530
.sp
Tinderbox User's avatar
Tinderbox User committed
531
Requires dig be compiled with \-DDIG_SIGCHASE.
Automatic Updater's avatar
regen  
Automatic Updater committed
532 533
.RE
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
534
\fB+[no]topdown\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
535
.RS 4
Tinderbox User's avatar
Tinderbox User committed
536
When chasing DNSSEC signature chains perform a top\-down validation. Requires dig be compiled with \-DDIG_SIGCHASE.
Automatic Updater's avatar
regen  
Automatic Updater committed
537 538
.RE
.PP
539
\fB+[no]nsid\fR
Automatic Updater's avatar
regen  
Automatic Updater committed
540
.RS 4
Tinderbox User's avatar
Tinderbox User committed
541
Include an EDNS name server ID request when sending a query.
542 543 544 545
.RE
.PP
\fB+[no]keepopen\fR
.RS 4
Tinderbox User's avatar
Tinderbox User committed
546 547
Keep the TCP socket open between queries and reuse it rather than creating a new TCP socket for each lookup. The default is
\fB+nokeepopen\fR.
Automatic Updater's avatar
regen  
Automatic Updater committed
548
.RE
Tinderbox User's avatar
Tinderbox User committed
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564
.PP
\fB+[no]sit\fR\fB[=####]\fR
.RS 4
Send a Source Identity Token EDNS option, with optional value. Replaying a SIT from a previous response will allow the server to identify a previous client. The default is
\fB+nosit\fR. Currently using experimental value 65001 for the option code.
.RE
.PP
\fB+[no]subnet=addr/prefix\fR
.RS 4
Send an EDNS Client Subnet option with the speciifed IP address or network prefix.
.RE
.PP
\fB+[no]expire\fR
.RS 4
Send an EDNS Expire option. Currently using experimental value 65002 for the option code.
.RE
565 566
.SH "MULTIPLE QUERIES"
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
567 568 569 570
The BIND 9 implementation of
\fBdig \fR
supports specifying multiple queries on the command line (in addition to supporting the
\fB\-f\fR
Tinderbox User's avatar
Tinderbox User committed
571
batch file option). Each of those queries can be supplied with its own set of flags, options and query options.
572
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
573 574
In this case, each
\fIquery\fR
Tinderbox User's avatar
Tinderbox User committed
575
argument represent an individual query in the command\-line syntax described above. Each consists of any of the standard options and flags, the name to be looked up, an optional query type and class and any query options that should be applied to that query.
576
.PP
Tinderbox User's avatar
Tinderbox User committed
577
A global set of query options, which should be applied to all queries, can also be supplied. These global query options must precede the first tuple of name, class, type, options, flags, and query options supplied on the command line. Any global query options (except the
Automatic Updater's avatar
regen  
Automatic Updater committed
578
\fB+[no]cmd\fR
Tinderbox User's avatar
Tinderbox User committed
579
option) can be overridden by a query\-specific set of query options. For example:
Automatic Updater's avatar
regen  
Automatic Updater committed
580 581
.sp
.RS 4
582
.nf
Tinderbox User's avatar
Tinderbox User committed
583
dig +qr www.isc.org any \-x 127.0.0.1 isc.org ns +noqr
584
.fi
Automatic Updater's avatar
regen  
Automatic Updater committed
585 586 587 588 589
.RE
.sp
shows how
\fBdig\fR
could be used from the command line to make three lookups: an ANY query for
Tinderbox User's avatar
Tinderbox User committed
590 591
www.isc.org, a reverse lookup of 127.0.0.1 and a query for the NS records of
isc.org. A global query option of
Automatic Updater's avatar
regen  
Automatic Updater committed
592 593 594
\fI+qr\fR
is applied, so that
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
595
shows the initial query it made for each lookup. The final query has a local query option of
Automatic Updater's avatar
regen  
Automatic Updater committed
596 597 598 599
\fI+noqr\fR
which means that
\fBdig\fR
will not print the initial query when it looks up the NS records for
Tinderbox User's avatar
Tinderbox User committed
600
isc.org.
Mark Andrews's avatar
regen  
Mark Andrews committed
601 602
.SH "IDN SUPPORT"
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
603 604
If
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
605
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names.
Automatic Updater's avatar
regen  
Automatic Updater committed
606
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
607
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server. If you'd like to turn off the IDN support for some reason, defines the
Automatic Updater's avatar
regen  
Automatic Updater committed
608
\fBIDN_DISABLE\fR
Tinderbox User's avatar
Tinderbox User committed
609
environment variable. The IDN support is disabled if the variable is set when
Automatic Updater's avatar
regen  
Automatic Updater committed
610
\fBdig\fR
Tinderbox User's avatar
Tinderbox User committed
611
runs.
612 613
.SH "FILES"
.PP
Tinderbox User's avatar
Tinderbox User committed
614
\fI/etc/resolv.conf\fR
Andreas Gustafsson's avatar
Andreas Gustafsson committed
615
.PP
Tinderbox User's avatar
Tinderbox User committed
616
\fI${HOME}/.digrc\fR
617 618
.SH "SEE ALSO"
.PP
Automatic Updater's avatar
regen  
Automatic Updater committed
619 620
\fBhost\fR(1),
\fBnamed\fR(8),
Tinderbox User's avatar
Tinderbox User committed
621 622
\fBdnssec\-keygen\fR(8),
RFC1035.
623 624
.SH "BUGS"
.PP
Tinderbox User's avatar
Tinderbox User committed
625
There are probably too many query options.
Automatic Updater's avatar
regen  
Automatic Updater committed
626
.SH "COPYRIGHT"
Tinderbox User's avatar
Tinderbox User committed
627
Copyright \(co 2004\-2011, 2013, 2014 Internet Systems Consortium, Inc. ("ISC")
Automatic Updater's avatar
regen  
Automatic Updater committed
628
.br
Tinderbox User's avatar
Tinderbox User committed
629
Copyright \(co 2000\-2003 Internet Software Consortium.
Automatic Updater's avatar
regen  
Automatic Updater committed
630
.br