man.dig.html revision d71e2e0c61df16ff37c9934c371a4a60c08974f7
816e576f77e2c46df3e3d97d65822aa8aded7c4bDavid Lawrence - Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley - Copyright (C) 2000-2003 Internet Software Consortium.
467cf32369bcad1b4874c8dbf35f5ca955cabf37Bob Halley - Permission to use, copy, modify, and distribute this software for any
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley - purpose with or without fee is hereby granted, provided that the above
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley - copyright notice and this permission notice appear in all copies.
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley - PERFORMANCE OF THIS SOFTWARE.
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<!-- $Id: man.dig.html,v 1.46 2007/05/09 03:33:51 marka Exp $ -->
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<link rel="prev" href="Bv9ARM.ch10.html" title="Manual pages">
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<link rel="next" href="man.host.html" title="host">
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<a accesskey="p" href="Bv9ARM.ch10.html">Prev</a>�</td>
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<td width="20%" align="right">�<a accesskey="n" href="man.host.html">Next</a>
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley<a name="man.dig"></a><div class="titlepage"></div>
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley<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>
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley<div class="cmdsynopsis"><p><code class="command">dig</code> [<code class="option">-h</code>]</p></div>
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<p><span><strong class="command">dig</strong></span>
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley (domain information groper) is a flexible tool
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley for interrogating DNS name servers. It performs DNS lookups and
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley displays the answers that are returned from the name server(s) that
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley troubleshoot DNS problems because of its flexibility, ease of use and
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley clarity of output. Other lookup tools tend to have less functionality
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley than <span><strong class="command">dig</strong></span>.
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley Although <span><strong class="command">dig</strong></span> is normally used with
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley command-line
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley arguments, it also has a batch mode of operation for reading lookup
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley requests from a file. A brief summary of its command-line arguments
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley and options is printed when the <code class="option">-h</code> option is given.
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley Unlike earlier versions, the BIND 9 implementation of
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley <span><strong class="command">dig</strong></span> allows multiple lookups to be issued
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley command line.
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley Unless it is told to query a specific name server,
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley <span><strong class="command">dig</strong></span> will try each of the servers listed
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley When no command line arguments or options are given, will perform an
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley NS query for "." (the root).
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley <code class="filename">${HOME}/.digrc</code>. This file is read and
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley any options in it
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley are applied before the command line arguments.
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley The IN and CH class names overlap with the IN and CH top level
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley domains names. Either use the <code class="option">-t</code> and
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley <code class="option">-c</code> options to specify the type and class or
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley use the <code class="option">-q</code> the specify the domain name or
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley use "IN." and "CH." when looking up these top level domains.
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley A typical invocation of <span><strong class="command">dig</strong></span> looks like:
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley<pre class="programlisting"> dig @server name type </pre>
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<dt><span class="term"><code class="constant">server</code></span></dt>
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley is the name or IP address of the name server to query. This can
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley address in dotted-decimal notation or an IPv6
3bbe4751ff06fc8bfe190289dddb2f58553e308eBob Halley address in colon-delimited notation. When the supplied
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley <em class="parameter"><code>server</code></em> argument is a
fb2d509d86af3a33350a1703316bed5b219edecaBob Halley <span><strong class="command">dig</strong></span> resolves that name before
fb2d509d86af3a33350a1703316bed5b219edecaBob Halley querying that name
fb2d509d86af3a33350a1703316bed5b219edecaBob Halley server. If no <em class="parameter"><code>server</code></em>
fb2d509d86af3a33350a1703316bed5b219edecaBob Halley argument is provided,
fb2d509d86af3a33350a1703316bed5b219edecaBob Halley <span><strong class="command">dig</strong></span> consults <code class="filename">/etc/resolv.conf</code>
fb2d509d86af3a33350a1703316bed5b219edecaBob Halley and queries the name servers listed there. The reply from the
fb2d509d86af3a33350a1703316bed5b219edecaBob Halley server that responds is displayed.
fb2d509d86af3a33350a1703316bed5b219edecaBob Halley<dt><span class="term"><code class="constant">name</code></span></dt>
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley is the name of the resource record that is to be looked up.
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley<dt><span class="term"><code class="constant">type</code></span></dt>
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley indicates what type of query is required —
015156aff4bfcbb7d70dbc7c50bcde0a8fabb108Bob Halley ANY, A, MX, SIG, etc.
<em class="parameter"><code>type</code></em> arguments. <span><strong class="command">dig</strong></span>
looked up using nibble format under the IP6.ARPA domain.
To use the older RFC1886 method using the IP6.INT domain
<span><strong class="command">key</strong></span> and <span><strong class="command">server</strong></span> statements in
<em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em> for it to be