man.dig.html revision b3cbb2f1ad021349e89807f3492df6e4e679cd56
1d882e9533b20c0e0783e9d17fcd3f5466fa422fcilix - Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
1d882e9533b20c0e0783e9d17fcd3f5466fa422fcilix - Copyright (C) 2000-2003 Internet Software Consortium.
3616fc4f881e624b50093cef5f017751ddf51b07cilix - Permission to use, copy, modify, and distribute this software for any
3616fc4f881e624b50093cef5f017751ddf51b07cilix - purpose with or without fee is hereby granted, provided that the above
1d882e9533b20c0e0783e9d17fcd3f5466fa422fcilix - copyright notice and this permission notice appear in all copies.
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
1d882e9533b20c0e0783e9d17fcd3f5466fa422fcilix - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3616fc4f881e624b50093cef5f017751ddf51b07cilix - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
1d882e9533b20c0e0783e9d17fcd3f5466fa422fcilix - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1d882e9533b20c0e0783e9d17fcd3f5466fa422fcilix - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
1d882e9533b20c0e0783e9d17fcd3f5466fa422fcilix - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1d882e9533b20c0e0783e9d17fcd3f5466fa422fcilix - PERFORMANCE OF THIS SOFTWARE.
3616fc4f881e624b50093cef5f017751ddf51b07cilix<!-- $Id: man.dig.html,v 1.37 2006/12/19 01:35:50 marka Exp $ -->
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
af0cfd3c37dc911b0d44fd4bc533561d32d9bcc2Alex Valavanis<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
d1561c248f49dc3508ae9e6557fc0d371928e394Markus Engel<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<link rel="prev" href="Bv9ARM.ch10.html" title="Manual pages">
5e657c265e2687328f5f9c7bf71a4c6b39bb3be9Liam P. White<link rel="next" href="man.host.html" title="host">
d4c22f866f0c9262e780b7bcbce4c790308e311cDiederik van Lierop<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
47badd0035ae8c9135c51444f3770b17ae504ddaAlex Valavanis<table width="100%" summary="Navigation header">
47badd0035ae8c9135c51444f3770b17ae504ddaAlex Valavanis<tr><th colspan="3" align="center">dig</th></tr>
07390c2aae073d28c5fa1a9ae5c4b3191d1399bfJon A. Cruz<a accesskey="p" href="Bv9ARM.ch10.html">Prev</a>�</td>
07390c2aae073d28c5fa1a9ae5c4b3191d1399bfJon A. Cruz<td width="20%" align="right">�<a accesskey="n" href="man.host.html">Next</a>
833612d1c1e43055c4428afa90dd2b112a439780cilix<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">-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">-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>
833612d1c1e43055c4428afa90dd2b112a439780cilix<div class="cmdsynopsis"><p><code class="command">dig</code> [<code class="option">-h</code>]</p></div>
833612d1c1e43055c4428afa90dd2b112a439780cilix<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
833612d1c1e43055c4428afa90dd2b112a439780cilix (domain information groper) is a flexible tool
833612d1c1e43055c4428afa90dd2b112a439780cilix for interrogating DNS name servers. It performs DNS lookups and
67f112a66b477fe7fb28c644a4deaf0793533838joncruz displays the answers that are returned from the name server(s) that
833612d1c1e43055c4428afa90dd2b112a439780cilix were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
833612d1c1e43055c4428afa90dd2b112a439780cilix troubleshoot DNS problems because of its flexibility, ease of use and
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix clarity of output. Other lookup tools tend to have less functionality
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix than <span><strong class="command">dig</strong></span>.
833612d1c1e43055c4428afa90dd2b112a439780cilix Although <span><strong class="command">dig</strong></span> is normally used with
833612d1c1e43055c4428afa90dd2b112a439780cilix command-line
67f112a66b477fe7fb28c644a4deaf0793533838joncruz arguments, it also has a batch mode of operation for reading lookup
833612d1c1e43055c4428afa90dd2b112a439780cilix requests from a file. A brief summary of its command-line arguments
833612d1c1e43055c4428afa90dd2b112a439780cilix and options is printed when the <code class="option">-h</code> option is given.
36f768de5093f93de10e3b516a2b6f8b74f41513cilix Unlike earlier versions, the BIND9 implementation of
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <span><strong class="command">dig</strong></span> allows multiple lookups to be issued
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix command line.
3616fc4f881e624b50093cef5f017751ddf51b07cilix Unless it is told to query a specific name server,
3616fc4f881e624b50093cef5f017751ddf51b07cilix <span><strong class="command">dig</strong></span> will try each of the servers listed
3616fc4f881e624b50093cef5f017751ddf51b07cilix When no command line arguments or options are given, will perform an
3616fc4f881e624b50093cef5f017751ddf51b07cilix NS query for "." (the root).
3616fc4f881e624b50093cef5f017751ddf51b07cilix It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
833612d1c1e43055c4428afa90dd2b112a439780cilix <code class="filename">${HOME}/.digrc</code>. This file is read and
8b30ff2c4a7189eb3d3eba6a8991d7d1b82e4545Markus Engel any options in it
833612d1c1e43055c4428afa90dd2b112a439780cilix are applied before the command line arguments.
833612d1c1e43055c4428afa90dd2b112a439780cilix The IN and CH class names overlap with the IN and CH top level
8b30ff2c4a7189eb3d3eba6a8991d7d1b82e4545Markus Engel domains names. Either use the <code class="option">-t</code> and
833612d1c1e43055c4428afa90dd2b112a439780cilix <code class="option">-c</code> options to specify the type and class or
3616fc4f881e624b50093cef5f017751ddf51b07cilix use the <code class="option">-q</code> the specify the domain name or
fc336487182165df2bbcbe52800aa3d2e292b7c7Liam P. White use "IN." and "CH." when looking up these top level domains.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix A typical invocation of <span><strong class="command">dig</strong></span> looks like:
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<pre class="programlisting"> dig @server name type </pre>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="constant">server</code></span></dt>
769a6887551cf7ff7bce4b48d3ac303cbea69507Liam P. White is the name or IP address of the name server to query. This can
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix address in dotted-decimal notation or an IPv6
fce046713c4cb905f38bf489cc4a73af425f3037Maximilian Albert address in colon-delimited notation. When the supplied
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <em class="parameter"><code>server</code></em> argument is a
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <span><strong class="command">dig</strong></span> resolves that name before
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix querying that name
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix server. If no <em class="parameter"><code>server</code></em>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix argument is provided,
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <span><strong class="command">dig</strong></span> consults <code class="filename">/etc/resolv.conf</code>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix and queries the name servers listed there. The reply from the
fa90912de6e92199e5fa5957d1d47fd485abc011cilix server that responds is displayed.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="constant">name</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix is the name of the resource record that is to be looked up.
9ba77856a8823f85b53c0a861d220cd0347f2754Liam P. White<dt><span class="term"><code class="constant">type</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix indicates what type of query is required —
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix ANY, A, MX, SIG, etc.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <em class="parameter"><code>type</code></em> can be any valid query
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix type. If no
3616fc4f881e624b50093cef5f017751ddf51b07cilix <em class="parameter"><code>type</code></em> argument is supplied,
3616fc4f881e624b50093cef5f017751ddf51b07cilix <span><strong class="command">dig</strong></span> will perform a lookup for an
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix The <code class="option">-b</code> option sets the source IP address of the query
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix to <em class="parameter"><code>address</code></em>. This must be a valid
3616fc4f881e624b50093cef5f017751ddf51b07cilix one of the host's network interfaces or "0.0.0.0" or "::". An optional
3616fc4f881e624b50093cef5f017751ddf51b07cilix may be specified by appending "#<port>"
3616fc4f881e624b50093cef5f017751ddf51b07cilix The default query class (IN for internet) is overridden by the
2dbe4fd256edcb332443e73c7518117a17cf769aMarc Jeanmougin <code class="option">-c</code> option. <em class="parameter"><code>class</code></em> is
3616fc4f881e624b50093cef5f017751ddf51b07cilix class, such as HS for Hesiod records or CH for CHAOSNET records.
3616fc4f881e624b50093cef5f017751ddf51b07cilix The <code class="option">-f</code> option makes <span><strong class="command">dig </strong></span>
3616fc4f881e624b50093cef5f017751ddf51b07cilix in batch mode by reading a list of lookup requests to process from the
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix file <em class="parameter"><code>filename</code></em>. The file contains a
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix queries, one per line. Each entry in the file should be organised in
b9314c4c1c56471487e07aa368f0e311d29bee58cilix the same way they would be presented as queries to
3616fc4f881e624b50093cef5f017751ddf51b07cilix <span><strong class="command">dig</strong></span> using the command-line interface.
3616fc4f881e624b50093cef5f017751ddf51b07cilix If a non-standard port number is to be queried, the
3616fc4f881e624b50093cef5f017751ddf51b07cilix <code class="option">-p</code> option is used. <em class="parameter"><code>port#</code></em> is
3616fc4f881e624b50093cef5f017751ddf51b07cilix the port number that <span><strong class="command">dig</strong></span> will send its
9ba77856a8823f85b53c0a861d220cd0347f2754Liam P. White instead of the standard DNS port number 53. This option would be used
818c556fe93c630c009124bc6e00d1357e6f1110Diederik van Lierop to test a name server that has been configured to listen for queries
3616fc4f881e624b50093cef5f017751ddf51b07cilix on a non-standard port number.
3616fc4f881e624b50093cef5f017751ddf51b07cilix The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span>
3616fc4f881e624b50093cef5f017751ddf51b07cilix use IPv4 query transport. The <code class="option">-6</code> option forces
818c556fe93c630c009124bc6e00d1357e6f1110Diederik van Lierop <span><strong class="command">dig</strong></span> to only use IPv6 query transport.
818c556fe93c630c009124bc6e00d1357e6f1110Diederik van Lierop The <code class="option">-t</code> option sets the query type to
818c556fe93c630c009124bc6e00d1357e6f1110Diederik van Lierop <em class="parameter"><code>type</code></em>. It can be any valid query type
818c556fe93c630c009124bc6e00d1357e6f1110Diederik van Lierop supported in BIND9. The default query type "A", unless the
818c556fe93c630c009124bc6e00d1357e6f1110Diederik van Lierop <code class="option">-x</code> option is supplied to indicate a reverse lookup.
818c556fe93c630c009124bc6e00d1357e6f1110Diederik van Lierop A zone transfer can be requested by specifying a type of AXFR. When
818c556fe93c630c009124bc6e00d1357e6f1110Diederik van Lierop an incremental zone transfer (IXFR) is required,
818c556fe93c630c009124bc6e00d1357e6f1110Diederik van Lierop <em class="parameter"><code>type</code></em> is set to <code class="literal">ixfr=N</code>.
d4c22f866f0c9262e780b7bcbce4c790308e311cDiederik van Lierop The incremental zone transfer will contain the changes made to the zone
833612d1c1e43055c4428afa90dd2b112a439780cilix since the serial number in the zone's SOA record was
d4c22f866f0c9262e780b7bcbce4c790308e311cDiederik van Lierop <em class="parameter"><code>N</code></em>.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix The <code class="option">-q</code> option sets the query name to
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <em class="parameter"><code>name</code></em>. This useful do distingish the
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <em class="parameter"><code>name</code></em> from other arguments.
833612d1c1e43055c4428afa90dd2b112a439780cilix Reverse lookups - mapping addresses to names - are simplified by the
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <code class="option">-x</code> option. <em class="parameter"><code>addr</code></em> is
833612d1c1e43055c4428afa90dd2b112a439780cilix address in dotted-decimal notation, or a colon-delimited IPv6 address.
17238dd97c572210f1036dd8a7a8657e67bfa9c3Campbell Barton When this option is used, there is no need to provide the
67f112a66b477fe7fb28c644a4deaf0793533838joncruz <em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em> and
833612d1c1e43055c4428afa90dd2b112a439780cilix <em class="parameter"><code>type</code></em> arguments. <span><strong class="command">dig</strong></span>
833612d1c1e43055c4428afa90dd2b112a439780cilix automatically performs a lookup for a name like
3616fc4f881e624b50093cef5f017751ddf51b07cilix <code class="literal">11.12.13.10.in-addr.arpa</code> and sets the
833612d1c1e43055c4428afa90dd2b112a439780cilix query type and
bedbeec8a0241f2d83052b4c9e3f40510b1edb73cilix class to PTR and IN respectively. By default, IPv6 addresses are
833612d1c1e43055c4428afa90dd2b112a439780cilix looked up using nibble format under the IP6.ARPA domain.
833612d1c1e43055c4428afa90dd2b112a439780cilix To use the older RFC1886 method using the IP6.INT domain
833612d1c1e43055c4428afa90dd2b112a439780cilix specify the <code class="option">-i</code> option. Bit string labels (RFC2874)
67f112a66b477fe7fb28c644a4deaf0793533838joncruz are now experimental and are not attempted.
833612d1c1e43055c4428afa90dd2b112a439780cilix To sign the DNS queries sent by <span><strong class="command">dig</strong></span> and
833612d1c1e43055c4428afa90dd2b112a439780cilix responses using transaction signatures (TSIG), specify a TSIG key file
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix using the <code class="option">-k</code> option. You can also specify the TSIG
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix key itself on the command line using the <code class="option">-y</code> option;
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <em class="parameter"><code>hmac</code></em> is the type of the TSIG, default HMAC-MD5,
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <em class="parameter"><code>name</code></em> is the name of the TSIG key and
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <em class="parameter"><code>key</code></em> is the actual key. The key is a
833612d1c1e43055c4428afa90dd2b112a439780cilix encoded string, typically generated by
833612d1c1e43055c4428afa90dd2b112a439780cilix <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix Caution should be taken when using the <code class="option">-y</code> option on
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix multi-user systems as the key can be visible in the output from
833612d1c1e43055c4428afa90dd2b112a439780cilix <span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span>
833612d1c1e43055c4428afa90dd2b112a439780cilix or in the shell's history file. When
833612d1c1e43055c4428afa90dd2b112a439780cilix using TSIG authentication with <span><strong class="command">dig</strong></span>, the name
bedbeec8a0241f2d83052b4c9e3f40510b1edb73cilix server that is queried needs to know the key and algorithm that is
bedbeec8a0241f2d83052b4c9e3f40510b1edb73cilix being used. In BIND, this is done by providing appropriate
833612d1c1e43055c4428afa90dd2b112a439780cilix <span><strong class="command">key</strong></span> and <span><strong class="command">server</strong></span> statements in
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix provides a number of query options which affect
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix the way in which lookups are made and the results displayed. Some of
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix these set or reset flag bits in the query header, some determine which
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix sections of the answer get printed, and others determine the timeout
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix and retry strategies.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix Each query option is identified by a keyword preceded by a plus sign
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix (<code class="literal">+</code>). Some keywords set or reset an
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix option. These may be preceded
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix by the string <code class="literal">no</code> to negate the meaning of
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix that keyword. Other
acd93b79c034f4bcc8ff02de8aa877f70f081881Marc Jeanmougin keywords assign values to options like the timeout interval. They
acd93b79c034f4bcc8ff02de8aa877f70f081881Marc Jeanmougin have the form <code class="option">+keyword=value</code>.
aa9235c966804d9b8f8daa083a2d123d9d47d2bbMarc Jeanmougin The query options are:
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix Use [do not use] TCP when querying name servers. The default
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix behaviour is to use UDP unless an AXFR or IXFR query is
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix requested, in
c4ae5c46c1d9c171f96e47e81f2f0f5f0e189547cilix which case a TCP connection is used.
833612d1c1e43055c4428afa90dd2b112a439780cilix<dt><span class="term"><code class="option">+[no]vc</code></span></dt>
833612d1c1e43055c4428afa90dd2b112a439780cilix Use [do not use] TCP when querying name servers. This alternate
833612d1c1e43055c4428afa90dd2b112a439780cilix syntax to <em class="parameter"><code>+[no]tcp</code></em> is
833612d1c1e43055c4428afa90dd2b112a439780cilix provided for backwards
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix compatibility. The "vc" stands for "virtual circuit".
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
fc336487182165df2bbcbe52800aa3d2e292b7c7Liam P. White Ignore truncation in UDP responses instead of retrying with TCP.
fbdfd8486b6e079ebac503d948d77131bffaa600cilix default, TCP retries are performed.
bbbbbd459609704904e6c228f27b5db2271b7dd4Markus Engel<dt><span class="term"><code class="option">+domain=somename</code></span></dt>
07390c2aae073d28c5fa1a9ae5c4b3191d1399bfJon A. Cruz Set the search list to contain the single domain
fbdfd8486b6e079ebac503d948d77131bffaa600cilix <em class="parameter"><code>somename</code></em>, as if specified in
bbbbbd459609704904e6c228f27b5db2271b7dd4Markus Engel <span><strong class="command">domain</strong></span> directive in
8b30ff2c4a7189eb3d3eba6a8991d7d1b82e4545Markus Engel <code class="filename">/etc/resolv.conf</code>, and enable
fbdfd8486b6e079ebac503d948d77131bffaa600cilix search list
fbdfd8486b6e079ebac503d948d77131bffaa600cilix processing as if the <em class="parameter"><code>+search</code></em>
bbbbbd459609704904e6c228f27b5db2271b7dd4Markus Engel option were given.
bbbbbd459609704904e6c228f27b5db2271b7dd4Markus Engel<dt><span class="term"><code class="option">+[no]search</code></span></dt>
fbdfd8486b6e079ebac503d948d77131bffaa600cilix Use [do not use] the search list defined by the searchlist or
fbdfd8486b6e079ebac503d948d77131bffaa600cilix directive in <code class="filename">resolv.conf</code> (if
833612d1c1e43055c4428afa90dd2b112a439780cilix The search list is not used by default.
833612d1c1e43055c4428afa90dd2b112a439780cilix<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
8b30ff2c4a7189eb3d3eba6a8991d7d1b82e4545Markus Engel Perform [do not perform] a search showing intermediate
8b30ff2c4a7189eb3d3eba6a8991d7d1b82e4545Markus Engel<dt><span class="term"><code class="option">+[no]defname</code></span></dt>
8b30ff2c4a7189eb3d3eba6a8991d7d1b82e4545Markus Engel Deprecated, treated as a synonym for <em class="parameter"><code>+[no]search</code></em>
833612d1c1e43055c4428afa90dd2b112a439780cilix<dt><span class="term"><code class="option">+[no]aaonly</code></span></dt>
e243dcc81f91e3c087610302fc55562d5749e5d8cilix Sets the "aa" flag in the query.
e243dcc81f91e3c087610302fc55562d5749e5d8cilix<dt><span class="term"><code class="option">+[no]aaflag</code></span></dt>
e243dcc81f91e3c087610302fc55562d5749e5d8cilix A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
e243dcc81f91e3c087610302fc55562d5749e5d8cilix<dt><span class="term"><code class="option">+[no]adflag</code></span></dt>
e243dcc81f91e3c087610302fc55562d5749e5d8cilix Set [do not set] the AD (authentic data) bit in the query. The
e243dcc81f91e3c087610302fc55562d5749e5d8cilix currently has a standard meaning only in responses, not in
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix but the ability to set the bit in the query is provided for
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix completeness.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="option">+[no]cdflag</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix Set [do not set] the CD (checking disabled) bit in the query.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix requests the server to not perform DNSSEC validation of
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="option">+[no]cl</code></span></dt>
e243dcc81f91e3c087610302fc55562d5749e5d8cilix Display [do not display] the CLASS when printing the record.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
e243dcc81f91e3c087610302fc55562d5749e5d8cilix Display [do not display] the TTL when printing the record.
e243dcc81f91e3c087610302fc55562d5749e5d8cilix<dt><span class="term"><code class="option">+[no]recurse</code></span></dt>
e243dcc81f91e3c087610302fc55562d5749e5d8cilix Toggle the setting of the RD (recursion desired) bit in the
e243dcc81f91e3c087610302fc55562d5749e5d8cilix This bit is set by default, which means <span><strong class="command">dig</strong></span>
e243dcc81f91e3c087610302fc55562d5749e5d8cilix normally sends recursive queries. Recursion is automatically
e243dcc81f91e3c087610302fc55562d5749e5d8cilix when the <em class="parameter"><code>+nssearch</code></em> or
833612d1c1e43055c4428afa90dd2b112a439780cilix <em class="parameter"><code>+trace</code></em> query options are
833612d1c1e43055c4428afa90dd2b112a439780cilix<dt><span class="term"><code class="option">+[no]nssearch</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix When this option is set, <span><strong class="command">dig</strong></span>
833612d1c1e43055c4428afa90dd2b112a439780cilix attempts to find the
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix authoritative name servers for the zone containing the name
3616fc4f881e624b50093cef5f017751ddf51b07cilix looked up and display the SOA record that each name server has
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="option">+[no]trace</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix Toggle tracing of the delegation path from the root name servers
e243dcc81f91e3c087610302fc55562d5749e5d8cilix the name being looked up. Tracing is disabled by default. When
833612d1c1e43055c4428afa90dd2b112a439780cilix tracing is enabled, <span><strong class="command">dig</strong></span> makes
833612d1c1e43055c4428afa90dd2b112a439780cilix iterative queries to
833612d1c1e43055c4428afa90dd2b112a439780cilix resolve the name being looked up. It will follow referrals from
833612d1c1e43055c4428afa90dd2b112a439780cilix root servers, showing the answer from each server that was used
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix resolve the lookup.
833612d1c1e43055c4428afa90dd2b112a439780cilix<dt><span class="term"><code class="option">+[no]cmd</code></span></dt>
833612d1c1e43055c4428afa90dd2b112a439780cilix toggles the printing of the initial comment in the output
833612d1c1e43055c4428afa90dd2b112a439780cilix identifying
3616fc4f881e624b50093cef5f017751ddf51b07cilix the version of <span><strong class="command">dig</strong></span> and the query
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix options that have
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix been applied. This comment is printed by default.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="option">+[no]short</code></span></dt>
3616fc4f881e624b50093cef5f017751ddf51b07cilix Provide a terse answer. The default is to print the answer in a
3616fc4f881e624b50093cef5f017751ddf51b07cilix verbose form.
3616fc4f881e624b50093cef5f017751ddf51b07cilix<dt><span class="term"><code class="option">+[no]identify</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix Show [or do not show] the IP address and port number that
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix supplied the
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix answer when the <em class="parameter"><code>+short</code></em> option
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix is enabled. If
769a6887551cf7ff7bce4b48d3ac303cbea69507Liam P. White short form answers are requested, the default is not to show the
acd93b79c034f4bcc8ff02de8aa877f70f081881Marc Jeanmougin source address and port number of the server that provided the
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz Toggle the display of comment lines in the output. The default
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz print comments.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix This query option toggles the printing of statistics: when the
3616fc4f881e624b50093cef5f017751ddf51b07cilix was made, the size of the reply and so on. The default
3616fc4f881e624b50093cef5f017751ddf51b07cilix behaviour is
3616fc4f881e624b50093cef5f017751ddf51b07cilix to print the query statistics.
3616fc4f881e624b50093cef5f017751ddf51b07cilix<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix Print [do not print] the query as it is sent.
3616fc4f881e624b50093cef5f017751ddf51b07cilix By default, the query is not printed.
3616fc4f881e624b50093cef5f017751ddf51b07cilix<dt><span class="term"><code class="option">+[no]question</code></span></dt>
3616fc4f881e624b50093cef5f017751ddf51b07cilix Print [do not print] the question section of a query when an
3616fc4f881e624b50093cef5f017751ddf51b07cilix returned. The default is to print the question section as a
3616fc4f881e624b50093cef5f017751ddf51b07cilix<dt><span class="term"><code class="option">+[no]answer</code></span></dt>
3616fc4f881e624b50093cef5f017751ddf51b07cilix Display [do not display] the answer section of a reply. The
3616fc4f881e624b50093cef5f017751ddf51b07cilix is to display it.
3616fc4f881e624b50093cef5f017751ddf51b07cilix<dt><span class="term"><code class="option">+[no]authority</code></span></dt>
3616fc4f881e624b50093cef5f017751ddf51b07cilix Display [do not display] the authority section of a reply. The
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix default is to display it.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="option">+[no]additional</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix Display [do not display] the additional section of a reply.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix The default is to display it.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="option">+[no]all</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix Set or clear all display flags.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="option">+time=T</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix Sets the timeout for a query to
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <em class="parameter"><code>T</code></em> seconds. The default time
3616fc4f881e624b50093cef5f017751ddf51b07cilix out is 5 seconds.
3616fc4f881e624b50093cef5f017751ddf51b07cilix An attempt to set <em class="parameter"><code>T</code></em> to less
3616fc4f881e624b50093cef5f017751ddf51b07cilix than 1 will result
3616fc4f881e624b50093cef5f017751ddf51b07cilix in a query timeout of 1 second being applied.
833612d1c1e43055c4428afa90dd2b112a439780cilix<dt><span class="term"><code class="option">+tries=T</code></span></dt>
833612d1c1e43055c4428afa90dd2b112a439780cilix Sets the number of times to try UDP queries to server to
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <em class="parameter"><code>T</code></em> instead of the default, 3.
833612d1c1e43055c4428afa90dd2b112a439780cilix <em class="parameter"><code>T</code></em> is less than or equal to
833612d1c1e43055c4428afa90dd2b112a439780cilix zero, the number of
833612d1c1e43055c4428afa90dd2b112a439780cilix tries is silently rounded up to 1.
c4ae5c46c1d9c171f96e47e81f2f0f5f0e189547cilix<dt><span class="term"><code class="option">+retry=T</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix Sets the number of times to retry UDP queries to server to
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <em class="parameter"><code>T</code></em> instead of the default, 2.
833612d1c1e43055c4428afa90dd2b112a439780cilix <em class="parameter"><code>+tries</code></em>, this does not include
833612d1c1e43055c4428afa90dd2b112a439780cilix the initial
b9314c4c1c56471487e07aa368f0e311d29bee58cilix<dt><span class="term"><code class="option">+ndots=D</code></span></dt>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix Set the number of dots that have to appear in
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em> for it to be
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix considered absolute. The default value is that defined using
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix ndots statement in <code class="filename">/etc/resolv.conf</code>, or 1 if no
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix ndots statement is present. Names with fewer dots are
e9b6af083e34e2397a8ddbe9781920733d09d151Ted Gould interpreted as
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix relative names and will be searched for in the domains listed in
b9314c4c1c56471487e07aa368f0e311d29bee58cilix <code class="option">search</code> or <code class="option">domain</code> directive in
09ba3247163582bf2e30e17c4c154aa259ce038acilix<dt><span class="term"><code class="option">+bufsize=B</code></span></dt>
209527815f6ad1b81d21bb3188947aef3d845010cilix Set the UDP message buffer size advertised using EDNS0 to
769a6887551cf7ff7bce4b48d3ac303cbea69507Liam P. White <em class="parameter"><code>B</code></em> bytes. The maximum and minimum sizes
833612d1c1e43055c4428afa90dd2b112a439780cilix of this buffer are 65535 and 0 respectively. Values outside
36f768de5093f93de10e3b516a2b6f8b74f41513cilix this range are rounded up or down appropriately.
36f768de5093f93de10e3b516a2b6f8b74f41513cilix Values other than zero will cause a EDNS query to be sent.
bedbeec8a0241f2d83052b4c9e3f40510b1edb73cilix<dt><span class="term"><code class="option">+edns=#</code></span></dt>
833612d1c1e43055c4428afa90dd2b112a439780cilix Specify the EDNS version to query with. Valid values
833612d1c1e43055c4428afa90dd2b112a439780cilix are 0 to 255. Setting the EDNS version will cause a
833612d1c1e43055c4428afa90dd2b112a439780cilix EDNS query to be sent. <code class="option">+noedns</code> clears the
833612d1c1e43055c4428afa90dd2b112a439780cilix remembered EDNS version.
833612d1c1e43055c4428afa90dd2b112a439780cilix<dt><span class="term"><code class="option">+[no]multiline</code></span></dt>
833612d1c1e43055c4428afa90dd2b112a439780cilix Print records like the SOA records in a verbose multi-line
833612d1c1e43055c4428afa90dd2b112a439780cilix format with human-readable comments. The default is to print
833612d1c1e43055c4428afa90dd2b112a439780cilix each record on a single line, to facilitate machine parsing
833612d1c1e43055c4428afa90dd2b112a439780cilix of the <span><strong class="command">dig</strong></span> output.
833612d1c1e43055c4428afa90dd2b112a439780cilix<dt><span class="term"><code class="option">+[no]fail</code></span></dt>
833612d1c1e43055c4428afa90dd2b112a439780cilix Do not try the next server if you receive a SERVFAIL. The
833612d1c1e43055c4428afa90dd2b112a439780cilix to not try the next server which is the reverse of normal stub
833612d1c1e43055c4428afa90dd2b112a439780cilix<dt><span class="term"><code class="option">+[no]besteffort</code></span></dt>
2dbe4fd256edcb332443e73c7518117a17cf769aMarc Jeanmougin Attempt to display the contents of messages which are malformed.
833612d1c1e43055c4428afa90dd2b112a439780cilix The default is to not display malformed answers.
36f768de5093f93de10e3b516a2b6f8b74f41513cilix<dt><span class="term"><code class="option">+[no]dnssec</code></span></dt>
2dbe4fd256edcb332443e73c7518117a17cf769aMarc Jeanmougin Requests DNSSEC records be sent by setting the DNSSEC OK bit
2dbe4fd256edcb332443e73c7518117a17cf769aMarc Jeanmougin in the OPT record in the additional section of the query.
833612d1c1e43055c4428afa90dd2b112a439780cilix<dt><span class="term"><code class="option">+[no]sigchase</code></span></dt>
833612d1c1e43055c4428afa90dd2b112a439780cilix Chase DNSSEC signature chains. Requires dig be compiled with
833612d1c1e43055c4428afa90dd2b112a439780cilix -DDIG_SIGCHASE.
833612d1c1e43055c4428afa90dd2b112a439780cilix<dt><span class="term"><code class="option">+trusted-key=####</code></span></dt>
2dbe4fd256edcb332443e73c7518117a17cf769aMarc Jeanmougin Specifies a file containing trusted keys to be used with
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix <code class="option">+sigchase</code>. Each DNSKEY record must be
833612d1c1e43055c4428afa90dd2b112a439780cilix on its own line.
833612d1c1e43055c4428afa90dd2b112a439780cilix If not specified <span><strong class="command">dig</strong></span> will look for
833612d1c1e43055c4428afa90dd2b112a439780cilix <code class="filename">/etc/trusted-key.key</code> then
833612d1c1e43055c4428afa90dd2b112a439780cilix <code class="filename">trusted-key.key</code> in the current directory.
833612d1c1e43055c4428afa90dd2b112a439780cilix Requires dig be compiled with -DDIG_SIGCHASE.
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<dt><span class="term"><code class="option">+[no]topdown</code></span></dt>
2dbe4fd256edcb332443e73c7518117a17cf769aMarc Jeanmougin When chasing DNSSEC signature chains perform a top down
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix Requires dig be compiled with -DDIG_SIGCHASE.
833612d1c1e43055c4428afa90dd2b112a439780cilix The BIND 9 implementation of <span><strong class="command">dig </strong></span>
bedbeec8a0241f2d83052b4c9e3f40510b1edb73cilix specifying multiple queries on the command line (in addition to
833612d1c1e43055c4428afa90dd2b112a439780cilix supporting the <code class="option">-f</code> batch file option). Each of those
2dbe4fd256edcb332443e73c7518117a17cf769aMarc Jeanmougin queries can be supplied with its own set of flags, options and query
833612d1c1e43055c4428afa90dd2b112a439780cilix In this case, each <em class="parameter"><code>query</code></em> argument
833612d1c1e43055c4428afa90dd2b112a439780cilix represent an
833612d1c1e43055c4428afa90dd2b112a439780cilix individual query in the command-line syntax described above. Each
acd93b79c034f4bcc8ff02de8aa877f70f081881Marc Jeanmougin consists of any of the standard options and flags, the name to be
acd93b79c034f4bcc8ff02de8aa877f70f081881Marc Jeanmougin looked up, an optional query type and class and any query options that
aa9235c966804d9b8f8daa083a2d123d9d47d2bbMarc Jeanmougin should be applied to that query.
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz A global set of query options, which should be applied to all queries,
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz can also be supplied. These global query options must precede the
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz first tuple of name, class, type, options, flags, and query options
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz supplied on the command line. Any global query options (except
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz the <code class="option">+[no]cmd</code> option) can be
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix overridden by a query-specific set of query options. For example:
36f768de5093f93de10e3b516a2b6f8b74f41513cilix shows how <span><strong class="command">dig</strong></span> could be used from the
36f768de5093f93de10e3b516a2b6f8b74f41513cilix command line
36f768de5093f93de10e3b516a2b6f8b74f41513cilix to make three lookups: an ANY query for <code class="literal">www.isc.org</code>, a
36f768de5093f93de10e3b516a2b6f8b74f41513cilix reverse lookup of 127.0.0.1 and a query for the NS records of
2dbe4fd256edcb332443e73c7518117a17cf769aMarc Jeanmougin A global query option of <em class="parameter"><code>+qr</code></em> is
36f768de5093f93de10e3b516a2b6f8b74f41513cilix that <span><strong class="command">dig</strong></span> shows the initial query it made
36f768de5093f93de10e3b516a2b6f8b74f41513cilix lookup. The final query has a local query option of
36f768de5093f93de10e3b516a2b6f8b74f41513cilix <em class="parameter"><code>+noqr</code></em> which means that <span><strong class="command">dig</strong></span>
36f768de5093f93de10e3b516a2b6f8b74f41513cilix will not print the initial query when it looks up the NS records for
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz If <span><strong class="command">dig</strong></span> has been built with IDN (internationalized
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz domain name) support, it can accept and display non-ASCII domain names.
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz <span><strong class="command">dig</strong></span> appropriately converts character encoding of
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz domain name before sending a request to DNS server or displaying a
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz reply from the server.
f91279be939ce6c33befa6cdb5bc8a99cc5a765cJon A. Cruz If you'd like to turn off the IDN support for some reason, defines
36f768de5093f93de10e3b516a2b6f8b74f41513cilix the <code class="envar">IDN_DISABLE</code> environment variable.
36f768de5093f93de10e3b516a2b6f8b74f41513cilix The IDN support is disabled if the variable is set when
36f768de5093f93de10e3b516a2b6f8b74f41513cilix <span><strong class="command">dig</strong></span> runs.
818c556fe93c630c009124bc6e00d1357e6f1110Diederik van Lierop<p><code class="filename">${HOME}/.digrc</code>
36f768de5093f93de10e3b516a2b6f8b74f41513cilix<p><span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
36f768de5093f93de10e3b516a2b6f8b74f41513cilix <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
36f768de5093f93de10e3b516a2b6f8b74f41513cilix <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
36f768de5093f93de10e3b516a2b6f8b74f41513cilix There are probably too many query options.
2dbe4fd256edcb332443e73c7518117a17cf769aMarc Jeanmougin<table width="100%" summary="Navigation footer">
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<a accesskey="p" href="Bv9ARM.ch10.html">Prev</a>�</td>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch10.html">Up</a></td>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<td width="40%" align="right">�<a accesskey="n" href="man.host.html">Next</a>
4358ff6156766a315e38e72a5c3c83d6d5f7486bcilix<td width="40%" align="left" valign="top">Manual pages�</td>
2dbe4fd256edcb332443e73c7518117a17cf769aMarc Jeanmougin<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
2dbe4fd256edcb332443e73c7518117a17cf769aMarc Jeanmougin<td width="40%" align="right" valign="top">�host</td>