dig.html revision e68c527dff2f1f7df2a542f8d6f9181a27e05eb7
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>
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User is the name or IP address of the name server to query. This
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User can be an IPv4 address in dotted-decimal notation or an IPv6
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein address in colon-delimited notation. When the supplied
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User <em class="parameter"><code>server</code></em> argument is a hostname,
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">dig</strong></span> resolves that name before querying
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User that name server.
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User If no <em class="parameter"><code>server</code></em> argument is
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User provided, <span><strong class="command">dig</strong></span> consults
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User <code class="filename">/etc/resolv.conf</code>; if an
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User address is found there, it queries the name server at
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User that address. If either of the <code class="option">-4</code> or
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User <code class="option">-6</code> options are in use, then
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User only addresses for the corresponding transport
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User will be tried. If no usable addresses are found,
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">dig</strong></span> will send the query to the
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User local host. The reply from the name server that
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User responds is displayed.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">name</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 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>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein indicates what type of query is required —
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein ANY, A, MX, SIG, etc.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>type</code></em> can be any valid query
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>type</code></em> argument is supplied,
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox 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:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Use [do not use] TCP when querying name servers. The default
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews behavior is to use UDP unless an AXFR or IXFR query is
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein requested, in
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein which case a TCP connection is used.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]vc</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Use [do not use] TCP when querying name servers. This alternate
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein syntax to <em class="parameter"><code>+[no]tcp</code></em> is
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein provided for backwards
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein compatibility. The "vc" stands for "virtual circuit".
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Ignore truncation in UDP responses instead of retrying with TCP.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein default, TCP retries are performed.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+domain=somename</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Set the search list to contain the single domain
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>somename</code></em>, as if specified in
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">domain</strong></span> directive in
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <code class="filename">/etc/resolv.conf</code>, and enable
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein processing as if the <em class="parameter"><code>+search</code></em>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein option were given.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]search</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Use [do not use] the search list defined by the searchlist or
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein directive in <code class="filename">resolv.conf</code> (if
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The search list is not used by default.
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews Perform [do not perform] a search showing intermediate
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]defname</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Deprecated, treated as a synonym for <em class="parameter"><code>+[no]search</code></em>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]aaonly</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Sets the "aa" flag in the query.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]aaflag</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
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.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]cdflag</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Set [do not set] the CD (checking disabled) bit in the query.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein requests the server to not perform DNSSEC validation of
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]cl</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Display [do not display] the CLASS when printing the record.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Display [do not display] the TTL when printing the record.
e68c527dff2f1f7df2a542f8d6f9181a27e05eb7Tinderbox User<dt><span class="term"><code class="option">+[no]ttlunits</code></span></dt>
e68c527dff2f1f7df2a542f8d6f9181a27e05eb7Tinderbox User Display [do not display] the TTL in friendly human-readable
e68c527dff2f1f7df2a542f8d6f9181a27e05eb7Tinderbox User time units of "s", "m", "h", "d", and "w", representing
e68c527dff2f1f7df2a542f8d6f9181a27e05eb7Tinderbox User seconds, minutes, hours, days and weeks. Implies +ttlid.
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.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]nssearch</code></span></dt>
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User When this option is set, <span><strong class="command">dig</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein attempts to find the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein authoritative name servers for the zone containing the name
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein looked up and display the SOA record that each name server has
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]trace</code></span></dt>
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater Toggle tracing of the delegation path from the root
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater name servers for the name being looked up. Tracing
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater is disabled by default. When tracing is enabled,
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">dig</strong></span> makes iterative queries to
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater resolve the name being looked up. It will follow
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater referrals from the root servers, showing the answer
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater from each server that was used to resolve the lookup.
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User <span><strong class="command">+dnssec</strong></span> is also set when +trace is
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater set to better emulate the default queries from a nameserver.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]cmd</code></span></dt>
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark Andrews Toggles the printing of the initial comment in the output
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User the version of <span><strong class="command">dig</strong></span> and the query
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein options that have
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein been applied. This comment is printed by default.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]short</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Provide a terse answer. The default is to print the answer in a
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein verbose form.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]identify</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Show [or do not show] the IP address and port number that
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein supplied the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein answer when the <em class="parameter"><code>+short</code></em> option
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein is enabled. If
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein short form answers are requested, the default is not to show the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein source address and port number of the server that provided the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Toggle the display of comment lines in the output. The default
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater is to print comments.
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater<dt><span class="term"><code class="option">+[no]rrcomments</code></span></dt>
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater Toggle the display of per-record comments in the output (for
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater example, human-readable key information about DNSKEY records).
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater The default is not to print record comments unless multiline
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater mode is active.
9054d0bb0301aa04ea1ff700ebe4beaf0b573d24Tinderbox User<dt><span class="term"><code class="option">+[no]crypto</code></span></dt>
9054d0bb0301aa04ea1ff700ebe4beaf0b573d24Tinderbox User Toggle the display of cryptographic fields in DNSSEC records.
9054d0bb0301aa04ea1ff700ebe4beaf0b573d24Tinderbox User The contents of these field are unnecessary to debug most DNSSEC
9054d0bb0301aa04ea1ff700ebe4beaf0b573d24Tinderbox User validation failures and removing them makes it easier to see
9054d0bb0301aa04ea1ff700ebe4beaf0b573d24Tinderbox User the common failures. The default is to display the fields.
9054d0bb0301aa04ea1ff700ebe4beaf0b573d24Tinderbox User When omitted they are replaced by the string "[omitted]" or
9054d0bb0301aa04ea1ff700ebe4beaf0b573d24Tinderbox User in the DNSKEY case the key id is displayed as the replacement,
9054d0bb0301aa04ea1ff700ebe4beaf0b573d24Tinderbox User e.g. "[ key id = value ]".
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater<dt><span class="term"><code class="option">+split=W</code></span></dt>
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater Split long hex- or base64-formatted fields in resource
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater records into chunks of <em class="parameter"><code>W</code></em> characters
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater (where <em class="parameter"><code>W</code></em> is rounded up to the nearest
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater multiple of 4).
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater <em class="parameter"><code>+nosplit</code></em> or
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater <em class="parameter"><code>+split=0</code></em> causes fields not to be
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater split at all. The default is 56 characters, or 44 characters
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater when multiline mode is active.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein This query option toggles the printing of statistics: when the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein was made, the size of the reply and so on. The default
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein to print the query statistics.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Print [do not print] the query as it is sent.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein By default, the query is not printed.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]question</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Print [do not print] the question section of a query when an
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein returned. The default is to print the question section as a
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]answer</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Display [do not display] the answer section of a reply. The
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein is to display it.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]authority</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Display [do not display] the authority section of a reply. The
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein default is to display it.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]additional</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Display [do not display] the additional section of a reply.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The default is to display it.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]all</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Set or clear all display flags.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+time=T</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Sets the timeout for a query to
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews <em class="parameter"><code>T</code></em> seconds. The default
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews timeout is 5 seconds.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein An attempt to set <em class="parameter"><code>T</code></em> to less
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein than 1 will result
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein in a query timeout of 1 second being applied.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+tries=T</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Sets the number of times to try UDP queries to server to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>T</code></em> instead of the default, 3.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>T</code></em> is less than or equal to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein zero, the number of
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein tries is silently rounded up to 1.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+retry=T</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Sets the number of times to retry UDP queries to server to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>T</code></em> instead of the default, 2.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>+tries</code></em>, this does not include
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+ndots=D</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Set the number of dots that have to appear in
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em> for it to be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein considered absolute. The default value is that defined using
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein ndots statement in <code class="filename">/etc/resolv.conf</code>, or 1 if no
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein ndots statement is present. Names with fewer dots are
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein interpreted as
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein relative names and will be searched for in the domains listed in
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <code class="option">search</code> or <code class="option">domain</code> directive in
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+bufsize=B</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Set the UDP message buffer size advertised using EDNS0 to
00124ad0406365d39f4b2d1011ef6a76706e9df0Mark Andrews <em class="parameter"><code>B</code></em> bytes. The maximum and minimum sizes
00124ad0406365d39f4b2d1011ef6a76706e9df0Mark Andrews of this buffer are 65535 and 0 respectively. Values outside
00124ad0406365d39f4b2d1011ef6a76706e9df0Mark Andrews this range are rounded up or down appropriately.
00124ad0406365d39f4b2d1011ef6a76706e9df0Mark Andrews Values other than zero will cause a EDNS query to be sent.
00124ad0406365d39f4b2d1011ef6a76706e9df0Mark Andrews<dt><span class="term"><code class="option">+edns=#</code></span></dt>
f39512a917cdd06c611d366603374f6ef570c80eTinderbox User Specify the EDNS version to query with. Valid values
f39512a917cdd06c611d366603374f6ef570c80eTinderbox User are 0 to 255. Setting the EDNS version will cause
f39512a917cdd06c611d366603374f6ef570c80eTinderbox User a EDNS query to be sent. <code class="option">+noedns</code>
f39512a917cdd06c611d366603374f6ef570c80eTinderbox User clears the remembered EDNS version. EDNS is set to
f39512a917cdd06c611d366603374f6ef570c80eTinderbox User 0 by default.
f39512a917cdd06c611d366603374f6ef570c80eTinderbox User<dt><span class="term"><code class="option">+[no]ednsopt[=code[:value]]</code></span></dt>
f39512a917cdd06c611d366603374f6ef570c80eTinderbox User Specify EDNS option with code point <code class="option">code</code>
f39512a917cdd06c611d366603374f6ef570c80eTinderbox User and optionally payload of <code class="option">value</code> as a
f39512a917cdd06c611d366603374f6ef570c80eTinderbox User hexadecimal string. <code class="option">+noednsopt</code>
f39512a917cdd06c611d366603374f6ef570c80eTinderbox User clears the EDNS options to to be sent.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]multiline</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Print records like the SOA records in a verbose multi-line
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein format with human-readable comments. The default is to print
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein each record on a single line, to facilitate machine parsing
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User of the <span><strong class="command">dig</strong></span> output.
6c8a888822cfe45f0525e7496dcaa27d341b6a5eAutomatic Updater<dt><span class="term"><code class="option">+[no]onesoa</code></span></dt>
6c8a888822cfe45f0525e7496dcaa27d341b6a5eAutomatic Updater Print only one (starting) SOA record when performing
6c8a888822cfe45f0525e7496dcaa27d341b6a5eAutomatic Updater an AXFR. The default is to print both the starting and
6c8a888822cfe45f0525e7496dcaa27d341b6a5eAutomatic Updater ending SOA records.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]fail</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Do not try the next server if you receive a SERVFAIL. The
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein to not try the next server which is the reverse of normal stub
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]besteffort</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Attempt to display the contents of messages which are malformed.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The default is to not display malformed answers.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]dnssec</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Requests DNSSEC records be sent by setting the DNSSEC OK bit
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein in the OPT record in the additional section of the query.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]sigchase</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Chase DNSSEC signature chains. Requires dig be compiled with
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein -DDIG_SIGCHASE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+trusted-key=####</code></span></dt>
90153b6536f7a5078e1c157c980110dbcd7fe205Mark Andrews Specifies a file containing trusted keys to be used with
90153b6536f7a5078e1c157c980110dbcd7fe205Mark Andrews <code class="option">+sigchase</code>. Each DNSKEY record must be
90153b6536f7a5078e1c157c980110dbcd7fe205Mark Andrews on its own line.
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User If not specified, <span><strong class="command">dig</strong></span> will look for
90153b6536f7a5078e1c157c980110dbcd7fe205Mark Andrews <code class="filename">/etc/trusted-key.key</code> then
90153b6536f7a5078e1c157c980110dbcd7fe205Mark Andrews <code class="filename">trusted-key.key</code> in the current directory.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Requires dig be compiled with -DDIG_SIGCHASE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="option">+[no]topdown</code></span></dt>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews When chasing DNSSEC signature chains perform a top-down
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Requires dig be compiled with -DDIG_SIGCHASE.
8dc5d5e460da15b2481893687cad7e5b72d0314aAutomatic Updater<dt><span class="term"><code class="option">+[no]nsid</code></span></dt>
8dc5d5e460da15b2481893687cad7e5b72d0314aAutomatic Updater Include an EDNS name server ID request when sending a query.
20489550151432d8d99c3f49629c7c718fdca6abMark Andrews<dt><span class="term"><code class="option">+[no]keepopen</code></span></dt>
20489550151432d8d99c3f49629c7c718fdca6abMark Andrews Keep the TCP socket open between queries and reuse it rather
20489550151432d8d99c3f49629c7c718fdca6abMark Andrews than creating a new TCP socket for each lookup. The default
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User<dt><span class="term"><code class="option">+[no]sit[<span class="optional">=####</span>]</code></span></dt>
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User Send a Source Identity Token EDNS option, with optional value.
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User Replaying a SIT from a previous response will allow the
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User server to identify a previous client. The default is
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User <code class="option">+nosit</code>. Currently using experimental value
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User 65001 for the option code.
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User<dt><span class="term"><code class="option">+[no]subnet=addr/prefix</code></span></dt>
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User Send an EDNS Client Subnet option with the speciifed
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User IP address or network prefix.
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User<dt><span class="term"><code class="option">+[no]expire</code></span></dt>
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User Send an EDNS Expire option. Currently using experimental
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User value 65002 for the option code.
e68c527dff2f1f7df2a542f8d6f9181a27e05eb7Tinderbox User<a name="id2545528"></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.