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