dig.1 17.4 KB
Newer Older
Mark Andrews's avatar
regen  
Mark Andrews committed
1
.\" Copyright (C) 2004-2007 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
.\" 
Jim Reid's avatar
Jim Reid committed
4 5 6
.\" Permission to use, copy, modify, and distribute this software for any
.\" 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
.\"
Mark Andrews's avatar
regen  
Mark Andrews committed
16
.\" $Id: dig.1,v 1.45 2007/05/16 06:12:00 marka Exp $
Rob Austein's avatar
regen  
Rob Austein committed
17
.\"
Rob Austein's avatar
regen  
Rob Austein committed
18 19
.hy 0
.ad l
Mark Andrews's avatar
regen  
Mark Andrews committed
20 21
.\"     Title: dig
.\"    Author: 
Mark Andrews's avatar
regen  
Mark Andrews committed
22
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
Mark Andrews's avatar
regen  
Mark Andrews committed
23 24 25 26
.\"      Date: Jun 30, 2000
.\"    Manual: BIND9
.\"    Source: BIND9
.\"
Mark Andrews's avatar
regen  
Mark Andrews committed
27 28 29 30 31 32
.TH "DIG" "1" "Jun 30, 2000" "BIND9" "BIND9"
.\" 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
Mark Andrews's avatar
regen  
Mark Andrews 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\-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
Mark Andrews's avatar
regen  
Mark Andrews committed
43 44 45 46 47
\fBdig\fR
(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
\fBdig\fR
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
Mark Andrews's avatar
regen  
Mark Andrews committed
49 50 51 52
Although
\fBdig\fR
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
\fB\-h\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
53
option is given. Unlike earlier versions, the BIND 9 implementation of
Mark Andrews's avatar
regen  
Mark Andrews committed
54 55
\fBdig\fR
allows multiple lookups to be issued from the command line.
56
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
57 58 59 60
Unless it is told to query a specific name server,
\fBdig\fR
will try each of the servers listed in
\fI/etc/resolv.conf\fR.
61
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
62
When no command line arguments or options are given, will perform an NS query for "." (the root).
Andreas Gustafsson's avatar
Andreas Gustafsson committed
63
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
64 65 66 67
It is possible to set per\-user defaults for
\fBdig\fR
via
\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
68 69 70 71 72 73 74 75
.PP
The IN and CH class names overlap with the IN and CH top level domains names. Either use the
\fB\-t\fR
and
\fB\-c\fR
options to specify the type and class or use the
\fB\-q\fR
the specify the domain name or use "IN." and "CH." when looking up these top level domains.
76 77
.SH "SIMPLE USAGE"
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
78 79 80 81
A typical invocation of
\fBdig\fR
looks like:
.sp
Mark Andrews's avatar
regen  
Mark Andrews committed
82
.RS 4
83 84 85
.nf
 dig @server name type 
.fi
Mark Andrews's avatar
regen  
Mark Andrews committed
86
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
87 88
.sp
where:
Mark Andrews's avatar
regen  
Mark Andrews committed
89
.PP
90
\fBserver\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
91
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
92 93 94 95 96 97 98 99 100 101 102
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
\fIserver\fR
argument is a hostname,
\fBdig\fR
resolves that name before querying that name server. If no
\fIserver\fR
argument is provided,
\fBdig\fR
consults
\fI/etc/resolv.conf\fR
and queries the name servers listed there. The reply from the name server that responds is displayed.
Mark Andrews's avatar
regen  
Mark Andrews committed
103 104
.RE
.PP
105
\fBname\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
106
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
107
is the name of the resource record that is to be looked up.
Mark Andrews's avatar
regen  
Mark Andrews committed
108 109
.RE
.PP
110
\fBtype\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
111
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
112 113 114 115 116 117 118
indicates what type of query is required \(em ANY, A, MX, SIG, etc.
\fItype\fR
can be any valid query type. If no
\fItype\fR
argument is supplied,
\fBdig\fR
will perform a lookup for an A record.
Mark Andrews's avatar
regen  
Mark Andrews committed
119
.RE
120 121
.SH "OPTIONS"
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
122 123 124 125
The
\fB\-b\fR
option sets the source IP address of the query to
\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>"
126
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
127 128 129 130
The default query class (IN for internet) is overridden by the
\fB\-c\fR
option.
\fIclass\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
131
is any valid class, such as HS for Hesiod records or CH for Chaosnet records.
132
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
133 134 135 136 137
The
\fB\-f\fR
option makes
\fBdig \fR
operate in batch mode by reading a list of lookup requests to process from the file
Mark Andrews's avatar
regen  
Mark Andrews committed
138
\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
Mark Andrews's avatar
regen  
Mark Andrews committed
139 140
\fBdig\fR
using the command\-line interface.
141
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
142 143 144 145 146 147 148
If a non\-standard port number is to be queried, the
\fB\-p\fR
option is used.
\fIport#\fR
is the port number that
\fBdig\fR
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.
149
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
150 151 152 153 154 155 156 157 158
The
\fB\-4\fR
option forces
\fBdig\fR
to only use IPv4 query transport. The
\fB\-6\fR
option forces
\fBdig\fR
to only use IPv6 query transport.
Mark Andrews's avatar
regen  
Mark Andrews committed
159
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
160 161 162
The
\fB\-t\fR
option sets the query type to
Mark Andrews's avatar
regen  
Mark Andrews committed
163
\fItype\fR. It can be any valid query type which is supported in BIND 9. The default query type is "A", unless the
Mark Andrews's avatar
regen  
Mark Andrews committed
164 165 166 167 168 169
\fB\-x\fR
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,
\fItype\fR
is set to
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.
170
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
171 172 173
The
\fB\-q\fR
option sets the query name to
Mark Andrews's avatar
regen  
Mark Andrews committed
174
\fIname\fR. This useful do distinguish the
Mark Andrews's avatar
regen  
Mark Andrews committed
175
\fIname\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
176
from other arguments.
Mark Andrews's avatar
regen  
Mark Andrews committed
177
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
178
Reverse lookups \(em mapping addresses to names \(em are simplified by the
Mark Andrews's avatar
regen  
Mark Andrews committed
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
\fB\-x\fR
option.
\fIaddr\fR
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
\fIname\fR,
\fIclass\fR
and
\fItype\fR
arguments.
\fBdig\fR
automatically performs a lookup for a name like
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
\fB\-i\fR
option. Bit string labels (RFC2874) are now experimental and are not attempted.
194
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
195 196 197 198 199 200 201
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
option. You can also specify the TSIG key itself on the command line using the
\fB\-y\fR
option;
Mark Andrews's avatar
regen  
Mark Andrews committed
202 203
\fIhmac\fR
is the type of the TSIG, default HMAC\-MD5,
Mark Andrews's avatar
regen  
Mark Andrews committed
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
\fIname\fR
is the name of the TSIG key and
\fIkey\fR
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
\fB\-y\fR
option on multi\-user systems as the key can be visible in the output from
\fBps\fR(1)
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
\fBkey\fR
and
\fBserver\fR
statements in
\fInamed.conf\fR.
219 220
.SH "QUERY OPTIONS"
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
221 222
\fBdig\fR
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.
223
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
224 225 226 227
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
no
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
228
.PP
229
\fB+[no]tcp\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
230
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
231
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.
Mark Andrews's avatar
regen  
Mark Andrews committed
232 233
.RE
.PP
234
\fB+[no]vc\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
235
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
236 237 238
Use [do not use] TCP when querying name servers. This alternate syntax to
\fI+[no]tcp\fR
is provided for backwards compatibility. The "vc" stands for "virtual circuit".
Mark Andrews's avatar
regen  
Mark Andrews committed
239 240
.RE
.PP
241
\fB+[no]ignore\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
242
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
243
Ignore truncation in UDP responses instead of retrying with TCP. By default, TCP retries are performed.
Mark Andrews's avatar
regen  
Mark Andrews committed
244 245
.RE
.PP
246
\fB+domain=somename\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
247
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
248 249 250 251 252 253 254
Set the search list to contain the single domain
\fIsomename\fR, as if specified in a
\fBdomain\fR
directive in
\fI/etc/resolv.conf\fR, and enable search list processing as if the
\fI+search\fR
option were given.
Mark Andrews's avatar
regen  
Mark Andrews committed
255 256
.RE
.PP
257
\fB+[no]search\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
258
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
259 260 261
Use [do not use] the search list defined by the searchlist or domain directive in
\fIresolv.conf\fR
(if any). The search list is not used by default.
Mark Andrews's avatar
regen  
Mark Andrews committed
262 263
.RE
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
264
\fB+[no]showsearch\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
265
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
266
Perform [do not perform] a search showing intermediate results.
Mark Andrews's avatar
regen  
Mark Andrews committed
267 268
.RE
.PP
269
\fB+[no]defname\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
270
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
271 272
Deprecated, treated as a synonym for
\fI+[no]search\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
273 274
.RE
.PP
275
\fB+[no]aaonly\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
276
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
277
Sets the "aa" flag in the query.
Mark Andrews's avatar
regen  
Mark Andrews committed
278 279
.RE
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
280
\fB+[no]aaflag\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
281
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
282 283
A synonym for
\fI+[no]aaonly\fR.
Mark Andrews's avatar
regen  
Mark Andrews committed
284 285
.RE
.PP
286
\fB+[no]adflag\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
287
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
288
Set [do not set] the AD (authentic data) bit in the query. The AD bit currently has a standard meaning only in responses, not in queries, but the ability to set the bit in the query is provided for completeness.
Mark Andrews's avatar
regen  
Mark Andrews committed
289 290
.RE
.PP
291
\fB+[no]cdflag\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
292
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
293
Set [do not set] the CD (checking disabled) bit in the query. This requests the server to not perform DNSSEC validation of responses.
Mark Andrews's avatar
regen  
Mark Andrews committed
294 295
.RE
.PP
Mark Andrews's avatar
Mark Andrews committed
296
\fB+[no]cl\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
297
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
298
Display [do not display] the CLASS when printing the record.
Mark Andrews's avatar
regen  
Mark Andrews committed
299 300
.RE
.PP
Mark Andrews's avatar
Mark Andrews committed
301
\fB+[no]ttlid\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
302
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
303
Display [do not display] the TTL when printing the record.
Mark Andrews's avatar
regen  
Mark Andrews committed
304 305
.RE
.PP
Mark Andrews's avatar
Mark Andrews committed
306
\fB+[no]recurse\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
307
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
308 309 310 311 312 313 314
Toggle the setting of the RD (recursion desired) bit in the query. This bit is set by default, which means
\fBdig\fR
normally sends recursive queries. Recursion is automatically disabled when the
\fI+nssearch\fR
or
\fI+trace\fR
query options are used.
Mark Andrews's avatar
regen  
Mark Andrews committed
315 316
.RE
.PP
317
\fB+[no]nssearch\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
318
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
319 320 321
When this option is set,
\fBdig\fR
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.
Mark Andrews's avatar
regen  
Mark Andrews committed
322 323
.RE
.PP
324
\fB+[no]trace\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
325
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
326 327 328
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,
\fBdig\fR
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.
Mark Andrews's avatar
regen  
Mark Andrews committed
329 330
.RE
.PP
331
\fB+[no]cmd\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
332
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
333
Toggles the printing of the initial comment in the output identifying the version of
Mark Andrews's avatar
regen  
Mark Andrews committed
334 335
\fBdig\fR
and the query options that have been applied. This comment is printed by default.
Mark Andrews's avatar
regen  
Mark Andrews committed
336 337
.RE
.PP
338
\fB+[no]short\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
339
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
340
Provide a terse answer. The default is to print the answer in a verbose form.
Mark Andrews's avatar
regen  
Mark Andrews committed
341 342
.RE
.PP
343
\fB+[no]identify\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
344
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
345 346 347
Show [or do not show] the IP address and port number that supplied the answer when the
\fI+short\fR
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.
Mark Andrews's avatar
regen  
Mark Andrews committed
348 349
.RE
.PP
350
\fB+[no]comments\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
351
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
352
Toggle the display of comment lines in the output. The default is to print comments.
Mark Andrews's avatar
regen  
Mark Andrews committed
353 354
.RE
.PP
355
\fB+[no]stats\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
356
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
357
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.
Mark Andrews's avatar
regen  
Mark Andrews committed
358 359
.RE
.PP
360
\fB+[no]qr\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
361
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
362
Print [do not print] the query as it is sent. By default, the query is not printed.
Mark Andrews's avatar
regen  
Mark Andrews committed
363 364
.RE
.PP
365
\fB+[no]question\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
366
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
367
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.
Mark Andrews's avatar
regen  
Mark Andrews committed
368 369
.RE
.PP
370
\fB+[no]answer\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
371
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
372
Display [do not display] the answer section of a reply. The default is to display it.
Mark Andrews's avatar
regen  
Mark Andrews committed
373 374
.RE
.PP
375
\fB+[no]authority\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
376
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
377
Display [do not display] the authority section of a reply. The default is to display it.
Mark Andrews's avatar
regen  
Mark Andrews committed
378 379
.RE
.PP
380
\fB+[no]additional\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
381
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
382
Display [do not display] the additional section of a reply. The default is to display it.
Mark Andrews's avatar
regen  
Mark Andrews committed
383 384
.RE
.PP
385
\fB+[no]all\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
386
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
387
Set or clear all display flags.
Mark Andrews's avatar
regen  
Mark Andrews committed
388 389
.RE
.PP
390
\fB+time=T\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
391
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
392 393
Sets the timeout for a query to
\fIT\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
394
seconds. The default timeout is 5 seconds. An attempt to set
Mark Andrews's avatar
regen  
Mark Andrews committed
395 396
\fIT\fR
to less than 1 will result in a query timeout of 1 second being applied.
Mark Andrews's avatar
regen  
Mark Andrews committed
397 398
.RE
.PP
Andreas Gustafsson's avatar
Andreas Gustafsson committed
399
\fB+tries=T\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
400
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
401 402 403 404 405
Sets the number of times to try UDP queries to server to
\fIT\fR
instead of the default, 3. If
\fIT\fR
is less than or equal to zero, the number of tries is silently rounded up to 1.
Mark Andrews's avatar
regen  
Mark Andrews committed
406 407
.RE
.PP
Andreas Gustafsson's avatar
Andreas Gustafsson committed
408
\fB+retry=T\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
409
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
410 411 412 413
Sets the number of times to retry UDP queries to server to
\fIT\fR
instead of the default, 2. Unlike
\fI+tries\fR, this does not include the initial query.
Mark Andrews's avatar
regen  
Mark Andrews committed
414 415
.RE
.PP
416
\fB+ndots=D\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
417
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
418 419 420 421 422 423 424 425 426 427 428
Set the number of dots that have to appear in
\fIname\fR
to
\fID\fR
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
\fBsearch\fR
or
\fBdomain\fR
directive in
\fI/etc/resolv.conf\fR.
Mark Andrews's avatar
regen  
Mark Andrews committed
429 430
.RE
.PP
431
\fB+bufsize=B\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
432
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
433 434 435
Set the UDP message buffer size advertised using EDNS0 to
\fIB\fR
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.
Mark Andrews's avatar
regen  
Mark Andrews committed
436 437
.RE
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
438
\fB+edns=#\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
439
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
440 441 442
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.
\fB+noedns\fR
clears the remembered EDNS version.
Mark Andrews's avatar
regen  
Mark Andrews committed
443 444
.RE
.PP
445
\fB+[no]multiline\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
446
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
447 448 449
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
\fBdig\fR
output.
Mark Andrews's avatar
regen  
Mark Andrews committed
450 451
.RE
.PP
Andreas Gustafsson's avatar
Andreas Gustafsson committed
452
\fB+[no]fail\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
453
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
454
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.
Mark Andrews's avatar
regen  
Mark Andrews committed
455 456
.RE
.PP
Andreas Gustafsson's avatar
Andreas Gustafsson committed
457
\fB+[no]besteffort\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
458
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
459
Attempt to display the contents of messages which are malformed. The default is to not display malformed answers.
Mark Andrews's avatar
regen  
Mark Andrews committed
460 461
.RE
.PP
Andreas Gustafsson's avatar
Andreas Gustafsson committed
462
\fB+[no]dnssec\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
463
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
464
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO) in the OPT record in the additional section of the query.
Mark Andrews's avatar
regen  
Mark Andrews committed
465 466
.RE
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
467
\fB+[no]sigchase\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
468
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
469
Chase DNSSEC signature chains. Requires dig be compiled with \-DDIG_SIGCHASE.
Mark Andrews's avatar
regen  
Mark Andrews committed
470 471
.RE
.PP
Rob Austein's avatar
regen  
Rob Austein committed
472
\fB+trusted\-key=####\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
473
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
474 475 476 477 478 479 480 481 482 483 484 485
Specifies a file containing trusted keys to be used with
\fB+sigchase\fR. Each DNSKEY record must be on its own line.
.sp
If not specified
\fBdig\fR
will look for
\fI/etc/trusted\-key.key\fR
then
\fItrusted\-key.key\fR
in the current directory.
.sp
Requires dig be compiled with \-DDIG_SIGCHASE.
Mark Andrews's avatar
regen  
Mark Andrews committed
486 487
.RE
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
488
\fB+[no]topdown\fR
Mark Andrews's avatar
regen  
Mark Andrews committed
489
.RS 4
Mark Andrews's avatar
regen  
Mark Andrews committed
490
When chasing DNSSEC signature chains perform a top\-down validation. Requires dig be compiled with \-DDIG_SIGCHASE.
Mark Andrews's avatar
regen  
Mark Andrews committed
491
.RE
492 493
.SH "MULTIPLE QUERIES"
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
494 495 496 497 498
The BIND 9 implementation of
\fBdig \fR
supports specifying multiple queries on the command line (in addition to supporting the
\fB\-f\fR
batch file option). Each of those queries can be supplied with its own set of flags, options and query options.
499
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
500 501 502
In this case, each
\fIquery\fR
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.
503
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
504 505 506 507
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
\fB+[no]cmd\fR
option) can be overridden by a query\-specific set of query options. For example:
.sp
Mark Andrews's avatar
regen  
Mark Andrews committed
508
.RS 4
509
.nf
Mark Andrews's avatar
regen  
Mark Andrews committed
510
dig +qr www.isc.org any \-x 127.0.0.1 isc.org ns +noqr
511
.fi
Mark Andrews's avatar
regen  
Mark Andrews committed
512
.RE
Mark Andrews's avatar
regen  
Mark Andrews committed
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527
.sp
shows how
\fBdig\fR
could be used from the command line to make three lookups: an ANY query for
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
\fI+qr\fR
is applied, so that
\fBdig\fR
shows the initial query it made for each lookup. The final query has a local query option of
\fI+noqr\fR
which means that
\fBdig\fR
will not print the initial query when it looks up the NS records for
isc.org.
Mark Andrews's avatar
regen  
Mark Andrews committed
528 529
.SH "IDN SUPPORT"
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
530 531 532 533 534 535 536 537 538
If
\fBdig\fR
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names.
\fBdig\fR
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
\fBIDN_DISABLE\fR
environment variable. The IDN support is disabled if the variable is set when
\fBdig\fR
runs.
539 540
.SH "FILES"
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
541
\fI/etc/resolv.conf\fR
Andreas Gustafsson's avatar
Andreas Gustafsson committed
542
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
543
\fI${HOME}/.digrc\fR
544 545
.SH "SEE ALSO"
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
546 547 548 549
\fBhost\fR(1),
\fBnamed\fR(8),
\fBdnssec\-keygen\fR(8),
RFC1035.
550 551
.SH "BUGS"
.PP
Mark Andrews's avatar
regen  
Mark Andrews committed
552
There are probably too many query options.
Mark Andrews's avatar
regen  
Mark Andrews committed
553
.SH "COPYRIGHT"
Mark Andrews's avatar
regen  
Mark Andrews committed
554
Copyright \(co 2004\-2007 Internet Systems Consortium, Inc. ("ISC")
Mark Andrews's avatar
regen  
Mark Andrews committed
555 556 557
.br
Copyright \(co 2000\-2003 Internet Software Consortium.
.br