dig.html revision 00124ad0406365d39f4b2d1011ef6a76706e9df0
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews<!--
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater - Copyright (C) 2000-2003 Internet Software Consortium.
59dd3b3cd954239d98ef52cd26328856cb6f2975Automatic Updater -
59dd3b3cd954239d98ef52cd26328856cb6f2975Automatic Updater - Permission to use, copy, modify, and distribute this software for any
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater - purpose with or without fee is hereby granted, provided that the above
59dd3b3cd954239d98ef52cd26328856cb6f2975Automatic Updater - copyright notice and this permission notice appear in all copies.
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews -
bb93c8542756719b53096b9939e4041d0966026fAutomatic Updater - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater - PERFORMANCE OF THIS SOFTWARE.
5c0fc20d6e59216d9a142409e5fdb498153aeaa5Automatic Updater-->
56874aef380a64a2c183b7c282c3e7a361d67fa1Automatic Updater<!-- $Id: dig.html,v 1.23 2005/06/07 03:06:49 marka Exp $ -->
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<html>
56874aef380a64a2c183b7c282c3e7a361d67fa1Automatic Updater<head>
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<title>dig</title>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
04eba969cb9a54bbda2896db2067c07b2ac5ba16Automatic Updater</head>
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<a name="id2456836"></a><div class="titlepage"></div>
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews<div class="refnamediv">
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews<h2>Name</h2>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<p>dig &#8212; DNS lookup utility</p>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson</div>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<div class="refsynopsisdiv">
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<h2>Synopsis</h2>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<div class="cmdsynopsis"><p><code class="command">dig</code> [@server] [<code class="option">-b <em class="replaceable"><code>address</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-f <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-k <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port#</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-x <em class="replaceable"><code>addr</code></em></code>] [<code class="option">-y <em class="replaceable"><code>name:key</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] [name] [type] [class] [queryopt...]</p></div>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<div class="cmdsynopsis"><p><code class="command">dig</code> [<code class="option">-h</code>]</p></div>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater</div>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<div class="refsect1" lang="en">
fc3576328379e813ccf6b3a6e66d9bb701a79c83Automatic Updater<a name="id2514317"></a><h2>DESCRIPTION</h2>
298c514fff250c1a147176cfbbc1c0ca441d1ea5Automatic Updater<p><span><strong class="command">dig</strong></span>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews (domain information groper) is a flexible tool
bbb069be941f649228760edcc241122933c066d2Automatic Updater for interrogating DNS name servers. It performs DNS lookups and
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews displays the answers that are returned from the name server(s) that
3098364bcdd7a719fbafa5fc8d2cc9e90e5a5989Automatic Updater were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
9d330c054e02f52cefd8dc0e71550b0fe07e077eAutomatic Updater troubleshoot DNS problems because of its flexibility, ease of use and
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews clarity of output. Other lookup tools tend to have less functionality
ca904804e43f663f08eb1ac9d6d617930b9a3cd3Automatic Updater than <span><strong class="command">dig</strong></span>.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews </p>
3a6600c8d319275d73c36eb625f77103cd83e824Automatic Updater<p>
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews Although <span><strong class="command">dig</strong></span> is normally used with
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews command-line
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews arguments, it also has a batch mode of operation for reading lookup
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson requests from a file. A brief summary of its command-line arguments
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews and options is printed when the <code class="option">-h</code> option is given.
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews Unlike earlier versions, the BIND9 implementation of
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews <span><strong class="command">dig</strong></span> allows multiple lookups to be issued
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews from the
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson command line.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews </p>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<p>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson Unless it is told to query a specific name server,
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews <span><strong class="command">dig</strong></span> will try each of the servers listed
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic Updater in
bb93c8542756719b53096b9939e4041d0966026fAutomatic Updater <code class="filename">/etc/resolv.conf</code>.
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont </p>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<p>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont When no command line arguments or options are given, will perform an
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont NS query for "." (the root).
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews </p>
6f046a065e5543f8cd7e2f24991c65d2372f4c8dMark Andrews<p>
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews <code class="filename">${HOME}/.digrc</code>. This file is read and
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews any options in it
4d0520004a9663324a6a30f2d1716565e6d0024cAutomatic Updater are applied before the command line arguments.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews </p>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews</div>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<div class="refsect1" lang="en">
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<a name="id2514373"></a><h2>SIMPLE USAGE</h2>
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews<p>
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews A typical invocation of <span><strong class="command">dig</strong></span> looks like:
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews </p>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<pre class="programlisting"> dig @server name type </pre>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<p>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews where:
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews </p>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<div class="variablelist"><dl>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<dt><span class="term"><code class="constant">server</code></span></dt>
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic Updater<dd><p>
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater is the name or IP address of the name server to query. This can
bb93c8542756719b53096b9939e4041d0966026fAutomatic Updater be an IPv4
bb93c8542756719b53096b9939e4041d0966026fAutomatic Updater address in dotted-decimal notation or an IPv6
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater address in colon-delimited notation. When the supplied
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater <em class="parameter"><code>server</code></em> argument is a
4cda4fd158d6ded5586bacea8c388445d99611eaAutomatic Updater hostname,
3098364bcdd7a719fbafa5fc8d2cc9e90e5a5989Automatic Updater <span><strong class="command">dig</strong></span> resolves that name before
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater querying that name
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic Updater server. If no <em class="parameter"><code>server</code></em>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater argument is provided,
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater <span><strong class="command">dig</strong></span> consults <code class="filename">/etc/resolv.conf</code>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater and queries the name servers listed there. The reply from the
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater name
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater server that responds is displayed.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="constant">name</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater is the name of the resource record that is to be looked up.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="constant">type</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater indicates what type of query is required &#8212;
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater ANY, A, MX, SIG, etc.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <em class="parameter"><code>type</code></em> can be any valid query
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater type. If no
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <em class="parameter"><code>type</code></em> argument is supplied,
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater <span><strong class="command">dig</strong></span> will perform a lookup for an
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater A record.
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater</dl></div>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<p>
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater </p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater</div>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<div class="refsect1" lang="en">
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<a name="id2514532"></a><h2>OPTIONS</h2>
ea935c46e8261ea10621e5b038426539fe8a7cc5Mark Andrews<p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater The <code class="option">-b</code> option sets the source IP address of the query
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater to <em class="parameter"><code>address</code></em>. This must be a valid
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater address on
7262eb86f2b465822206122921e2f357218f0cfdAutomatic Updater one of the host's network interfaces or "0.0.0.0" or "::". An optional
96ea71632887c58a9d00f47eb318bf76b35903c3Mark Andrews port
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater may be specified by appending "#&lt;port&gt;"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p>
bbb069be941f649228760edcc241122933c066d2Automatic Updater<p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater The default query class (IN for internet) is overridden by the
4cda4fd158d6ded5586bacea8c388445d99611eaAutomatic Updater <code class="option">-c</code> option. <em class="parameter"><code>class</code></em> is
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews any valid
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater class, such as HS for Hesiod records or CH for CHAOSNET records.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews </p>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater The <code class="option">-f</code> option makes <span><strong class="command">dig </strong></span>
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater operate
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews in batch mode by reading a list of lookup requests to process from the
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews file <em class="parameter"><code>filename</code></em>. The file contains a
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater number of
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews queries, one per line. Each entry in the file should be organised in
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews the same way they would be presented as queries to
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews <span><strong class="command">dig</strong></span> using the command-line interface.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p>
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater<p>
5c0fc20d6e59216d9a142409e5fdb498153aeaa5Automatic Updater If a non-standard port number is to be queried, the
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <code class="option">-p</code> option is used. <em class="parameter"><code>port#</code></em> is
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater the port number that <span><strong class="command">dig</strong></span> will send its
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater queries
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater instead of the standard DNS port number 53. This option would be used
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington to test a name server that has been configured to listen for queries
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater on a non-standard port number.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p>
5c0fc20d6e59216d9a142409e5fdb498153aeaa5Automatic Updater<p>
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater to only
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater use IPv4 query transport. The <code class="option">-6</code> option forces
00be0f9f61d4c6bf197d000bfa1a6b7e70ea0866Automatic Updater <span><strong class="command">dig</strong></span> to only use IPv6 query transport.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson </p>
00be0f9f61d4c6bf197d000bfa1a6b7e70ea0866Automatic Updater<p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater The <code class="option">-t</code> option sets the query type to
5c0fc20d6e59216d9a142409e5fdb498153aeaa5Automatic Updater <em class="parameter"><code>type</code></em>. It can be any valid query type
ca904804e43f663f08eb1ac9d6d617930b9a3cd3Automatic Updater which is
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater supported in BIND9. The default query type "A", unless the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <code class="option">-x</code> option is supplied to indicate a reverse lookup.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater A zone transfer can be requested by specifying a type of AXFR. When
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews an incremental zone transfer (IXFR) is required,
81c3cb9b921cda22a5a35fa32ca1bf35797b9a36Automatic Updater <em class="parameter"><code>type</code></em> is set to <code class="literal">ixfr=N</code>.
4f5257ba7afbe06e949d1577581de18b22ef6c05Automatic Updater The incremental zone transfer will contain the changes made to the zone
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews since the serial number in the zone's SOA record was
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews <em class="parameter"><code>N</code></em>.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson </p>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Reverse lookups - mapping addresses to names - are simplified by the
8ae412a86ed138263796195eed82a4716e7effcbMark Andrews <code class="option">-x</code> option. <em class="parameter"><code>addr</code></em> is
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater an IPv4
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews address in dotted-decimal notation, or a colon-delimited IPv6 address.
56874aef380a64a2c183b7c282c3e7a361d67fa1Automatic Updater When this option is used, there is no need to provide the
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews <em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em> and
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews <em class="parameter"><code>type</code></em> arguments. <span><strong class="command">dig</strong></span>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews automatically performs a lookup for a name like
56874aef380a64a2c183b7c282c3e7a361d67fa1Automatic Updater <code class="literal">11.12.13.10.in-addr.arpa</code> and sets the
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater query type and
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews class to PTR and IN respectively. By default, IPv6 addresses are
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews looked up using nibble format under the IP6.ARPA domain.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews To use the older RFC1886 method using the IP6.INT domain
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews specify the <code class="option">-i</code> option. Bit string labels (RFC2874)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews are now experimental and are not attempted.
e076d0c88be69de7c190ab924d095e69d2e11f7aAndreas Gustafsson </p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater To sign the DNS queries sent by <span><strong class="command">dig</strong></span> and
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater their
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater responses using transaction signatures (TSIG), specify a TSIG key file
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews using the <code class="option">-k</code> option. You can also specify the TSIG
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson key itself on the command line using the <code class="option">-y</code> option;
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews <em class="parameter"><code>name</code></em> is the name of the TSIG key and
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <em class="parameter"><code>key</code></em> is the actual key. The key is a
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews base-64
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson encoded string, typically generated by
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews Caution should be taken when using the <code class="option">-y</code> option on
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews multi-user systems as the key can be visible in the output from
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington or in the shell's history file. When
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater using TSIG authentication with <span><strong class="command">dig</strong></span>, the name
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater server that is queried needs to know the key and algorithm that is
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater being used. In BIND, this is done by providing appropriate
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <span><strong class="command">key</strong></span> and <span><strong class="command">server</strong></span> statements in
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <code class="filename">named.conf</code>.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater</div>
bc0a4c01beede169df81a3ee5b614ed9e82339dbAutomatic Updater<div class="refsect1" lang="en">
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<a name="id2514715"></a><h2>QUERY OPTIONS</h2>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<p><span><strong class="command">dig</strong></span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington provides a number of query options which affect
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington the way in which lookups are made and the results displayed. Some of
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington these set or reset flag bits in the query header, some determine which
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington sections of the answer get printed, and others determine the timeout
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington and retry strategies.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Each query option is identified by a keyword preceded by a plus sign
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington (<code class="literal">+</code>). Some keywords set or reset an
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington option. These may be preceded
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington by the string <code class="literal">no</code> to negate the meaning of
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington that keyword. Other
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington keywords assign values to options like the timeout interval. They
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington have the form <code class="option">+keyword=value</code>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington The query options are:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<div class="variablelist"><dl>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Use [do not use] TCP when querying name servers. The default
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington behaviour is to use UDP unless an AXFR or IXFR query is
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington requested, in
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington which case a TCP connection is used.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]vc</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Use [do not use] TCP when querying name servers. This alternate
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington syntax to <em class="parameter"><code>+[no]tcp</code></em> is
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington provided for backwards
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington compatibility. The "vc" stands for "virtual circuit".
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Ignore truncation in UDP responses instead of retrying with TCP.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington By
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington default, TCP retries are performed.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+domain=somename</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Set the search list to contain the single domain
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <em class="parameter"><code>somename</code></em>, as if specified in
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington a
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span><strong class="command">domain</strong></span> directive in
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <code class="filename">/etc/resolv.conf</code>, and enable
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington search list
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington processing as if the <em class="parameter"><code>+search</code></em>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington option were given.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]search</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Use [do not use] the search list defined by the searchlist or
0d3490f93bb980fde704055e74c1b508987a5fe4Mark Andrews domain
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington directive in <code class="filename">resolv.conf</code> (if
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington any).
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington The search list is not used by default.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington </p></dd>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<dt><span class="term"><code class="option">+[no]defname</code></span></dt>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Deprecated, treated as a synonym for <em class="parameter"><code>+[no]search</code></em>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews </p></dd>
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington<dt><span class="term"><code class="option">+[no]aaonly</code></span></dt>
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<dd><p>
998b76837ac21e4243a0f97618ea91206be8c028Automatic Updater Sets the "aa" flag in the query.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+[no]aaflag</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]adflag</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
81c3cb9b921cda22a5a35fa32ca1bf35797b9a36Automatic Updater Set [do not set] the AD (authentic data) bit in the query. The
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater AD bit
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater currently has a standard meaning only in responses, not in
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater queries,
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater but the ability to set the bit in the query is provided for
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater completeness.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+[no]cdflag</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
c01dec514a81ecf8c17ca3ef8c3ba95e437295ebAutomatic Updater Set [do not set] the CD (checking disabled) bit in the query.
2d4f33db52cdd5c8bb7cd86b4c5f74205d686646Automatic Updater This
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater requests the server to not perform DNSSEC validation of
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater responses.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+[no]cl</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Display [do not display] the CLASS when printing the record.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Display [do not display] the TTL when printing the record.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]recurse</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Toggle the setting of the RD (recursion desired) bit in the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington query.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington This bit is set by default, which means <span><strong class="command">dig</strong></span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington normally sends recursive queries. Recursion is automatically
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington disabled
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington when the <em class="parameter"><code>+nssearch</code></em> or
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <em class="parameter"><code>+trace</code></em> query options are
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington used.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]nssearch</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington When this option is set, <span><strong class="command">dig</strong></span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington attempts to find the
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews authoritative name servers for the zone containing the name
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews being
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington looked up and display the SOA record that each name server has
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington for the
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater zone.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]trace</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Toggle tracing of the delegation path from the root name servers
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater for
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater the name being looked up. Tracing is disabled by default. When
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater tracing is enabled, <span><strong class="command">dig</strong></span> makes
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington iterative queries to
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater resolve the name being looked up. It will follow referrals from
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington the
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews root servers, showing the answer from each server that was used
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews to
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington resolve the lookup.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]cmd</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington toggles the printing of the initial comment in the output
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington identifying
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington the version of <span><strong class="command">dig</strong></span> and the query
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington options that have
b7aab05edae933e169d5f83c653935b17c7f0a8bMark Andrews been applied. This comment is printed by default.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]short</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews Provide a terse answer. The default is to print the answer in a
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews verbose form.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]identify</code></span></dt>
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Show [or do not show] the IP address and port number that
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington supplied the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington answer when the <em class="parameter"><code>+short</code></em> option
bbb069be941f649228760edcc241122933c066d2Automatic Updater is enabled. If
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington short form answers are requested, the default is not to show the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington source address and port number of the server that provided the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington answer.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Toggle the display of comment lines in the output. The default
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington is to
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington print comments.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater This query option toggles the printing of statistics: when the
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater query
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater was made, the size of the reply and so on. The default
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater behaviour is
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater to print the query statistics.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Print [do not print] the query as it is sent.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater By default, the query is not printed.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+[no]question</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews Print [do not print] the question section of a query when an
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington answer is
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews returned. The default is to print the question section as a
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington comment.
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews </p></dd>
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews<dt><span class="term"><code class="option">+[no]answer</code></span></dt>
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews<dd><p>
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews Display [do not display] the answer section of a reply. The
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews default
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington is to display it.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]authority</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Display [do not display] the authority section of a reply. The
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington default is to display it.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]additional</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Display [do not display] the additional section of a reply.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington The default is to display it.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+[no]all</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Set or clear all display flags.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+time=T</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Sets the timeout for a query to
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <em class="parameter"><code>T</code></em> seconds. The default time
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater out is 5 seconds.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater An attempt to set <em class="parameter"><code>T</code></em> to less
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington than 1 will result
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater in a query timeout of 1 second being applied.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+tries=T</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Sets the number of times to try UDP queries to server to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <em class="parameter"><code>T</code></em> instead of the default, 3.
532d27b39244fadfcf8d8b4593f4c65434c9c664Automatic Updater If
532d27b39244fadfcf8d8b4593f4c65434c9c664Automatic Updater <em class="parameter"><code>T</code></em> is less than or equal to
532d27b39244fadfcf8d8b4593f4c65434c9c664Automatic Updater zero, the number of
532d27b39244fadfcf8d8b4593f4c65434c9c664Automatic Updater tries is silently rounded up to 1.
532d27b39244fadfcf8d8b4593f4c65434c9c664Automatic Updater </p></dd>
532d27b39244fadfcf8d8b4593f4c65434c9c664Automatic Updater<dt><span class="term"><code class="option">+retry=T</code></span></dt>
532d27b39244fadfcf8d8b4593f4c65434c9c664Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Sets the number of times to retry UDP queries to server to
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington <em class="parameter"><code>T</code></em> instead of the default, 2.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington Unlike
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington <em class="parameter"><code>+tries</code></em>, this does not include
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater the initial
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater query.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+ndots=D</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Set the number of dots that have to appear in
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em> for it to be
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater considered absolute. The default value is that defined using
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater the
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater ndots statement in <code class="filename">/etc/resolv.conf</code>, or 1 if no
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater ndots statement is present. Names with fewer dots are
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater interpreted as
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater relative names and will be searched for in the domains listed in
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater the
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <code class="option">search</code> or <code class="option">domain</code> directive in
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <code class="filename">/etc/resolv.conf</code>.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic Updater<dt><span class="term"><code class="option">+bufsize=B</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic Updater Set the UDP message buffer size advertised using EDNS0 to
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <em class="parameter"><code>B</code></em> bytes. The maximum and minimum sizes
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater of this buffer are 65535 and 0 respectively. Values outside
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater this range are rounded up or down appropriately.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Values other than zero will cause a EDNS query to be sent.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+edns=#</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
532d27b39244fadfcf8d8b4593f4c65434c9c664Automatic Updater Specify the EDNS version to query with. Valid values
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington are 0 to 255. Setting the EDNS version will cause a
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater EDNS query to be sent. <code class="option">+noedns</code> clears the
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater remembered EDNS version.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]multiline</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Print records like the SOA records in a verbose multi-line
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington format with human-readable comments. The default is to print
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater each record on a single line, to facilitate machine parsing
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater of the <span><strong class="command">dig</strong></span> output.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+[no]fail</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Do not try the next server if you receive a SERVFAIL. The
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater default is
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater to not try the next server which is the reverse of normal stub
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater resolver
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater behaviour.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+[no]besteffort</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Attempt to display the contents of messages which are malformed.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater The default is to not display malformed answers.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+[no]dnssec</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Requests DNSSEC records be sent by setting the DNSSEC OK bit
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater (DO)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater in the OPT record in the additional section of the query.
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+[no]sigchase</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Chase DNSSEC signature chains. Requires dig be compiled with
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews -DDIG_SIGCHASE.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+trusted-key=####</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Specify a trusted key to be used with
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <code class="option">+sigchase</code>.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Requires dig be compiled with -DDIG_SIGCHASE.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p></dd>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="option">+[no]topdown</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dd><p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater When chasing DNSSEC signature chains perform a top down
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater validation.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Requires dig be compiled with -DDIG_SIGCHASE.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p></dd>
2da2220fe7af2c45724b50b0187523b1fab0cf08Rob Austein</dl></div>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater</div>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<div class="refsect1" lang="en">
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<a name="id2515874"></a><h2>MULTIPLE QUERIES</h2>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater The BIND 9 implementation of <span><strong class="command">dig </strong></span>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater supports
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington specifying multiple queries on the command line (in addition to
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic Updater supporting the <code class="option">-f</code> batch file option). Each of those
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington queries can be supplied with its own set of flags, options and query
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic Updater options.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p>
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic Updater<p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater In this case, each <em class="parameter"><code>query</code></em> argument
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater represent an
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater individual query in the command-line syntax described above. Each
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater consists of any of the standard options and flags, the name to be
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington looked up, an optional query type and class and any query options that
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington should be applied to that query.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington A global set of query options, which should be applied to all queries,
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington can also be supplied. These global query options must precede the
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater first tuple of name, class, type, options, flags, and query options
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater supplied on the command line. Any global query options (except
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington the <code class="option">+[no]cmd</code> option) can be
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater overridden by a query-specific set of query options. For example:
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<pre class="programlisting">
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterdig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater</pre>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater shows how <span><strong class="command">dig</strong></span> could be used from the
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater command line
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington to make three lookups: an ANY query for <code class="literal">www.isc.org</code>, a
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington reverse lookup of 127.0.0.1 and a query for the NS records of
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <code class="literal">isc.org</code>.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater A global query option of <em class="parameter"><code>+qr</code></em> is
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater applied, so
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater that <span><strong class="command">dig</strong></span> shows the initial query it made
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater for each
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater lookup. The final query has a local query option of
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <em class="parameter"><code>+noqr</code></em> which means that <span><strong class="command">dig</strong></span>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater will not print the initial query when it looks up the NS records for
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <code class="literal">isc.org</code>.
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews </p>
f8c47598b87a5eb5ff2ceda6c81d136212d59cefAutomatic Updater</div>
7a6ad11e0185a73984410f3252f3c49c3a301dbdBrian Wellington<div class="refsect1" lang="en">
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<a name="id2515936"></a><h2>FILES</h2>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<p><code class="filename">/etc/resolv.conf</code>
7a6ad11e0185a73984410f3252f3c49c3a301dbdBrian Wellington </p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<p><code class="filename">${HOME}/.digrc</code>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater</div>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<div class="refsect1" lang="en">
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<a name="id2515953"></a><h2>SEE ALSO</h2>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<p><span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <em class="citetitle">RFC1035</em>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington </p>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater</div>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<div class="refsect1" lang="en">
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<a name="id2515990"></a><h2>BUGS</h2>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington There are probably too many query options.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </p>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington</div>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater</div></body>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater</html>
bbb069be941f649228760edcc241122933c066d2Automatic Updater