d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
71cef386fae61275b03e203825680b39fedaa8c6Tinderbox User - Copyright (C) 2000-2018 Internet Systems Consortium, Inc. ("ISC")
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - This Source Code Form is subject to the terms of the Mozilla Public
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - License, v. 2.0. If a copy of the MPL was not distributed with this
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - file, You can obtain one at http://mozilla.org/MPL/2.0/.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User<link rel="up" href="Bv9ARM.ch13.html" title="Manual pages">
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User<link rel="prev" href="Bv9ARM.ch13.html" title="Manual pages">
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<link rel="next" href="man.mdig.html" title="mdig">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<table width="100%" summary="Navigation header">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<tr><th colspan="3" align="center">dig</th></tr>
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User<a accesskey="p" href="Bv9ARM.ch13.html">Prev</a>�</td>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<th width="60%" align="center">Manual pages</th>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<td width="20%" align="right">�<a accesskey="n" href="man.mdig.html">Next</a>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<a name="man.dig"></a><div class="titlepage"></div>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User — DNS lookup utility
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User [<code class="option">-b <em class="replaceable"><code>address</code></em></code>]
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User [<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User [<code class="option">-f <em class="replaceable"><code>filename</code></em></code>]
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User [<code class="option">-k <em class="replaceable"><code>filename</code></em></code>]
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User [<code class="option">-p <em class="replaceable"><code>port#</code></em></code>]
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User [<code class="option">-q <em class="replaceable"><code>name</code></em></code>]
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User [<code class="option">-t <em class="replaceable"><code>type</code></em></code>]
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User [<code class="option">-x <em class="replaceable"><code>addr</code></em></code>]
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User [<code class="option">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]name:key</code></em></code>]
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User [queryopt...]
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User [global-queryopt...]
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<a name="id-1.14.2.7"></a><h2>DESCRIPTION</h2>
d95b19f839f5bad2d1c25577fd334907bd90656cTinderbox User <p><span class="command"><strong>dig</strong></span> is a flexible tool
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews for interrogating DNS name servers. It performs DNS lookups and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews displays the answers that are returned from the name server(s) that
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt were queried. Most DNS administrators use <span class="command"><strong>dig</strong></span> to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews troubleshoot DNS problems because of its flexibility, ease of use and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews clarity of output. Other lookup tools tend to have less functionality
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt than <span class="command"><strong>dig</strong></span>.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt Although <span class="command"><strong>dig</strong></span> is normally used with
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews command-line
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews arguments, it also has a batch mode of operation for reading lookup
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews requests from a file. A brief summary of its command-line arguments
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews and options is printed when the <code class="option">-h</code> option is given.
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews Unlike earlier versions, the BIND 9 implementation of
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span class="command"><strong>dig</strong></span> allows multiple lookups to be issued
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews command line.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Unless it is told to query a specific name server,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span class="command"><strong>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
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt are found, <span class="command"><strong>dig</strong></span> will send the query to the local
b49958b502ee45022010a0b1bed3968f598895a4Automatic Updater When no command line arguments or options are given,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span class="command"><strong>dig</strong></span> will perform an NS query for "." (the root).
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt It is possible to set per-user defaults for <span class="command"><strong>dig</strong></span> via
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <code class="filename">${HOME}/.digrc</code>. This file is read and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews any options in it
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews 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
9d557856c2a19ec95ee73245f60a92f8675cf5baTinderbox User <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.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<a name="id-1.14.2.8"></a><h2>SIMPLE USAGE</h2>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt A typical invocation of <span class="command"><strong>dig</strong></span> looks like:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<pre class="programlisting"> dig @server name type </pre>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<div class="variablelist"><dl class="variablelist">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span class="command"><strong>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
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt provided, <span class="command"><strong>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,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span class="command"><strong>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.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span class="command"><strong>dig</strong></span> will perform a lookup for an
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <div class="variablelist"><dl class="variablelist">
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User Use IPv4 only.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User Use IPv6 only.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User<dt><span class="term">-b <em class="replaceable"><code>address[<span class="optional">#port</span>]</code></em></span></dt>
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User Set the source IP address of the query.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User The <em class="parameter"><code>address</code></em> must be a valid address on
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User one of the host's network interfaces, or "0.0.0.0" or "::". An
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User optional port may be specified by appending "#<port>"
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User Set the query class. The
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User default <em class="parameter"><code>class</code></em> is IN; other classes
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User are HS for Hesiod records or CH for Chaosnet records.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User<dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt Batch mode: <span class="command"><strong>dig</strong></span> reads a list of lookup
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User requests to process from the
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User given <em class="parameter"><code>file</code></em>. Each line in the file
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User should be organized in the same way they would be
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User presented as queries to
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span class="command"><strong>dig</strong></span> using the command-line interface.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User Do reverse IPv6 lookups using the obsolete RFC1886 IP6.INT
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User domain, which is no longer in use. Obsolete bit string
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User label queries (RFC2874) are not attempted.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User<dt><span class="term">-k <em class="replaceable"><code>keyfile</code></em></span></dt>
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User Sign queries using TSIG using a key read from the given file.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User Key files can be generated using
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <span class="refentrytitle">tsig-keygen</span>(8)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt When using TSIG authentication with <span class="command"><strong>dig</strong></span>,
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User the name server that is queried needs to know the key and
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User algorithm that is being used. In BIND, this is done by
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt providing appropriate <span class="command"><strong>key</strong></span>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt and <span class="command"><strong>server</strong></span> statements in
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User Enable memory usage debugging.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User<dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User Send the query to a non-standard port on the server,
dec590a3deb8e87380a8bd3a77d535dba3729bf6Tinderbox User instead of the default port 53. This option would be used
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User to test a name server that has been configured to listen
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User for queries on a non-standard port number.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User<dt><span class="term">-q <em class="replaceable"><code>name</code></em></span></dt>
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User The domain name to query. This is useful to distinguish
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User the <em class="parameter"><code>name</code></em> from other arguments.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User The resource record type to query. It can be any valid query type
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User supported in BIND 9. The default query type is "A", unless the
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User <code class="option">-x</code> option is supplied to indicate a reverse lookup.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User A zone transfer can be requested by specifying a type of AXFR. When
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User an incremental zone transfer (IXFR) is required, set the
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User <em class="parameter"><code>type</code></em> to <code class="literal">ixfr=N</code>.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User The incremental zone transfer will contain the changes
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User made to the zone since the serial number in the zone's SOA
c71b045cdb935188b3781f6da8039d7bdbc51ad5Tinderbox User Print query times in microseconds instead of milliseconds.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User Print the version number and exit.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User<dt><span class="term">-x <em class="replaceable"><code>addr</code></em></span></dt>
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User Simplified reverse lookups, for mapping addresses to
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User names. The <em class="parameter"><code>addr</code></em> is an IPv4 address
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User in dotted-decimal notation, or a colon-delimited IPv6
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User address. When the <code class="option">-x</code> is used, there is no
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User need to provide
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User the <em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em>
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User and <em class="parameter"><code>type</code></em>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt arguments. <span class="command"><strong>dig</strong></span> automatically performs a
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User lookup for a name like
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User <code class="literal">94.2.0.192.in-addr.arpa</code> and sets the
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User query type and class to PTR and IN respectively. IPv6
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User addresses are looked up using nibble format under the
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User IP6.ARPA domain (but see also the <code class="option">-i</code>
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User<dt><span class="term">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]keyname:secret</code></em></span></dt>
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User Sign queries using TSIG with the given authentication key.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User <em class="parameter"><code>keyname</code></em> is the name of the key, and
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User <em class="parameter"><code>secret</code></em> is the base64 encoded shared secret.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User <em class="parameter"><code>hmac</code></em> is the name of the key algorithm;
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User valid choices are <code class="literal">hmac-md5</code>,
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User <code class="literal">hmac-sha1</code>, <code class="literal">hmac-sha224</code>,
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User <code class="literal">hmac-sha256</code>, <code class="literal">hmac-sha384</code>, or
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User <code class="literal">hmac-sha512</code>. If <em class="parameter"><code>hmac</code></em>
281ed127e3ed6c7e07792c19c3bc4562f71cfa90Tinderbox User is not specified, the default is <code class="literal">hmac-md5</code>
281ed127e3ed6c7e07792c19c3bc4562f71cfa90Tinderbox User or if MD5 was disabled <code class="literal">hmac-sha256</code>.
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User NOTE: You should use the <code class="option">-k</code> option and
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User avoid the <code class="option">-y</code> option, because
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User with <code class="option">-y</code> the shared secret is supplied as
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User a command line argument in clear text. This may be visible
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User in the output from
0eea9763d88e3edf9b6de585f7cfbb08de977124Tinderbox User or in a history file maintained by the user's shell.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<a name="id-1.14.2.10"></a><h2>QUERY OPTIONS</h2>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <p><span class="command"><strong>dig</strong></span>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews provides a number of query options which affect
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews the way in which lookups are made and the results displayed. Some of
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews these set or reset flag bits in the query header, some determine which
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews sections of the answer get printed, and others determine the timeout
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews and retry strategies.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Each query option is identified by a keyword preceded by a plus sign
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews (<code class="literal">+</code>). Some keywords set or reset an
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews option. These may be preceded
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews by the string <code class="literal">no</code> to negate the meaning of
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews that keyword. Other
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews keywords assign values to options like the timeout interval. They
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews have the form <code class="option">+keyword=value</code>.
335c82aebd0da12b401cfac28bd305da95a4d052Tinderbox User Keywords may be abbreviated, provided the abbreviation is
335c82aebd0da12b401cfac28bd305da95a4d052Tinderbox User unambiguous; for example, <code class="literal">+cd</code> is equivalent
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The query options are:
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<div class="variablelist"><dl class="variablelist">
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>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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.
1879ff49326b49a9e4eadaca193c631409bf8575Tinderbox User<dt><span class="term"><code class="option">+[no]badcookie</code></span></dt>
1879ff49326b49a9e4eadaca193c631409bf8575Tinderbox User Retry lookup with the new server cookie if a
1879ff49326b49a9e4eadaca193c631409bf8575Tinderbox User BADCOOKIE response is received.
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.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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.
335c82aebd0da12b401cfac28bd305da95a4d052Tinderbox User<dt><span class="term"><code class="option">+[no]class</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
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt output identifying the version of <span class="command"><strong>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.
1879ff49326b49a9e4eadaca193c631409bf8575Tinderbox User<dt><span class="term"><code class="option">+[no]cookie[<span class="optional">=####</span>]</code></span></dt>
1879ff49326b49a9e4eadaca193c631409bf8575Tinderbox User Send a COOKIE EDNS option, with optional
1879ff49326b49a9e4eadaca193c631409bf8575Tinderbox User value. Replaying a COOKIE from a previous response will
1879ff49326b49a9e4eadaca193c631409bf8575Tinderbox User allow the server to identify a previous client. The
1879ff49326b49a9e4eadaca193c631409bf8575Tinderbox User default is <code class="option">+cookie</code>.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span class="command"><strong>+cookie</strong></span> is also set when +trace
1879ff49326b49a9e4eadaca193c631409bf8575Tinderbox User is set to better emulate the default queries from a
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
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt a <span class="command"><strong>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.
d9f0b06dc2bba47e3fe63afdf41c638d3517ceffTinderbox User<dt><span class="term"><code class="option">+dscp=value</code></span></dt>
d9f0b06dc2bba47e3fe63afdf41c638d3517ceffTinderbox User Set the DSCP code point to be used when sending the
d9f0b06dc2bba47e3fe63afdf41c638d3517ceffTinderbox User query. Valid DSCP code points are in the range
a24330c4805a224191ab687d0291963062fe3355Tinderbox User [0..63]. By default no code point is explicitly set.
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.
4fe1df3962f1f37304b6789b2d1a33a70fcb0b28Tinderbox User<dt><span class="term"><code class="option">+[no]ednsflags[=#]</code></span></dt>
4fe1df3962f1f37304b6789b2d1a33a70fcb0b28Tinderbox User Set the must-be-zero EDNS flags bits (Z bits) to the
4fe1df3962f1f37304b6789b2d1a33a70fcb0b28Tinderbox User specified value. Decimal, hex and octal encodings are
4fe1df3962f1f37304b6789b2d1a33a70fcb0b28Tinderbox User accepted. Setting a named flag (e.g. DO) will silently be
4fe1df3962f1f37304b6789b2d1a33a70fcb0b28Tinderbox User ignored. By default, no Z bits are set.
def82e8de9ff45e29ab21e5aba9a39539138c1f4Tinderbox User<dt><span class="term"><code class="option">+[no]ednsnegotiation</code></span></dt>
def82e8de9ff45e29ab21e5aba9a39539138c1f4Tinderbox User Enable / disable EDNS version negotiation. By default
def82e8de9ff45e29ab21e5aba9a39539138c1f4Tinderbox User EDNS version negotiation is enabled.
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
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User hexadecimal string. <code class="option">code</code> can be
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User either an EDNS option name (for example,
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User <code class="literal">NSID</code> or <code class="literal">ECS</code>),
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User or an arbitrary numeric value. <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.
a3ff24aaa545c45b8c581b2127d02d735aff8881Tinderbox User<dt><span class="term"><code class="option">+[no]header-only</code></span></dt>
a3ff24aaa545c45b8c581b2127d02d735aff8881Tinderbox User Send a query with a DNS header without a question section.
a3ff24aaa545c45b8c581b2127d02d735aff8881Tinderbox User The default is to add a question section. The query type
a3ff24aaa545c45b8c581b2127d02d735aff8881Tinderbox User and query name are ignored when this is set.
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.
8d72b87657b901cad11c512829242dd6e94d3cf0Tinderbox User<dt><span class="term"><code class="option">+[no]idnout</code></span></dt>
8d72b87657b901cad11c512829242dd6e94d3cf0Tinderbox User Convert [do not convert] puny code on output.
8d72b87657b901cad11c512829242dd6e94d3cf0Tinderbox User This requires IDN SUPPORT to have been enabled at
8d72b87657b901cad11c512829242dd6e94d3cf0Tinderbox User compile time. The default is to convert output.
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>.
0226754d9e537fd56b690d5890cfe215a6c59f89Tinderbox User<dt><span class="term"><code class="option">+[no]mapped</code></span></dt>
0226754d9e537fd56b690d5890cfe215a6c59f89Tinderbox User Allow mapped IPv4 over IPv6 addresses to be used. The
0226754d9e537fd56b690d5890cfe215a6c59f89Tinderbox User default is <code class="option">+mapped</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
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt facilitate machine parsing of the <span class="command"><strong>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
78ec962d9828200d18cd0e41b7d6b9792a74923dTinderbox User <code class="filename">/etc/resolv.conf</code> if
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>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt When this option is set, <span class="command"><strong>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.
e9ed929fd1a190f29391be9c7ae324e7e56ff9c9Tinderbox User<dt><span class="term"><code class="option">+[no]opcode=value</code></span></dt>
e9ed929fd1a190f29391be9c7ae324e7e56ff9c9Tinderbox User Set [restore] the DNS message opcode to the specified
e9ed929fd1a190f29391be9c7ae324e7e56ff9c9Tinderbox User value. The default value is QUERY (0).
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.
335c82aebd0da12b401cfac28bd305da95a4d052Tinderbox User<dt><span class="term"><code class="option">+[no]rdflag</code></span></dt>
335c82aebd0da12b401cfac28bd305da95a4d052Tinderbox User A synonym for <em class="parameter"><code>+[no]recurse</code></em>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span class="command"><strong>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.
78ec962d9828200d18cd0e41b7d6b9792a74923dTinderbox User 'ndots' from <code class="filename">resolv.conf</code> (default 1)
78ec962d9828200d18cd0e41b7d6b9792a74923dTinderbox User which may be overridden by <em class="parameter"><code>+ndots</code></em>
78ec962d9828200d18cd0e41b7d6b9792a74923dTinderbox User determines if the name will be treated as relative
78ec962d9828200d18cd0e41b7d6b9792a74923dTinderbox User or not and hence whether a search is eventually
78ec962d9828200d18cd0e41b7d6b9792a74923dTinderbox User performed or not.
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>
48900a8f62784cce8afb632190512581e1c20d34Tinderbox User Chase DNSSEC signature chains. Requires dig be compiled
48900a8f62784cce8afb632190512581e1c20d34Tinderbox User with -DDIG_SIGCHASE. This feature is deprecated.
48900a8f62784cce8afb632190512581e1c20d34Tinderbox User Use <span class="command"><strong>delv</strong></span> instead.
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.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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
e285c11870c6263cd79b418e104c7eb3e2d96952Tinderbox User<dt><span class="term"><code class="option">+[no]subnet=addr[/prefix-length]</code></span></dt>
6825f304c5f0cc2d4ba22fa2b6f7a431f9c1de59Tinderbox User Send (don't send) an EDNS Client Subnet option with the
e285c11870c6263cd79b418e104c7eb3e2d96952Tinderbox User specified IP address or network prefix.
6825f304c5f0cc2d4ba22fa2b6f7a431f9c1de59Tinderbox User <span class="command"><strong>dig +subnet=0.0.0.0/0</strong></span>, or simply
e285c11870c6263cd79b418e104c7eb3e2d96952Tinderbox User <span class="command"><strong>dig +subnet=0</strong></span> for short, sends an EDNS
cfbd5fb444d23947fd4c6952a25c82108c7df081Tinderbox User CLIENT-SUBNET option with an empty address and a source
e285c11870c6263cd79b418e104c7eb3e2d96952Tinderbox User prefix-length of zero, which signals a resolver that
e285c11870c6263cd79b418e104c7eb3e2d96952Tinderbox User the client's address information must
e285c11870c6263cd79b418e104c7eb3e2d96952Tinderbox User <span class="emphasis"><em>not</em></span> be used when resolving
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
c32570b3191fdfb38a65567b8bb729fdb42ff847Tinderbox User default behavior is to use UDP unless a type
c32570b3191fdfb38a65567b8bb729fdb42ff847Tinderbox User <code class="literal">any</code> or <code class="literal">ixfr=N</code>
c32570b3191fdfb38a65567b8bb729fdb42ff847Tinderbox User query is requested, in which case the default is TCP.
c32570b3191fdfb38a65567b8bb729fdb42ff847Tinderbox User AXFR queries always use TCP.
de283bda6a902c2102a795192eeab3a769001c7dTinderbox User<dt><span class="term"><code class="option">+timeout=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.
48900a8f62784cce8afb632190512581e1c20d34Tinderbox User This feature is deprecated. Use <span class="command"><strong>delv</strong></span> instead.
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,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span class="command"><strong>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.
c0cbdeedb5e119c640f098da1851cb1b9adcc739Tinderbox User If @server is also specified, it affects only the
c0cbdeedb5e119c640f098da1851cb1b9adcc739Tinderbox User initial query for the root zone name servers.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span class="command"><strong>+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
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt If not specified, <span class="command"><strong>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.
48900a8f62784cce8afb632190512581e1c20d34Tinderbox User This feature is deprecated. Use <span class="command"><strong>delv</strong></span> instead.
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.
ee2e5fec653c2ccbe1531d6e0bded2218d6a76afTinderbox User<dt><span class="term"><code class="option">+[no]unknownformat</code></span></dt>
ee2e5fec653c2ccbe1531d6e0bded2218d6a76afTinderbox User Print all RDATA in unknown RR type presentation format
ee2e5fec653c2ccbe1531d6e0bded2218d6a76afTinderbox User (RFC 3597). The default is to print RDATA for known types
ee2e5fec653c2ccbe1531d6e0bded2218d6a76afTinderbox User in the type's presentation format.
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".
def82e8de9ff45e29ab21e5aba9a39539138c1f4Tinderbox User<dt><span class="term"><code class="option">+[no]zflag</code></span></dt>
def82e8de9ff45e29ab21e5aba9a39539138c1f4Tinderbox User Set [do not set] the last unassigned DNS header flag in a
def82e8de9ff45e29ab21e5aba9a39539138c1f4Tinderbox User DNS query. This flag is off by default.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<a name="id-1.14.2.11"></a><h2>MULTIPLE QUERIES</h2>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt The BIND 9 implementation of <span class="command"><strong>dig </strong></span>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews specifying multiple queries on the command line (in addition to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews supporting the <code class="option">-f</code> batch file option). Each of those
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews queries can be supplied with its own set of flags, options and query
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews In this case, each <em class="parameter"><code>query</code></em> argument
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews represent an
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews individual query in the command-line syntax described above. Each
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews consists of any of the standard options and flags, the name to be
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews looked up, an optional query type and class and any query options that
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews should be applied to that query.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews A global set of query options, which should be applied to all queries,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews can also be supplied. These global query options must precede the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews first tuple of name, class, type, options, flags, and query options
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews supplied on the command line. Any global query options (except
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews the <code class="option">+[no]cmd</code> option) can be
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews overridden by a query-specific set of query options. For example:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt shows how <span class="command"><strong>dig</strong></span> could be used from the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews command line
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews to make three lookups: an ANY query for <code class="literal">www.isc.org</code>, a
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews reverse lookup of 127.0.0.1 and a query for the NS records of
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews A global query option of <em class="parameter"><code>+qr</code></em> is
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt that <span class="command"><strong>dig</strong></span> shows the initial query it made
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews lookup. The final query has a local query option of
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <em class="parameter"><code>+noqr</code></em> which means that <span class="command"><strong>dig</strong></span>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews will not print the initial query when it looks up the NS records for
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<a name="id-1.14.2.12"></a><h2>IDN SUPPORT</h2>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt If <span class="command"><strong>dig</strong></span> has been built with IDN (internationalized
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews domain name) support, it can accept and display non-ASCII domain names.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span class="command"><strong>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.
9d557856c2a19ec95ee73245f60a92f8675cf5baTinderbox User The IDN support is disabled if the variable is set when
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <span class="command"><strong>dig</strong></span> runs.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <p><code class="filename">/etc/resolv.conf</code>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <p><code class="filename">${HOME}/.digrc</code>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <span class="refentrytitle">dnssec-keygen</span>(8)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews There are probably too many query options.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<table width="100%" summary="Navigation footer">
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User<a accesskey="p" href="Bv9ARM.ch13.html">Prev</a>�</td>
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch13.html">Up</a></td>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<td width="40%" align="right">�<a accesskey="n" href="man.mdig.html">Next</a>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<td width="40%" align="left" valign="top">Manual pages�</td>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User<td width="40%" align="right" valign="top">�<span class="application">mdig</span>
c313914d0e66b20969215e519bbf2ab4ecf39512Tinderbox User<p xmlns:db="http://docbook.org/ns/docbook" style="text-align: center;">BIND 9.11.3 (Extended Support Version)</p>