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