man.dig.html revision f39512a917cdd06c611d366603374f6ef570c80e
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<!--
5569e7de51513952d89f29de08049ed6bb054d6eAutomatic Updater - Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC")
a7038d1a0513c8e804937ebc95fc9cb3a46c04f5Mark Andrews - Copyright (C) 2000-2003 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence -
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater - Permission to use, copy, modify, and/or distribute this software for any
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence - purpose with or without fee is hereby granted, provided that the above
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence - copyright notice and this permission notice appear in all copies.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence -
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence-->
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<!-- $Id$ -->
0ef59d22882fc5d28f4683fdbe88aefd8eaad6f3Francis Dupont<html>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<head>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<title>dig</title>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
29747dfe5e073a299b3681e01f5c55540f8bfed7Mark Andrews<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<link rel="prev" href="Bv9ARM.ch10.html" title="Manual pages">
899f7f9af527d3dfe8345dcc8210d7c23fc950afDavid Lawrence<link rel="next" href="man.host.html" title="host">
c4717613e45323ed23dc6e9162cba89f1f83830cDavid Lawrence</head>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
9550eb2dab1d03e03e6c060f92e655d47ac1fc1bMichael Graff<div class="navheader">
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<table width="100%" summary="Navigation header">
c4958494a98a59ce25e9fecad76a9ab0e36cc59fDanny Mayer<tr><th colspan="3" align="center">dig</th></tr>
8f804834e2b537da5c8bc81f986143a46147b490Andreas Gustafsson<tr>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<td width="20%" align="left">
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<a accesskey="p" href="Bv9ARM.ch10.html">Prev</a>�</td>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<th width="60%" align="center">Manual pages</th>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<td width="20%" align="right">�<a accesskey="n" href="man.host.html">Next</a>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence</td>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence</tr>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence</table>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<hr>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein</div>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<div class="refentry" lang="en">
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<a name="man.dig"></a><div class="titlepage"></div>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<div class="refnamediv">
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<h2>Name</h2>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p>dig &#8212; DNS lookup utility</p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence</div>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<div class="refsynopsisdiv">
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<h2>Synopsis</h2>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<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">-v</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>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<div class="cmdsynopsis"><p><code class="command">dig</code> [<code class="option">-h</code>]</p></div>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein</div>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<div class="refsect1" lang="en">
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<a name="id2613372"></a><h2>DESCRIPTION</h2>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p><span><strong class="command">dig</strong></span>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence (domain information groper) is a flexible tool
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence for interrogating DNS name servers. It performs DNS lookups and
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence displays the answers that are returned from the name server(s) that
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence troubleshoot DNS problems because of its flexibility, ease of use and
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein clarity of output. Other lookup tools tend to have less functionality
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein than <span><strong class="command">dig</strong></span>.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Although <span><strong class="command">dig</strong></span> is normally used with
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence command-line
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence arguments, it also has a batch mode of operation for reading lookup
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence requests from a file. A brief summary of its command-line arguments
2918b5bda6a55c301eb87992b5f2acd7176d0737David Lawrence and options is printed when the <code class="option">-h</code> option is given.
2918b5bda6a55c301eb87992b5f2acd7176d0737David Lawrence Unlike earlier versions, the BIND 9 implementation of
2918b5bda6a55c301eb87992b5f2acd7176d0737David Lawrence <span><strong class="command">dig</strong></span> allows multiple lookups to be issued
959cf5e112c41ba8da2a202f51bc0c7a3cf47f68Tatuya JINMEI 神明達哉 from the
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein command line.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Unless it is told to query a specific name server,
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <span><strong class="command">dig</strong></span> will try each of the servers listed in
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <code class="filename">/etc/resolv.conf</code>. If no usable server addresses
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence are found, <span><strong class="command">dig</strong></span> will send the query to the local
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence host.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence When no command line arguments or options are given,
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <span><strong class="command">dig</strong></span> will perform an NS query for "." (the root).
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
0cfbb9285a96f1355e5a3bd458624eaed2f16846Automatic Updater <code class="filename">${HOME}/.digrc</code>. This file is read and
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein any options in it
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein are applied before the command line arguments.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p>
d409ceeda41a256e8114423674d844d5f5035ee8Bob Halley<p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence The IN and CH class names overlap with the IN and CH top level
8f804834e2b537da5c8bc81f986143a46147b490Andreas Gustafsson domain names. Either use the <code class="option">-t</code> and
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <code class="option">-c</code> options to specify the type and class,
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence use the <code class="option">-q</code> the specify the domain name, or
8f804834e2b537da5c8bc81f986143a46147b490Andreas Gustafsson use "IN." and "CH." when looking up these top level domains.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein</div>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<div class="refsect1" lang="en">
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<a name="id2613475"></a><h2>SIMPLE USAGE</h2>
8f804834e2b537da5c8bc81f986143a46147b490Andreas Gustafsson<p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence A typical invocation of <span><strong class="command">dig</strong></span> looks like:
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p>
8f804834e2b537da5c8bc81f986143a46147b490Andreas Gustafsson<pre class="programlisting"> dig @server name type </pre>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein where:
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence
0cfbb9285a96f1355e5a3bd458624eaed2f16846Automatic Updater </p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<div class="variablelist"><dl>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="constant">server</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence is the name or IP address of the name server to query. This
0cfbb9285a96f1355e5a3bd458624eaed2f16846Automatic Updater can be an IPv4 address in dotted-decimal notation or an IPv6
8862388bcb44f634cbfc3e69f11ff4cb76590a4bMark Andrews address in colon-delimited notation. When the supplied
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <em class="parameter"><code>server</code></em> argument is a hostname,
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <span><strong class="command">dig</strong></span> resolves that name before querying
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein that name server.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein If no <em class="parameter"><code>server</code></em> argument is
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence provided, <span><strong class="command">dig</strong></span> consults
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <code class="filename">/etc/resolv.conf</code>; if an
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence address is found there, it queries the name server at
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence that address. If either of the <code class="option">-4</code> or
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <code class="option">-6</code> options are in use, then
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence only addresses for the corresponding transport
61e9c1cdbe29683bb2db388e4fc6a6fd59315cefDavid Lawrence will be tried. If no usable addresses are found,
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <span><strong class="command">dig</strong></span> will send the query to the
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence local host. The reply from the name server that
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence responds is displayed.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence</dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="constant">name</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence is the name of the resource record that is to be looked up.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="constant">type</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence indicates what type of query is required &#8212;
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein ANY, A, MX, SIG, etc.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <em class="parameter"><code>type</code></em> can be any valid query
1a487fb7d230403bf1b5d6628542134f52c80653Michael Graff type. If no
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <em class="parameter"><code>type</code></em> argument is supplied,
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <span><strong class="command">dig</strong></span> will perform a lookup for an
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence A record.
1a487fb7d230403bf1b5d6628542134f52c80653Michael Graff </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence</dl></div>
c4958494a98a59ce25e9fecad76a9ab0e36cc59fDanny Mayer<p>
c4958494a98a59ce25e9fecad76a9ab0e36cc59fDanny Mayer </p>
c4958494a98a59ce25e9fecad76a9ab0e36cc59fDanny Mayer</div>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<div class="refsect1" lang="en">
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<a name="id2613669"></a><h2>OPTIONS</h2>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein The <code class="option">-b</code> option sets the source IP address of the query
1a487fb7d230403bf1b5d6628542134f52c80653Michael Graff to <em class="parameter"><code>address</code></em>. This must be a valid
1a487fb7d230403bf1b5d6628542134f52c80653Michael Graff address on
1a487fb7d230403bf1b5d6628542134f52c80653Michael Graff one of the host's network interfaces or "0.0.0.0" or "::". An optional
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence port
5fe5a0c02634eaadfcbc3528bf2c184557110a3bAndreas Gustafsson may be specified by appending "#&lt;port&gt;"
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p>
1a487fb7d230403bf1b5d6628542134f52c80653Michael Graff The default query class (IN for internet) is overridden by the
df0f58959ed82a2a43ca8d816ce9592541df9f2fMark Andrews <code class="option">-c</code> option. <em class="parameter"><code>class</code></em> is
ecf7a1812527d5557564b71363dabec491980246Mark Andrews any valid
88f7da46901f5d1218e354768674e72e9190d05aMichael Graff class, such as HS for Hesiod records or CH for Chaosnet records.
1a487fb7d230403bf1b5d6628542134f52c80653Michael Graff </p>
b161f87be81548d1b6d0210a7e138a08fbb2d3e5David Lawrence<p>
b161f87be81548d1b6d0210a7e138a08fbb2d3e5David Lawrence The <code class="option">-f</code> option makes <span><strong class="command">dig </strong></span>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence operate
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence in batch mode by reading a list of lookup requests to process from the
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein file <em class="parameter"><code>filename</code></em>. The file contains a
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence number of
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence queries, one per line. Each entry in the file should be organized in
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence the same way they would be presented as queries to
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <span><strong class="command">dig</strong></span> using the command-line interface.
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence </p>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence<p>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence The <code class="option">-m</code> option enables memory usage debugging.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<p>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence If a non-standard port number is to be queried, the
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence <code class="option">-p</code> option is used. <em class="parameter"><code>port#</code></em> is
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein the port number that <span><strong class="command">dig</strong></span> will send its
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence queries
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein instead of the standard DNS port number 53. This option would be used
1b106e224d3931e85d68c091fe1ec7758d9f07cbAndreas Gustafsson to test a name server that has been configured to listen for queries
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein on a non-standard port number.
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence </p>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein to only
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence use IPv4 query transport. The <code class="option">-6</code> option forces
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence <span><strong class="command">dig</strong></span> to only use IPv6 query transport.
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence </p>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein The <code class="option">-t</code> option sets the query type to
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence <em class="parameter"><code>type</code></em>. It can be any valid query type
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence which is
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence supported in BIND 9. The default query type is "A", unless the
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence <code class="option">-x</code> option is supplied to indicate a reverse lookup.
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence A zone transfer can be requested by specifying a type of AXFR. When
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence an incremental zone transfer (IXFR) is required,
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence <em class="parameter"><code>type</code></em> is set to <code class="literal">ixfr=N</code>.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein The incremental zone transfer will contain the changes made to the zone
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence since the serial number in the zone's SOA record was
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence <em class="parameter"><code>N</code></em>.
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence </p>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence<p>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence The <code class="option">-q</code> option sets the query name to
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <em class="parameter"><code>name</code></em>. This is useful to distinguish the
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence <em class="parameter"><code>name</code></em> from other arguments.
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence </p>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein The <code class="option">-v</code> causes <span><strong class="command">dig</strong></span> to
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein print the version number and exit.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Reverse lookups &#8212; mapping addresses to names &#8212; are simplified by the
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <code class="option">-x</code> option. <em class="parameter"><code>addr</code></em> is
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence an IPv4
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein address in dotted-decimal notation, or a colon-delimited IPv6 address.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence When this option is used, there is no need to provide the
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em> and
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <em class="parameter"><code>type</code></em> arguments. <span><strong class="command">dig</strong></span>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence automatically performs a lookup for a name like
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <code class="literal">11.12.13.10.in-addr.arpa</code> and sets the
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein query type and
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein class to PTR and IN respectively. By default, IPv6 addresses are
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence looked up using nibble format under the IP6.ARPA domain.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence To use the older RFC1886 method using the IP6.INT domain
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein specify the <code class="option">-i</code> option. Bit string labels (RFC2874)
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence are now experimental and are not attempted.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence To sign the DNS queries sent by <span><strong class="command">dig</strong></span> and
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein their
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein responses using transaction signatures (TSIG), specify a TSIG key file
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence using the <code class="option">-k</code> option. You can also specify the TSIG
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence key itself on the command line using the <code class="option">-y</code> option;
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence <em class="parameter"><code>hmac</code></em> is the type of the TSIG, default HMAC-MD5,
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence <em class="parameter"><code>name</code></em> is the name of the TSIG key and
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <em class="parameter"><code>key</code></em> is the actual key. The key is a
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence base-64
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence encoded string, typically generated by
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence Caution should be taken when using the <code class="option">-y</code> option on
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence multi-user systems as the key can be visible in the output from
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence or in the shell's history file. When
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence using TSIG authentication with <span><strong class="command">dig</strong></span>, the name
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein server that is queried needs to know the key and algorithm that is
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence being used. In BIND, this is done by providing appropriate
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence <span><strong class="command">key</strong></span> and <span><strong class="command">server</strong></span> statements in
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence <code class="filename">named.conf</code>.
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence </p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein</div>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence<div class="refsect1" lang="en">
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence<a name="id2666385"></a><h2>QUERY OPTIONS</h2>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence<p><span><strong class="command">dig</strong></span>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein provides a number of query options which affect
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence the way in which lookups are made and the results displayed. Some of
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence these set or reset flag bits in the query header, some determine which
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence sections of the answer get printed, and others determine the timeout
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence and retry strategies.
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence </p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Each query option is identified by a keyword preceded by a plus sign
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein (<code class="literal">+</code>). Some keywords set or reset an
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence option. These may be preceded
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence by the string <code class="literal">no</code> to negate the meaning of
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence that keyword. Other
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein keywords assign values to options like the timeout interval. They
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence have the form <code class="option">+keyword=value</code>.
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence The query options are:
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence<div class="variablelist"><dl>
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Use [do not use] TCP when querying name servers. The default
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein behavior is to use UDP unless an AXFR or IXFR query is
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence requested, in
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence which case a TCP connection is used.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+[no]vc</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Use [do not use] TCP when querying name servers. This alternate
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein syntax to <em class="parameter"><code>+[no]tcp</code></em> is
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence provided for backwards
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence compatibility. The "vc" stands for "virtual circuit".
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Ignore truncation in UDP responses instead of retrying with TCP.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence By
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence default, TCP retries are performed.
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+domain=somename</code></span></dt>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence<dd><p>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence Set the search list to contain the single domain
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence <em class="parameter"><code>somename</code></em>, as if specified in
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein a
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence <span><strong class="command">domain</strong></span> directive in
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence <code class="filename">/etc/resolv.conf</code>, and enable
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence search list
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence processing as if the <em class="parameter"><code>+search</code></em>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein option were given.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence<dt><span class="term"><code class="option">+[no]search</code></span></dt>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence<dd><p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Use [do not use] the search list defined by the searchlist or
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence domain
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein directive in <code class="filename">resolv.conf</code> (if
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence any).
0bd4e3591ac1a729c7ec8f811844119473350975David Lawrence The search list is not used by default.
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Perform [do not perform] a search showing intermediate
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence results.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+[no]defname</code></span></dt>
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence<dd><p>
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence Deprecated, treated as a synonym for <em class="parameter"><code>+[no]search</code></em>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]aaonly</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Sets the "aa" flag in the query.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+[no]aaflag</code></span></dt>
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence<dd><p>
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+[no]adflag</code></span></dt>
6a8832f784bd53aa6afbda22f6187cea6490e1e1Andreas Gustafsson<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Set [do not set] the AD (authentic data) bit in the
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence query. This requests the server to return whether
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein all of the answer and authority sections have all
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence been validated as secure according to the security
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence policy of the server. AD=1 indicates that all records
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence have been validated as secure and the answer is not
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence from a OPT-OUT range. AD=0 indicate that some part
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence of the answer was insecure or not validated. This
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence bit is set by default.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+[no]cdflag</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Set [do not set] the CD (checking disabled) bit in the query.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence This
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein requests the server to not perform DNSSEC validation of
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence responses.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]cl</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Display [do not display] the CLASS when printing the record.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Display [do not display] the TTL when printing the record.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence<dt><span class="term"><code class="option">+[no]recurse</code></span></dt>
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence<dd><p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Toggle the setting of the RD (recursion desired) bit
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence in the query. This bit is set by default, which means
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <span><strong class="command">dig</strong></span> normally sends recursive
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence queries. Recursion is automatically disabled when
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence the <em class="parameter"><code>+nssearch</code></em> or
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <em class="parameter"><code>+trace</code></em> query options are used.
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence </p></dd>
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence<dt><span class="term"><code class="option">+[no]nssearch</code></span></dt>
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence<dd><p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein When this option is set, <span><strong class="command">dig</strong></span>
6a8832f784bd53aa6afbda22f6187cea6490e1e1Andreas Gustafsson attempts to find the
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence authoritative name servers for the zone containing the name
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence being
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein looked up and display the SOA record that each name server has
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence for the
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence zone.
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence </p></dd>
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence<dt><span class="term"><code class="option">+[no]trace</code></span></dt>
ff30a206ecc63b6681716322ed7f017e3f51ea7fDavid Lawrence<dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Toggle tracing of the delegation path from the root
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein name servers for the name being looked up. Tracing
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein is disabled by default. When tracing is enabled,
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <span><strong class="command">dig</strong></span> makes iterative queries to
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence resolve the name being looked up. It will follow
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein referrals from the root servers, showing the answer
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence from each server that was used to resolve the lookup.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <span><strong class="command">+dnssec</strong></span> is also set when +trace is
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence set to better emulate the default queries from a nameserver.
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence </p>
87cafc5e70f79f2586d067fbdd64f61bbab069d2David Lawrence</dd>
87cafc5e70f79f2586d067fbdd64f61bbab069d2David Lawrence<dt><span class="term"><code class="option">+[no]cmd</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Toggles the printing of the initial comment in the output
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence identifying
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence the version of <span><strong class="command">dig</strong></span> and the query
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein options that have
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence been applied. This comment is printed by default.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+[no]short</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Provide a terse answer. The default is to print the answer in a
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence verbose form.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+[no]identify</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Show [or do not show] the IP address and port number that
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence supplied the
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein answer when the <em class="parameter"><code>+short</code></em> option
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence is enabled. If
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence short form answers are requested, the default is not to show the
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence source address and port number of the server that provided the
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence answer.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Toggle the display of comment lines in the output. The default
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein is to print comments.
2918b5bda6a55c301eb87992b5f2acd7176d0737David Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]rrcomments</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence Toggle the display of per-record comments in the output (for
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence example, human-readable key information about DNSKEY records).
863ac191b448a13ae1a3a8ee3458344e11602737David Lawrence The default is not to print record comments unless multiline
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence mode is active.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]crypto</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Toggle the display of cryptographic fields in DNSSEC records.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein The contents of these field are unnecessary to debug most DNSSEC
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein validation failures and removing them makes it easier to see
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence the common failures. The default is to display the fields.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein When omitted they are replaced by the string "[omitted]" or
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence in the DNSKEY case the key id is displayed as the replacement,
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein e.g. "[ key id = value ]".
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+split=W</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Split long hex- or base64-formatted fields in resource
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence records into chunks of <em class="parameter"><code>W</code></em> characters
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein (where <em class="parameter"><code>W</code></em> is rounded up to the nearest
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence multiple of 4).
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <em class="parameter"><code>+nosplit</code></em> or
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <em class="parameter"><code>+split=0</code></em> causes fields not to be
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein split at all. The default is 56 characters, or 44 characters
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence when multiline mode is active.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence This query option toggles the printing of statistics: when the
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein query
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein was made, the size of the reply and so on. The default
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein behavior is
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence to print the query statistics.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence Print [do not print] the query as it is sent.
87cafc5e70f79f2586d067fbdd64f61bbab069d2David Lawrence By default, the query is not printed.
87cafc5e70f79f2586d067fbdd64f61bbab069d2David Lawrence </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+[no]question</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Print [do not print] the question section of a query when an
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence answer is
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence returned. The default is to print the question section as a
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein comment.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]answer</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Display [do not display] the answer section of a reply. The
0ef59d22882fc5d28f4683fdbe88aefd8eaad6f3Francis Dupont default
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence is to display it.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]authority</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Display [do not display] the authority section of a reply. The
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein default is to display it.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]additional</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Display [do not display] the additional section of a reply.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence The default is to display it.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]all</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Set or clear all display flags.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+time=T</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Sets the timeout for a query to
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <em class="parameter"><code>T</code></em> seconds. The default
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein timeout is 5 seconds.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence An attempt to set <em class="parameter"><code>T</code></em> to less
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein than 1 will result
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence in a query timeout of 1 second being applied.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+tries=T</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Sets the number of times to try UDP queries to server to
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <em class="parameter"><code>T</code></em> instead of the default, 3.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence If
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <em class="parameter"><code>T</code></em> is less than or equal to
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein zero, the number of
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence tries is silently rounded up to 1.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+retry=T</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Sets the number of times to retry UDP queries to server to
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <em class="parameter"><code>T</code></em> instead of the default, 2.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Unlike
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <em class="parameter"><code>+tries</code></em>, this does not include
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence the initial
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence query.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+ndots=D</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Set the number of dots that have to appear in
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em> for it to be
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein considered absolute. The default value is that defined using
0cfbb9285a96f1355e5a3bd458624eaed2f16846Automatic Updater the
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein ndots statement in <code class="filename">/etc/resolv.conf</code>, or 1 if no
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence ndots statement is present. Names with fewer dots are
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence interpreted as
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence relative names and will be searched for in the domains listed in
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein the
fc6f5743aa860861fe39ca2680d9aa08e39d3039Andreas Gustafsson <code class="option">search</code> or <code class="option">domain</code> directive in
fc6f5743aa860861fe39ca2680d9aa08e39d3039Andreas Gustafsson <code class="filename">/etc/resolv.conf</code>.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+bufsize=B</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Set the UDP message buffer size advertised using EDNS0 to
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <em class="parameter"><code>B</code></em> bytes. The maximum and minimum sizes
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence of this buffer are 65535 and 0 respectively. Values outside
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence this range are rounded up or down appropriately.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Values other than zero will cause a EDNS query to be sent.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+edns=#</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
0ef59d22882fc5d28f4683fdbe88aefd8eaad6f3Francis Dupont Specify the EDNS version to query with. Valid values
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence are 0 to 255. Setting the EDNS version will cause
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence a EDNS query to be sent. <code class="option">+noedns</code>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein clears the remembered EDNS version. EDNS is set to
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence 0 by default.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p></dd>
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence<dt><span class="term"><code class="option">+[no]ednsopt[=code[:value]]</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence Specify EDNS option with code point <code class="option">code</code>
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence and optionally payload of <code class="option">value</code> as a
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein hexadecimal string. <code class="option">+noednsopt</code>
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence clears the EDNS options to to be sent.
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence </p></dd>
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence<dt><span class="term"><code class="option">+[no]multiline</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence Print records like the SOA records in a verbose multi-line
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence format with human-readable comments. The default is to print
b161f87be81548d1b6d0210a7e138a08fbb2d3e5David Lawrence each record on a single line, to facilitate machine parsing
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein of the <span><strong class="command">dig</strong></span> output.
b161f87be81548d1b6d0210a7e138a08fbb2d3e5David Lawrence </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+[no]onesoa</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Print only one (starting) SOA record when performing
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein an AXFR. The default is to print both the starting and
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein ending SOA records.
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence </p></dd>
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence<dt><span class="term"><code class="option">+[no]fail</code></span></dt>
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence<dd><p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Do not try the next server if you receive a SERVFAIL. The
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence default is
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence to not try the next server which is the reverse of normal stub
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence resolver
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein behavior.
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence </p></dd>
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence<dt><span class="term"><code class="option">+[no]besteffort</code></span></dt>
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence<dd><p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Attempt to display the contents of messages which are malformed.
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence The default is to not display malformed answers.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
0ef59d22882fc5d28f4683fdbe88aefd8eaad6f3Francis Dupont<dt><span class="term"><code class="option">+[no]dnssec</code></span></dt>
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence<dd><p>
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence Requests DNSSEC records be sent by setting the DNSSEC OK bit
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein (DO)
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence in the OPT record in the additional section of the query.
00a1623a59b1540c28781e8ccd8341c8114dbc75David Lawrence </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+[no]sigchase</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence Chase DNSSEC signature chains. Requires dig be compiled with
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence -DDIG_SIGCHASE.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dt><span class="term"><code class="option">+trusted-key=####</code></span></dt>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<dd>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Specifies a file containing trusted keys to be used with
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <code class="option">+sigchase</code>. Each DNSKEY record must be
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence on its own line.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein If not specified, <span><strong class="command">dig</strong></span> will look for
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <code class="filename">/etc/trusted-key.key</code> then
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <code class="filename">trusted-key.key</code> in the current directory.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Requires dig be compiled with -DDIG_SIGCHASE.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein</dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+[no]topdown</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
b161f87be81548d1b6d0210a7e138a08fbb2d3e5David Lawrence When chasing DNSSEC signature chains perform a top-down
fc6f5743aa860861fe39ca2680d9aa08e39d3039Andreas Gustafsson validation.
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence Requires dig be compiled with -DDIG_SIGCHASE.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
0c7b7a19e5a3c23fbb789238dcc4d43cd55387a0Brian Wellington<dt><span class="term"><code class="option">+[no]nsid</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Include an EDNS name server ID request when sending a query.
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence </p></dd>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence<dt><span class="term"><code class="option">+[no]keepopen</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence Keep the TCP socket open between queries and reuse it rather
b161f87be81548d1b6d0210a7e138a08fbb2d3e5David Lawrence than creating a new TCP socket for each lookup. The default
fc6f5743aa860861fe39ca2680d9aa08e39d3039Andreas Gustafsson is <code class="option">+nokeepopen</code>.
b161f87be81548d1b6d0210a7e138a08fbb2d3e5David Lawrence </p></dd>
b161f87be81548d1b6d0210a7e138a08fbb2d3e5David Lawrence<dt><span class="term"><code class="option">+[no]sit[<span class="optional">=####</span>]</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
0c7b7a19e5a3c23fbb789238dcc4d43cd55387a0Brian Wellington Send a Source Identity Token EDNS option, with optional value.
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence Replaying a SIT from a previous response will allow the
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein server to identify a previous client. The default is
3fb1637c9265cc593973326ae193783413f68699Tatuya JINMEI 神明達哉 <code class="option">+nosit</code>. Currently using experimental value
0cfbb9285a96f1355e5a3bd458624eaed2f16846Automatic Updater 65001 for the option code.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+[no]subnet=addr/prefix</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Send an EDNS Client Subnet option with the speciifed
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein IP address or network prefix.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term"><code class="option">+[no]expire</code></span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Send an EDNS Expire option. Currently using experimental
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein value 65002 for the option code.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p></dd>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein</dl></div>
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence<p>
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence </p>
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence</div>
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence<div class="refsect1" lang="en">
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence<a name="id2667561"></a><h2>MULTIPLE QUERIES</h2>
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence<p>
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence The BIND 9 implementation of <span><strong class="command">dig </strong></span>
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence supports
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence specifying multiple queries on the command line (in addition to
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence supporting the <code class="option">-f</code> batch file option). Each of those
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence queries can be supplied with its own set of flags, options and query
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence options.
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence </p>
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence<p>
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence In this case, each <em class="parameter"><code>query</code></em> argument
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence represent an
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence individual query in the command-line syntax described above. Each
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence consists of any of the standard options and flags, the name to be
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence looked up, an optional query type and class and any query options that
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence should be applied to that query.
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence </p>
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence<p>
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence A global set of query options, which should be applied to all queries,
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence can also be supplied. These global query options must precede the
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence first tuple of name, class, type, options, flags, and query options
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence supplied on the command line. Any global query options (except
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein the <code class="option">+[no]cmd</code> option) can be
b74896ead5671943135727b50d86d1040d7ffbf3David Lawrence overridden by a query-specific set of query options. For example:
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<pre class="programlisting">
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeindig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence</pre>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence shows how <span><strong class="command">dig</strong></span> could be used from the
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein command line
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence to make three lookups: an ANY query for <code class="literal">www.isc.org</code>, a
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence reverse lookup of 127.0.0.1 and a query for the NS records of
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <code class="literal">isc.org</code>.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence A global query option of <em class="parameter"><code>+qr</code></em> is
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein applied, so
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence that <span><strong class="command">dig</strong></span> shows the initial query it made
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence for each
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence lookup. The final query has a local query option of
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <em class="parameter"><code>+noqr</code></em> which means that <span><strong class="command">dig</strong></span>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein will not print the initial query when it looks up the NS records for
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <code class="literal">isc.org</code>.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence</div>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<div class="refsect1" lang="en">
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<a name="id2667715"></a><h2>IDN SUPPORT</h2>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence<p>
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence If <span><strong class="command">dig</strong></span> has been built with IDN (internationalized
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein domain name) support, it can accept and display non-ASCII domain names.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <span><strong class="command">dig</strong></span> appropriately converts character encoding of
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence domain name before sending a request to DNS server or displaying a
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein reply from the server.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence If you'd like to turn off the IDN support for some reason, defines
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence the <code class="envar">IDN_DISABLE</code> environment variable.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein The IDN support is disabled if the variable is set when
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence <span><strong class="command">dig</strong></span> runs.
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence </p>
30576c592b538cab293cf6e1f6265d376cd5a12cAndreas Gustafsson</div>
30576c592b538cab293cf6e1f6265d376cd5a12cAndreas Gustafsson<div class="refsect1" lang="en">
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<a name="id2667812"></a><h2>FILES</h2>
30576c592b538cab293cf6e1f6265d376cd5a12cAndreas Gustafsson<p><code class="filename">/etc/resolv.conf</code>
30576c592b538cab293cf6e1f6265d376cd5a12cAndreas Gustafsson </p>
30576c592b538cab293cf6e1f6265d376cd5a12cAndreas Gustafsson<p><code class="filename">${HOME}/.digrc</code>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
30576c592b538cab293cf6e1f6265d376cd5a12cAndreas Gustafsson</div>
30576c592b538cab293cf6e1f6265d376cd5a12cAndreas Gustafsson<div class="refsect1" lang="en">
30576c592b538cab293cf6e1f6265d376cd5a12cAndreas Gustafsson<a name="id2667833"></a><h2>SEE ALSO</h2>
30576c592b538cab293cf6e1f6265d376cd5a12cAndreas Gustafsson<p><span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <em class="citetitle">RFC1035</em>.
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence </p>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence</div>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence<div class="refsect1" lang="en">
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence<a name="id2667870"></a><h2>BUGS</h2>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<p>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence There are probably too many query options.
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence </p>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence</div>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence</div>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence<div class="navfooter">
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence<hr>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence<table width="100%" summary="Navigation footer">
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence<tr>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence<td width="40%" align="left">
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<a accesskey="p" href="Bv9ARM.ch10.html">Prev</a>�</td>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch10.html">Up</a></td>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence<td width="40%" align="right">�<a accesskey="n" href="man.host.html">Next</a>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence</td>
edcd1247ad7e81bb8b430e610d9718f64c70f05dDavid Lawrence</tr>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<tr>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence<td width="40%" align="left" valign="top">Manual pages�</td>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence<td width="40%" align="right" valign="top">�host</td>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein</tr>
1b038dbf0659fce246485562601ee851a9841ba1David Lawrence</table>
2918b5bda6a55c301eb87992b5f2acd7176d0737David Lawrence</div>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein</body>
2918b5bda6a55c301eb87992b5f2acd7176d0737David Lawrence</html>
2918b5bda6a55c301eb87992b5f2acd7176d0737David Lawrence