dig.html revision b90c4f0646e61b6cc82bde5a93e400e1015974b8
665a24faf6b3711e4012ac02ae5f0981c093ac1eTinderbox User - Copyright (C) 2004-2011, 2013, 2014 Internet Systems Consortium, Inc. ("ISC")
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews - Copyright (C) 2000-2003 Internet Software Consortium.
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater - Permission to use, copy, modify, and/or distribute this software for any
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson - purpose with or without fee is hereby granted, provided that the above
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson - copyright notice and this permission notice appear in all copies.
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a name="man.dig"></a><div class="titlepage"></div>
b46346eb3026ba4bebc093bc93cfe159131e541eTinderbox User<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>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<div class="cmdsynopsis"><p><code class="command">dig</code> [<code class="option">-h</code>]</p></div>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User<p><span><strong class="command">dig</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein (domain information groper) is a flexible tool
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein for interrogating DNS name servers. It performs DNS lookups and
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein displays the answers that are returned from the name server(s) that
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein troubleshoot DNS problems because of its flexibility, ease of use and
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein clarity of output. Other lookup tools tend to have less functionality
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User than <span><strong class="command">dig</strong></span>.
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User Although <span><strong class="command">dig</strong></span> is normally used with
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein command-line
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein arguments, it also has a batch mode of operation for reading lookup
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein requests from a file. A brief summary of its command-line arguments
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein and options is printed when the <code class="option">-h</code> option is given.
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews Unlike earlier versions, the BIND 9 implementation of
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">dig</strong></span> allows multiple lookups to be issued
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein command line.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Unless it is told to query a specific name server,
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">dig</strong></span> will try each of the servers listed in
03c0efc6892ef2ed17338b2ecbb2c5f23fbad0c9Tinderbox User <code class="filename">/etc/resolv.conf</code>. If no usable server addresses
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User are found, <span><strong class="command">dig</strong></span> will send the query to the local
b49958b502ee45022010a0b1bed3968f598895a4Automatic Updater When no command line arguments or options are given,
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">dig</strong></span> will perform an NS query for "." (the root).
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <code class="filename">${HOME}/.digrc</code>. This file is read and
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein any options in it
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein are applied before the command line arguments.
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark Andrews The IN and CH class names overlap with the IN and CH top level
665a24faf6b3711e4012ac02ae5f0981c093ac1eTinderbox User domain names. Either use the <code class="option">-t</code> and
b49958b502ee45022010a0b1bed3968f598895a4Automatic Updater <code class="option">-c</code> options to specify the type and class,
b49958b502ee45022010a0b1bed3968f598895a4Automatic Updater use the <code class="option">-q</code> the specify the domain name, or
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark Andrews use "IN." and "CH." when looking up these top level domains.
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User A typical invocation of <span><strong class="command">dig</strong></span> looks like:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<pre class="programlisting"> dig @server name type </pre>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">server</code></span></dt>
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User is the name or IP address of the name server to query. This
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User can be an IPv4 address in dotted-decimal notation or an IPv6
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User address in colon-delimited notation. When the supplied
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User <em class="parameter"><code>server</code></em> argument is a hostname,
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User <span><strong class="command">dig</strong></span> resolves that name before querying
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User that name server.
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User If no <em class="parameter"><code>server</code></em> argument is
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User provided, <span><strong class="command">dig</strong></span> consults
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User <code class="filename">/etc/resolv.conf</code>; if an
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User address is found there, it queries the name server at
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User that address. If either of the <code class="option">-4</code> or
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User <code class="option">-6</code> options are in use, then
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User only addresses for the corresponding transport
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User will be tried. If no usable addresses are found,
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User <span><strong class="command">dig</strong></span> will send the query to the
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User local host. The reply from the name server that
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User responds is displayed.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">name</code></span></dt>
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User is the name of the resource record that is to be looked up.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">type</code></span></dt>
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User indicates what type of query is required —
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User ANY, A, MX, SIG, etc.
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User <em class="parameter"><code>type</code></em> can be any valid query
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User <em class="parameter"><code>type</code></em> argument is supplied,
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User <span><strong class="command">dig</strong></span> will perform a lookup for an
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The <code class="option">-b</code> option sets the source IP address of the query
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein to <em class="parameter"><code>address</code></em>. This must be a valid
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein one of the host's network interfaces or "0.0.0.0" or "::". An optional
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein may be specified by appending "#<port>"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The default query class (IN for internet) is overridden by the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <code class="option">-c</code> option. <em class="parameter"><code>class</code></em> is
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark Andrews class, such as HS for Hesiod records or CH for Chaosnet records.
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User The <code class="option">-f</code> option makes <span><strong class="command">dig </strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein in batch mode by reading a list of lookup requests to process from the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein file <em class="parameter"><code>filename</code></em>. The file contains a
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews queries, one per line. Each entry in the file should be organized in
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the same way they would be presented as queries to
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">dig</strong></span> using the command-line interface.
1c09d68dfd18b6e839c8cd68b78c11b3ccca4160Automatic Updater The <code class="option">-m</code> option enables memory usage debugging.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein If a non-standard port number is to be queried, the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <code class="option">-p</code> option is used. <em class="parameter"><code>port#</code></em> is
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User the port number that <span><strong class="command">dig</strong></span> will send its
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein instead of the standard DNS port number 53. This option would be used
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein to test a name server that has been configured to listen for queries
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein on a non-standard port number.
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein use IPv4 query transport. The <code class="option">-6</code> option forces
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">dig</strong></span> to only use IPv6 query transport.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The <code class="option">-t</code> option sets the query type to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>type</code></em>. It can be any valid query type
f6da30bb5447c23d880b09f601441e70c5313557Mark Andrews supported in BIND 9. The default query type is "A", unless the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <code class="option">-x</code> option is supplied to indicate a reverse lookup.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein A zone transfer can be requested by specifying a type of AXFR. When
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein an incremental zone transfer (IXFR) is required,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>type</code></em> is set to <code class="literal">ixfr=N</code>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The incremental zone transfer will contain the changes made to the zone
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein since the serial number in the zone's SOA record was
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews The <code class="option">-q</code> option sets the query name to
665a24faf6b3711e4012ac02ae5f0981c093ac1eTinderbox User <em class="parameter"><code>name</code></em>. This is useful to distinguish the
8c9957e63274e6ea44d182703116307b1a65dabbMark Andrews <em class="parameter"><code>name</code></em> from other arguments.
b46346eb3026ba4bebc093bc93cfe159131e541eTinderbox User The <code class="option">-v</code> causes <span><strong class="command">dig</strong></span> to
b46346eb3026ba4bebc093bc93cfe159131e541eTinderbox User print the version number and exit.
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews Reverse lookups — mapping addresses to names — are simplified by the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <code class="option">-x</code> option. <em class="parameter"><code>addr</code></em> is
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein address in dotted-decimal notation, or a colon-delimited IPv6 address.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein When this option is used, there is no need to provide the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em> and
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <em class="parameter"><code>type</code></em> arguments. <span><strong class="command">dig</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein automatically performs a lookup for a name like
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <code class="literal">11.12.13.10.in-addr.arpa</code> and sets the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein query type and
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein class to PTR and IN respectively. By default, IPv6 addresses are
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein looked up using nibble format under the IP6.ARPA domain.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein To use the older RFC1886 method using the IP6.INT domain
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein specify the <code class="option">-i</code> option. Bit string labels (RFC2874)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein are now experimental and are not attempted.
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User To sign the DNS queries sent by <span><strong class="command">dig</strong></span> and
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein responses using transaction signatures (TSIG), specify a TSIG key file
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein using the <code class="option">-k</code> option. You can also specify the TSIG
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein key itself on the command line using the <code class="option">-y</code> option;
7329012471d165cd3dc4180ad2a0a43de91e7f01Mark Andrews <em class="parameter"><code>hmac</code></em> is the type of the TSIG, default HMAC-MD5,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>name</code></em> is the name of the TSIG key and
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>key</code></em> is the actual key. The key is a
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein encoded string, typically generated by
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Caution should be taken when using the <code class="option">-y</code> option on
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein multi-user systems as the key can be visible in the output from
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein or in the shell's history file. When
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User using TSIG authentication with <span><strong class="command">dig</strong></span>, the name
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein server that is queried needs to know the key and algorithm that is
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein being used. In BIND, this is done by providing appropriate
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">key</strong></span> and <span><strong class="command">server</strong></span> statements in
b46346eb3026ba4bebc093bc93cfe159131e541eTinderbox User<a name="id2544009"></a><h2>QUERY OPTIONS</h2>
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User<p><span><strong class="command">dig</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein provides a number of query options which affect
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the way in which lookups are made and the results displayed. Some of
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein these set or reset flag bits in the query header, some determine which
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein sections of the answer get printed, and others determine the timeout
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein and retry strategies.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Each query option is identified by a keyword preceded by a plus sign
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein (<code class="literal">+</code>). Some keywords set or reset an
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein option. These may be preceded
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein by the string <code class="literal">no</code> to negate the meaning of
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein that keyword. Other
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein keywords assign values to options like the timeout interval. They
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein have the form <code class="option">+keyword=value</code>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The query options are:
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]aaflag</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]aaonly</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Sets the "aa" flag in the query.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]additional</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Display [do not display] the additional section of a
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User reply. The default is to display it.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]adflag</code></span></dt>
370c55dfcdc559b8761ef3eb4921498580caf14cAutomatic Updater Set [do not set] the AD (authentic data) bit in the
370c55dfcdc559b8761ef3eb4921498580caf14cAutomatic Updater query. This requests the server to return whether
370c55dfcdc559b8761ef3eb4921498580caf14cAutomatic Updater all of the answer and authority sections have all
370c55dfcdc559b8761ef3eb4921498580caf14cAutomatic Updater been validated as secure according to the security
370c55dfcdc559b8761ef3eb4921498580caf14cAutomatic Updater policy of the server. AD=1 indicates that all records
370c55dfcdc559b8761ef3eb4921498580caf14cAutomatic Updater have been validated as secure and the answer is not
370c55dfcdc559b8761ef3eb4921498580caf14cAutomatic Updater from a OPT-OUT range. AD=0 indicate that some part
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater of the answer was insecure or not validated. This
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater bit is set by default.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]all</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Set or clear all display flags.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]answer</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Display [do not display] the answer section of a
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User reply. The default is to display it.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]authority</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Display [do not display] the authority section of a
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User reply. The default is to display it.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]besteffort</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Attempt to display the contents of messages which are
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User malformed. The default is to not display malformed
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+bufsize=B</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Set the UDP message buffer size advertised using EDNS0
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User to <em class="parameter"><code>B</code></em> bytes. The maximum and
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User minimum sizes of this buffer are 65535 and 0 respectively.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Values outside this range are rounded up or down
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User appropriately. Values other than zero will cause a
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User EDNS query to be sent.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]cdflag</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Set [do not set] the CD (checking disabled) bit in
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User the query. This requests the server to not perform
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User DNSSEC validation of responses.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]cl</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Display [do not display] the CLASS when printing the
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]cmd</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Toggles the printing of the initial comment in the
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User output identifying the version of <span><strong class="command">dig</strong></span>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User and the query options that have been applied. This
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User comment is printed by default.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Toggle the display of comment lines in the output.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User The default is to print comments.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]crypto</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Toggle the display of cryptographic fields in DNSSEC
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User records. The contents of these field are unnecessary
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User to debug most DNSSEC validation failures and removing
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User them makes it easier to see the common failures. The
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User default is to display the fields. When omitted they
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User are replaced by the string "[omitted]" or in the
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User DNSKEY case the key id is displayed as the replacement,
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User e.g. "[ key id = value ]".
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]defname</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Deprecated, treated as a synonym for
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <em class="parameter"><code>+[no]search</code></em>
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User<dt><span class="term"><code class="option">+[no]dnssec</code></span></dt>
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User Requests DNSSEC records be sent by setting the DNSSEC
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User OK bit (DO) in the OPT record in the additional section
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User of the query.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+domain=somename</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Set the search list to contain the single domain
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <em class="parameter"><code>somename</code></em>, as if specified in
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User a <span><strong class="command">domain</strong></span> directive in
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <code class="filename">/etc/resolv.conf</code>, and enable
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User search list processing as if the
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <em class="parameter"><code>+search</code></em> option were given.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]edns[=#]</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Specify the EDNS version to query with. Valid values
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User are 0 to 255. Setting the EDNS version will cause
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User a EDNS query to be sent. <code class="option">+noedns</code>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User clears the remembered EDNS version. EDNS is set to
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User 0 by default.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]ednsopt[=code[:value]]</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Specify EDNS option with code point <code class="option">code</code>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User and optionally payload of <code class="option">value</code> as a
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User hexadecimal string. <code class="option">+noednsopt</code>
b90c4f0646e61b6cc82bde5a93e400e1015974b8Tinderbox User clears the EDNS options to be sent.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]expire</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Send an EDNS Expire option.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]fail</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Do not try the next server if you receive a SERVFAIL.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User The default is to not try the next server which is
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User the reverse of normal stub resolver behavior.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]identify</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Show [or do not show] the IP address and port number
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User that supplied the answer when the
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <em class="parameter"><code>+short</code></em> option is enabled. If
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User short form answers are requested, the default is not
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User to show the source address and port number of the
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User server that provided the answer.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Ignore truncation in UDP responses instead of retrying
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User with TCP. By default, TCP retries are performed.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]keepopen</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Keep the TCP socket open between queries and reuse
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User it rather than creating a new TCP socket for each
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User lookup. The default is <code class="option">+nokeepopen</code>.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]multiline</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Print records like the SOA records in a verbose
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User multi-line format with human-readable comments. The
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User default is to print each record on a single line, to
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User facilitate machine parsing of the <span><strong class="command">dig</strong></span>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+ndots=D</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Set the number of dots that have to appear in
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User for it to be considered absolute. The default value
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User is that defined using the ndots statement in
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <code class="filename">/etc/resolv.conf</code>, or 1 if no
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User ndots statement is present. Names with fewer dots
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User are interpreted as relative names and will be searched
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User for in the domains listed in the <code class="option">search</code>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User or <code class="option">domain</code> directive in
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <code class="filename">/etc/resolv.conf</code>.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]nsid</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Include an EDNS name server ID request when sending
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]nssearch</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User When this option is set, <span><strong class="command">dig</strong></span>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User attempts to find the authoritative name servers for
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User the zone containing the name being looked up and
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User display the SOA record that each name server has for
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]onesoa</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Print only one (starting) SOA record when performing
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User an AXFR. The default is to print both the starting
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User and ending SOA records.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Print [do not print] the query as it is sent. By
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User default, the query is not printed.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]question</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Print [do not print] the question section of a query
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User when an answer is returned. The default is to print
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User the question section as a comment.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]recurse</code></span></dt>
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater Toggle the setting of the RD (recursion desired) bit
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater in the query. This bit is set by default, which means
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">dig</strong></span> normally sends recursive
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater queries. Recursion is automatically disabled when
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater the <em class="parameter"><code>+nssearch</code></em> or
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater <em class="parameter"><code>+trace</code></em> query options are used.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+retry=T</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Sets the number of times to retry UDP queries to
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User server to <em class="parameter"><code>T</code></em> instead of the
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User default, 2. Unlike <em class="parameter"><code>+tries</code></em>,
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User this does not include the initial query.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]rrcomments</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Toggle the display of per-record comments in the
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User output (for example, human-readable key information
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User about DNSKEY records). The default is not to print
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User record comments unless multiline mode is active.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]search</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Use [do not use] the search list defined by the
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User searchlist or domain directive in
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <code class="filename">resolv.conf</code> (if any). The search
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User list is not used by default.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]short</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Provide a terse answer. The default is to print the
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User answer in a verbose form.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Perform [do not perform] a search showing intermediate
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]sigchase</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Chase DNSSEC signature chains. Requires dig be
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User compiled with -DDIG_SIGCHASE.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]sit[<span class="optional">=####</span>]</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Send a Source Identity Token EDNS option, with optional
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User value. Replaying a SIT from a previous response will
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User allow the server to identify a previous client. The
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User default is <code class="option">+nosit</code>. Currently using
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User experimental value 65001 for the option code.
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater<dt><span class="term"><code class="option">+split=W</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Split long hex- or base64-formatted fields in resource
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User records into chunks of <em class="parameter"><code>W</code></em>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User characters (where <em class="parameter"><code>W</code></em> is rounded
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User up to the nearest multiple of 4).
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <em class="parameter"><code>+nosplit</code></em> or
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <em class="parameter"><code>+split=0</code></em> causes fields not to
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User be split at all. The default is 56 characters, or
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User 44 characters when multiline mode is active.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User This query option toggles the printing of statistics:
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User when the query was made, the size of the reply and
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User so on. The default behavior is to print the query
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]subnet=addr/prefix</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Send an EDNS Client Subnet option with the speciifed
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User IP address or network prefix.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Use [do not use] TCP when querying name servers. The
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User default behavior is to use UDP unless an
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <code class="literal">ixfr=N</code> query is requested, in which
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User case the default is TCP. AXFR queries always use
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+time=T</code></span></dt>
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User Sets the timeout for a query to
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User <em class="parameter"><code>T</code></em> seconds. The default
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews timeout is 5 seconds.
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User An attempt to set <em class="parameter"><code>T</code></em> to less
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User than 1 will result
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User in a query timeout of 1 second being applied.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]topdown</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User When chasing DNSSEC signature chains perform a top-down
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User validation. Requires dig be compiled with -DDIG_SIGCHASE.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]trace</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Toggle tracing of the delegation path from the root
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User name servers for the name being looked up. Tracing
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User is disabled by default. When tracing is enabled,
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <span><strong class="command">dig</strong></span> makes iterative queries to
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User resolve the name being looked up. It will follow
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User referrals from the root servers, showing the answer
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User from each server that was used to resolve the lookup.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <span><strong class="command">+dnssec</strong></span> is also set when +trace
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User is set to better emulate the default queries from a
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+tries=T</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Sets the number of times to try UDP queries to server
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User to <em class="parameter"><code>T</code></em> instead of the default,
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User 3. If <em class="parameter"><code>T</code></em> is less than or equal
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User to zero, the number of tries is silently rounded up
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+trusted-key=####</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Specifies a file containing trusted keys to be used
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User with <code class="option">+sigchase</code>. Each DNSKEY record
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User must be on its own line.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User If not specified, <span><strong class="command">dig</strong></span> will look
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User for <code class="filename">/etc/trusted-key.key</code> then
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User <code class="filename">trusted-key.key</code> in the current
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Requires dig be compiled with -DDIG_SIGCHASE.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Display [do not display] the TTL when printing the
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]ttlunits</code></span></dt>
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User Display [do not display] the TTL in friendly human-readable
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User time units of "s", "m", "h", "d", and "w", representing
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User seconds, minutes, hours, days and weeks. Implies +ttlid.
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User<dt><span class="term"><code class="option">+[no]vc</code></span></dt>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User Use [do not use] TCP when querying name servers. This
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User alternate syntax to <em class="parameter"><code>+[no]tcp</code></em>
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User is provided for backwards compatibility. The "vc"
8e16b3078757ba3010c24aef805e9e29ed19518bTinderbox User stands for "virtual circuit".
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User<a name="id2545262"></a><h2>MULTIPLE QUERIES</h2>
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User The BIND 9 implementation of <span><strong class="command">dig </strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein specifying multiple queries on the command line (in addition to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein supporting the <code class="option">-f</code> batch file option). Each of those
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein queries can be supplied with its own set of flags, options and query
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein In this case, each <em class="parameter"><code>query</code></em> argument
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein represent an
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein individual query in the command-line syntax described above. Each
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein consists of any of the standard options and flags, the name to be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein looked up, an optional query type and class and any query options that
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein should be applied to that query.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein A global set of query options, which should be applied to all queries,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein can also be supplied. These global query options must precede the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein first tuple of name, class, type, options, flags, and query options
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein supplied on the command line. Any global query options (except
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the <code class="option">+[no]cmd</code> option) can be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein overridden by a query-specific set of query options. For example:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeindig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User shows how <span><strong class="command">dig</strong></span> could be used from the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein command line
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein to make three lookups: an ANY query for <code class="literal">www.isc.org</code>, a
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein reverse lookup of 127.0.0.1 and a query for the NS records of
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein A global query option of <em class="parameter"><code>+qr</code></em> is
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User that <span><strong class="command">dig</strong></span> shows the initial query it made
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein lookup. The final query has a local query option of
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <em class="parameter"><code>+noqr</code></em> which means that <span><strong class="command">dig</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein will not print the initial query when it looks up the NS records for
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User If <span><strong class="command">dig</strong></span> has been built with IDN (internationalized
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews domain name) support, it can accept and display non-ASCII domain names.
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">dig</strong></span> appropriately converts character encoding of
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews domain name before sending a request to DNS server or displaying a
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews reply from the server.
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews If you'd like to turn off the IDN support for some reason, defines
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews the <code class="envar">IDN_DISABLE</code> environment variable.
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews The IDN support is disabled if the variable is set when
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">dig</strong></span> runs.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><code class="filename">/etc/resolv.conf</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein There are probably too many query options.