|
1 '\" te |
|
2 .\" Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC") |
|
3 .\" Permission to use, copy, modify, and/or 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. THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 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. |
|
4 .\" Portions Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. |
|
5 .TH dig 8 "19 Oct 2015" "SunOS 5.12" "System Administration Commands" |
|
6 .SH NAME |
|
7 dig \- DNS lookup utility |
|
8 .SH SYNOPSIS |
|
9 .LP |
|
10 .nf |
|
11 \fBdig\fR [@server] [\fB-b\fR \fIaddress\fR] [\fB-c\fR \fIclass\fR] [\fB-f\fR \fIfilename\fR] |
|
12 [\fB-k\fR \fIfilename\fR] [\fB-m\fR] [\fB-p\fR \fIport#\fR] [\fB-q\fR \fIname\fR] [\fB-t\fR \fItype\fR] [\fB-x\fR \fIaddr\fR] |
|
13 [\fB-y\fR [\fIhmac\fR:]\fIname:key\fR] [\fB-4\fR] [\fB-6\fR] [\fIname\fR] [\fItype\fR] [\fIclass\fR] [\fIqueryopt\fR]... |
|
14 .fi |
|
15 |
|
16 .LP |
|
17 .nf |
|
18 \fBdig\fR [\fB-h\fR] |
|
19 .fi |
|
20 |
|
21 .LP |
|
22 .nf |
|
23 \fBdig\fR [\fIglobal-queryopt\fR...] [\fIquery\fR...] |
|
24 .fi |
|
25 |
|
26 .SH DESCRIPTION |
|
27 .sp |
|
28 .LP |
|
29 The \fBdig\fR utility (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. |
|
30 .sp |
|
31 .LP |
|
32 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 option is specified. Unlike earlier versions, the BIND 9 implementation of \fBdig\fR allows multiple lookups to be issued from the command line. |
|
33 .sp |
|
34 .LP |
|
35 Unless it is told to query a specific name server, \fBdig\fR tries each of the servers listed in \fB/etc/resolv.conf\fR. |
|
36 .sp |
|
37 .LP |
|
38 When no command line arguments or options are given, \fBdig\fR performs an NS query for "." (the root). |
|
39 .sp |
|
40 .LP |
|
41 It is possible to set per-user defaults for \fBdig\fR with \fB${HOME}/.digrc\fR. This file is read and any options in it are applied before the command line arguments. |
|
42 .sp |
|
43 .LP |
|
44 The \fBIN\fR and \fBCH\fR class names overlap with the \fBIN\fR and \fBCH\fR top level domains names. Either use the \fB-t\fR and \fB-c\fR options to specify the type and class, or use \fB"IN."\fR and \fB"CH."\fR when looking up these top level domains. |
|
45 .SS "Simple Usage" |
|
46 .sp |
|
47 .LP |
|
48 The following is a typical invocation of \fBdig\fR: |
|
49 .sp |
|
50 .in +2 |
|
51 .nf |
|
52 dig @server name type |
|
53 .fi |
|
54 .in -2 |
|
55 .sp |
|
56 |
|
57 .sp |
|
58 .LP |
|
59 where: |
|
60 .sp |
|
61 .ne 2 |
|
62 .mk |
|
63 .na |
|
64 \fB\fIserver\fR\fR |
|
65 .ad |
|
66 .sp .6 |
|
67 .RS 4n |
|
68 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 \fB/etc/resolv.conf\fR and queries the name servers listed there. The reply from the name server that responds is displayed. |
|
69 .RE |
|
70 |
|
71 .sp |
|
72 .ne 2 |
|
73 .mk |
|
74 .na |
|
75 \fB\fIname\fR\fR |
|
76 .ad |
|
77 .sp .6 |
|
78 .RS 4n |
|
79 The name of the resource record that is to be looked up. |
|
80 .RE |
|
81 |
|
82 .sp |
|
83 .ne 2 |
|
84 .mk |
|
85 .na |
|
86 \fB\fItype\fR\fR |
|
87 .ad |
|
88 .sp .6 |
|
89 .RS 4n |
|
90 Indicates what type of query is required (ANY, A, MX, SIG, among others.) \fItype\fR can be any valid query type. If no \fItype\fR argument is supplied, \fBdig\fR performs a lookup for an A record. |
|
91 .RE |
|
92 |
|
93 .SH OPTIONS |
|
94 .sp |
|
95 .LP |
|
96 The following options are supported: |
|
97 .sp |
|
98 .ne 2 |
|
99 .mk |
|
100 .na |
|
101 \fB\fB-4\fR\fR |
|
102 .ad |
|
103 .sp .6 |
|
104 .RS 4n |
|
105 Use only IPv4 transport. By default both IPv4 and IPv6 transports can be used. Options \fB-4\fR and \fB-6\fR are mutually exclusive. |
|
106 .RE |
|
107 |
|
108 .sp |
|
109 .ne 2 |
|
110 .mk |
|
111 .na |
|
112 \fB\fB-6\fR\fR |
|
113 .ad |
|
114 .sp .6 |
|
115 .RS 4n |
|
116 Use only IPv6 transport. By default both IPv4 and IPv6 transports can be used. Options \fB-4\fR and \fB-6\fR are mutually exclusive. |
|
117 .RE |
|
118 |
|
119 .sp |
|
120 .ne 2 |
|
121 .mk |
|
122 .na |
|
123 \fB\fB-b\fR \fIaddress\fR\fR |
|
124 .ad |
|
125 .sp .6 |
|
126 .RS 4n |
|
127 Set 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 \fB0.0.0.0\fR or \fB::\fR. An optional port may be specified by appending: \fB#\fR\fI<port>\fR |
|
128 .RE |
|
129 |
|
130 .sp |
|
131 .ne 2 |
|
132 .mk |
|
133 .na |
|
134 \fB\fB-c\fR \fIclass\fR\fR |
|
135 .ad |
|
136 .sp .6 |
|
137 .RS 4n |
|
138 Override the default query class (IN for internet). The \fIclass\fR argument is any valid class, such as HS for Hesiod records or CH for CHAOSNET records. |
|
139 .RE |
|
140 |
|
141 .sp |
|
142 .ne 2 |
|
143 .mk |
|
144 .na |
|
145 \fB\fB-f\fR \fIfilename\fR\fR |
|
146 .ad |
|
147 .sp .6 |
|
148 .RS 4n |
|
149 Operate in batch mode by reading a list of lookup requests to process from the file \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 \fBdig\fR using the command-line interface. |
|
150 .RE |
|
151 |
|
152 .sp |
|
153 .ne 2 |
|
154 .mk |
|
155 .na |
|
156 \fB\fB-h\fR\fR |
|
157 .ad |
|
158 .sp .6 |
|
159 .RS 4n |
|
160 Print a brief summary of command-line arguments and options. |
|
161 .RE |
|
162 |
|
163 .sp |
|
164 .ne 2 |
|
165 .mk |
|
166 .na |
|
167 \fB\fB-k\fR \fIfilename\fR\fR |
|
168 .ad |
|
169 .sp .6 |
|
170 .RS 4n |
|
171 Specify a transaction signature (TSIG) key file to sign the DNS queries sent by \fBdig\fR and their responses using TSIGs. |
|
172 .RE |
|
173 |
|
174 .sp |
|
175 .ne 2 |
|
176 .mk |
|
177 .na |
|
178 \fB\fB-m\fR\fR |
|
179 .ad |
|
180 .sp .6 |
|
181 .RS 4n |
|
182 Enable memory usage debugging. |
|
183 .RE |
|
184 |
|
185 .sp |
|
186 .ne 2 |
|
187 .mk |
|
188 .na |
|
189 \fB\fB-p\fR \fIport#\fR\fR |
|
190 .ad |
|
191 .sp .6 |
|
192 .RS 4n |
|
193 Query a non-standard port number. The \fIport#\fR argument is the port number that \fBdig\fR sends its queries instead of the standard DNS port number 53. This option tests a name server that has been configured to listen for queries on a non-standard port number. |
|
194 .RE |
|
195 |
|
196 .sp |
|
197 .ne 2 |
|
198 .mk |
|
199 .na |
|
200 \fB\fB-q\fR \fIname\fR\fR |
|
201 .ad |
|
202 .sp .6 |
|
203 .RS 4n |
|
204 Sets the query name to \fIname\fR. This can be useful in that the query name can be easily distinguished from other arguments. |
|
205 .RE |
|
206 |
|
207 .sp |
|
208 .ne 2 |
|
209 .mk |
|
210 .na |
|
211 \fB\fB-t\fR \fItype\fR\fR |
|
212 .ad |
|
213 .sp .6 |
|
214 .RS 4n |
|
215 Set the query type to \fItype\fR, which can be any valid query type supported in BIND9. The default query type "A", unless the \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 \fBixfr\fR=\fIN\fR. 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. |
|
216 .RE |
|
217 |
|
218 .sp |
|
219 .ne 2 |
|
220 .mk |
|
221 .na |
|
222 \fB\fB-x\fR \fIaddr\fR\fR |
|
223 .ad |
|
224 .sp .6 |
|
225 .RS 4n |
|
226 Simplify reverse lookups (mapping addresses to names ). The \fIaddr\fR argument 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. The \fBdig\fR utility automatically performs a lookup for a name like \fB11.12.13.10.in-addr.arpa\fR 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 (RFC 2874) are now experimental and are not attempted. |
|
227 .RE |
|
228 |
|
229 .sp |
|
230 .ne 2 |
|
231 .mk |
|
232 .na |
|
233 \fB\fB-y\fR [\fIhmac\fR:]\fIname\fR:\fIkey\fR\fR |
|
234 .ad |
|
235 .sp .6 |
|
236 .RS 4n |
|
237 Specify a transaction signature (TSIG) key on the command line. This is done to sign the DNS queries sent by \fBdig\fR, as well as their responses. You can also specify the TSIG key itself on the command line using the \fB-y\fR option. The optional \fIhmac\fR is the type of TSIG; the default is \fBHMAC-MD5\fR. The \fIname\fR argument is the name of the TSIG key and the \fIkey\fR argument is the actual key. The key is a base-64 encoded string, typically generated by \fBdnssec-keygen\fR(8). |
|
238 .sp |
|
239 Caution should be taken when using the \fB-y\fR option on multi-user systems, since 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 \fBnamed.conf\fR. |
|
240 .RE |
|
241 |
|
242 .SH QUERY OPTIONS |
|
243 .sp |
|
244 .LP |
|
245 The \fBdig\fR utility 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. |
|
246 .sp |
|
247 .LP |
|
248 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=\fR\fIvalue\fR. The query options are: |
|
249 .sp |
|
250 .ne 2 |
|
251 .mk |
|
252 .na |
|
253 \fB\fB+[no]tcp\fR\fR |
|
254 .ad |
|
255 .sp .6 |
|
256 .RS 4n |
|
257 Use [do not use] TCP when querying name servers. The default behaviour is to use UDP unless an AXFR or IXFR query is requested, in which case a TCP connection is used. |
|
258 .RE |
|
259 |
|
260 .sp |
|
261 .ne 2 |
|
262 .mk |
|
263 .na |
|
264 \fB\fB+[no]vc\fR\fR |
|
265 .ad |
|
266 .sp .6 |
|
267 .RS 4n |
|
268 Use [do not use] TCP when querying name servers. This alternate syntax to \fB+[no]tcp\fR is provided for backwards compatibility. The "vc" stands for "virtual circuit". |
|
269 .RE |
|
270 |
|
271 .sp |
|
272 .ne 2 |
|
273 .mk |
|
274 .na |
|
275 \fB\fB+[no]ignore\fR\fR |
|
276 .ad |
|
277 .sp .6 |
|
278 .RS 4n |
|
279 Ignore truncation in UDP responses instead of retrying with TCP. By default, TCP retries are performed. |
|
280 .RE |
|
281 |
|
282 .sp |
|
283 .ne 2 |
|
284 .mk |
|
285 .na |
|
286 \fB\fB+domain=\fR\fIsomename\fR\fR |
|
287 .ad |
|
288 .sp .6 |
|
289 .RS 4n |
|
290 Set the search list to contain the single domain \fIsomename\fR, as if specified in a \fBdomain\fR directive in \fB/etc/resolv.conf\fR, and enable search list processing as if the \fB+search\fR option were given. |
|
291 .RE |
|
292 |
|
293 .sp |
|
294 .ne 2 |
|
295 .mk |
|
296 .na |
|
297 \fB\fB+[no]search\fR\fR |
|
298 .ad |
|
299 .sp .6 |
|
300 .RS 4n |
|
301 Use [do not use] the search list defined by the \fBsearchlist\fR or \fBdomain\fR directive in \fBresolv.conf\fR (if any). The search list is not used by default. |
|
302 .RE |
|
303 |
|
304 .sp |
|
305 .ne 2 |
|
306 .mk |
|
307 .na |
|
308 \fB\fB+[no]showsearch\fR\fR |
|
309 .ad |
|
310 .sp .6 |
|
311 .RS 4n |
|
312 Perform [do not perform] a search showing intermediate results. |
|
313 .RE |
|
314 |
|
315 .sp |
|
316 .ne 2 |
|
317 .mk |
|
318 .na |
|
319 \fB\fB+[no]defname\fR\fR |
|
320 .ad |
|
321 .sp .6 |
|
322 .RS 4n |
|
323 Deprecated, treated as a synonym for \fB+[no]search\fR. |
|
324 .RE |
|
325 |
|
326 .sp |
|
327 .ne 2 |
|
328 .mk |
|
329 .na |
|
330 \fB\fB+[no]aaonly\fR\fR |
|
331 .ad |
|
332 .sp .6 |
|
333 .RS 4n |
|
334 Sets the \fBaa\fR flag in the query. |
|
335 .RE |
|
336 |
|
337 .sp |
|
338 .ne 2 |
|
339 .mk |
|
340 .na |
|
341 \fB\fB+[no]aaflag\fR\fR |
|
342 .ad |
|
343 .sp .6 |
|
344 .RS 4n |
|
345 A synonym for \fB+[no]aaonly\fR. |
|
346 .RE |
|
347 |
|
348 .sp |
|
349 .ne 2 |
|
350 .mk |
|
351 .na |
|
352 \fB\fB+[no]adflag\fR\fR |
|
353 .ad |
|
354 .sp .6 |
|
355 .RS 4n |
|
356 Set [do not set] the AD (authentic data) bit in the query. This requests that the server return, regardless of whether all of the answer and authority sections have all been validated as secure according to the security policy of the server. A setting of \fBAD=1\fR indicates that all records have been validated as secure and the answer is not from an \fBOPT-OUT\fR range. \fBAD=0\fR indicates that some part of the answer is insecure or not validated. |
|
357 .RE |
|
358 |
|
359 .sp |
|
360 .ne 2 |
|
361 .mk |
|
362 .na |
|
363 \fB\fB+[no]cdflag\fR\fR |
|
364 .ad |
|
365 .sp .6 |
|
366 .RS 4n |
|
367 Set [do not set] the CD (checking disabled) bit in the query. This requests the server to not perform DNSSEC validation of responses. |
|
368 .RE |
|
369 |
|
370 .sp |
|
371 .ne 2 |
|
372 .mk |
|
373 .na |
|
374 \fB\fB+[no]cl\fR\fR |
|
375 .ad |
|
376 .sp .6 |
|
377 .RS 4n |
|
378 Display [do not display] the CLASS when printing the record. |
|
379 .RE |
|
380 |
|
381 .sp |
|
382 .ne 2 |
|
383 .mk |
|
384 .na |
|
385 \fB\fB+[no]ttlid\fR\fR |
|
386 .ad |
|
387 .sp .6 |
|
388 .RS 4n |
|
389 Display [do not display] the TTL when printing the record. |
|
390 .RE |
|
391 |
|
392 .sp |
|
393 .ne 2 |
|
394 .mk |
|
395 .na |
|
396 \fB\fB+[no]recurse\fR\fR |
|
397 .ad |
|
398 .sp .6 |
|
399 .RS 4n |
|
400 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 \fB+nssearch\fR or \fB+trace\fR query options are used. |
|
401 .RE |
|
402 |
|
403 .sp |
|
404 .ne 2 |
|
405 .mk |
|
406 .na |
|
407 \fB\fB+[no]nssearch\fR\fR |
|
408 .ad |
|
409 .sp .6 |
|
410 .RS 4n |
|
411 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. |
|
412 .RE |
|
413 |
|
414 .sp |
|
415 .ne 2 |
|
416 .mk |
|
417 .na |
|
418 \fB\fB+[no]trace\fR\fR |
|
419 .ad |
|
420 .sp .6 |
|
421 .RS 4n |
|
422 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. |
|
423 .RE |
|
424 |
|
425 .sp |
|
426 .ne 2 |
|
427 .mk |
|
428 .na |
|
429 \fB\fB+[no]cmd\fR\fR |
|
430 .ad |
|
431 .sp .6 |
|
432 .RS 4n |
|
433 Toggle the printing of the initial comment in the output identifying the version of \fBdig\fR and the query options that have been applied. This comment is printed by default. |
|
434 .RE |
|
435 |
|
436 .sp |
|
437 .ne 2 |
|
438 .mk |
|
439 .na |
|
440 \fB\fB+[no]short\fR\fR |
|
441 .ad |
|
442 .sp .6 |
|
443 .RS 4n |
|
444 Provide a terse answer. The default is to print the answer in a verbose form. |
|
445 .RE |
|
446 |
|
447 .sp |
|
448 .ne 2 |
|
449 .mk |
|
450 .na |
|
451 \fB\fB+[no]identify\fR\fR |
|
452 .ad |
|
453 .sp .6 |
|
454 .RS 4n |
|
455 Show [or do not show] the IP address and port number that supplied the answer when the +\fIshort\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. |
|
456 .RE |
|
457 |
|
458 .sp |
|
459 .ne 2 |
|
460 .mk |
|
461 .na |
|
462 \fB\fB+[no]comments\fR\fR |
|
463 .ad |
|
464 .sp .6 |
|
465 .RS 4n |
|
466 Toggle the display of comment lines in the output. The default is to print comments. |
|
467 .RE |
|
468 |
|
469 .sp |
|
470 .ne 2 |
|
471 .mk |
|
472 .na |
|
473 \fB\fB+[no]stats\fR\fR |
|
474 .ad |
|
475 .sp .6 |
|
476 .RS 4n |
|
477 Toggle the printing of statistics: when the query was made, the size of the reply and so on. The default behaviour is to print the query statistics. |
|
478 .RE |
|
479 |
|
480 .sp |
|
481 .ne 2 |
|
482 .mk |
|
483 .na |
|
484 \fB\fB+[no]qr\fR\fR |
|
485 .ad |
|
486 .sp .6 |
|
487 .RS 4n |
|
488 Print [do not print] the query as it is sent. By default, the query is not printed. |
|
489 .RE |
|
490 |
|
491 .sp |
|
492 .ne 2 |
|
493 .mk |
|
494 .na |
|
495 \fB\fB+[no]question\fR\fR |
|
496 .ad |
|
497 .sp .6 |
|
498 .RS 4n |
|
499 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. |
|
500 .RE |
|
501 |
|
502 .sp |
|
503 .ne 2 |
|
504 .mk |
|
505 .na |
|
506 \fB\fB+[no]answer\fR\fR |
|
507 .ad |
|
508 .sp .6 |
|
509 .RS 4n |
|
510 Display [do not display] the answer section of a reply. The default is to display it. |
|
511 .RE |
|
512 |
|
513 .sp |
|
514 .ne 2 |
|
515 .mk |
|
516 .na |
|
517 \fB\fB+[no]authority\fR\fR |
|
518 .ad |
|
519 .sp .6 |
|
520 .RS 4n |
|
521 Display [do not display] the authority section of a reply. The default is to display it. |
|
522 .RE |
|
523 |
|
524 .sp |
|
525 .ne 2 |
|
526 .mk |
|
527 .na |
|
528 \fB\fB+[no]additional\fR\fR |
|
529 .ad |
|
530 .sp .6 |
|
531 .RS 4n |
|
532 Display [do not display] the additional section of a reply. The default is to display it. |
|
533 .RE |
|
534 |
|
535 .sp |
|
536 .ne 2 |
|
537 .mk |
|
538 .na |
|
539 \fB\fB+[no]all\fR\fR |
|
540 .ad |
|
541 .sp .6 |
|
542 .RS 4n |
|
543 Set or clear all display flags. |
|
544 .RE |
|
545 |
|
546 .sp |
|
547 .ne 2 |
|
548 .mk |
|
549 .na |
|
550 \fB\fB+time=\fR\fIT\fR\fR |
|
551 .ad |
|
552 .sp .6 |
|
553 .RS 4n |
|
554 Sets the timeout for a query to \fIT\fR seconds. The default time out is 5 seconds. An attempt to set \fIT\fR to less than 1 will result in a query timeout of 1 second being applied. |
|
555 .RE |
|
556 |
|
557 .sp |
|
558 .ne 2 |
|
559 .mk |
|
560 .na |
|
561 \fB\fB+tries=\fR\fIT\fR\fR |
|
562 .ad |
|
563 .sp .6 |
|
564 .RS 4n |
|
565 Sets the maximum number of UDP attempts to \fIT\fR. The default number is 3 (1 initial attempt followed by 2 retries). If T is less than or equal to zero, the number of retries is silently rounded up to 1. |
|
566 .RE |
|
567 |
|
568 .sp |
|
569 .ne 2 |
|
570 .mk |
|
571 .na |
|
572 \fB\fB+retry=\fR\fIT\fR\fR |
|
573 .ad |
|
574 .sp .6 |
|
575 .RS 4n |
|
576 Sets the number of UDP retries to \fIT\fR. The default is 2. |
|
577 .RE |
|
578 |
|
579 .sp |
|
580 .ne 2 |
|
581 .mk |
|
582 .na |
|
583 \fB\fB+ndots=\fR\fID\fR\fR |
|
584 .ad |
|
585 .sp .6 |
|
586 .RS 4n |
|
587 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 \fBndots\fR statement in \fB/etc/resolv.conf\fR, or 1 if no \fBndots\fR 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 \fB/etc/resolv.conf\fR. |
|
588 .RE |
|
589 |
|
590 .sp |
|
591 .ne 2 |
|
592 .mk |
|
593 .na |
|
594 \fB\fB+bufsize=\fR\fIB\fR\fR |
|
595 .ad |
|
596 .sp .6 |
|
597 .RS 4n |
|
598 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. |
|
599 .RE |
|
600 |
|
601 .sp |
|
602 .ne 2 |
|
603 .mk |
|
604 .na |
|
605 \fB\fB+edns=\fR\fI#\fR\fR |
|
606 .ad |
|
607 .sp .6 |
|
608 .RS 4n |
|
609 Specify the EDNS version with which to query. Valid values are 0 to 255. Setting the EDNS version causes a EDNS query to be sent. \fB+noedns\fR clears the remembered EDNS version. |
|
610 .RE |
|
611 |
|
612 .sp |
|
613 .ne 2 |
|
614 .mk |
|
615 .na |
|
616 \fB\fB+[no]multiline\fR\fR |
|
617 .ad |
|
618 .sp .6 |
|
619 .RS 4n |
|
620 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. |
|
621 .RE |
|
622 |
|
623 .sp |
|
624 .ne 2 |
|
625 .mk |
|
626 .na |
|
627 \fB\fB+[no]fail\fR\fR |
|
628 .ad |
|
629 .sp .6 |
|
630 .RS 4n |
|
631 Do not try the next server if you receive a \fBSERVFAIL\fR. The default is to not try the next server which is the reverse of normal stub resolver behavior. |
|
632 .RE |
|
633 |
|
634 .sp |
|
635 .ne 2 |
|
636 .mk |
|
637 .na |
|
638 \fB\fB+[no]besteffort\fR\fR |
|
639 .ad |
|
640 .sp .6 |
|
641 .RS 4n |
|
642 Attempt to display the contents of messages which are malformed. The default is to not display malformed answers. |
|
643 .RE |
|
644 |
|
645 .sp |
|
646 .ne 2 |
|
647 .mk |
|
648 .na |
|
649 \fB\fB+[no]dnssec\fR\fR |
|
650 .ad |
|
651 .sp .6 |
|
652 .RS 4n |
|
653 Request DNSSEC records be sent by setting the DNSSEC OK bit (DO) in the OPT record in the additional section of the query. |
|
654 .RE |
|
655 |
|
656 .sp |
|
657 .ne 2 |
|
658 .mk |
|
659 .na |
|
660 \fB\fB+[no]sigchase\fR\fR |
|
661 .ad |
|
662 .sp .6 |
|
663 .RS 4n |
|
664 Chase DNSSEC signature chains. Requires \fBdig\fR be compiled with \fB-DDIG_SIGCHASE\fR. |
|
665 .RE |
|
666 |
|
667 .sp |
|
668 .ne 2 |
|
669 .mk |
|
670 .na |
|
671 \fB\fB+trusted-key=\fR####\fR |
|
672 .ad |
|
673 .sp .6 |
|
674 .RS 4n |
|
675 Specifies a file containing trusted keys to be used with \fB+sigchase\fR. Each \fBDNSKEY\fR record must be on its own line. |
|
676 .sp |
|
677 If not specified dig will look for \fB/etc/trusted-key.key\fR then \fBtrusted-key.key\fR in the current directory. |
|
678 .sp |
|
679 Requires \fBdig\fR be compiled with \fB-DDIG_SIGCHASE\fR. |
|
680 .RE |
|
681 |
|
682 .sp |
|
683 .ne 2 |
|
684 .mk |
|
685 .na |
|
686 \fB\fB+[no]topdown\fR\fR |
|
687 .ad |
|
688 .sp .6 |
|
689 .RS 4n |
|
690 When chasing DNSSEC signature chains, perform a top-down validation. Requires \fBdig\fR be compiled with \fB-DDIG_SIGCHASE\fR. |
|
691 .RE |
|
692 |
|
693 .sp |
|
694 .ne 2 |
|
695 .mk |
|
696 .na |
|
697 \fB\fB+[no]nsid\fR\fR |
|
698 .ad |
|
699 .sp .6 |
|
700 .RS 4n |
|
701 Include an EDNS name server ID request when sending a query. |
|
702 .RE |
|
703 |
|
704 .SH MULTIPLE QUERIES |
|
705 .sp |
|
706 .LP |
|
707 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. |
|
708 .sp |
|
709 .LP |
|
710 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. |
|
711 .sp |
|
712 .LP |
|
713 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: |
|
714 .sp |
|
715 .in +2 |
|
716 .nf |
|
717 dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr |
|
718 .fi |
|
719 .in -2 |
|
720 .sp |
|
721 |
|
722 .sp |
|
723 .LP |
|
724 \&...shows how \fBdig\fR could be used from the command line to make three lookups: an ANY query for \fBwww.isc.org\fR, a reverse lookup of 127.0.0.1 and a query for the NS records of \fBisc.org\fR. A global query option of \fB+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 \fB+noqr\fR which means that \fBdig\fR will not print the initial query when it looks up the NS records for \fBisc.org\fR. |
|
725 .SH FILES |
|
726 .sp |
|
727 .ne 2 |
|
728 .mk |
|
729 .na |
|
730 \fB\fB/etc/resolv.conf\fR\fR |
|
731 .ad |
|
732 .sp .6 |
|
733 .RS 4n |
|
734 Resolver configuration file |
|
735 .RE |
|
736 |
|
737 .sp |
|
738 .ne 2 |
|
739 .mk |
|
740 .na |
|
741 \fB\fB${HOME}/.digrc\fR\fR |
|
742 .ad |
|
743 .sp .6 |
|
744 .RS 4n |
|
745 User-defined configuration file |
|
746 .RE |
|
747 |
|
748 .SH ATTRIBUTES |
|
749 .sp |
|
750 .LP |
|
751 See \fBattributes\fR(5) for descriptions of the following attributes: |
|
752 .sp |
|
753 |
|
754 .sp |
|
755 .TS |
|
756 tab() box; |
|
757 cw(2.75i) |cw(2.75i) |
|
758 lw(2.75i) |lw(2.75i) |
|
759 . |
|
760 ATTRIBUTE TYPEATTRIBUTE VALUE |
|
761 _ |
|
762 Availabilitynetwork/dns/bind |
|
763 _ |
|
764 Interface StabilityVolatile |
|
765 .TE |
|
766 |
|
767 .SH SEE ALSO |
|
768 .sp |
|
769 .LP |
|
770 \fBdnssec-keygen\fR(8), \fBhost\fR(8), \fBnamed\fR(8), \fBnslookup\fR(8), \fBattributes\fR(5) |
|
771 .sp |
|
772 .LP |
|
773 \fIRFC 1035\fR |
|
774 .sp |
|
775 .LP |
|
776 See the BIND 9 \fIAdministrator's Reference Manual\fR. As of the date of publication of this man page, this document is available at https://www.isc.org/software/bind/documentation\&. |
|
777 .SH BUGS |
|
778 .sp |
|
779 .LP |
|
780 There are probably too many query options. |
|
781 .SH NOTES |
|
782 .sp |
|
783 .LP |
|
784 \fBnslookup\fR(8) and \fBdig\fR now report "Not Implemented" as \fBNOTIMP\fR rather than \fBNOTIMPL\fR. This will have impact on scripts that are looking for \fBNOTIMPL\fR. |