]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/bind9/doc/arm/man.dig.html
MFV r292314:
[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="id2612595"></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="id2612834"></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="id2613164"></a><h2>OPTIONS</h2>
156 <div class="variablelist"><dl>
157 <dt><span class="term">-4</span></dt>
158 <dd><p>
159             Use IPv4 only.
160           </p></dd>
161 <dt><span class="term">-6</span></dt>
162 <dd><p>
163             Use IPv6 only.
164           </p></dd>
165 <dt><span class="term">-b <em class="replaceable"><code>address[<span class="optional">#port</span>]</code></em></span></dt>
166 <dd><p>
167             Set the source IP address of the query.
168             The <em class="parameter"><code>address</code></em> must be a valid address on
169             one of the host's network interfaces, or "0.0.0.0" or "::". An
170             optional port may be specified by appending "#&lt;port&gt;"
171           </p></dd>
172 <dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
173 <dd><p>
174             Set the query class. The
175             default <em class="parameter"><code>class</code></em> is IN; other classes
176             are HS for Hesiod records or CH for Chaosnet records.
177           </p></dd>
178 <dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
179 <dd><p>
180             Batch mode: <span><strong class="command">dig</strong></span> reads a list of lookup
181             requests to process from the
182             given <em class="parameter"><code>file</code></em>. Each line in the file
183             should be organized in the same way they would be
184             presented as queries to
185             <span><strong class="command">dig</strong></span> using the command-line interface.
186           </p></dd>
187 <dt><span class="term">-i</span></dt>
188 <dd><p>
189             Do reverse IPv6 lookups using the obsolete RFC1886 IP6.INT
190             domain, which is no longer in use. Obsolete bit string
191             label queries (RFC2874) are not attempted.
192           </p></dd>
193 <dt><span class="term">-k <em class="replaceable"><code>keyfile</code></em></span></dt>
194 <dd><p>
195             Sign queries using TSIG using a key read from the given file.
196             Key files can be generated using
197             <span class="citerefentry"><span class="refentrytitle">tsig-keygen</span>(8)</span>.
198             When using TSIG authentication with <span><strong class="command">dig</strong></span>,
199             the name server that is queried needs to know the key and
200             algorithm that is being used. In BIND, this is done by
201             providing appropriate <span><strong class="command">key</strong></span>
202             and <span><strong class="command">server</strong></span> statements in
203             <code class="filename">named.conf</code>.
204           </p></dd>
205 <dt><span class="term">-m</span></dt>
206 <dd><p>
207             Enable memory usage debugging.
208             
209           </p></dd>
210 <dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
211 <dd><p>
212             Send the query to a non-standard port on the server,
213             instead of the defaut port 53. This option would be used
214             to test a name server that has been configured to listen
215             for queries on a non-standard port number.
216           </p></dd>
217 <dt><span class="term">-q <em class="replaceable"><code>name</code></em></span></dt>
218 <dd><p>
219             The domain name to query. This is useful to distinguish
220             the <em class="parameter"><code>name</code></em> from other arguments.
221           </p></dd>
222 <dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
223 <dd><p>
224             The resource record type to query. It can be any valid query type
225             which is
226             supported in BIND 9.  The default query type is "A", unless the
227             <code class="option">-x</code> option is supplied to indicate a reverse lookup.
228             A zone transfer can be requested by specifying a type of AXFR.  When
229             an incremental zone transfer (IXFR) is required, set the
230             <em class="parameter"><code>type</code></em> to <code class="literal">ixfr=N</code>.
231             The incremental zone transfer will contain the changes
232             made to the zone since the serial number in the zone's SOA
233             record was
234             <em class="parameter"><code>N</code></em>.
235           </p></dd>
236 <dt><span class="term">-v</span></dt>
237 <dd><p>
238             Print the version number and exit.
239           </p></dd>
240 <dt><span class="term">-x <em class="replaceable"><code>addr</code></em></span></dt>
241 <dd><p>
242             Simplified reverse lookups, for mapping addresses to
243             names. The <em class="parameter"><code>addr</code></em> is an IPv4 address
244             in dotted-decimal notation, or a colon-delimited IPv6
245             address. When the <code class="option">-x</code> is used, there is no
246             need to provide
247             the <em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em>
248             and <em class="parameter"><code>type</code></em>
249             arguments. <span><strong class="command">dig</strong></span> automatically performs a
250             lookup for a name like
251             <code class="literal">94.2.0.192.in-addr.arpa</code> and sets the
252             query type and class to PTR and IN respectively. IPv6
253             addresses are looked up using nibble format under the
254             IP6.ARPA domain (but see also the <code class="option">-i</code>
255             option).
256           </p></dd>
257 <dt><span class="term">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]keyname:secret</code></em></span></dt>
258 <dd>
259 <p>
260             Sign queries using TSIG with the given authentication key.
261             <em class="parameter"><code>keyname</code></em> is the name of the key, and
262             <em class="parameter"><code>secret</code></em> is the base64 encoded shared secret.
263             <em class="parameter"><code>hmac</code></em> is the name of the key algorithm;
264             valid choices are <code class="literal">hmac-md5</code>,
265             <code class="literal">hmac-sha1</code>, <code class="literal">hmac-sha224</code>,
266             <code class="literal">hmac-sha256</code>, <code class="literal">hmac-sha384</code>, or
267             <code class="literal">hmac-sha512</code>.  If <em class="parameter"><code>hmac</code></em>
268             is not specified, the default is <code class="literal">hmac-md5</code>.
269           </p>
270 <p>
271             NOTE: You should use the <code class="option">-k</code> option and
272             avoid the <code class="option">-y</code> option, because
273             with <code class="option">-y</code> the shared secret is supplied as
274             a command line argument in clear text. This may be visible
275             in the output from
276             <span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span>
277             or in a history file maintained by the user's shell.
278           </p>
279 </dd>
280 </dl></div>
281 </div>
282 <div class="refsect1" lang="en">
283 <a name="id2665699"></a><h2>QUERY OPTIONS</h2>
284 <p><span><strong class="command">dig</strong></span>
285       provides a number of query options which affect
286       the way in which lookups are made and the results displayed.  Some of
287       these set or reset flag bits in the query header, some determine which
288       sections of the answer get printed, and others determine the timeout
289       and retry strategies.
290     </p>
291 <p>
292       Each query option is identified by a keyword preceded by a plus sign
293       (<code class="literal">+</code>).  Some keywords set or reset an
294       option.  These may be preceded
295       by the string <code class="literal">no</code> to negate the meaning of
296       that keyword.  Other
297       keywords assign values to options like the timeout interval.  They
298       have the form <code class="option">+keyword=value</code>.
299       Keywords may be abbreviated, provided the abbreviation is
300       unambiguous; for example, <code class="literal">+cd</code> is equivalent
301       to <code class="literal">+cdflag</code>.
302       The query options are:
303
304       </p>
305 <div class="variablelist"><dl>
306 <dt><span class="term"><code class="option">+[no]aaflag</code></span></dt>
307 <dd><p>
308               A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
309             </p></dd>
310 <dt><span class="term"><code class="option">+[no]aaonly</code></span></dt>
311 <dd><p>
312               Sets the "aa" flag in the query.
313             </p></dd>
314 <dt><span class="term"><code class="option">+[no]additional</code></span></dt>
315 <dd><p>
316               Display [do not display] the additional section of a
317               reply.  The default is to display it.
318             </p></dd>
319 <dt><span class="term"><code class="option">+[no]adflag</code></span></dt>
320 <dd><p>
321               Set [do not set] the AD (authentic data) bit in the
322               query.  This requests the server to return whether
323               all of the answer and authority sections have all
324               been validated as secure according to the security
325               policy of the server.  AD=1 indicates that all records
326               have been validated as secure and the answer is not
327               from a OPT-OUT range.  AD=0 indicate that some part
328               of the answer was insecure or not validated.  This
329               bit is set by default.
330             </p></dd>
331 <dt><span class="term"><code class="option">+[no]all</code></span></dt>
332 <dd><p>
333               Set or clear all display flags.
334             </p></dd>
335 <dt><span class="term"><code class="option">+[no]answer</code></span></dt>
336 <dd><p>
337               Display [do not display] the answer section of a
338               reply.  The default is to display it.
339             </p></dd>
340 <dt><span class="term"><code class="option">+[no]authority</code></span></dt>
341 <dd><p>
342               Display [do not display] the authority section of a
343               reply.  The default is to display it.
344             </p></dd>
345 <dt><span class="term"><code class="option">+[no]besteffort</code></span></dt>
346 <dd><p>
347               Attempt to display the contents of messages which are
348               malformed.  The default is to not display malformed
349               answers.
350             </p></dd>
351 <dt><span class="term"><code class="option">+bufsize=B</code></span></dt>
352 <dd><p>
353               Set the UDP message buffer size advertised using EDNS0
354               to <em class="parameter"><code>B</code></em> bytes.  The maximum and
355               minimum sizes of this buffer are 65535 and 0 respectively.
356               Values outside this range are rounded up or down
357               appropriately.  Values other than zero will cause a
358               EDNS query to be sent.
359             </p></dd>
360 <dt><span class="term"><code class="option">+[no]cdflag</code></span></dt>
361 <dd><p>
362               Set [do not set] the CD (checking disabled) bit in
363               the query.  This requests the server to not perform
364               DNSSEC validation of responses.
365             </p></dd>
366 <dt><span class="term"><code class="option">+[no]class</code></span></dt>
367 <dd><p>
368               Display [do not display] the CLASS when printing the
369               record.
370             </p></dd>
371 <dt><span class="term"><code class="option">+[no]cmd</code></span></dt>
372 <dd><p>
373               Toggles the printing of the initial comment in the
374               output identifying the version of <span><strong class="command">dig</strong></span>
375               and the query options that have been applied.  This
376               comment is printed by default.
377             </p></dd>
378 <dt><span class="term"><code class="option">+[no]comments</code></span></dt>
379 <dd><p>
380               Toggle the display of comment lines in the output.
381               The default is to print comments.
382             </p></dd>
383 <dt><span class="term"><code class="option">+[no]defname</code></span></dt>
384 <dd><p>
385               Deprecated, treated as a synonym for
386               <em class="parameter"><code>+[no]search</code></em>
387             </p></dd>
388 <dt><span class="term"><code class="option">+[no]dnssec</code></span></dt>
389 <dd><p>
390               Requests DNSSEC records be sent by setting the DNSSEC
391               OK bit (DO) in the OPT record in the additional section
392               of the query.
393             </p></dd>
394 <dt><span class="term"><code class="option">+domain=somename</code></span></dt>
395 <dd><p>
396               Set the search list to contain the single domain
397               <em class="parameter"><code>somename</code></em>, as if specified in
398               a <span><strong class="command">domain</strong></span> directive in
399               <code class="filename">/etc/resolv.conf</code>, and enable
400               search list processing as if the
401               <em class="parameter"><code>+search</code></em> option were given.
402             </p></dd>
403 <dt><span class="term"><code class="option">+[no]edns[=#]</code></span></dt>
404 <dd><p>
405                Specify the EDNS version to query with.  Valid values
406                are 0 to 255.  Setting the EDNS version will cause
407                a EDNS query to be sent.  <code class="option">+noedns</code>
408                clears the remembered EDNS version.  EDNS is set to
409                0 by default.
410             </p></dd>
411 <dt><span class="term"><code class="option">+[no]fail</code></span></dt>
412 <dd><p>
413               Do not try the next server if you receive a SERVFAIL.
414               The default is to not try the next server which is
415               the reverse of normal stub resolver behavior.
416             </p></dd>
417 <dt><span class="term"><code class="option">+[no]identify</code></span></dt>
418 <dd><p>
419               Show [or do not show] the IP address and port number
420               that supplied the answer when the
421               <em class="parameter"><code>+short</code></em> option is enabled.  If
422               short form answers are requested, the default is not
423               to show the source address and port number of the
424               server that provided the answer.
425             </p></dd>
426 <dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
427 <dd><p>
428               Ignore truncation in UDP responses instead of retrying
429               with TCP.  By default, TCP retries are performed.
430             </p></dd>
431 <dt><span class="term"><code class="option">+[no]keepopen</code></span></dt>
432 <dd><p>
433               Keep the TCP socket open between queries and reuse
434               it rather than creating a new TCP socket for each
435               lookup.  The default is <code class="option">+nokeepopen</code>.
436             </p></dd>
437 <dt><span class="term"><code class="option">+[no]multiline</code></span></dt>
438 <dd><p>
439               Print records like the SOA records in a verbose
440               multi-line format with human-readable comments.  The
441               default is to print each record on a single line, to
442               facilitate machine parsing of the <span><strong class="command">dig</strong></span>
443               output.
444             </p></dd>
445 <dt><span class="term"><code class="option">+ndots=D</code></span></dt>
446 <dd><p>
447               Set the number of dots that have to appear in
448               <em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em>
449               for it to be considered absolute.  The default value
450               is that defined using the ndots statement in
451               <code class="filename">/etc/resolv.conf</code>, or 1 if no
452               ndots statement is present.  Names with fewer dots
453               are interpreted as relative names and will be searched
454               for in the domains listed in the <code class="option">search</code>
455               or <code class="option">domain</code> directive in
456               <code class="filename">/etc/resolv.conf</code> if
457               <code class="option">+search</code> is set.
458             </p></dd>
459 <dt><span class="term"><code class="option">+[no]nsid</code></span></dt>
460 <dd><p>
461               Include an EDNS name server ID request when sending
462               a query.
463             </p></dd>
464 <dt><span class="term"><code class="option">+[no]nssearch</code></span></dt>
465 <dd><p>
466               When this option is set, <span><strong class="command">dig</strong></span>
467               attempts to find the authoritative name servers for
468               the zone containing the name being looked up and
469               display the SOA record that each name server has for
470               the zone.
471             </p></dd>
472 <dt><span class="term"><code class="option">+[no]onesoa</code></span></dt>
473 <dd><p>
474               Print only one (starting) SOA record when performing
475               an AXFR. The default is to print both the starting
476               and ending SOA records.
477             </p></dd>
478 <dt><span class="term"><code class="option">+[no]qr</code></span></dt>
479 <dd><p>
480               Print [do not print] the query as it is sent.  By
481               default, the query is not printed.
482             </p></dd>
483 <dt><span class="term"><code class="option">+[no]question</code></span></dt>
484 <dd><p>
485               Print [do not print] the question section of a query
486               when an answer is returned.  The default is to print
487               the question section as a comment.
488             </p></dd>
489 <dt><span class="term"><code class="option">+[no]rdflag</code></span></dt>
490 <dd><p>
491               A synonym for <em class="parameter"><code>+[no]recurse</code></em>.
492             </p></dd>
493 <dt><span class="term"><code class="option">+[no]recurse</code></span></dt>
494 <dd><p>
495               Toggle the setting of the RD (recursion desired) bit
496               in the query.  This bit is set by default, which means
497               <span><strong class="command">dig</strong></span> normally sends recursive
498               queries.  Recursion is automatically disabled when
499               the <em class="parameter"><code>+nssearch</code></em> or
500               <em class="parameter"><code>+trace</code></em> query options are used.
501             </p></dd>
502 <dt><span class="term"><code class="option">+retry=T</code></span></dt>
503 <dd><p>
504               Sets the number of times to retry UDP queries to
505               server to <em class="parameter"><code>T</code></em> instead of the
506               default, 2.  Unlike <em class="parameter"><code>+tries</code></em>,
507               this does not include the initial query.
508             </p></dd>
509 <dt><span class="term"><code class="option">+[no]rrcomments</code></span></dt>
510 <dd><p>
511               Toggle the display of per-record comments in the
512               output (for example, human-readable key information
513               about DNSKEY records).  The default is not to print
514               record comments unless multiline mode is active.
515             </p></dd>
516 <dt><span class="term"><code class="option">+[no]search</code></span></dt>
517 <dd>
518 <p>
519               Use [do not use] the search list defined by the
520               searchlist or domain directive in
521               <code class="filename">resolv.conf</code> (if any).  The search
522               list is not used by default.
523             </p>
524 <p>
525               'ndots' from <code class="filename">resolv.conf</code> (default 1)
526                which may be overridden by <em class="parameter"><code>+ndots</code></em>
527               determines if the name will be treated as relative
528               or not and hence whether a search is eventually
529               performed or not.
530             </p>
531 </dd>
532 <dt><span class="term"><code class="option">+[no]short</code></span></dt>
533 <dd><p>
534               Provide a terse answer.  The default is to print the
535               answer in a verbose form.
536             </p></dd>
537 <dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
538 <dd><p>
539               Perform [do not perform] a search showing intermediate
540               results.
541             </p></dd>
542 <dt><span class="term"><code class="option">+[no]sigchase</code></span></dt>
543 <dd><p>
544               Chase DNSSEC signature chains.  Requires dig be
545               compiled with -DDIG_SIGCHASE.
546             </p></dd>
547 <dt><span class="term"><code class="option">+split=W</code></span></dt>
548 <dd><p>
549               Split long hex- or base64-formatted fields in resource
550               records into chunks of <em class="parameter"><code>W</code></em>
551               characters (where <em class="parameter"><code>W</code></em> is rounded
552               up to the nearest multiple of 4).
553               <em class="parameter"><code>+nosplit</code></em> or
554               <em class="parameter"><code>+split=0</code></em> causes fields not to
555               be split at all.  The default is 56 characters, or
556               44 characters when multiline mode is active.
557             </p></dd>
558 <dt><span class="term"><code class="option">+[no]stats</code></span></dt>
559 <dd><p>
560               This query option toggles the printing of statistics:
561               when the query was made, the size of the reply and
562               so on.  The default behavior is to print the query
563               statistics.
564             </p></dd>
565 <dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
566 <dd><p>
567               Use [do not use] TCP when querying name servers. The
568               default behavior is to use UDP unless an
569               <code class="literal">ixfr=N</code> query is requested, in which
570               case the default is TCP.  AXFR queries always use
571               TCP.
572             </p></dd>
573 <dt><span class="term"><code class="option">+time=T</code></span></dt>
574 <dd><p>
575
576               Sets the timeout for a query to
577               <em class="parameter"><code>T</code></em> seconds.  The default
578               timeout is 5 seconds.
579               An attempt to set <em class="parameter"><code>T</code></em> to less
580               than 1 will result
581               in a query timeout of 1 second being applied.
582             </p></dd>
583 <dt><span class="term"><code class="option">+[no]topdown</code></span></dt>
584 <dd><p>
585               When chasing DNSSEC signature chains perform a top-down
586               validation.  Requires dig be compiled with -DDIG_SIGCHASE.
587             </p></dd>
588 <dt><span class="term"><code class="option">+[no]trace</code></span></dt>
589 <dd>
590 <p>
591               Toggle tracing of the delegation path from the root
592               name servers for the name being looked up.  Tracing
593               is disabled by default.  When tracing is enabled,
594               <span><strong class="command">dig</strong></span> makes iterative queries to
595               resolve the name being looked up.  It will follow
596               referrals from the root servers, showing the answer
597               from each server that was used to resolve the lookup.
598             </p>
599 <p>
600               If @server is also specified, it affects only the
601               initial query for the root zone name servers.
602             </p>
603 <p>
604               <span><strong class="command">+dnssec</strong></span> is also set when +trace
605               is set to better emulate the default queries from a
606               nameserver.
607             </p>
608 </dd>
609 <dt><span class="term"><code class="option">+tries=T</code></span></dt>
610 <dd><p>
611               Sets the number of times to try UDP queries to server
612               to <em class="parameter"><code>T</code></em> instead of the default,
613               3.  If <em class="parameter"><code>T</code></em> is less than or equal
614               to zero, the number of tries is silently rounded up
615               to 1.
616             </p></dd>
617 <dt><span class="term"><code class="option">+trusted-key=####</code></span></dt>
618 <dd>
619 <p>
620               Specifies a file containing trusted keys to be used
621               with <code class="option">+sigchase</code>.  Each DNSKEY record
622               must be on its own line.
623             </p>
624 <p>
625               If not specified, <span><strong class="command">dig</strong></span> will look
626               for <code class="filename">/etc/trusted-key.key</code> then
627               <code class="filename">trusted-key.key</code> in the current
628               directory.
629             </p>
630 <p>
631               Requires dig be compiled with -DDIG_SIGCHASE.
632             </p>
633 </dd>
634 <dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
635 <dd><p>
636               Display [do not display] the TTL when printing the
637               record.
638             </p></dd>
639 <dt><span class="term"><code class="option">+[no]vc</code></span></dt>
640 <dd><p>
641               Use [do not use] TCP when querying name servers.  This
642               alternate syntax to <em class="parameter"><code>+[no]tcp</code></em>
643               is provided for backwards compatibility.  The "vc"
644               stands for "virtual circuit".
645             </p></dd>
646 </dl></div>
647 <p>
648
649     </p>
650 </div>
651 <div class="refsect1" lang="en">
652 <a name="id2666846"></a><h2>MULTIPLE QUERIES</h2>
653 <p>
654       The BIND 9 implementation of <span><strong class="command">dig </strong></span>
655       supports
656       specifying multiple queries on the command line (in addition to
657       supporting the <code class="option">-f</code> batch file option).  Each of those
658       queries can be supplied with its own set of flags, options and query
659       options.
660     </p>
661 <p>
662       In this case, each <em class="parameter"><code>query</code></em> argument
663       represent an
664       individual query in the command-line syntax described above.  Each
665       consists of any of the standard options and flags, the name to be
666       looked up, an optional query type and class and any query options that
667       should be applied to that query.
668     </p>
669 <p>
670       A global set of query options, which should be applied to all queries,
671       can also be supplied.  These global query options must precede the
672       first tuple of name, class, type, options, flags, and query options
673       supplied on the command line.  Any global query options (except
674       the <code class="option">+[no]cmd</code> option) can be
675       overridden by a query-specific set of query options.  For example:
676       </p>
677 <pre class="programlisting">
678 dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
679 </pre>
680 <p>
681       shows how <span><strong class="command">dig</strong></span> could be used from the
682       command line
683       to make three lookups: an ANY query for <code class="literal">www.isc.org</code>, a
684       reverse lookup of 127.0.0.1 and a query for the NS records of
685       <code class="literal">isc.org</code>.
686
687       A global query option of <em class="parameter"><code>+qr</code></em> is
688       applied, so
689       that <span><strong class="command">dig</strong></span> shows the initial query it made
690       for each
691       lookup.  The final query has a local query option of
692       <em class="parameter"><code>+noqr</code></em> which means that <span><strong class="command">dig</strong></span>
693       will not print the initial query when it looks up the NS records for
694       <code class="literal">isc.org</code>.
695     </p>
696 </div>
697 <div class="refsect1" lang="en">
698 <a name="id2667000"></a><h2>IDN SUPPORT</h2>
699 <p>
700       If <span><strong class="command">dig</strong></span> has been built with IDN (internationalized
701       domain name) support, it can accept and display non-ASCII domain names.
702       <span><strong class="command">dig</strong></span> appropriately converts character encoding of
703       domain name before sending a request to DNS server or displaying a
704       reply from the server.
705       If you'd like to turn off the IDN support for some reason, defines
706       the <code class="envar">IDN_DISABLE</code> environment variable.
707       The IDN support is disabled if the variable is set when 
708       <span><strong class="command">dig</strong></span> runs.
709     </p>
710 </div>
711 <div class="refsect1" lang="en">
712 <a name="id2667029"></a><h2>FILES</h2>
713 <p><code class="filename">/etc/resolv.conf</code>
714     </p>
715 <p><code class="filename">${HOME}/.digrc</code>
716     </p>
717 </div>
718 <div class="refsect1" lang="en">
719 <a name="id2667118"></a><h2>SEE ALSO</h2>
720 <p><span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
721       <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
722       <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
723       <em class="citetitle">RFC1035</em>.
724     </p>
725 </div>
726 <div class="refsect1" lang="en">
727 <a name="id2667156"></a><h2>BUGS</h2>
728 <p>
729       There are probably too many query options.
730     </p>
731 </div>
732 </div>
733 <div class="navfooter">
734 <hr>
735 <table width="100%" summary="Navigation footer">
736 <tr>
737 <td width="40%" align="left">
738 <a accesskey="p" href="Bv9ARM.ch13.html">Prev</a> </td>
739 <td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch13.html">Up</a></td>
740 <td width="40%" align="right"> <a accesskey="n" href="man.host.html">Next</a>
741 </td>
742 </tr>
743 <tr>
744 <td width="40%" align="left" valign="top">Manual pages </td>
745 <td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
746 <td width="40%" align="right" valign="top"> host</td>
747 </tr>
748 </table>
749 </div>
750 <p style="text-align: center;">BIND 9.9.8-P2 (Extended Support Version)</p>
751 </body>
752 </html>