]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/bind9/doc/arm/man.dig.html
Update BIND to 9.9.7.
[FreeBSD/stable/9.git] / contrib / bind9 / doc / arm / man.dig.html
1 <!--
2  - Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC")
3  - Copyright (C) 2000-2003 Internet Software Consortium.
4  - 
5  - Permission to use, copy, modify, and/or 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 <!-- $Id$ -->
18 <html>
19 <head>
20 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21 <title>dig</title>
22 <meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
23 <link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
24 <link rel="up" href="Bv9ARM.ch13.html" title="Manual pages">
25 <link rel="prev" href="Bv9ARM.ch13.html" title="Manual pages">
26 <link rel="next" href="man.host.html" title="host">
27 </head>
28 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
29 <div class="navheader">
30 <table width="100%" summary="Navigation header">
31 <tr><th colspan="3" align="center">dig</th></tr>
32 <tr>
33 <td width="20%" align="left">
34 <a accesskey="p" href="Bv9ARM.ch13.html">Prev</a> </td>
35 <th width="60%" align="center">Manual pages</th>
36 <td width="20%" align="right"> <a accesskey="n" href="man.host.html">Next</a>
37 </td>
38 </tr>
39 </table>
40 <hr>
41 </div>
42 <div class="refentry" lang="en">
43 <a name="man.dig"></a><div class="titlepage"></div>
44 <div class="refnamediv">
45 <h2>Name</h2>
46 <p>dig &#8212; DNS lookup utility</p>
47 </div>
48 <div class="refsynopsisdiv">
49 <h2>Synopsis</h2>
50 <div class="cmdsynopsis"><p><code class="command">dig</code>  [@server] [<code class="option">-b <em class="replaceable"><code>address</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-f <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-k <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-m</code>] [<code class="option">-p <em class="replaceable"><code>port#</code></em></code>] [<code class="option">-q <em class="replaceable"><code>name</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v</code>] [<code class="option">-x <em class="replaceable"><code>addr</code></em></code>] [<code class="option">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]name:key</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] [name] [type] [class] [queryopt...]</p></div>
51 <div class="cmdsynopsis"><p><code class="command">dig</code>  [<code class="option">-h</code>]</p></div>
52 <div class="cmdsynopsis"><p><code class="command">dig</code>  [global-queryopt...] [query...]</p></div>
53 </div>
54 <div class="refsect1" lang="en">
55 <a name="id2612260"></a><h2>DESCRIPTION</h2>
56 <p><span><strong class="command">dig</strong></span>
57       (domain information groper) is a flexible tool
58       for interrogating DNS name servers.  It performs DNS lookups and
59       displays the answers that are returned from the name server(s) that
60       were queried.  Most DNS administrators use <span><strong class="command">dig</strong></span> to
61       troubleshoot DNS problems because of its flexibility, ease of use and
62       clarity of output.  Other lookup tools tend to have less functionality
63       than <span><strong class="command">dig</strong></span>.
64     </p>
65 <p>
66       Although <span><strong class="command">dig</strong></span> is normally used with
67       command-line
68       arguments, it also has a batch mode of operation for reading lookup
69       requests from a file.  A brief summary of its command-line arguments
70       and options is printed when the <code class="option">-h</code> option is given.
71       Unlike earlier versions, the BIND 9 implementation of
72       <span><strong class="command">dig</strong></span> allows multiple lookups to be issued
73       from the
74       command line.
75     </p>
76 <p>
77       Unless it is told to query a specific name server,
78       <span><strong class="command">dig</strong></span> will try each of the servers listed in
79       <code class="filename">/etc/resolv.conf</code>. If no usable server addresses
80       are found, <span><strong class="command">dig</strong></span> will send the query to the local
81       host.
82     </p>
83 <p>
84       When no command line arguments or options are given,
85       <span><strong class="command">dig</strong></span> will perform an NS query for "." (the root).
86     </p>
87 <p>
88       It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
89       <code class="filename">${HOME}/.digrc</code>.  This file is read and
90       any options in it
91       are applied before the command line arguments.
92     </p>
93 <p>
94       The IN and CH class names overlap with the IN and CH top level
95       domain names.  Either use the <code class="option">-t</code> and
96       <code class="option">-c</code> options to specify the type and class, 
97       use the <code class="option">-q</code> the specify the domain name, or
98       use "IN." and "CH." when looking up these top level domains.
99     </p>
100 </div>
101 <div class="refsect1" lang="en">
102 <a name="id2612362"></a><h2>SIMPLE USAGE</h2>
103 <p>
104       A typical invocation of <span><strong class="command">dig</strong></span> looks like:
105       </p>
106 <pre class="programlisting"> dig @server name type </pre>
107 <p>
108       where:
109
110       </p>
111 <div class="variablelist"><dl>
112 <dt><span class="term"><code class="constant">server</code></span></dt>
113 <dd>
114 <p>
115               is the name or IP address of the name server to query.  This
116               can be an IPv4 address in dotted-decimal notation or an IPv6
117               address in colon-delimited notation.  When the supplied
118               <em class="parameter"><code>server</code></em> argument is a hostname,
119               <span><strong class="command">dig</strong></span> resolves that name before querying
120               that name server.
121             </p>
122 <p>
123               If no <em class="parameter"><code>server</code></em> argument is
124               provided, <span><strong class="command">dig</strong></span> consults
125               <code class="filename">/etc/resolv.conf</code>; if an
126               address is found there, it queries the name server at
127               that address. If either of the <code class="option">-4</code> or
128               <code class="option">-6</code> options are in use, then
129               only addresses for the corresponding transport
130               will be tried.  If no usable addresses are found,
131               <span><strong class="command">dig</strong></span> will send the query to the
132               local host.  The reply from the name server that
133               responds is displayed.
134             </p>
135 </dd>
136 <dt><span class="term"><code class="constant">name</code></span></dt>
137 <dd><p>
138               is the name of the resource record that is to be looked up.
139             </p></dd>
140 <dt><span class="term"><code class="constant">type</code></span></dt>
141 <dd><p>
142               indicates what type of query is required &#8212;
143               ANY, A, MX, SIG, etc.
144               <em class="parameter"><code>type</code></em> can be any valid query
145               type.  If no
146               <em class="parameter"><code>type</code></em> argument is supplied,
147               <span><strong class="command">dig</strong></span> will perform a lookup for an
148               A record.
149             </p></dd>
150 </dl></div>
151 <p>
152     </p>
153 </div>
154 <div class="refsect1" lang="en">
155 <a name="id2612829"></a><h2>OPTIONS</h2>
156 <p>
157       The <code class="option">-b</code> option sets the source IP address of the query
158       to <em class="parameter"><code>address</code></em>.  This must be a valid
159       address on
160       one of the host's network interfaces or "0.0.0.0" or "::".  An optional
161       port
162       may be specified by appending "#&lt;port&gt;"
163     </p>
164 <p>
165       The default query class (IN for internet) is overridden by the
166       <code class="option">-c</code> option.  <em class="parameter"><code>class</code></em> is
167       any valid
168       class, such as HS for Hesiod records or CH for Chaosnet records.
169     </p>
170 <p>
171       The <code class="option">-f</code> option makes <span><strong class="command">dig </strong></span>
172       operate
173       in batch mode by reading a list of lookup requests to process from the
174       file <em class="parameter"><code>filename</code></em>.  The file contains a
175       number of
176       queries, one per line.  Each entry in the file should be organized in
177       the same way they would be presented as queries to
178       <span><strong class="command">dig</strong></span> using the command-line interface.
179     </p>
180 <p>
181       The <code class="option">-m</code> option enables memory usage debugging.
182       
183     </p>
184 <p>
185       If a non-standard port number is to be queried, the
186       <code class="option">-p</code> option is used.  <em class="parameter"><code>port#</code></em> is
187       the port number that <span><strong class="command">dig</strong></span> will send its
188       queries
189       instead of the standard DNS port number 53.  This option would be used
190       to test a name server that has been configured to listen for queries
191       on a non-standard port number.
192     </p>
193 <p>
194       The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span>
195       to only
196       use IPv4 query transport.  The <code class="option">-6</code> option forces
197       <span><strong class="command">dig</strong></span> to only use IPv6 query transport.
198     </p>
199 <p>
200       The <code class="option">-t</code> option sets the query type to
201       <em class="parameter"><code>type</code></em>.  It can be any valid query type
202       which is
203       supported in BIND 9.  The default query type is "A", unless the
204       <code class="option">-x</code> option is supplied to indicate a reverse lookup.
205       A zone transfer can be requested by specifying a type of AXFR.  When
206       an incremental zone transfer (IXFR) is required,
207       <em class="parameter"><code>type</code></em> is set to <code class="literal">ixfr=N</code>.
208       The incremental zone transfer will contain the changes made to the zone
209       since the serial number in the zone's SOA record was
210       <em class="parameter"><code>N</code></em>.
211     </p>
212 <p>
213       The <code class="option">-q</code> option sets the query name to 
214       <em class="parameter"><code>name</code></em>.  This is useful to distinguish the
215       <em class="parameter"><code>name</code></em> from other arguments.
216     </p>
217 <p>
218       The <code class="option">-v</code> causes <span><strong class="command">dig</strong></span> to
219       print the version number and exit.
220     </p>
221 <p>
222       Reverse lookups &#8212; mapping addresses to names &#8212; are simplified by the
223       <code class="option">-x</code> option.  <em class="parameter"><code>addr</code></em> is
224       an IPv4
225       address in dotted-decimal notation, or a colon-delimited IPv6 address.
226       When this option is used, there is no need to provide the
227       <em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em> and
228       <em class="parameter"><code>type</code></em> arguments.  <span><strong class="command">dig</strong></span>
229       automatically performs a lookup for a name like
230       <code class="literal">11.12.13.10.in-addr.arpa</code> and sets the
231       query type and
232       class to PTR and IN respectively.  By default, IPv6 addresses are
233       looked up using nibble format under the IP6.ARPA domain.
234       To use the older RFC1886 method using the IP6.INT domain
235       specify the <code class="option">-i</code> option.  Bit string labels (RFC2874)
236       are now experimental and are not attempted.
237     </p>
238 <p>
239       To sign the DNS queries sent by <span><strong class="command">dig</strong></span> and
240       their
241       responses using transaction signatures (TSIG), specify a TSIG key file
242       using the <code class="option">-k</code> option.  You can also specify the TSIG
243       key itself on the command line using the <code class="option">-y</code> option;
244       <em class="parameter"><code>hmac</code></em> is the type of the TSIG, default HMAC-MD5,
245       <em class="parameter"><code>name</code></em> is the name of the TSIG key and
246       <em class="parameter"><code>key</code></em> is the actual key.  The key is a
247       base-64
248       encoded string, typically generated by
249       <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
250
251       Caution should be taken when using the <code class="option">-y</code> option on
252       multi-user systems as the key can be visible in the output from
253       <span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span>
254       or in the shell's history file.  When
255       using TSIG authentication with <span><strong class="command">dig</strong></span>, the name
256       server that is queried needs to know the key and algorithm that is
257       being used.  In BIND, this is done by providing appropriate
258       <span><strong class="command">key</strong></span> and <span><strong class="command">server</strong></span> statements in
259       <code class="filename">named.conf</code>.
260     </p>
261 </div>
262 <div class="refsect1" lang="en">
263 <a name="id2664316"></a><h2>QUERY OPTIONS</h2>
264 <p><span><strong class="command">dig</strong></span>
265       provides a number of query options which affect
266       the way in which lookups are made and the results displayed.  Some of
267       these set or reset flag bits in the query header, some determine which
268       sections of the answer get printed, and others determine the timeout
269       and retry strategies.
270     </p>
271 <p>
272       Each query option is identified by a keyword preceded by a plus sign
273       (<code class="literal">+</code>).  Some keywords set or reset an
274       option.  These may be preceded
275       by the string <code class="literal">no</code> to negate the meaning of
276       that keyword.  Other
277       keywords assign values to options like the timeout interval.  They
278       have the form <code class="option">+keyword=value</code>.
279       The query options are:
280
281       </p>
282 <div class="variablelist"><dl>
283 <dt><span class="term"><code class="option">+[no]aaflag</code></span></dt>
284 <dd><p>
285               A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
286             </p></dd>
287 <dt><span class="term"><code class="option">+[no]aaonly</code></span></dt>
288 <dd><p>
289               Sets the "aa" flag in the query.
290             </p></dd>
291 <dt><span class="term"><code class="option">+[no]additional</code></span></dt>
292 <dd><p>
293               Display [do not display] the additional section of a
294               reply.  The default is to display it.
295             </p></dd>
296 <dt><span class="term"><code class="option">+[no]adflag</code></span></dt>
297 <dd><p>
298               Set [do not set] the AD (authentic data) bit in the
299               query.  This requests the server to return whether
300               all of the answer and authority sections have all
301               been validated as secure according to the security
302               policy of the server.  AD=1 indicates that all records
303               have been validated as secure and the answer is not
304               from a OPT-OUT range.  AD=0 indicate that some part
305               of the answer was insecure or not validated.  This
306               bit is set by default.
307             </p></dd>
308 <dt><span class="term"><code class="option">+[no]all</code></span></dt>
309 <dd><p>
310               Set or clear all display flags.
311             </p></dd>
312 <dt><span class="term"><code class="option">+[no]answer</code></span></dt>
313 <dd><p>
314               Display [do not display] the answer section of a
315               reply.  The default is to display it.
316             </p></dd>
317 <dt><span class="term"><code class="option">+[no]authority</code></span></dt>
318 <dd><p>
319               Display [do not display] the authority section of a
320               reply.  The default is to display it.
321             </p></dd>
322 <dt><span class="term"><code class="option">+[no]besteffort</code></span></dt>
323 <dd><p>
324               Attempt to display the contents of messages which are
325               malformed.  The default is to not display malformed
326               answers.
327             </p></dd>
328 <dt><span class="term"><code class="option">+bufsize=B</code></span></dt>
329 <dd><p>
330               Set the UDP message buffer size advertised using EDNS0
331               to <em class="parameter"><code>B</code></em> bytes.  The maximum and
332               minimum sizes of this buffer are 65535 and 0 respectively.
333               Values outside this range are rounded up or down
334               appropriately.  Values other than zero will cause a
335               EDNS query to be sent.
336             </p></dd>
337 <dt><span class="term"><code class="option">+[no]cdflag</code></span></dt>
338 <dd><p>
339               Set [do not set] the CD (checking disabled) bit in
340               the query.  This requests the server to not perform
341               DNSSEC validation of responses.
342             </p></dd>
343 <dt><span class="term"><code class="option">+[no]cl</code></span></dt>
344 <dd><p>
345               Display [do not display] the CLASS when printing the
346               record.
347             </p></dd>
348 <dt><span class="term"><code class="option">+[no]cmd</code></span></dt>
349 <dd><p>
350               Toggles the printing of the initial comment in the
351               output identifying the version of <span><strong class="command">dig</strong></span>
352               and the query options that have been applied.  This
353               comment is printed by default.
354             </p></dd>
355 <dt><span class="term"><code class="option">+[no]comments</code></span></dt>
356 <dd><p>
357               Toggle the display of comment lines in the output.
358               The default is to print comments.
359             </p></dd>
360 <dt><span class="term"><code class="option">+[no]defname</code></span></dt>
361 <dd><p>
362               Deprecated, treated as a synonym for
363               <em class="parameter"><code>+[no]search</code></em>
364             </p></dd>
365 <dt><span class="term"><code class="option">+[no]dnssec</code></span></dt>
366 <dd><p>
367               Requests DNSSEC records be sent by setting the DNSSEC
368               OK bit (DO) in the OPT record in the additional section
369               of the query.
370             </p></dd>
371 <dt><span class="term"><code class="option">+domain=somename</code></span></dt>
372 <dd><p>
373               Set the search list to contain the single domain
374               <em class="parameter"><code>somename</code></em>, as if specified in
375               a <span><strong class="command">domain</strong></span> directive in
376               <code class="filename">/etc/resolv.conf</code>, and enable
377               search list processing as if the
378               <em class="parameter"><code>+search</code></em> option were given.
379             </p></dd>
380 <dt><span class="term"><code class="option">+[no]edns[=#]</code></span></dt>
381 <dd><p>
382                Specify the EDNS version to query with.  Valid values
383                are 0 to 255.  Setting the EDNS version will cause
384                a EDNS query to be sent.  <code class="option">+noedns</code>
385                clears the remembered EDNS version.  EDNS is set to
386                0 by default.
387             </p></dd>
388 <dt><span class="term"><code class="option">+[no]fail</code></span></dt>
389 <dd><p>
390               Do not try the next server if you receive a SERVFAIL.
391               The default is to not try the next server which is
392               the reverse of normal stub resolver behavior.
393             </p></dd>
394 <dt><span class="term"><code class="option">+[no]identify</code></span></dt>
395 <dd><p>
396               Show [or do not show] the IP address and port number
397               that supplied the answer when the
398               <em class="parameter"><code>+short</code></em> option is enabled.  If
399               short form answers are requested, the default is not
400               to show the source address and port number of the
401               server that provided the answer.
402             </p></dd>
403 <dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
404 <dd><p>
405               Ignore truncation in UDP responses instead of retrying
406               with TCP.  By default, TCP retries are performed.
407             </p></dd>
408 <dt><span class="term"><code class="option">+[no]keepopen</code></span></dt>
409 <dd><p>
410               Keep the TCP socket open between queries and reuse
411               it rather than creating a new TCP socket for each
412               lookup.  The default is <code class="option">+nokeepopen</code>.
413             </p></dd>
414 <dt><span class="term"><code class="option">+[no]multiline</code></span></dt>
415 <dd><p>
416               Print records like the SOA records in a verbose
417               multi-line format with human-readable comments.  The
418               default is to print each record on a single line, to
419               facilitate machine parsing of the <span><strong class="command">dig</strong></span>
420               output.
421             </p></dd>
422 <dt><span class="term"><code class="option">+ndots=D</code></span></dt>
423 <dd><p>
424               Set the number of dots that have to appear in
425               <em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em>
426               for it to be considered absolute.  The default value
427               is that defined using the ndots statement in
428               <code class="filename">/etc/resolv.conf</code>, or 1 if no
429               ndots statement is present.  Names with fewer dots
430               are interpreted as relative names and will be searched
431               for in the domains listed in the <code class="option">search</code>
432               or <code class="option">domain</code> directive in
433               <code class="filename">/etc/resolv.conf</code> if
434               <code class="option">+search</code> is set.
435             </p></dd>
436 <dt><span class="term"><code class="option">+[no]nsid</code></span></dt>
437 <dd><p>
438               Include an EDNS name server ID request when sending
439               a query.
440             </p></dd>
441 <dt><span class="term"><code class="option">+[no]nssearch</code></span></dt>
442 <dd><p>
443               When this option is set, <span><strong class="command">dig</strong></span>
444               attempts to find the authoritative name servers for
445               the zone containing the name being looked up and
446               display the SOA record that each name server has for
447               the zone.
448             </p></dd>
449 <dt><span class="term"><code class="option">+[no]onesoa</code></span></dt>
450 <dd><p>
451               Print only one (starting) SOA record when performing
452               an AXFR. The default is to print both the starting
453               and ending SOA records.
454             </p></dd>
455 <dt><span class="term"><code class="option">+[no]qr</code></span></dt>
456 <dd><p>
457               Print [do not print] the query as it is sent.  By
458               default, the query is not printed.
459             </p></dd>
460 <dt><span class="term"><code class="option">+[no]question</code></span></dt>
461 <dd><p>
462               Print [do not print] the question section of a query
463               when an answer is returned.  The default is to print
464               the question section as a comment.
465             </p></dd>
466 <dt><span class="term"><code class="option">+[no]recurse</code></span></dt>
467 <dd><p>
468               Toggle the setting of the RD (recursion desired) bit
469               in the query.  This bit is set by default, which means
470               <span><strong class="command">dig</strong></span> normally sends recursive
471               queries.  Recursion is automatically disabled when
472               the <em class="parameter"><code>+nssearch</code></em> or
473               <em class="parameter"><code>+trace</code></em> query options are used.
474             </p></dd>
475 <dt><span class="term"><code class="option">+retry=T</code></span></dt>
476 <dd><p>
477               Sets the number of times to retry UDP queries to
478               server to <em class="parameter"><code>T</code></em> instead of the
479               default, 2.  Unlike <em class="parameter"><code>+tries</code></em>,
480               this does not include the initial query.
481             </p></dd>
482 <dt><span class="term"><code class="option">+[no]rrcomments</code></span></dt>
483 <dd><p>
484               Toggle the display of per-record comments in the
485               output (for example, human-readable key information
486               about DNSKEY records).  The default is not to print
487               record comments unless multiline mode is active.
488             </p></dd>
489 <dt><span class="term"><code class="option">+[no]search</code></span></dt>
490 <dd>
491 <p>
492               Use [do not use] the search list defined by the
493               searchlist or domain directive in
494               <code class="filename">resolv.conf</code> (if any).  The search
495               list is not used by default.
496             </p>
497 <p>
498               'ndots' from <code class="filename">resolv.conf</code> (default 1)
499                which may be overridden by <em class="parameter"><code>+ndots</code></em>
500               determines if the name will be treated as relative
501               or not and hence whether a search is eventually
502               performed or not.
503             </p>
504 </dd>
505 <dt><span class="term"><code class="option">+[no]short</code></span></dt>
506 <dd><p>
507               Provide a terse answer.  The default is to print the
508               answer in a verbose form.
509             </p></dd>
510 <dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
511 <dd><p>
512               Perform [do not perform] a search showing intermediate
513               results.
514             </p></dd>
515 <dt><span class="term"><code class="option">+[no]sigchase</code></span></dt>
516 <dd><p>
517               Chase DNSSEC signature chains.  Requires dig be
518               compiled with -DDIG_SIGCHASE.
519             </p></dd>
520 <dt><span class="term"><code class="option">+split=W</code></span></dt>
521 <dd><p>
522               Split long hex- or base64-formatted fields in resource
523               records into chunks of <em class="parameter"><code>W</code></em>
524               characters (where <em class="parameter"><code>W</code></em> is rounded
525               up to the nearest multiple of 4).
526               <em class="parameter"><code>+nosplit</code></em> or
527               <em class="parameter"><code>+split=0</code></em> causes fields not to
528               be split at all.  The default is 56 characters, or
529               44 characters when multiline mode is active.
530             </p></dd>
531 <dt><span class="term"><code class="option">+[no]stats</code></span></dt>
532 <dd><p>
533               This query option toggles the printing of statistics:
534               when the query was made, the size of the reply and
535               so on.  The default behavior is to print the query
536               statistics.
537             </p></dd>
538 <dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
539 <dd><p>
540               Use [do not use] TCP when querying name servers. The
541               default behavior is to use UDP unless an
542               <code class="literal">ixfr=N</code> query is requested, in which
543               case the default is TCP.  AXFR queries always use
544               TCP.
545             </p></dd>
546 <dt><span class="term"><code class="option">+time=T</code></span></dt>
547 <dd><p>
548
549               Sets the timeout for a query to
550               <em class="parameter"><code>T</code></em> seconds.  The default
551               timeout is 5 seconds.
552               An attempt to set <em class="parameter"><code>T</code></em> to less
553               than 1 will result
554               in a query timeout of 1 second being applied.
555             </p></dd>
556 <dt><span class="term"><code class="option">+[no]topdown</code></span></dt>
557 <dd><p>
558               When chasing DNSSEC signature chains perform a top-down
559               validation.  Requires dig be compiled with -DDIG_SIGCHASE.
560             </p></dd>
561 <dt><span class="term"><code class="option">+[no]trace</code></span></dt>
562 <dd>
563 <p>
564               Toggle tracing of the delegation path from the root
565               name servers for the name being looked up.  Tracing
566               is disabled by default.  When tracing is enabled,
567               <span><strong class="command">dig</strong></span> makes iterative queries to
568               resolve the name being looked up.  It will follow
569               referrals from the root servers, showing the answer
570               from each server that was used to resolve the lookup.
571             </p>
572 <p>
573               <span><strong class="command">+dnssec</strong></span> is also set when +trace
574               is set to better emulate the default queries from a
575               nameserver.
576             </p>
577 </dd>
578 <dt><span class="term"><code class="option">+tries=T</code></span></dt>
579 <dd><p>
580               Sets the number of times to try UDP queries to server
581               to <em class="parameter"><code>T</code></em> instead of the default,
582               3.  If <em class="parameter"><code>T</code></em> is less than or equal
583               to zero, the number of tries is silently rounded up
584               to 1.
585             </p></dd>
586 <dt><span class="term"><code class="option">+trusted-key=####</code></span></dt>
587 <dd>
588 <p>
589               Specifies a file containing trusted keys to be used
590               with <code class="option">+sigchase</code>.  Each DNSKEY record
591               must be on its own line.
592             </p>
593 <p>
594               If not specified, <span><strong class="command">dig</strong></span> will look
595               for <code class="filename">/etc/trusted-key.key</code> then
596               <code class="filename">trusted-key.key</code> in the current
597               directory.
598             </p>
599 <p>
600               Requires dig be compiled with -DDIG_SIGCHASE.
601             </p>
602 </dd>
603 <dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
604 <dd><p>
605               Display [do not display] the TTL when printing the
606               record.
607             </p></dd>
608 <dt><span class="term"><code class="option">+[no]vc</code></span></dt>
609 <dd><p>
610               Use [do not use] TCP when querying name servers.  This
611               alternate syntax to <em class="parameter"><code>+[no]tcp</code></em>
612               is provided for backwards compatibility.  The "vc"
613               stands for "virtual circuit".
614             </p></dd>
615 </dl></div>
616 <p>
617
618     </p>
619 </div>
620 <div class="refsect1" lang="en">
621 <a name="id2665499"></a><h2>MULTIPLE QUERIES</h2>
622 <p>
623       The BIND 9 implementation of <span><strong class="command">dig </strong></span>
624       supports
625       specifying multiple queries on the command line (in addition to
626       supporting the <code class="option">-f</code> batch file option).  Each of those
627       queries can be supplied with its own set of flags, options and query
628       options.
629     </p>
630 <p>
631       In this case, each <em class="parameter"><code>query</code></em> argument
632       represent an
633       individual query in the command-line syntax described above.  Each
634       consists of any of the standard options and flags, the name to be
635       looked up, an optional query type and class and any query options that
636       should be applied to that query.
637     </p>
638 <p>
639       A global set of query options, which should be applied to all queries,
640       can also be supplied.  These global query options must precede the
641       first tuple of name, class, type, options, flags, and query options
642       supplied on the command line.  Any global query options (except
643       the <code class="option">+[no]cmd</code> option) can be
644       overridden by a query-specific set of query options.  For example:
645       </p>
646 <pre class="programlisting">
647 dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
648 </pre>
649 <p>
650       shows how <span><strong class="command">dig</strong></span> could be used from the
651       command line
652       to make three lookups: an ANY query for <code class="literal">www.isc.org</code>, a
653       reverse lookup of 127.0.0.1 and a query for the NS records of
654       <code class="literal">isc.org</code>.
655
656       A global query option of <em class="parameter"><code>+qr</code></em> is
657       applied, so
658       that <span><strong class="command">dig</strong></span> shows the initial query it made
659       for each
660       lookup.  The final query has a local query option of
661       <em class="parameter"><code>+noqr</code></em> which means that <span><strong class="command">dig</strong></span>
662       will not print the initial query when it looks up the NS records for
663       <code class="literal">isc.org</code>.
664     </p>
665 </div>
666 <div class="refsect1" lang="en">
667 <a name="id2665653"></a><h2>IDN SUPPORT</h2>
668 <p>
669       If <span><strong class="command">dig</strong></span> has been built with IDN (internationalized
670       domain name) support, it can accept and display non-ASCII domain names.
671       <span><strong class="command">dig</strong></span> appropriately converts character encoding of
672       domain name before sending a request to DNS server or displaying a
673       reply from the server.
674       If you'd like to turn off the IDN support for some reason, defines
675       the <code class="envar">IDN_DISABLE</code> environment variable.
676       The IDN support is disabled if the variable is set when 
677       <span><strong class="command">dig</strong></span> runs.
678     </p>
679 </div>
680 <div class="refsect1" lang="en">
681 <a name="id2665750"></a><h2>FILES</h2>
682 <p><code class="filename">/etc/resolv.conf</code>
683     </p>
684 <p><code class="filename">${HOME}/.digrc</code>
685     </p>
686 </div>
687 <div class="refsect1" lang="en">
688 <a name="id2665771"></a><h2>SEE ALSO</h2>
689 <p><span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
690       <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
691       <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
692       <em class="citetitle">RFC1035</em>.
693     </p>
694 </div>
695 <div class="refsect1" lang="en">
696 <a name="id2665809"></a><h2>BUGS</h2>
697 <p>
698       There are probably too many query options.
699     </p>
700 </div>
701 </div>
702 <div class="navfooter">
703 <hr>
704 <table width="100%" summary="Navigation footer">
705 <tr>
706 <td width="40%" align="left">
707 <a accesskey="p" href="Bv9ARM.ch13.html">Prev</a> </td>
708 <td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch13.html">Up</a></td>
709 <td width="40%" align="right"> <a accesskey="n" href="man.host.html">Next</a>
710 </td>
711 </tr>
712 <tr>
713 <td width="40%" align="left" valign="top">Manual pages </td>
714 <td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
715 <td width="40%" align="right" valign="top"> host</td>
716 </tr>
717 </table>
718 </div>
719 <p style="text-align: center;">BIND 9.9.7 (Extended Support Version)</p>
720 </body>
721 </html>