man.dig.html revision 8c9957e63274e6ea44d182703116307b1a65dabb
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson - Copyright (C) 2000-2003 Internet Software Consortium.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson - Permission to use, copy, modify, and distribute this software for any
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson - purpose with or without fee is hereby granted, provided that the above
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson - copyright notice and this permission notice appear in all copies.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson - PERFORMANCE OF THIS SOFTWARE.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<!-- $Id: man.dig.html,v 1.10 2005/10/26 06:23:18 marka Exp $ -->
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<link rel="prev" href="Bv9ARM.ch10.html" title="Manual pages">
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<link rel="next" href="man.host.html" title="host">
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<table width="100%" summary="Navigation header">
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<tr><th colspan="3" align="center">dig</th></tr>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<a accesskey="p" href="Bv9ARM.ch10.html">Prev</a>�</td>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<th width="60%" align="center">Manual pages</th>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<td width="20%" align="right">�<a accesskey="n" href="man.host.html">Next</a>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<a name="man.dig"></a><div class="titlepage"></div>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas 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">-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>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<div class="cmdsynopsis"><p><code class="command">dig</code> [<code class="option">-h</code>]</p></div>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<a name="id2544716"></a><h2>DESCRIPTION</h2>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<p><span><strong class="command">dig</strong></span>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson (domain information groper) is a flexible tool
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson for interrogating DNS name servers. It performs DNS lookups and
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson displays the answers that are returned from the name server(s) that
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson troubleshoot DNS problems because of its flexibility, ease of use and
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson clarity of output. Other lookup tools tend to have less functionality
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson than <span><strong class="command">dig</strong></span>.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Although <span><strong class="command">dig</strong></span> is normally used with
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson arguments, it also has a batch mode of operation for reading lookup
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson requests from a file. A brief summary of its command-line arguments
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson and options is printed when the <code class="option">-h</code> option is given.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Unlike earlier versions, the BIND9 implementation of
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <span><strong class="command">dig</strong></span> allows multiple lookups to be issued
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Unless it is told to query a specific name server,
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <span><strong class="command">dig</strong></span> will try each of the servers listed
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <code class="filename">/etc/resolv.conf</code>.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson When no command line arguments or options are given, will perform an
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson NS query for "." (the root).
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <code class="filename">${HOME}/.digrc</code>. This file is read and
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson any options in it
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson are applied before the command line arguments.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<a name="id2544859"></a><h2>SIMPLE USAGE</h2>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson A typical invocation of <span><strong class="command">dig</strong></span> looks like:
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<pre class="programlisting"> dig @server name type </pre>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="constant">server</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson is the name or IP address of the name server to query. This can
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson address in dotted-decimal notation or an IPv6
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson address in colon-delimited notation. When the supplied
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>server</code></em> argument is a
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <span><strong class="command">dig</strong></span> resolves that name before
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson querying that name
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson server. If no <em class="parameter"><code>server</code></em>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson argument is provided,
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <span><strong class="command">dig</strong></span> consults <code class="filename">/etc/resolv.conf</code>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson and queries the name servers listed there. The reply from the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson server that responds is displayed.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="constant">name</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson is the name of the resource record that is to be looked up.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="constant">type</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson indicates what type of query is required —
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson ANY, A, MX, SIG, etc.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>type</code></em> can be any valid query
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>type</code></em> argument is supplied,
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <span><strong class="command">dig</strong></span> will perform a lookup for an
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson The <code class="option">-b</code> option sets the source IP address of the query
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson to <em class="parameter"><code>address</code></em>. This must be a valid
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson one of the host's network interfaces or "0.0.0.0" or "::". An optional
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson may be specified by appending "#<port>"
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson The default query class (IN for internet) is overridden by the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <code class="option">-c</code> option. <em class="parameter"><code>class</code></em> is
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson class, such as HS for Hesiod records or CH for CHAOSNET records.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson The <code class="option">-f</code> option makes <span><strong class="command">dig </strong></span>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson in batch mode by reading a list of lookup requests to process from the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson file <em class="parameter"><code>filename</code></em>. The file contains a
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson queries, one per line. Each entry in the file should be organised in
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson the same way they would be presented as queries to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <span><strong class="command">dig</strong></span> using the command-line interface.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson If a non-standard port number is to be queried, the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <code class="option">-p</code> option is used. <em class="parameter"><code>port#</code></em> is
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson the port number that <span><strong class="command">dig</strong></span> will send its
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson instead of the standard DNS port number 53. This option would be used
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson to test a name server that has been configured to listen for queries
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson on a non-standard port number.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson use IPv4 query transport. The <code class="option">-6</code> option forces
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <span><strong class="command">dig</strong></span> to only use IPv6 query transport.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson The <code class="option">-t</code> option sets the query type to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>type</code></em>. It can be any valid query type
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson supported in BIND9. The default query type "A", unless the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <code class="option">-x</code> option is supplied to indicate a reverse lookup.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson A zone transfer can be requested by specifying a type of AXFR. When
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson an incremental zone transfer (IXFR) is required,
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>type</code></em> is set to <code class="literal">ixfr=N</code>.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson The incremental zone transfer will contain the changes made to the zone
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson since the serial number in the zone's SOA record was
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>N</code></em>.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson The <code class="option">-q</code> option sets the query name to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>name</code></em>. This useful do distingish the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>name</code></em> from other arguments.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Reverse lookups - mapping addresses to names - are simplified by the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <code class="option">-x</code> option. <em class="parameter"><code>addr</code></em> is
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson address in dotted-decimal notation, or a colon-delimited IPv6 address.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson When this option is used, there is no need to provide the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em> and
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>type</code></em> arguments. <span><strong class="command">dig</strong></span>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson automatically performs a lookup for a name like
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <code class="literal">11.12.13.10.in-addr.arpa</code> and sets the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson query type and
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson class to PTR and IN respectively. By default, IPv6 addresses are
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson looked up using nibble format under the IP6.ARPA domain.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson To use the older RFC1886 method using the IP6.INT domain
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson specify the <code class="option">-i</code> option. Bit string labels (RFC2874)
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson are now experimental and are not attempted.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson To sign the DNS queries sent by <span><strong class="command">dig</strong></span> and
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson responses using transaction signatures (TSIG), specify a TSIG key file
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson using the <code class="option">-k</code> option. You can also specify the TSIG
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson key itself on the command line using the <code class="option">-y</code> option;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>name</code></em> is the name of the TSIG key and
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>key</code></em> is the actual key. The key is a
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson encoded string, typically generated by
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Caution should be taken when using the <code class="option">-y</code> option on
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson multi-user systems as the key can be visible in the output from
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson or in the shell's history file. When
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson using TSIG authentication with <span><strong class="command">dig</strong></span>, the name
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson server that is queried needs to know the key and algorithm that is
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson being used. In BIND, this is done by providing appropriate
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <span><strong class="command">key</strong></span> and <span><strong class="command">server</strong></span> statements in
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <code class="filename">named.conf</code>.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<a name="id2545297"></a><h2>QUERY OPTIONS</h2>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<p><span><strong class="command">dig</strong></span>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson provides a number of query options which affect
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson the way in which lookups are made and the results displayed. Some of
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson these set or reset flag bits in the query header, some determine which
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson sections of the answer get printed, and others determine the timeout
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson and retry strategies.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Each query option is identified by a keyword preceded by a plus sign
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson (<code class="literal">+</code>). Some keywords set or reset an
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson option. These may be preceded
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson by the string <code class="literal">no</code> to negate the meaning of
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson that keyword. Other
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson keywords assign values to options like the timeout interval. They
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson have the form <code class="option">+keyword=value</code>.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson The query options are:
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Use [do not use] TCP when querying name servers. The default
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson behaviour is to use UDP unless an AXFR or IXFR query is
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson which case a TCP connection is used.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]vc</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Use [do not use] TCP when querying name servers. This alternate
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson syntax to <em class="parameter"><code>+[no]tcp</code></em> is
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson provided for backwards
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson compatibility. The "vc" stands for "virtual circuit".
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Ignore truncation in UDP responses instead of retrying with TCP.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson default, TCP retries are performed.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+domain=somename</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Set the search list to contain the single domain
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>somename</code></em>, as if specified in
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <span><strong class="command">domain</strong></span> directive in
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <code class="filename">/etc/resolv.conf</code>, and enable
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson processing as if the <em class="parameter"><code>+search</code></em>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson option were given.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]search</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Use [do not use] the search list defined by the searchlist or
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson directive in <code class="filename">resolv.conf</code> (if
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson The search list is not used by default.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Perform [do not perform] a search showing intermediate
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]defname</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Deprecated, treated as a synonym for <em class="parameter"><code>+[no]search</code></em>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]aaonly</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Sets the "aa" flag in the query.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]aaflag</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]adflag</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Set [do not set] the AD (authentic data) bit in the query. The
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson currently has a standard meaning only in responses, not in
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson but the ability to set the bit in the query is provided for
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]cdflag</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Set [do not set] the CD (checking disabled) bit in the query.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson requests the server to not perform DNSSEC validation of
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]cl</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Display [do not display] the CLASS when printing the record.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Display [do not display] the TTL when printing the record.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]recurse</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Toggle the setting of the RD (recursion desired) bit in the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson This bit is set by default, which means <span><strong class="command">dig</strong></span>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson normally sends recursive queries. Recursion is automatically
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson when the <em class="parameter"><code>+nssearch</code></em> or
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>+trace</code></em> query options are
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]nssearch</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson When this option is set, <span><strong class="command">dig</strong></span>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson attempts to find the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson authoritative name servers for the zone containing the name
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson looked up and display the SOA record that each name server has
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]trace</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Toggle tracing of the delegation path from the root name servers
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson the name being looked up. Tracing is disabled by default. When
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson tracing is enabled, <span><strong class="command">dig</strong></span> makes
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson iterative queries to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson resolve the name being looked up. It will follow referrals from
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson root servers, showing the answer from each server that was used
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson resolve the lookup.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]cmd</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson toggles the printing of the initial comment in the output
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson the version of <span><strong class="command">dig</strong></span> and the query
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson options that have
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson been applied. This comment is printed by default.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]short</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Provide a terse answer. The default is to print the answer in a
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]identify</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Show [or do not show] the IP address and port number that
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson answer when the <em class="parameter"><code>+short</code></em> option
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson is enabled. If
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson short form answers are requested, the default is not to show the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson source address and port number of the server that provided the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Toggle the display of comment lines in the output. The default
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson print comments.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson This query option toggles the printing of statistics: when the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson was made, the size of the reply and so on. The default
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson to print the query statistics.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Print [do not print] the query as it is sent.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson By default, the query is not printed.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]question</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Print [do not print] the question section of a query when an
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson returned. The default is to print the question section as a
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]answer</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Display [do not display] the answer section of a reply. The
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson is to display it.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]authority</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Display [do not display] the authority section of a reply. The
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson default is to display it.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]additional</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Display [do not display] the additional section of a reply.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson The default is to display it.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]all</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Set or clear all display flags.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+time=T</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Sets the timeout for a query to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>T</code></em> seconds. The default time
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson out is 5 seconds.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson An attempt to set <em class="parameter"><code>T</code></em> to less
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson than 1 will result
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson in a query timeout of 1 second being applied.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+tries=T</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Sets the number of times to try UDP queries to server to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>T</code></em> instead of the default, 3.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>T</code></em> is less than or equal to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson zero, the number of
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson tries is silently rounded up to 1.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+retry=T</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Sets the number of times to retry UDP queries to server to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>T</code></em> instead of the default, 2.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>+tries</code></em>, this does not include
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+ndots=D</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Set the number of dots that have to appear in
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em> for it to be
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson considered absolute. The default value is that defined using
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson ndots statement in <code class="filename">/etc/resolv.conf</code>, or 1 if no
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson ndots statement is present. Names with fewer dots are
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson interpreted as
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson relative names and will be searched for in the domains listed in
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <code class="option">search</code> or <code class="option">domain</code> directive in
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <code class="filename">/etc/resolv.conf</code>.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+bufsize=B</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Set the UDP message buffer size advertised using EDNS0 to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <em class="parameter"><code>B</code></em> bytes. The maximum and minimum sizes
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson of this buffer are 65535 and 0 respectively. Values outside
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson this range are rounded up or down appropriately.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Values other than zero will cause a EDNS query to be sent.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+edns=#</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Specify the EDNS version to query with. Valid values
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson are 0 to 255. Setting the EDNS version will cause a
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson EDNS query to be sent. <code class="option">+noedns</code> clears the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson remembered EDNS version.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]multiline</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Print records like the SOA records in a verbose multi-line
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson format with human-readable comments. The default is to print
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson each record on a single line, to facilitate machine parsing
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson of the <span><strong class="command">dig</strong></span> output.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]fail</code></span></dt>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Do not try the next server if you receive a SERVFAIL. The
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson to not try the next server which is the reverse of normal stub