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