dig.html revision 3afd0ff6628df1e7e20161e4afa99469a1195a5b
ea206aebcafe1ed5d470dd99daab9a1cedc81c7cMark Andrews - Copyright (C) 2004-2011, 2013 Internet Systems Consortium, Inc. ("ISC")
a02a0a8a7eb461619931f4a0e896afa247b52c54Mark Andrews - Copyright (C) 2000-2003 Internet Software Consortium.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews - Permission to use, copy, modify, and/or distribute this software for any
ea206aebcafe1ed5d470dd99daab9a1cedc81c7cMark Andrews - purpose with or without fee is hereby granted, provided that the above
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews - copyright notice and this permission notice appear in all copies.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
01bf5871f8861eb805dd8ca79bdb9b0b9e4e6a5eMark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<!-- $Id$ -->
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<a name="man.dig"></a><div class="titlepage"></div>
bac2ed6ec3fbb5420e6ce69dd1218745d4e02b1eMark Andrews<div class="cmdsynopsis"><p><code class="command">dig</code> [@server] [<code class="option">-b <em class="replaceable"><code>address</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-f <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-k <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-m</code>] [<code class="option">-p <em class="replaceable"><code>port#</code></em></code>] [<code class="option">-q <em class="replaceable"><code>name</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-x <em class="replaceable"><code>addr</code></em></code>] [<code class="option">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]name:key</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] [name] [type] [class] [queryopt...]</p></div>
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark Andrews<div class="cmdsynopsis"><p><code class="command">dig</code> [<code class="option">-h</code>]</p></div>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark Andrews<p><span><strong class="command">dig</strong></span>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews (domain information groper) is a flexible tool
bac2ed6ec3fbb5420e6ce69dd1218745d4e02b1eMark Andrews for interrogating DNS name servers. It performs DNS lookups and
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews displays the answers that are returned from the name server(s) that
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark Andrews troubleshoot DNS problems because of its flexibility, ease of use and
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews clarity of output. Other lookup tools tend to have less functionality
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews than <span><strong class="command">dig</strong></span>.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews Although <span><strong class="command">dig</strong></span> is normally used with
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews arguments, it also has a batch mode of operation for reading lookup
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews requests from a file. A brief summary of its command-line arguments
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson and options is printed when the <code class="option">-h</code> option is given.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews Unlike earlier versions, the BIND 9 implementation of
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span><strong class="command">dig</strong></span> allows multiple lookups to be issued
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews command line.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews Unless it is told to query a specific name server,
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews <span><strong class="command">dig</strong></span> will try each of the servers listed in
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews <code class="filename">/etc/resolv.conf</code>. If no usable server addreses
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews are found, <span><strong class="command">dig</strong></span> will send the query to the local
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson When no command line arguments or options are given,
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson <span><strong class="command">dig</strong></span> will perform an NS query for "." (the root).
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson <code class="filename">${HOME}/.digrc</code>. This file is read and
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson any options in it
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson are applied before the command line arguments.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson The IN and CH class names overlap with the IN and CH top level
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson domains names. Either use the <code class="option">-t</code> and
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson <code class="option">-c</code> options to specify the type and class,
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson use the <code class="option">-q</code> the specify the domain name, or
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington use "IN." and "CH." when looking up these top level domains.
c25080dc50542213058c240226c9f342186e6285Mark Andrews A typical invocation of <span><strong class="command">dig</strong></span> looks like:
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews<pre class="programlisting"> dig @server name type </pre>
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews<dt><span class="term"><code class="constant">server</code></span></dt>
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews is the name or IP address of the name server to query. This
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews can be an IPv4 address in dotted-decimal notation or an IPv6
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews address in colon-delimited notation. When the supplied
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews <em class="parameter"><code>server</code></em> argument is a hostname,
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews <span><strong class="command">dig</strong></span> resolves that name before querying
642e0716c8b4ab82ebc8e60f94c9e897ee89f19aMark Andrews that name server.
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews If no <em class="parameter"><code>server</code></em> argument is
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews provided, <span><strong class="command">dig</strong></span> consults
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews <code class="filename">/etc/resolv.conf</code>; if an
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews address is found there, it queries the name server at
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews that address. If either of the <code class="option">-4</code> or
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews <code class="option">-6</code> options are in use, then
c25080dc50542213058c240226c9f342186e6285Mark Andrews only addresses for the corresponding transport
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews will be tried. If no usable addresses are found,
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews <span><strong class="command">dig</strong></span> will send the query to the
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews local host. The reply from the name server that
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews responds is displayed.
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews<dt><span class="term"><code class="constant">name</code></span></dt>
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews is the name of the resource record that is to be looked up.
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews<dt><span class="term"><code class="constant">type</code></span></dt>
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews indicates what type of query is required —
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark Andrews ANY, A, MX, SIG, etc.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews <em class="parameter"><code>type</code></em> can be any valid query
642e0716c8b4ab82ebc8e60f94c9e897ee89f19aMark Andrews <em class="parameter"><code>type</code></em> argument is supplied,
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews <span><strong class="command">dig</strong></span> will perform a lookup for an
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews The <code class="option">-b</code> option sets the source IP address of the query
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews to <em class="parameter"><code>address</code></em>. This must be a valid
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews one of the host's network interfaces or "0.0.0.0" or "::". An optional
642e0716c8b4ab82ebc8e60f94c9e897ee89f19aMark Andrews may be specified by appending "#<port>"
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews The default query class (IN for internet) is overridden by the
ea206aebcafe1ed5d470dd99daab9a1cedc81c7cMark Andrews <code class="option">-c</code> option. <em class="parameter"><code>class</code></em> is
ea206aebcafe1ed5d470dd99daab9a1cedc81c7cMark Andrews class, such as HS for Hesiod records or CH for Chaosnet records.
7c40ffd67bd1e73907f83a79a6ff8c635f4a4a74Mark Andrews The <code class="option">-f</code> option makes <span><strong class="command">dig </strong></span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington in batch mode by reading a list of lookup requests to process from the
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews file <em class="parameter"><code>filename</code></em>. The file contains a
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews queries, one per line. Each entry in the file should be organized in
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews the same way they would be presented as queries to
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews <span><strong class="command">dig</strong></span> using the command-line interface.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews The <code class="option">-m</code> option enables memory usage debugging.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews If a non-standard port number is to be queried, the
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews <code class="option">-p</code> option is used. <em class="parameter"><code>port#</code></em> is
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark Andrews the port number that <span><strong class="command">dig</strong></span> will send its
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews instead of the standard DNS port number 53. This option would be used
5752b9e296f14034f103149f18188770c2cc5239Mark Andrews to test a name server that has been configured to listen for queries
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews on a non-standard port number.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews use IPv4 query transport. The <code class="option">-6</code> option forces
e076d0c88be69de7c190ab924d095e69d2e11f7aAndreas Gustafsson <span><strong class="command">dig</strong></span> to only use IPv6 query transport.
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews The <code class="option">-t</code> option sets the query type to
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews <em class="parameter"><code>type</code></em>. It can be any valid query type
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson supported in BIND 9. The default query type is "A", unless the
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson <code class="option">-x</code> option is supplied to indicate a reverse lookup.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews A zone transfer can be requested by specifying a type of AXFR. When
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson an incremental zone transfer (IXFR) is required,
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson <em class="parameter"><code>type</code></em> is set to <code class="literal">ixfr=N</code>.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews The incremental zone transfer will contain the changes made to the zone
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington since the serial number in the zone's SOA record was
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews The <code class="option">-q</code> option sets the query name to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <em class="parameter"><code>name</code></em>. This useful do distinguish the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <em class="parameter"><code>name</code></em> from other arguments.
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews Reverse lookups — mapping addresses to names — are simplified by the
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews <code class="option">-x</code> option. <em class="parameter"><code>addr</code></em> is
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews address in dotted-decimal notation, or a colon-delimited IPv6 address.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington When this option is used, there is no need to provide the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em> and
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <em class="parameter"><code>type</code></em> arguments. <span><strong class="command">dig</strong></span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington automatically performs a lookup for a name like
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <code class="literal">11.12.13.10.in-addr.arpa</code> and sets the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington query type and
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington class to PTR and IN respectively. By default, IPv6 addresses are
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington looked up using nibble format under the IP6.ARPA domain.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington To use the older RFC1886 method using the IP6.INT domain
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington specify the <code class="option">-i</code> option. Bit string labels (RFC2874)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington are now experimental and are not attempted.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington To sign the DNS queries sent by <span><strong class="command">dig</strong></span> and
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington responses using transaction signatures (TSIG), specify a TSIG key file
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington using the <code class="option">-k</code> option. You can also specify the TSIG
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington key itself on the command line using the <code class="option">-y</code> option;
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <em class="parameter"><code>hmac</code></em> is the type of the TSIG, default HMAC-MD5,
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <em class="parameter"><code>name</code></em> is the name of the TSIG key and
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <em class="parameter"><code>key</code></em> is the actual key. The key is a
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington encoded string, typically generated by
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Caution should be taken when using the <code class="option">-y</code> option on
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington multi-user systems as the key can be visible in the output from
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington or in the shell's history file. When
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington using TSIG authentication with <span><strong class="command">dig</strong></span>, the name
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington server that is queried needs to know the key and algorithm that is
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington being used. In BIND, this is done by providing appropriate
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span><strong class="command">key</strong></span> and <span><strong class="command">server</strong></span> statements in
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<a name="id2544061"></a><h2>QUERY OPTIONS</h2>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<p><span><strong class="command">dig</strong></span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington provides a number of query options which affect
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington the way in which lookups are made and the results displayed. Some of
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington these set or reset flag bits in the query header, some determine which
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington sections of the answer get printed, and others determine the timeout
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington and retry strategies.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Each query option is identified by a keyword preceded by a plus sign
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington (<code class="literal">+</code>). Some keywords set or reset an
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington option. These may be preceded
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington by the string <code class="literal">no</code> to negate the meaning of
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews that keyword. Other
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews keywords assign values to options like the timeout interval. They
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington have the form <code class="option">+keyword=value</code>.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington The query options are:
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Use [do not use] TCP when querying name servers. The default
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington behavior is to use UDP unless an AXFR or IXFR query is
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington requested, in
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington which case a TCP connection is used.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]vc</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Use [do not use] TCP when querying name servers. This alternate
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington syntax to <em class="parameter"><code>+[no]tcp</code></em> is
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington provided for backwards
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington compatibility. The "vc" stands for "virtual circuit".
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews Ignore truncation in UDP responses instead of retrying with TCP.
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews default, TCP retries are performed.
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews<dt><span class="term"><code class="option">+domain=somename</code></span></dt>
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews Set the search list to contain the single domain
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews <em class="parameter"><code>somename</code></em>, as if specified in
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews <span><strong class="command">domain</strong></span> directive in
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews <code class="filename">/etc/resolv.conf</code>, and enable
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews processing as if the <em class="parameter"><code>+search</code></em>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews option were given.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<dt><span class="term"><code class="option">+[no]search</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Use [do not use] the search list defined by the searchlist or
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington directive in <code class="filename">resolv.conf</code> (if
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington The search list is not used by default.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Perform [do not perform] a search showing intermediate
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]defname</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Deprecated, treated as a synonym for <em class="parameter"><code>+[no]search</code></em>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]aaonly</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Sets the "aa" flag in the query.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]aaflag</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]adflag</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Set [do not set] the AD (authentic data) bit in the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews query. This requests the server to return whether
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews all of the answer and authority sections have all
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews been validated as secure according to the security
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington policy of the server. AD=1 indicates that all records
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews have been validated as secure and the answer is not
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington from a OPT-OUT range. AD=0 indicate that some part
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington of the answer was insecure or not validated. This
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington bit is set by default.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]cdflag</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Set [do not set] the CD (checking disabled) bit in the query.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington requests the server to not perform DNSSEC validation of
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]cl</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Display [do not display] the CLASS when printing the record.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Display [do not display] the TTL when printing the record.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]recurse</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Toggle the setting of the RD (recursion desired) bit
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington in the query. This bit is set by default, which means
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span><strong class="command">dig</strong></span> normally sends recursive
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews queries. Recursion is automatically disabled when
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington the <em class="parameter"><code>+nssearch</code></em> or
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <em class="parameter"><code>+trace</code></em> query options are used.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]nssearch</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington When this option is set, <span><strong class="command">dig</strong></span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington attempts to find the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington authoritative name servers for the zone containing the name
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington looked up and display the SOA record that each name server has
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<dt><span class="term"><code class="option">+[no]trace</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Toggle tracing of the delegation path from the root
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews name servers for the name being looked up. Tracing
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews is disabled by default. When tracing is enabled,
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">dig</strong></span> makes iterative queries to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews resolve the name being looked up. It will follow
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews referrals from the root servers, showing the answer
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews from each server that was used to resolve the lookup.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <span><strong class="command">+dnssec</strong></span> is also set when +trace is
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington set to better emulate the default queries from a nameserver.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]cmd</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Toggles the printing of the initial comment in the output
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington the version of <span><strong class="command">dig</strong></span> and the query
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington options that have
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington been applied. This comment is printed by default.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]short</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Provide a terse answer. The default is to print the answer in a
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington verbose form.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]identify</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Show [or do not show] the IP address and port number that
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington answer when the <em class="parameter"><code>+short</code></em> option
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews is enabled. If
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews short form answers are requested, the default is not to show the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington source address and port number of the server that provided the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Toggle the display of comment lines in the output. The default
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews is to print comments.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="term"><code class="option">+[no]rrcomments</code></span></dt>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews Toggle the display of per-record comments in the output (for
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews example, human-readable key information about DNSKEY records).
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews The default is not to print record comments unless multiline
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington mode is active.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="term"><code class="option">+[no]crypto</code></span></dt>
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington Toggle the display of cryptographic fields in DNSSEC records.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington The contents of these field are unnecessary to debug most DNSSEC
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington validation failures and removing them makes it easier to see
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews the common failures. The default is to display the fields.
83a810eba60ae87341a2d177ff60d834e26d7a90Mark Andrews When omitted they are replaced by the string "[omitted]" or
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington in the DNSKEY case the key id is displayed as the replacement,
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews e.g. "[ key id = value ]".
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<dt><span class="term"><code class="option">+split=W</code></span></dt>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews Split long hex- or base64-formatted fields in resource
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews records into chunks of <em class="parameter"><code>W</code></em> characters
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews (where <em class="parameter"><code>W</code></em> is rounded up to the nearest
83a810eba60ae87341a2d177ff60d834e26d7a90Mark Andrews multiple of 4).
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews <em class="parameter"><code>+nosplit</code></em> or
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews <em class="parameter"><code>+split=0</code></em> causes fields not to be
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews split at all. The default is 56 characters, or 44 characters
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews when multiline mode is active.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews This query option toggles the printing of statistics: when the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews was made, the size of the reply and so on. The default
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews to print the query statistics.
01bf5871f8861eb805dd8ca79bdb9b0b9e4e6a5eMark Andrews<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Print [do not print] the query as it is sent.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews By default, the query is not printed.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]question</code></span></dt>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews Print [do not print] the question section of a query when an
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews returned. The default is to print the question section as a
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="term"><code class="option">+[no]answer</code></span></dt>
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews Display [do not display] the answer section of a reply. The
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews is to display it.
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews<dt><span class="term"><code class="option">+[no]authority</code></span></dt>
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews Display [do not display] the authority section of a reply. The
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews default is to display it.
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews<dt><span class="term"><code class="option">+[no]additional</code></span></dt>
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews Display [do not display] the additional section of a reply.
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews The default is to display it.
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews<dt><span class="term"><code class="option">+[no]all</code></span></dt>
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews Set or clear all display flags.
48b492d73ae5328c5efef4b9e0f22063e0ab058aMark Andrews<dt><span class="term"><code class="option">+time=T</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Sets the timeout for a query to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <em class="parameter"><code>T</code></em> seconds. The default
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington timeout is 5 seconds.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews An attempt to set <em class="parameter"><code>T</code></em> to less
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews than 1 will result
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews in a query timeout of 1 second being applied.
ca9a8f6d0b0f2a400a96f868193471510364336fMark Andrews<dt><span class="term"><code class="option">+tries=T</code></span></dt>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews Sets the number of times to try UDP queries to server to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <em class="parameter"><code>T</code></em> instead of the default, 3.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews <em class="parameter"><code>T</code></em> is less than or equal to
854b0d831e45a90211917e3a49f40d10c4a2ee79Mark Andrews zero, the number of
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews tries is silently rounded up to 1.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="term"><code class="option">+retry=T</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Sets the number of times to retry UDP queries to server to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <em class="parameter"><code>T</code></em> instead of the default, 2.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <em class="parameter"><code>+tries</code></em>, this does not include
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+ndots=D</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Set the number of dots that have to appear in
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews <em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em> for it to be
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews considered absolute. The default value is that defined using
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews ndots statement in <code class="filename">/etc/resolv.conf</code>, or 1 if no
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ndots statement is present. Names with fewer dots are
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington interpreted as
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington relative names and will be searched for in the domains listed in
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <code class="option">search</code> or <code class="option">domain</code> directive in
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington <code class="filename">/etc/resolv.conf</code>.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<dt><span class="term"><code class="option">+bufsize=B</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Set the UDP message buffer size advertised using EDNS0 to
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews <em class="parameter"><code>B</code></em> bytes. The maximum and minimum sizes
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews of this buffer are 65535 and 0 respectively. Values outside
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington this range are rounded up or down appropriately.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews Values other than zero will cause a EDNS query to be sent.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="term"><code class="option">+edns=#</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Specify the EDNS version to query with. Valid values
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington are 0 to 255. Setting the EDNS version will cause
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington a EDNS query to be sent. <code class="option">+noedns</code>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington clears the remembered EDNS version. EDNS is set to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews 0 by default.
83a810eba60ae87341a2d177ff60d834e26d7a90Mark Andrews<dt><span class="term"><code class="option">+[no]multiline</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Print records like the SOA records in a verbose multi-line
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews format with human-readable comments. The default is to print
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews each record on a single line, to facilitate machine parsing
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews of the <span><strong class="command">dig</strong></span> output.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]onesoa</code></span></dt>
7a6ad11e0185a73984410f3252f3c49c3a301dbdBrian Wellington Print only one (starting) SOA record when performing
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews an AXFR. The default is to print both the starting and
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ending SOA records.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="term"><code class="option">+[no]fail</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Do not try the next server if you receive a SERVFAIL. The
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington to not try the next server which is the reverse of normal stub
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<dt><span class="term"><code class="option">+[no]besteffort</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Attempt to display the contents of messages which are malformed.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews The default is to not display malformed answers.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="term"><code class="option">+[no]dnssec</code></span></dt>
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews Requests DNSSEC records be sent by setting the DNSSEC OK bit
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews in the OPT record in the additional section of the query.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews<dt><span class="term"><code class="option">+[no]sigchase</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Chase DNSSEC signature chains. Requires dig be compiled with
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews -DDIG_SIGCHASE.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="term"><code class="option">+trusted-key=####</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Specifies a file containing trusted keys to be used with
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <code class="option">+sigchase</code>. Each DNSKEY record must be
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews on its own line.
e076d0c88be69de7c190ab924d095e69d2e11f7aAndreas Gustafsson If not specified, <span><strong class="command">dig</strong></span> will look for
e076d0c88be69de7c190ab924d095e69d2e11f7aAndreas Gustafsson <code class="filename">/etc/trusted-key.key</code> then
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <code class="filename">trusted-key.key</code> in the current directory.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Requires dig be compiled with -DDIG_SIGCHASE.
01bf5871f8861eb805dd8ca79bdb9b0b9e4e6a5eMark Andrews<dt><span class="term"><code class="option">+[no]topdown</code></span></dt>
01bf5871f8861eb805dd8ca79bdb9b0b9e4e6a5eMark Andrews When chasing DNSSEC signature chains perform a top-down
01bf5871f8861eb805dd8ca79bdb9b0b9e4e6a5eMark Andrews Requires dig be compiled with -DDIG_SIGCHASE.
01bf5871f8861eb805dd8ca79bdb9b0b9e4e6a5eMark Andrews<dt><span class="term"><code class="option">+[no]nsid</code></span></dt>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Include an EDNS name server ID request when sending a query.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<dt><span class="term"><code class="option">+[no]keepopen</code></span></dt>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews Keep the TCP socket open between queries and reuse it rather
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews than creating a new TCP socket for each lookup. The default
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<a name="id2545355"></a><h2>MULTIPLE QUERIES</h2>
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington The BIND 9 implementation of <span><strong class="command">dig </strong></span>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington specifying multiple queries on the command line (in addition to
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews supporting the <code class="option">-f</code> batch file option). Each of those
49ef9cb60f37eb190986b750db57a194c8f7321cMark Andrews queries can be supplied with its own set of flags, options and query
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews In this case, each <em class="parameter"><code>query</code></em> argument
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews represent an
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews individual query in the command-line syntax described above. Each
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews consists of any of the standard options and flags, the name to be
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington looked up, an optional query type and class and any query options that
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews should be applied to that query.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews A global set of query options, which should be applied to all queries,
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews can also be supplied. These global query options must precede the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews first tuple of name, class, type, options, flags, and query options
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews supplied on the command line. Any global query options (except
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews the <code class="option">+[no]cmd</code> option) can be
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington overridden by a query-specific set of query options. For example:
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsdig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
53aed64e0f8553762fc0c380ee41cb42f514c7d5Brian Wellington shows how <span><strong class="command">dig</strong></span> could be used from the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews command line
53aed64e0f8553762fc0c380ee41cb42f514c7d5Brian Wellington to make three lookups: an ANY query for <code class="literal">www.isc.org</code>, a
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews reverse lookup of 127.0.0.1 and a query for the NS records of
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews A global query option of <em class="parameter"><code>+qr</code></em> is
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews that <span><strong class="command">dig</strong></span> shows the initial query it made
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews lookup. The final query has a local query option of
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <em class="parameter"><code>+noqr</code></em> which means that <span><strong class="command">dig</strong></span>
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews will not print the initial query when it looks up the NS records for
6e611cc919d69bed062e9885078412ef2ac4f007Mark Andrews If <span><strong class="command">dig</strong></span> has been built with IDN (internationalized
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews domain name) support, it can accept and display non-ASCII domain names.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span><strong class="command">dig</strong></span> appropriately converts character encoding of
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews domain name before sending a request to DNS server or displaying a
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews reply from the server.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington If you'd like to turn off the IDN support for some reason, defines
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews the <code class="envar">IDN_DISABLE</code> environment variable.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington The IDN support is disabled if the variable is set when
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews <span><strong class="command">dig</strong></span> runs.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews<p><code class="filename">/etc/resolv.conf</code>
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington<p><span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews There are probably too many query options.