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