]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bind9/bin/dig/dig.html
This commit was generated by cvs2svn to compensate for changes in r147466,
[FreeBSD/FreeBSD.git] / contrib / bind9 / bin / dig / dig.html
1 <!--
2  - Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
3  - Copyright (C) 2000-2003  Internet Software Consortium.
4  -
5  - Permission to use, copy, modify, and distribute this software for any
6  - purpose with or without fee is hereby granted, provided that the above
7  - copyright notice and this permission notice appear in all copies.
8  -
9  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11  - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15  - PERFORMANCE OF THIS SOFTWARE.
16 -->
17
18 <!-- $Id: dig.html,v 1.6.2.4.2.7 2004/08/22 23:38:57 marka Exp $ -->
19
20 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
21 <HTML
22 ><HEAD
23 ><TITLE
24 >dig</TITLE
25 ><META
26 NAME="GENERATOR"
27 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
28 ><BODY
29 CLASS="REFENTRY"
30 BGCOLOR="#FFFFFF"
31 TEXT="#000000"
32 LINK="#0000FF"
33 VLINK="#840084"
34 ALINK="#0000FF"
35 ><H1
36 ><A
37 NAME="AEN1"
38 ></A
39 >dig</H1
40 ><DIV
41 CLASS="REFNAMEDIV"
42 ><A
43 NAME="AEN8"
44 ></A
45 ><H2
46 >Name</H2
47 >dig&nbsp;--&nbsp;DNS lookup utility</DIV
48 ><DIV
49 CLASS="REFSYNOPSISDIV"
50 ><A
51 NAME="AEN11"
52 ></A
53 ><H2
54 >Synopsis</H2
55 ><P
56 ><B
57 CLASS="COMMAND"
58 >dig</B
59 >  [@server] [<VAR
60 CLASS="OPTION"
61 >-b <VAR
62 CLASS="REPLACEABLE"
63 >address</VAR
64 ></VAR
65 >] [<VAR
66 CLASS="OPTION"
67 >-c <VAR
68 CLASS="REPLACEABLE"
69 >class</VAR
70 ></VAR
71 >] [<VAR
72 CLASS="OPTION"
73 >-f <VAR
74 CLASS="REPLACEABLE"
75 >filename</VAR
76 ></VAR
77 >] [<VAR
78 CLASS="OPTION"
79 >-k <VAR
80 CLASS="REPLACEABLE"
81 >filename</VAR
82 ></VAR
83 >] [<VAR
84 CLASS="OPTION"
85 >-p <VAR
86 CLASS="REPLACEABLE"
87 >port#</VAR
88 ></VAR
89 >] [<VAR
90 CLASS="OPTION"
91 >-t <VAR
92 CLASS="REPLACEABLE"
93 >type</VAR
94 ></VAR
95 >] [<VAR
96 CLASS="OPTION"
97 >-x <VAR
98 CLASS="REPLACEABLE"
99 >addr</VAR
100 ></VAR
101 >] [<VAR
102 CLASS="OPTION"
103 >-y <VAR
104 CLASS="REPLACEABLE"
105 >name:key</VAR
106 ></VAR
107 >] [<VAR
108 CLASS="OPTION"
109 >-4</VAR
110 >] [<VAR
111 CLASS="OPTION"
112 >-6</VAR
113 >] [name] [type] [class] [queryopt...]</P
114 ><P
115 ><B
116 CLASS="COMMAND"
117 >dig</B
118 >  [<VAR
119 CLASS="OPTION"
120 >-h</VAR
121 >]</P
122 ><P
123 ><B
124 CLASS="COMMAND"
125 >dig</B
126 >  [global-queryopt...] [query...]</P
127 ></DIV
128 ><DIV
129 CLASS="REFSECT1"
130 ><A
131 NAME="AEN55"
132 ></A
133 ><H2
134 >DESCRIPTION</H2
135 ><P
136 ><B
137 CLASS="COMMAND"
138 >dig</B
139 > (domain information groper) is a flexible tool
140 for interrogating DNS name servers.  It performs DNS lookups and
141 displays the answers that are returned from the name server(s) that
142 were queried.  Most DNS administrators use <B
143 CLASS="COMMAND"
144 >dig</B
145 > to
146 troubleshoot DNS problems because of its flexibility, ease of use and
147 clarity of output.  Other lookup tools tend to have less functionality
148 than <B
149 CLASS="COMMAND"
150 >dig</B
151 >.</P
152 ><P
153 >Although <B
154 CLASS="COMMAND"
155 >dig</B
156 > is normally used with command-line
157 arguments, it also has a batch mode of operation for reading lookup
158 requests from a file.  A brief summary of its command-line arguments
159 and options is printed when the <VAR
160 CLASS="OPTION"
161 >-h</VAR
162 > option is given.
163 Unlike earlier versions, the BIND9 implementation of
164 <B
165 CLASS="COMMAND"
166 >dig</B
167 > allows multiple lookups to be issued from the
168 command line.</P
169 ><P
170 >Unless it is told to query a specific name server,
171 <B
172 CLASS="COMMAND"
173 >dig</B
174 > will try each of the servers listed in
175 <TT
176 CLASS="FILENAME"
177 >/etc/resolv.conf</TT
178 >.</P
179 ><P
180 >When no command line arguments or options are given, will perform an
181 NS query for "." (the root).</P
182 ><P
183 >It is possible to set per-user defaults for <B
184 CLASS="COMMAND"
185 >dig</B
186 > via
187 <TT
188 CLASS="FILENAME"
189 >${HOME}/.digrc</TT
190 >.  This file is read and any options in it
191 are applied before the command line arguments.</P
192 ></DIV
193 ><DIV
194 CLASS="REFSECT1"
195 ><A
196 NAME="AEN72"
197 ></A
198 ><H2
199 >SIMPLE USAGE</H2
200 ><P
201 >A typical invocation of <B
202 CLASS="COMMAND"
203 >dig</B
204 > looks like:
205 <PRE
206 CLASS="PROGRAMLISTING"
207 > dig @server name type </PRE
208 > where:
209
210 <P
211 ></P
212 ><DIV
213 CLASS="VARIABLELIST"
214 ><DL
215 ><DT
216 ><CODE
217 CLASS="CONSTANT"
218 >server</CODE
219 ></DT
220 ><DD
221 ><P
222 >is the name or IP address of the name server to query.  This can be an IPv4
223 address in dotted-decimal notation or an IPv6
224 address in colon-delimited notation.  When the supplied
225 <VAR
226 CLASS="PARAMETER"
227 >server</VAR
228 > argument is a hostname,
229 <B
230 CLASS="COMMAND"
231 >dig</B
232 > resolves that name before querying that name
233 server.  If no <VAR
234 CLASS="PARAMETER"
235 >server</VAR
236 > argument is provided,
237 <B
238 CLASS="COMMAND"
239 >dig</B
240 > consults <TT
241 CLASS="FILENAME"
242 >/etc/resolv.conf</TT
243 >
244 and queries the name servers listed there.  The reply from the name
245 server that responds is displayed.</P
246 ></DD
247 ><DT
248 ><CODE
249 CLASS="CONSTANT"
250 >name</CODE
251 ></DT
252 ><DD
253 ><P
254 >is the name of the resource record that is to be looked up.</P
255 ></DD
256 ><DT
257 ><CODE
258 CLASS="CONSTANT"
259 >type</CODE
260 ></DT
261 ><DD
262 ><P
263 >indicates what type of query is required &mdash;
264 ANY, A, MX, SIG, etc.
265 <VAR
266 CLASS="PARAMETER"
267 >type</VAR
268 > can be any valid query type.  If no
269 <VAR
270 CLASS="PARAMETER"
271 >type</VAR
272 > argument is supplied,
273 <B
274 CLASS="COMMAND"
275 >dig</B
276 > will perform a lookup for an A record.</P
277 ></DD
278 ></DL
279 ></DIV
280 ></P
281 ></DIV
282 ><DIV
283 CLASS="REFSECT1"
284 ><A
285 NAME="AEN101"
286 ></A
287 ><H2
288 >OPTIONS</H2
289 ><P
290 >The <VAR
291 CLASS="OPTION"
292 >-b</VAR
293 > option sets the source IP address of the query
294 to <VAR
295 CLASS="PARAMETER"
296 >address</VAR
297 >.  This must be a valid address on
298 one of the host's network interfaces or "0.0.0.0" or "::".  An optional port
299 may be specified by appending "#&lt;port&gt;"</P
300 ><P
301 >The default query class (IN for internet) is overridden by the
302 <VAR
303 CLASS="OPTION"
304 >-c</VAR
305 > option.  <VAR
306 CLASS="PARAMETER"
307 >class</VAR
308 > is any valid
309 class, such as HS for Hesiod records or CH for CHAOSNET records.</P
310 ><P
311 >The <VAR
312 CLASS="OPTION"
313 >-f</VAR
314 > option makes <B
315 CLASS="COMMAND"
316 >dig </B
317 > operate
318 in batch mode by reading a list of lookup requests to process from the
319 file <VAR
320 CLASS="PARAMETER"
321 >filename</VAR
322 >.  The file contains a number of
323 queries, one per line.  Each entry in the file should be organised in
324 the same way they would be presented as queries to
325 <B
326 CLASS="COMMAND"
327 >dig</B
328 > using the command-line interface.</P
329 ><P
330 >If a non-standard port number is to be queried, the
331 <VAR
332 CLASS="OPTION"
333 >-p</VAR
334 > option is used.  <VAR
335 CLASS="PARAMETER"
336 >port#</VAR
337 > is
338 the port number that <B
339 CLASS="COMMAND"
340 >dig</B
341 > will send its queries
342 instead of the standard DNS port number 53.  This option would be used
343 to test a name server that has been configured to listen for queries
344 on a non-standard port number.</P
345 ><P
346 >The <VAR
347 CLASS="OPTION"
348 >-4</VAR
349 > option forces <B
350 CLASS="COMMAND"
351 >dig</B
352 > to only
353 use IPv4 query transport.  The <VAR
354 CLASS="OPTION"
355 >-6</VAR
356 > option forces
357 <B
358 CLASS="COMMAND"
359 >dig</B
360 > to only use IPv6 query transport.</P
361 ><P
362 >The <VAR
363 CLASS="OPTION"
364 >-t</VAR
365 > option sets the query type to
366 <VAR
367 CLASS="PARAMETER"
368 >type</VAR
369 >.  It can be any valid query type which is
370 supported in BIND9.  The default query type "A", unless the
371 <VAR
372 CLASS="OPTION"
373 >-x</VAR
374 > option is supplied to indicate a reverse lookup.
375 A zone transfer can be requested by specifying a type of AXFR.  When
376 an incremental zone transfer (IXFR) is required,
377 <VAR
378 CLASS="PARAMETER"
379 >type</VAR
380 > is set to <VAR
381 CLASS="LITERAL"
382 >ixfr=N</VAR
383 >.
384 The incremental zone transfer will contain the changes made to the zone
385 since the serial number in the zone's SOA record was
386 <VAR
387 CLASS="PARAMETER"
388 >N</VAR
389 >.</P
390 ><P
391 >Reverse lookups - mapping addresses to names - are simplified by the
392 <VAR
393 CLASS="OPTION"
394 >-x</VAR
395 > option.  <VAR
396 CLASS="PARAMETER"
397 >addr</VAR
398 > is an IPv4
399 address in dotted-decimal notation, or a colon-delimited IPv6 address.
400 When this option is used, there is no need to provide the
401 <VAR
402 CLASS="PARAMETER"
403 >name</VAR
404 >, <VAR
405 CLASS="PARAMETER"
406 >class</VAR
407 > and
408 <VAR
409 CLASS="PARAMETER"
410 >type</VAR
411 > arguments.  <B
412 CLASS="COMMAND"
413 >dig</B
414 >
415 automatically performs a lookup for a name like
416 <VAR
417 CLASS="LITERAL"
418 >11.12.13.10.in-addr.arpa</VAR
419 > and sets the query type and
420 class to PTR and IN respectively.  By default, IPv6 addresses are
421 looked up using nibble format under the IP6.ARPA domain.
422 To use the older RFC1886 method using the IP6.INT domain 
423 specify the <VAR
424 CLASS="OPTION"
425 >-i</VAR
426 > option.  Bit string labels (RFC2874)
427 are now experimental and are not attempted.</P
428 ><P
429 >To sign the DNS queries sent by <B
430 CLASS="COMMAND"
431 >dig</B
432 > and their
433 responses using transaction signatures (TSIG), specify a TSIG key file
434 using the <VAR
435 CLASS="OPTION"
436 >-k</VAR
437 > option.  You can also specify the TSIG
438 key itself on the command line using the <VAR
439 CLASS="OPTION"
440 >-y</VAR
441 > option;
442 <VAR
443 CLASS="PARAMETER"
444 >name</VAR
445 > is the name of the TSIG key and
446 <VAR
447 CLASS="PARAMETER"
448 >key</VAR
449 > is the actual key.  The key is a base-64
450 encoded string, typically generated by <SPAN
451 CLASS="CITEREFENTRY"
452 ><SPAN
453 CLASS="REFENTRYTITLE"
454 >dnssec-keygen</SPAN
455 >(8)</SPAN
456 >.
457
458 Caution should be taken when using the <VAR
459 CLASS="OPTION"
460 >-y</VAR
461 > option on
462 multi-user systems as the key can be visible in the output from
463 <SPAN
464 CLASS="CITEREFENTRY"
465 ><SPAN
466 CLASS="REFENTRYTITLE"
467 >ps</SPAN
468 >(1)</SPAN
469 > or in the shell's history file.  When
470 using TSIG authentication with <B
471 CLASS="COMMAND"
472 >dig</B
473 >, the name
474 server that is queried needs to know the key and algorithm that is
475 being used.  In BIND, this is done by providing appropriate
476 <B
477 CLASS="COMMAND"
478 >key</B
479 > and <B
480 CLASS="COMMAND"
481 >server</B
482 > statements in
483 <TT
484 CLASS="FILENAME"
485 >named.conf</TT
486 >.</P
487 ></DIV
488 ><DIV
489 CLASS="REFSECT1"
490 ><A
491 NAME="AEN156"
492 ></A
493 ><H2
494 >QUERY OPTIONS</H2
495 ><P
496 ><B
497 CLASS="COMMAND"
498 >dig</B
499 > provides a number of query options which affect
500 the way in which lookups are made and the results displayed.  Some of
501 these set or reset flag bits in the query header, some determine which
502 sections of the answer get printed, and others determine the timeout
503 and retry strategies.</P
504 ><P
505 >Each query option is identified by a keyword preceded by a plus sign
506 (<VAR
507 CLASS="LITERAL"
508 >+</VAR
509 >).  Some keywords set or reset an option.  These may be preceded
510 by the string <VAR
511 CLASS="LITERAL"
512 >no</VAR
513 > to negate the meaning of that keyword.  Other
514 keywords assign values to options like the timeout interval.  They
515 have the form <VAR
516 CLASS="OPTION"
517 >+keyword=value</VAR
518 >.
519 The query options are:
520
521 <P
522 ></P
523 ><DIV
524 CLASS="VARIABLELIST"
525 ><DL
526 ><DT
527 ><VAR
528 CLASS="OPTION"
529 >+[no]tcp</VAR
530 ></DT
531 ><DD
532 ><P
533 >Use [do not use] TCP when querying name servers.  The default
534 behaviour is to use UDP unless an AXFR or IXFR query is requested, in
535 which case a TCP connection is used.</P
536 ></DD
537 ><DT
538 ><VAR
539 CLASS="OPTION"
540 >+[no]vc</VAR
541 ></DT
542 ><DD
543 ><P
544 >Use [do not use] TCP when querying name servers.  This alternate
545 syntax to <VAR
546 CLASS="PARAMETER"
547 >+[no]tcp</VAR
548 > is provided for backwards
549 compatibility.  The "vc" stands for "virtual circuit".</P
550 ></DD
551 ><DT
552 ><VAR
553 CLASS="OPTION"
554 >+[no]ignore</VAR
555 ></DT
556 ><DD
557 ><P
558 >Ignore truncation in UDP responses instead of retrying with TCP.  By
559 default, TCP retries are performed.</P
560 ></DD
561 ><DT
562 ><VAR
563 CLASS="OPTION"
564 >+domain=somename</VAR
565 ></DT
566 ><DD
567 ><P
568 >Set the search list to contain the single domain
569 <VAR
570 CLASS="PARAMETER"
571 >somename</VAR
572 >, as if specified in a
573 <B
574 CLASS="COMMAND"
575 >domain</B
576 > directive in
577 <TT
578 CLASS="FILENAME"
579 >/etc/resolv.conf</TT
580 >, and enable search list
581 processing as if the <VAR
582 CLASS="PARAMETER"
583 >+search</VAR
584 > option were given.</P
585 ></DD
586 ><DT
587 ><VAR
588 CLASS="OPTION"
589 >+[no]search</VAR
590 ></DT
591 ><DD
592 ><P
593 >Use [do not use] the search list defined by the searchlist or domain
594 directive in <TT
595 CLASS="FILENAME"
596 >resolv.conf</TT
597 > (if any).
598 The search list is not used by default.</P
599 ></DD
600 ><DT
601 ><VAR
602 CLASS="OPTION"
603 >+[no]defname</VAR
604 ></DT
605 ><DD
606 ><P
607 >Deprecated, treated as a synonym for <VAR
608 CLASS="PARAMETER"
609 >+[no]search</VAR
610 ></P
611 ></DD
612 ><DT
613 ><VAR
614 CLASS="OPTION"
615 >+[no]aaonly</VAR
616 ></DT
617 ><DD
618 ><P
619 >Sets the "aa" flag in the query.</P
620 ></DD
621 ><DT
622 ><VAR
623 CLASS="OPTION"
624 >+[no]aaflag</VAR
625 ></DT
626 ><DD
627 ><P
628 >A synonym for <VAR
629 CLASS="PARAMETER"
630 >+[no]aaonly</VAR
631 >.</P
632 ></DD
633 ><DT
634 ><VAR
635 CLASS="OPTION"
636 >+[no]adflag</VAR
637 ></DT
638 ><DD
639 ><P
640 >Set [do not set] the AD (authentic data) bit in the query.  The AD bit
641 currently has a standard meaning only in responses, not in queries,
642 but the ability to set the bit in the query is provided for
643 completeness.</P
644 ></DD
645 ><DT
646 ><VAR
647 CLASS="OPTION"
648 >+[no]cdflag</VAR
649 ></DT
650 ><DD
651 ><P
652 >Set [do not set] the CD (checking disabled) bit in the query.  This
653 requests the server to not perform DNSSEC validation of responses.</P
654 ></DD
655 ><DT
656 ><VAR
657 CLASS="OPTION"
658 >+[no]cl</VAR
659 ></DT
660 ><DD
661 ><P
662 >Display [do not display] the CLASS when printing the record.</P
663 ></DD
664 ><DT
665 ><VAR
666 CLASS="OPTION"
667 >+[no]ttlid</VAR
668 ></DT
669 ><DD
670 ><P
671 >Display [do not display] the TTL when printing the record.</P
672 ></DD
673 ><DT
674 ><VAR
675 CLASS="OPTION"
676 >+[no]recurse</VAR
677 ></DT
678 ><DD
679 ><P
680 >Toggle the setting of the RD (recursion desired) bit in the query.
681 This bit is set by default, which means <B
682 CLASS="COMMAND"
683 >dig</B
684 >
685 normally sends recursive queries.  Recursion is automatically disabled
686 when the <VAR
687 CLASS="PARAMETER"
688 >+nssearch</VAR
689 > or
690 <VAR
691 CLASS="PARAMETER"
692 >+trace</VAR
693 > query options are used.</P
694 ></DD
695 ><DT
696 ><VAR
697 CLASS="OPTION"
698 >+[no]nssearch</VAR
699 ></DT
700 ><DD
701 ><P
702 >When this option is set, <B
703 CLASS="COMMAND"
704 >dig</B
705 > attempts to find the
706 authoritative name servers for the zone containing the name being
707 looked up and display the SOA record that each name server has for the
708 zone.</P
709 ></DD
710 ><DT
711 ><VAR
712 CLASS="OPTION"
713 >+[no]trace</VAR
714 ></DT
715 ><DD
716 ><P
717 >Toggle tracing of the delegation path from the root name servers for
718 the name being looked up.  Tracing is disabled by default.  When
719 tracing is enabled, <B
720 CLASS="COMMAND"
721 >dig</B
722 > makes iterative queries to
723 resolve the name being looked up.  It will follow referrals from the
724 root servers, showing the answer from each server that was used to
725 resolve the lookup.</P
726 ></DD
727 ><DT
728 ><VAR
729 CLASS="OPTION"
730 >+[no]cmd</VAR
731 ></DT
732 ><DD
733 ><P
734 >toggles the printing of the initial comment in the output identifying
735 the version of <B
736 CLASS="COMMAND"
737 >dig</B
738 > and the query options that have
739 been applied.  This comment is printed by default.</P
740 ></DD
741 ><DT
742 ><VAR
743 CLASS="OPTION"
744 >+[no]short</VAR
745 ></DT
746 ><DD
747 ><P
748 >Provide a terse answer.  The default is to print the answer in a
749 verbose form.</P
750 ></DD
751 ><DT
752 ><VAR
753 CLASS="OPTION"
754 >+[no]identify</VAR
755 ></DT
756 ><DD
757 ><P
758 >Show [or do not show] the IP address and port number that supplied the
759 answer when the <VAR
760 CLASS="PARAMETER"
761 >+short</VAR
762 > option is enabled.  If
763 short form answers are requested, the default is not to show the
764 source address and port number of the server that provided the answer.</P
765 ></DD
766 ><DT
767 ><VAR
768 CLASS="OPTION"
769 >+[no]comments</VAR
770 ></DT
771 ><DD
772 ><P
773 >Toggle the display of comment lines in the output.  The default is to
774 print comments.</P
775 ></DD
776 ><DT
777 ><VAR
778 CLASS="OPTION"
779 >+[no]stats</VAR
780 ></DT
781 ><DD
782 ><P
783 >This query option toggles the printing of statistics: when the query
784 was made, the size of the reply and so on.  The default behaviour is
785 to print the query statistics.</P
786 ></DD
787 ><DT
788 ><VAR
789 CLASS="OPTION"
790 >+[no]qr</VAR
791 ></DT
792 ><DD
793 ><P
794 >Print [do not print] the query as it is sent.
795 By default, the query is not printed.</P
796 ></DD
797 ><DT
798 ><VAR
799 CLASS="OPTION"
800 >+[no]question</VAR
801 ></DT
802 ><DD
803 ><P
804 >Print [do not print] the question section of a query when an answer is
805 returned.  The default is to print the question section as a comment.</P
806 ></DD
807 ><DT
808 ><VAR
809 CLASS="OPTION"
810 >+[no]answer</VAR
811 ></DT
812 ><DD
813 ><P
814 >Display [do not display] the answer section of a reply.  The default
815 is to display it.</P
816 ></DD
817 ><DT
818 ><VAR
819 CLASS="OPTION"
820 >+[no]authority</VAR
821 ></DT
822 ><DD
823 ><P
824 >Display [do not display] the authority section of a reply.  The
825 default is to display it.</P
826 ></DD
827 ><DT
828 ><VAR
829 CLASS="OPTION"
830 >+[no]additional</VAR
831 ></DT
832 ><DD
833 ><P
834 >Display [do not display] the additional section of a reply.
835 The default is to display it.</P
836 ></DD
837 ><DT
838 ><VAR
839 CLASS="OPTION"
840 >+[no]all</VAR
841 ></DT
842 ><DD
843 ><P
844 >Set or clear all display flags.</P
845 ></DD
846 ><DT
847 ><VAR
848 CLASS="OPTION"
849 >+time=T</VAR
850 ></DT
851 ><DD
852 ><P
853 >&#13;Sets the timeout for a query to
854 <VAR
855 CLASS="PARAMETER"
856 >T</VAR
857 > seconds.  The default time out is 5 seconds.
858 An attempt to set <VAR
859 CLASS="PARAMETER"
860 >T</VAR
861 > to less than 1 will result
862 in a query timeout of 1 second being applied.</P
863 ></DD
864 ><DT
865 ><VAR
866 CLASS="OPTION"
867 >+tries=T</VAR
868 ></DT
869 ><DD
870 ><P
871 >Sets the number of times to try UDP queries to server to
872 <VAR
873 CLASS="PARAMETER"
874 >T</VAR
875 > instead of the default, 3.  If
876 <VAR
877 CLASS="PARAMETER"
878 >T</VAR
879 > is less than or equal to zero, the number of
880 tries is silently rounded up to 1.</P
881 ></DD
882 ><DT
883 ><VAR
884 CLASS="OPTION"
885 >+retry=T</VAR
886 ></DT
887 ><DD
888 ><P
889 >Sets the number of times to retry UDP queries to server to
890 <VAR
891 CLASS="PARAMETER"
892 >T</VAR
893 > instead of the default, 2.  Unlike
894 <VAR
895 CLASS="PARAMETER"
896 >+tries</VAR
897 >, this does not include the initial
898 query.</P
899 ></DD
900 ><DT
901 ><VAR
902 CLASS="OPTION"
903 >+ndots=D</VAR
904 ></DT
905 ><DD
906 ><P
907 >Set the number of dots that have to appear in
908 <VAR
909 CLASS="PARAMETER"
910 >name</VAR
911 > to <VAR
912 CLASS="PARAMETER"
913 >D</VAR
914 > for it to be
915 considered absolute.  The default value is that defined using the
916 ndots statement in <TT
917 CLASS="FILENAME"
918 >/etc/resolv.conf</TT
919 >, or 1 if no
920 ndots statement is present.  Names with fewer dots are interpreted as
921 relative names and will be searched for in the domains listed in the
922 <VAR
923 CLASS="OPTION"
924 >search</VAR
925 > or <VAR
926 CLASS="OPTION"
927 >domain</VAR
928 > directive in
929 <TT
930 CLASS="FILENAME"
931 >/etc/resolv.conf</TT
932 >.</P
933 ></DD
934 ><DT
935 ><VAR
936 CLASS="OPTION"
937 >+bufsize=B</VAR
938 ></DT
939 ><DD
940 ><P
941 >Set the UDP message buffer size advertised using EDNS0 to
942 <VAR
943 CLASS="PARAMETER"
944 >B</VAR
945 > bytes.  The maximum and minimum sizes of this
946 buffer are 65535 and 0 respectively.  Values outside this range are
947 rounded up or down appropriately.</P
948 ></DD
949 ><DT
950 ><VAR
951 CLASS="OPTION"
952 >+[no]multiline</VAR
953 ></DT
954 ><DD
955 ><P
956 >Print records like the SOA records in a verbose multi-line
957 format with human-readable comments.  The default is to print
958 each record on a single line, to facilitate machine parsing 
959 of the <B
960 CLASS="COMMAND"
961 >dig</B
962 > output.</P
963 ></DD
964 ><DT
965 ><VAR
966 CLASS="OPTION"
967 >+[no]fail</VAR
968 ></DT
969 ><DD
970 ><P
971 >Do not try the next server if you receive a SERVFAIL.  The default is
972 to not try the next server which is the reverse of normal stub resolver
973 behaviour.</P
974 ></DD
975 ><DT
976 ><VAR
977 CLASS="OPTION"
978 >+[no]besteffort</VAR
979 ></DT
980 ><DD
981 ><P
982 >Attempt to display the contents of messages which are malformed.
983 The default is to not display malformed answers.</P
984 ></DD
985 ><DT
986 ><VAR
987 CLASS="OPTION"
988 >+[no]dnssec</VAR
989 ></DT
990 ><DD
991 ><P
992 >Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO)
993 in the OPT record in the additional section of the query.</P
994 ></DD
995 ><DT
996 ><VAR
997 CLASS="OPTION"
998 >+[no]sigchase</VAR
999 ></DT
1000 ><DD
1001 ><P
1002 >Chase DNSSEC signature chains.  Requires dig be compiled with
1003 -DDIG_SIGCHASE.</P
1004 ></DD
1005 ><DT
1006 ><VAR
1007 CLASS="OPTION"
1008 >+trusted-key=####</VAR
1009 ></DT
1010 ><DD
1011 ><P
1012 >Specify a trusted key to be used with <VAR
1013 CLASS="OPTION"
1014 >+sigchase</VAR
1015 >.
1016 Requires dig be compiled with -DDIG_SIGCHASE.</P
1017 ></DD
1018 ><DT
1019 ><VAR
1020 CLASS="OPTION"
1021 >+[no]topdown</VAR
1022 ></DT
1023 ><DD
1024 ><P
1025 >When chasing DNSSEC signature chains perform a top down validation.
1026 Requires dig be compiled with -DDIG_SIGCHASE.</P
1027 ></DD
1028 ></DL
1029 ></DIV
1030 >&#13;</P
1031 ></DIV
1032 ><DIV
1033 CLASS="REFSECT1"
1034 ><A
1035 NAME="AEN385"
1036 ></A
1037 ><H2
1038 >MULTIPLE QUERIES</H2
1039 ><P
1040 >The BIND 9 implementation of <B
1041 CLASS="COMMAND"
1042 >dig </B
1043 > supports
1044 specifying multiple queries on the command line (in addition to
1045 supporting the <VAR
1046 CLASS="OPTION"
1047 >-f</VAR
1048 > batch file option).  Each of those
1049 queries can be supplied with its own set of flags, options and query
1050 options.</P
1051 ><P
1052 >In this case, each <VAR
1053 CLASS="PARAMETER"
1054 >query</VAR
1055 > argument represent an
1056 individual query in the command-line syntax described above.  Each
1057 consists of any of the standard options and flags, the name to be
1058 looked up, an optional query type and class and any query options that
1059 should be applied to that query.</P
1060 ><P
1061 >A global set of query options, which should be applied to all queries,
1062 can also be supplied.  These global query options must precede the
1063 first tuple of name, class, type, options, flags, and query options
1064 supplied on the command line.  Any global query options (except
1065 the <VAR
1066 CLASS="OPTION"
1067 >+[no]cmd</VAR
1068 > option) can be
1069 overridden by a query-specific set of query options.  For example:
1070 <PRE
1071 CLASS="PROGRAMLISTING"
1072 >dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr</PRE
1073 >
1074 shows how <B
1075 CLASS="COMMAND"
1076 >dig</B
1077 > could be used from the command line
1078 to make three lookups: an ANY query for <VAR
1079 CLASS="LITERAL"
1080 >www.isc.org</VAR
1081 >, a
1082 reverse lookup of 127.0.0.1 and a query for the NS records of
1083 <VAR
1084 CLASS="LITERAL"
1085 >isc.org</VAR
1086 >.
1087
1088 A global query option of <VAR
1089 CLASS="PARAMETER"
1090 >+qr</VAR
1091 > is applied, so
1092 that <B
1093 CLASS="COMMAND"
1094 >dig</B
1095 > shows the initial query it made for each
1096 lookup.  The final query has a local query option of
1097 <VAR
1098 CLASS="PARAMETER"
1099 >+noqr</VAR
1100 > which means that <B
1101 CLASS="COMMAND"
1102 >dig</B
1103 >
1104 will not print the initial query when it looks up the NS records for
1105 <VAR
1106 CLASS="LITERAL"
1107 >isc.org</VAR
1108 >.</P
1109 ></DIV
1110 ><DIV
1111 CLASS="REFSECT1"
1112 ><A
1113 NAME="AEN403"
1114 ></A
1115 ><H2
1116 >FILES</H2
1117 ><P
1118 ><TT
1119 CLASS="FILENAME"
1120 >/etc/resolv.conf</TT
1121 ></P
1122 ><P
1123 ><TT
1124 CLASS="FILENAME"
1125 >${HOME}/.digrc</TT
1126 ></P
1127 ></DIV
1128 ><DIV
1129 CLASS="REFSECT1"
1130 ><A
1131 NAME="AEN409"
1132 ></A
1133 ><H2
1134 >SEE ALSO</H2
1135 ><P
1136 ><SPAN
1137 CLASS="CITEREFENTRY"
1138 ><SPAN
1139 CLASS="REFENTRYTITLE"
1140 >host</SPAN
1141 >(1)</SPAN
1142 >,
1143 <SPAN
1144 CLASS="CITEREFENTRY"
1145 ><SPAN
1146 CLASS="REFENTRYTITLE"
1147 >named</SPAN
1148 >(8)</SPAN
1149 >,
1150 <SPAN
1151 CLASS="CITEREFENTRY"
1152 ><SPAN
1153 CLASS="REFENTRYTITLE"
1154 >dnssec-keygen</SPAN
1155 >(8)</SPAN
1156 >,
1157 <I
1158 CLASS="CITETITLE"
1159 >RFC1035</I
1160 >.</P
1161 ></DIV
1162 ><DIV
1163 CLASS="REFSECT1"
1164 ><A
1165 NAME="AEN422"
1166 ></A
1167 ><H2
1168 >BUGS </H2
1169 ><P
1170 >There are probably too many query options. </P
1171 ></DIV
1172 ></BODY
1173 ></HTML
1174 >