]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - contrib/bind9/bin/dig/dig.docbook
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / contrib / bind9 / bin / dig / dig.docbook
1 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2                "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3                [<!ENTITY mdash "&#8212;">]>
4 <!--
5  - Copyright (C) 2004-2009  Internet Systems Consortium, Inc. ("ISC")
6  - Copyright (C) 2000-2003  Internet Software Consortium.
7  -
8  - Permission to use, copy, modify, and/or distribute this software for any
9  - purpose with or without fee is hereby granted, provided that the above
10  - copyright notice and this permission notice appear in all copies.
11  -
12  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
13  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14  - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
16  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
17  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18  - PERFORMANCE OF THIS SOFTWARE.
19 -->
20
21 <!-- $Id: dig.docbook,v 1.42.44.3 2009/02/02 04:42:48 marka Exp $ -->
22 <refentry id="man.dig">
23
24   <refentryinfo>
25     <date>Jun 30, 2000</date>
26   </refentryinfo>
27
28   <refmeta>
29     <refentrytitle>dig</refentrytitle>
30     <manvolnum>1</manvolnum>
31     <refmiscinfo>BIND9</refmiscinfo>
32   </refmeta>
33
34   <refnamediv>
35     <refname>dig</refname>
36     <refpurpose>DNS lookup utility</refpurpose>
37   </refnamediv>
38
39   <docinfo>
40     <copyright>
41       <year>2004</year>
42       <year>2005</year>
43       <year>2006</year>
44       <year>2007</year>
45       <year>2008</year>
46       <year>2009</year>
47       <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
48     </copyright>
49     <copyright>
50       <year>2000</year>
51       <year>2001</year>
52       <year>2002</year>
53       <year>2003</year>
54       <holder>Internet Software Consortium.</holder>
55     </copyright>
56   </docinfo>
57
58   <refsynopsisdiv>
59     <cmdsynopsis>
60       <command>dig</command>
61       <arg choice="opt">@server</arg>
62       <arg><option>-b <replaceable class="parameter">address</replaceable></option></arg>
63       <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
64       <arg><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
65       <arg><option>-k <replaceable class="parameter">filename</replaceable></option></arg>
66       <arg><option>-m</option></arg>
67       <arg><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
68       <arg><option>-q <replaceable class="parameter">name</replaceable></option></arg>
69       <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
70       <arg><option>-x <replaceable class="parameter">addr</replaceable></option></arg>
71       <arg><option>-y <replaceable class="parameter"><optional>hmac:</optional>name:key</replaceable></option></arg>
72       <arg><option>-4</option></arg>
73       <arg><option>-6</option></arg>
74       <arg choice="opt">name</arg>
75       <arg choice="opt">type</arg>
76       <arg choice="opt">class</arg>
77       <arg choice="opt" rep="repeat">queryopt</arg>
78     </cmdsynopsis>
79
80     <cmdsynopsis>
81       <command>dig</command>
82       <arg><option>-h</option></arg>
83     </cmdsynopsis>
84
85     <cmdsynopsis>
86       <command>dig</command>
87       <arg choice="opt" rep="repeat">global-queryopt</arg>
88       <arg choice="opt" rep="repeat">query</arg>
89     </cmdsynopsis>
90   </refsynopsisdiv>
91
92   <refsect1>
93     <title>DESCRIPTION</title>
94     <para><command>dig</command>
95       (domain information groper) is a flexible tool
96       for interrogating DNS name servers.  It performs DNS lookups and
97       displays the answers that are returned from the name server(s) that
98       were queried.  Most DNS administrators use <command>dig</command> to
99       troubleshoot DNS problems because of its flexibility, ease of use and
100       clarity of output.  Other lookup tools tend to have less functionality
101       than <command>dig</command>.
102     </para>
103
104     <para>
105       Although <command>dig</command> is normally used with
106       command-line
107       arguments, it also has a batch mode of operation for reading lookup
108       requests from a file.  A brief summary of its command-line arguments
109       and options is printed when the <option>-h</option> option is given.
110       Unlike earlier versions, the BIND 9 implementation of
111       <command>dig</command> allows multiple lookups to be issued
112       from the
113       command line.
114     </para>
115
116     <para>
117       Unless it is told to query a specific name server,
118       <command>dig</command> will try each of the servers listed
119       in
120       <filename>/etc/resolv.conf</filename>.
121     </para>
122
123     <para>
124       When no command line arguments or options are given,
125       <command>dig</command> will perform an NS query for "." (the root).
126     </para>
127
128     <para>
129       It is possible to set per-user defaults for <command>dig</command> via
130       <filename>${HOME}/.digrc</filename>.  This file is read and
131       any options in it
132       are applied before the command line arguments.
133     </para>
134
135     <para>
136       The IN and CH class names overlap with the IN and CH top level
137       domains names.  Either use the <option>-t</option> and
138       <option>-c</option> options to specify the type and class, 
139       use the <option>-q</option> the specify the domain name, or
140       use "IN." and "CH." when looking up these top level domains.
141     </para>
142
143   </refsect1>
144
145   <refsect1>
146     <title>SIMPLE USAGE</title>
147
148     <para>
149       A typical invocation of <command>dig</command> looks like:
150       <programlisting> dig @server name type </programlisting>
151       where:
152
153       <variablelist>
154
155         <varlistentry>
156           <term><constant>server</constant></term>
157           <listitem>
158             <para>
159               is the name or IP address of the name server to query.  This can
160               be an IPv4
161               address in dotted-decimal notation or an IPv6
162               address in colon-delimited notation.  When the supplied
163               <parameter>server</parameter> argument is a
164               hostname,
165               <command>dig</command> resolves that name before
166               querying that name
167               server.  If no <parameter>server</parameter>
168               argument is provided,
169               <command>dig</command> consults <filename>/etc/resolv.conf</filename>
170               and queries the name servers listed there.  The reply from the
171               name
172               server that responds is displayed.
173             </para>
174           </listitem>
175         </varlistentry>
176
177         <varlistentry>
178           <term><constant>name</constant></term>
179           <listitem>
180             <para>
181               is the name of the resource record that is to be looked up.
182             </para>
183           </listitem>
184         </varlistentry>
185
186         <varlistentry>
187           <term><constant>type</constant></term>
188           <listitem>
189             <para>
190               indicates what type of query is required &mdash;
191               ANY, A, MX, SIG, etc.
192               <parameter>type</parameter> can be any valid query
193               type.  If no
194               <parameter>type</parameter> argument is supplied,
195               <command>dig</command> will perform a lookup for an
196               A record.
197             </para>
198           </listitem>
199         </varlistentry>
200
201       </variablelist>
202     </para>
203
204   </refsect1>
205
206   <refsect1>
207     <title>OPTIONS</title>
208
209     <para>
210       The <option>-b</option> option sets the source IP address of the query
211       to <parameter>address</parameter>.  This must be a valid
212       address on
213       one of the host's network interfaces or "0.0.0.0" or "::".  An optional
214       port
215       may be specified by appending "#&lt;port&gt;"
216     </para>
217
218     <para>
219       The default query class (IN for internet) is overridden by the
220       <option>-c</option> option.  <parameter>class</parameter> is
221       any valid
222       class, such as HS for Hesiod records or CH for Chaosnet records.
223     </para>
224
225     <para>
226       The <option>-f</option> option makes <command>dig </command>
227       operate
228       in batch mode by reading a list of lookup requests to process from the
229       file <parameter>filename</parameter>.  The file contains a
230       number of
231       queries, one per line.  Each entry in the file should be organized in
232       the same way they would be presented as queries to
233       <command>dig</command> using the command-line interface.
234     </para>
235
236     <para>
237       The <option>-m</option> option enables memory usage debugging.
238       <!-- It enables ISC_MEM_DEBUGTRACE and ISC_MEM_DEBUGRECORD
239            documented in include/isc/mem.h -->
240     </para>
241
242     <para>
243       If a non-standard port number is to be queried, the
244       <option>-p</option> option is used.  <parameter>port#</parameter> is
245       the port number that <command>dig</command> will send its
246       queries
247       instead of the standard DNS port number 53.  This option would be used
248       to test a name server that has been configured to listen for queries
249       on a non-standard port number.
250     </para>
251
252     <para>
253       The <option>-4</option> option forces <command>dig</command>
254       to only
255       use IPv4 query transport.  The <option>-6</option> option forces
256       <command>dig</command> to only use IPv6 query transport.
257     </para>
258
259     <para>
260       The <option>-t</option> option sets the query type to
261       <parameter>type</parameter>.  It can be any valid query type
262       which is
263       supported in BIND 9.  The default query type is "A", unless the
264       <option>-x</option> option is supplied to indicate a reverse lookup.
265       A zone transfer can be requested by specifying a type of AXFR.  When
266       an incremental zone transfer (IXFR) is required,
267       <parameter>type</parameter> is set to <literal>ixfr=N</literal>.
268       The incremental zone transfer will contain the changes made to the zone
269       since the serial number in the zone's SOA record was
270       <parameter>N</parameter>.
271     </para>
272
273     <para>
274       The <option>-q</option> option sets the query name to 
275       <parameter>name</parameter>.  This useful do distinguish the
276       <parameter>name</parameter> from other arguments.
277     </para>
278
279     <para>
280       Reverse lookups &mdash; mapping addresses to names &mdash; are simplified by the
281       <option>-x</option> option.  <parameter>addr</parameter> is
282       an IPv4
283       address in dotted-decimal notation, or a colon-delimited IPv6 address.
284       When this option is used, there is no need to provide the
285       <parameter>name</parameter>, <parameter>class</parameter> and
286       <parameter>type</parameter> arguments.  <command>dig</command>
287       automatically performs a lookup for a name like
288       <literal>11.12.13.10.in-addr.arpa</literal> and sets the
289       query type and
290       class to PTR and IN respectively.  By default, IPv6 addresses are
291       looked up using nibble format under the IP6.ARPA domain.
292       To use the older RFC1886 method using the IP6.INT domain
293       specify the <option>-i</option> option.  Bit string labels (RFC2874)
294       are now experimental and are not attempted.
295     </para>
296
297     <para>
298       To sign the DNS queries sent by <command>dig</command> and
299       their
300       responses using transaction signatures (TSIG), specify a TSIG key file
301       using the <option>-k</option> option.  You can also specify the TSIG
302       key itself on the command line using the <option>-y</option> option;
303       <parameter>hmac</parameter> is the type of the TSIG, default HMAC-MD5,
304       <parameter>name</parameter> is the name of the TSIG key and
305       <parameter>key</parameter> is the actual key.  The key is a
306       base-64
307       encoded string, typically generated by
308       <citerefentry>
309         <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
310       </citerefentry>.
311
312       Caution should be taken when using the <option>-y</option> option on
313       multi-user systems as the key can be visible in the output from
314       <citerefentry>
315         <refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum>
316       </citerefentry>
317       or in the shell's history file.  When
318       using TSIG authentication with <command>dig</command>, the name
319       server that is queried needs to know the key and algorithm that is
320       being used.  In BIND, this is done by providing appropriate
321       <command>key</command> and <command>server</command> statements in
322       <filename>named.conf</filename>.
323     </para>
324
325   </refsect1>
326
327   <refsect1>
328     <title>QUERY OPTIONS</title>
329
330     <para><command>dig</command>
331       provides a number of query options which affect
332       the way in which lookups are made and the results displayed.  Some of
333       these set or reset flag bits in the query header, some determine which
334       sections of the answer get printed, and others determine the timeout
335       and retry strategies.
336     </para>
337
338     <para>
339       Each query option is identified by a keyword preceded by a plus sign
340       (<literal>+</literal>).  Some keywords set or reset an
341       option.  These may be preceded
342       by the string <literal>no</literal> to negate the meaning of
343       that keyword.  Other
344       keywords assign values to options like the timeout interval.  They
345       have the form <option>+keyword=value</option>.
346       The query options are:
347
348       <variablelist>
349
350         <varlistentry>
351           <term><option>+[no]tcp</option></term>
352           <listitem>
353             <para>
354               Use [do not use] TCP when querying name servers.  The default
355               behavior is to use UDP unless an AXFR or IXFR query is
356               requested, in
357               which case a TCP connection is used.
358             </para>
359           </listitem>
360         </varlistentry>
361
362         <varlistentry>
363           <term><option>+[no]vc</option></term>
364           <listitem>
365             <para>
366               Use [do not use] TCP when querying name servers.  This alternate
367               syntax to <parameter>+[no]tcp</parameter> is
368               provided for backwards
369               compatibility.  The "vc" stands for "virtual circuit".
370             </para>
371           </listitem>
372         </varlistentry>
373
374         <varlistentry>
375           <term><option>+[no]ignore</option></term>
376           <listitem>
377             <para>
378               Ignore truncation in UDP responses instead of retrying with TCP.
379                By
380               default, TCP retries are performed.
381             </para>
382           </listitem>
383         </varlistentry>
384
385         <varlistentry>
386           <term><option>+domain=somename</option></term>
387           <listitem>
388             <para>
389               Set the search list to contain the single domain
390               <parameter>somename</parameter>, as if specified in
391               a
392               <command>domain</command> directive in
393               <filename>/etc/resolv.conf</filename>, and enable
394               search list
395               processing as if the <parameter>+search</parameter>
396               option were given.
397             </para>
398           </listitem>
399         </varlistentry>
400
401         <varlistentry>
402           <term><option>+[no]search</option></term>
403           <listitem>
404             <para>
405               Use [do not use] the search list defined by the searchlist or
406               domain
407               directive in <filename>resolv.conf</filename> (if
408               any).
409               The search list is not used by default.
410             </para>
411           </listitem>
412         </varlistentry>
413
414         <varlistentry>
415           <term><option>+[no]showsearch</option></term>
416           <listitem>
417             <para>
418               Perform [do not perform] a search showing intermediate
419               results.
420             </para>
421           </listitem>
422         </varlistentry>
423
424         <varlistentry>
425           <term><option>+[no]defname</option></term>
426           <listitem>
427             <para>
428               Deprecated, treated as a synonym for <parameter>+[no]search</parameter>
429             </para>
430           </listitem>
431         </varlistentry>
432
433         <varlistentry>
434           <term><option>+[no]aaonly</option></term>
435           <listitem>
436             <para>
437               Sets the "aa" flag in the query.
438             </para>
439           </listitem>
440         </varlistentry>
441
442         <varlistentry>
443           <term><option>+[no]aaflag</option></term>
444           <listitem>
445             <para>
446               A synonym for <parameter>+[no]aaonly</parameter>.
447             </para>
448           </listitem>
449         </varlistentry>
450
451         <varlistentry>
452           <term><option>+[no]adflag</option></term>
453           <listitem>
454             <para>
455               Set [do not set] the AD (authentic data) bit in the
456               query.  This requests the server to return whether
457               all of the answer and authority sections have all
458               been validated as secure according to the security
459               policy of the server.  AD=1 indicates that all records
460               have been validated as secure and the answer is not
461               from a OPT-OUT range.  AD=0 indicate that some part
462               of the answer was insecure or not validated.
463             </para>
464           </listitem>
465         </varlistentry>
466
467         <varlistentry>
468           <term><option>+[no]cdflag</option></term>
469           <listitem>
470             <para>
471               Set [do not set] the CD (checking disabled) bit in the query.
472               This
473               requests the server to not perform DNSSEC validation of
474               responses.
475             </para>
476           </listitem>
477         </varlistentry>
478
479         <varlistentry>
480           <term><option>+[no]cl</option></term>
481           <listitem>
482             <para>
483               Display [do not display] the CLASS when printing the record.
484             </para>
485           </listitem>
486         </varlistentry>
487
488         <varlistentry>
489           <term><option>+[no]ttlid</option></term>
490           <listitem>
491             <para>
492               Display [do not display] the TTL when printing the record.
493             </para>
494           </listitem>
495         </varlistentry>
496
497         <varlistentry>
498           <term><option>+[no]recurse</option></term>
499           <listitem>
500             <para>
501               Toggle the setting of the RD (recursion desired) bit in the
502               query.
503               This bit is set by default, which means <command>dig</command>
504               normally sends recursive queries.  Recursion is automatically
505               disabled
506               when the <parameter>+nssearch</parameter> or
507               <parameter>+trace</parameter> query options are
508               used.
509             </para>
510           </listitem>
511         </varlistentry>
512
513         <varlistentry>
514           <term><option>+[no]nssearch</option></term>
515           <listitem>
516             <para>
517               When this option is set, <command>dig</command>
518               attempts to find the
519               authoritative name servers for the zone containing the name
520               being
521               looked up and display the SOA record that each name server has
522               for the
523               zone.
524             </para>
525           </listitem>
526         </varlistentry>
527
528         <varlistentry>
529           <term><option>+[no]trace</option></term>
530           <listitem>
531             <para>
532               Toggle tracing of the delegation path from the root name servers
533               for
534               the name being looked up.  Tracing is disabled by default.  When
535               tracing is enabled, <command>dig</command> makes
536               iterative queries to
537               resolve the name being looked up.  It will follow referrals from
538               the
539               root servers, showing the answer from each server that was used
540               to
541               resolve the lookup.
542             </para>
543           </listitem>
544         </varlistentry>
545
546         <varlistentry>
547           <term><option>+[no]cmd</option></term>
548           <listitem>
549             <para>
550               Toggles the printing of the initial comment in the output
551               identifying
552               the version of <command>dig</command> and the query
553               options that have
554               been applied.  This comment is printed by default.
555             </para>
556           </listitem>
557         </varlistentry>
558
559         <varlistentry>
560           <term><option>+[no]short</option></term>
561           <listitem>
562             <para>
563               Provide a terse answer.  The default is to print the answer in a
564               verbose form.
565             </para>
566           </listitem>
567         </varlistentry>
568
569         <varlistentry>
570           <term><option>+[no]identify</option></term>
571           <listitem>
572             <para>
573               Show [or do not show] the IP address and port number that
574               supplied the
575               answer when the <parameter>+short</parameter> option
576               is enabled.  If
577               short form answers are requested, the default is not to show the
578               source address and port number of the server that provided the
579               answer.
580             </para>
581           </listitem>
582         </varlistentry>
583
584         <varlistentry>
585           <term><option>+[no]comments</option></term>
586           <listitem>
587             <para>
588               Toggle the display of comment lines in the output.  The default
589               is to
590               print comments.
591             </para>
592           </listitem>
593         </varlistentry>
594
595         <varlistentry>
596           <term><option>+[no]stats</option></term>
597           <listitem>
598             <para>
599               This query option toggles the printing of statistics: when the
600               query
601               was made, the size of the reply and so on.  The default
602               behavior is
603               to print the query statistics.
604             </para>
605           </listitem>
606         </varlistentry>
607
608         <varlistentry>
609           <term><option>+[no]qr</option></term>
610           <listitem>
611             <para>
612               Print [do not print] the query as it is sent.
613               By default, the query is not printed.
614             </para>
615           </listitem>
616         </varlistentry>
617
618         <varlistentry>
619           <term><option>+[no]question</option></term>
620           <listitem>
621             <para>
622               Print [do not print] the question section of a query when an
623               answer is
624               returned.  The default is to print the question section as a
625               comment.
626             </para>
627           </listitem>
628         </varlistentry>
629
630         <varlistentry>
631           <term><option>+[no]answer</option></term>
632           <listitem>
633             <para>
634               Display [do not display] the answer section of a reply.  The
635               default
636               is to display it.
637             </para>
638           </listitem>
639         </varlistentry>
640
641         <varlistentry>
642           <term><option>+[no]authority</option></term>
643           <listitem>
644             <para>
645               Display [do not display] the authority section of a reply.  The
646               default is to display it.
647             </para>
648           </listitem>
649         </varlistentry>
650
651         <varlistentry>
652           <term><option>+[no]additional</option></term>
653           <listitem>
654             <para>
655               Display [do not display] the additional section of a reply.
656               The default is to display it.
657             </para>
658           </listitem>
659         </varlistentry>
660
661         <varlistentry>
662           <term><option>+[no]all</option></term>
663           <listitem>
664             <para>
665               Set or clear all display flags.
666             </para>
667           </listitem>
668         </varlistentry>
669
670         <varlistentry>
671           <term><option>+time=T</option></term>
672           <listitem>
673             <para>
674
675               Sets the timeout for a query to
676               <parameter>T</parameter> seconds.  The default
677               timeout is 5 seconds.
678               An attempt to set <parameter>T</parameter> to less
679               than 1 will result
680               in a query timeout of 1 second being applied.
681             </para>
682           </listitem>
683         </varlistentry>
684
685         <varlistentry>
686           <term><option>+tries=T</option></term>
687           <listitem>
688             <para>
689               Sets the number of times to try UDP queries to server to
690               <parameter>T</parameter> instead of the default, 3.
691               If
692               <parameter>T</parameter> is less than or equal to
693               zero, the number of
694               tries is silently rounded up to 1.
695             </para>
696           </listitem>
697         </varlistentry>
698
699         <varlistentry>
700           <term><option>+retry=T</option></term>
701           <listitem>
702             <para>
703               Sets the number of times to retry UDP queries to server to
704               <parameter>T</parameter> instead of the default, 2.
705               Unlike
706               <parameter>+tries</parameter>, this does not include
707               the initial
708               query.
709             </para>
710           </listitem>
711         </varlistentry>
712
713         <varlistentry>
714           <term><option>+ndots=D</option></term>
715           <listitem>
716             <para>
717               Set the number of dots that have to appear in
718               <parameter>name</parameter> to <parameter>D</parameter> for it to be
719               considered absolute.  The default value is that defined using
720               the
721               ndots statement in <filename>/etc/resolv.conf</filename>, or 1 if no
722               ndots statement is present.  Names with fewer dots are
723               interpreted as
724               relative names and will be searched for in the domains listed in
725               the
726               <option>search</option> or <option>domain</option> directive in
727               <filename>/etc/resolv.conf</filename>.
728             </para>
729           </listitem>
730         </varlistentry>
731
732         <varlistentry>
733           <term><option>+bufsize=B</option></term>
734           <listitem>
735             <para>
736               Set the UDP message buffer size advertised using EDNS0 to
737               <parameter>B</parameter> bytes.  The maximum and minimum sizes
738               of this buffer are 65535 and 0 respectively.  Values outside
739               this range are rounded up or down appropriately.  
740               Values other than zero will cause a EDNS query to be sent.
741             </para>
742           </listitem>
743         </varlistentry>
744
745         <varlistentry>
746           <term><option>+edns=#</option></term>
747           <listitem>
748             <para>
749                Specify the EDNS version to query with.  Valid values
750                are 0 to 255.  Setting the EDNS version will cause a
751                EDNS query to be sent.  <option>+noedns</option> clears the
752                remembered EDNS version.
753             </para>
754           </listitem>
755         </varlistentry>
756
757         <varlistentry>
758           <term><option>+[no]multiline</option></term>
759           <listitem>
760             <para>
761               Print records like the SOA records in a verbose multi-line
762               format with human-readable comments.  The default is to print
763               each record on a single line, to facilitate machine parsing
764               of the <command>dig</command> output.
765             </para>
766           </listitem>
767         </varlistentry>
768
769         <varlistentry>
770           <term><option>+[no]fail</option></term>
771           <listitem>
772             <para>
773               Do not try the next server if you receive a SERVFAIL.  The
774               default is
775               to not try the next server which is the reverse of normal stub
776               resolver
777               behavior.
778             </para>
779           </listitem>
780         </varlistentry>
781
782         <varlistentry>
783           <term><option>+[no]besteffort</option></term>
784           <listitem>
785             <para>
786               Attempt to display the contents of messages which are malformed.
787               The default is to not display malformed answers.
788             </para>
789           </listitem>
790         </varlistentry>
791
792         <varlistentry>
793           <term><option>+[no]dnssec</option></term>
794           <listitem>
795             <para>
796               Requests DNSSEC records be sent by setting the DNSSEC OK bit
797               (DO)
798               in the OPT record in the additional section of the query.
799             </para>
800           </listitem>
801         </varlistentry>
802
803         <varlistentry>
804           <term><option>+[no]sigchase</option></term>
805           <listitem>
806             <para>
807               Chase DNSSEC signature chains.  Requires dig be compiled with
808               -DDIG_SIGCHASE.
809             </para>
810           </listitem>
811         </varlistentry>
812
813         <varlistentry>
814           <term><option>+trusted-key=####</option></term>
815           <listitem>
816             <para>
817               Specifies a file containing trusted keys to be used with
818               <option>+sigchase</option>.  Each DNSKEY record must be
819               on its own line.
820             </para>
821             <para>
822               If not specified, <command>dig</command> will look for
823               <filename>/etc/trusted-key.key</filename> then
824               <filename>trusted-key.key</filename> in the current directory.
825             </para>
826             <para>
827               Requires dig be compiled with -DDIG_SIGCHASE.
828             </para>
829           </listitem>
830         </varlistentry>
831
832         <varlistentry>
833           <term><option>+[no]topdown</option></term>
834           <listitem>
835             <para>
836               When chasing DNSSEC signature chains perform a top-down
837               validation.
838               Requires dig be compiled with -DDIG_SIGCHASE.
839             </para>
840           </listitem>
841         </varlistentry>
842
843         <varlistentry>
844           <term><option>+[no]nsid</option></term>
845           <listitem>
846             <para>
847               Include an EDNS name server ID request when sending a query.
848             </para>
849           </listitem>
850         </varlistentry>
851
852
853       </variablelist>
854
855     </para>
856   </refsect1>
857
858   <refsect1>
859     <title>MULTIPLE QUERIES</title>
860
861     <para>
862       The BIND 9 implementation of <command>dig </command>
863       supports
864       specifying multiple queries on the command line (in addition to
865       supporting the <option>-f</option> batch file option).  Each of those
866       queries can be supplied with its own set of flags, options and query
867       options.
868     </para>
869
870     <para>
871       In this case, each <parameter>query</parameter> argument
872       represent an
873       individual query in the command-line syntax described above.  Each
874       consists of any of the standard options and flags, the name to be
875       looked up, an optional query type and class and any query options that
876       should be applied to that query.
877     </para>
878
879     <para>
880       A global set of query options, which should be applied to all queries,
881       can also be supplied.  These global query options must precede the
882       first tuple of name, class, type, options, flags, and query options
883       supplied on the command line.  Any global query options (except
884       the <option>+[no]cmd</option> option) can be
885       overridden by a query-specific set of query options.  For example:
886       <programlisting>
887 dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
888 </programlisting>
889       shows how <command>dig</command> could be used from the
890       command line
891       to make three lookups: an ANY query for <literal>www.isc.org</literal>, a
892       reverse lookup of 127.0.0.1 and a query for the NS records of
893       <literal>isc.org</literal>.
894
895       A global query option of <parameter>+qr</parameter> is
896       applied, so
897       that <command>dig</command> shows the initial query it made
898       for each
899       lookup.  The final query has a local query option of
900       <parameter>+noqr</parameter> which means that <command>dig</command>
901       will not print the initial query when it looks up the NS records for
902       <literal>isc.org</literal>.
903     </para>
904
905   </refsect1>
906
907   <refsect1>
908     <title>IDN SUPPORT</title>
909     <para>
910       If <command>dig</command> has been built with IDN (internationalized
911       domain name) support, it can accept and display non-ASCII domain names.
912       <command>dig</command> appropriately converts character encoding of
913       domain name before sending a request to DNS server or displaying a
914       reply from the server.
915       If you'd like to turn off the IDN support for some reason, defines
916       the <envar>IDN_DISABLE</envar> environment variable.
917       The IDN support is disabled if the variable is set when 
918       <command>dig</command> runs.
919     </para>
920   </refsect1>
921
922   <refsect1>
923     <title>FILES</title>
924     <para><filename>/etc/resolv.conf</filename>
925     </para>
926     <para><filename>${HOME}/.digrc</filename>
927     </para>
928   </refsect1>
929
930   <refsect1>
931     <title>SEE ALSO</title>
932     <para><citerefentry>
933         <refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
934       </citerefentry>,
935       <citerefentry>
936         <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
937       </citerefentry>,
938       <citerefentry>
939         <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
940       </citerefentry>,
941       <citetitle>RFC1035</citetitle>.
942     </para>
943   </refsect1>
944
945   <refsect1>
946     <title>BUGS</title>
947     <para>
948       There are probably too many query options.
949     </para>
950   </refsect1>
951 </refentry><!--
952  - Local variables:
953  - mode: sgml
954  - End:
955 -->