man.dig.html revision c8c33981e6b68e71ae09f549db5cbb5b3ee2d663
088fa5d9eaa83bf4b3d59a64c0519f42a143aaa9Alin Brici - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller - Copyright (C) 2000-2003 Internet Software Consortium.
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller - Permission to use, copy, modify, and distribute this software for any
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller - purpose with or without fee is hereby granted, provided that the above
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller - copyright notice and this permission notice appear in all copies.
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller - PERFORMANCE OF THIS SOFTWARE.
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller<!-- $Id: man.dig.html,v 1.3 2005/07/19 07:29:54 marka Exp $ -->
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
b84068e6021ec8a830c26c4494f6e335d1f9c0efBrendan Miller<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
088fa5d9eaa83bf4b3d59a64c0519f42a143aaa9Alin Brici<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller<link rel="prev" href="Bv9ARM.ch10.html" title="Manual pages">
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller<link rel="next" href="man.host.html" title="host">
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller<table width="100%" summary="Navigation header">
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller<tr><th colspan="3" align="center">dig</th></tr>
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller<a accesskey="p" href="Bv9ARM.ch10.html">Prev</a>�</td>
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller<th width="60%" align="center">Manual pages</th>
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller<td width="20%" align="right">�<a accesskey="n" href="man.host.html">Next</a>
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller<a name="man.dig"></a><div class="titlepage"></div>
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller<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">-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>name:key</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] [name] [type] [class] [queryopt...]</p></div>
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller<div class="cmdsynopsis"><p><code class="command">dig</code> [<code class="option">-h</code>]</p></div>
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller<p><span><strong class="command">dig</strong></span>
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller (domain information groper) is a flexible tool
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller for interrogating DNS name servers. It performs DNS lookups and
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller displays the answers that are returned from the name server(s) that
ad0b283113c3f11ac1877df97d5d0fae899b56caBrendan Mmiller were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
b84068e6021ec8a830c26c4494f6e335d1f9c0efBrendan Miller troubleshoot DNS problems because of its flexibility, ease of use and
b84068e6021ec8a830c26c4494f6e335d1f9c0efBrendan Miller clarity of output. Other lookup tools tend to have less functionality
ad0b283113c3f11ac1877df97d5d0fae899b56caBrendan Mmiller than <span><strong class="command">dig</strong></span>.
ba208d3f0e9d48f3c841cdd627f200a7bb04cea8Brendan Mmiller Although <span><strong class="command">dig</strong></span> is normally used with
ba208d3f0e9d48f3c841cdd627f200a7bb04cea8Brendan Mmiller arguments, it also has a batch mode of operation for reading lookup
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller requests from a file. A brief summary of its command-line arguments
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller and options is printed when the <code class="option">-h</code> option is given.
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller Unlike earlier versions, the BIND9 implementation of
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller <span><strong class="command">dig</strong></span> allows multiple lookups to be issued
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller command line.
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller Unless it is told to query a specific name server,
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller <span><strong class="command">dig</strong></span> will try each of the servers listed
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller <code class="filename">/etc/resolv.conf</code>.
52a38c0fe76475c93300961068ea9332cb9854d6Brendan Mmiller When no command line arguments or options are given, will perform an
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller NS query for "." (the root).
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller <code class="filename">${HOME}/.digrc</code>. This file is read and
52a38c0fe76475c93300961068ea9332cb9854d6Brendan Mmiller any options in it
52a38c0fe76475c93300961068ea9332cb9854d6Brendan Mmiller are applied before the command line arguments.
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller<a name="id2533374"></a><h2>SIMPLE USAGE</h2>
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller A typical invocation of <span><strong class="command">dig</strong></span> looks like:
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller<pre class="programlisting"> dig @server name type </pre>
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller<dt><span class="term"><code class="constant">server</code></span></dt>
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller is the name or IP address of the name server to query. This can
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller address in dotted-decimal notation or an IPv6
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller address in colon-delimited notation. When the supplied
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller <em class="parameter"><code>server</code></em> argument is a
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller <span><strong class="command">dig</strong></span> resolves that name before
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller querying that name
01f9c7d314ab242f004a7ce919c82ca886aedc3fBrendan Miller server. If no <em class="parameter"><code>server</code></em>
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller argument is provided,
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller <span><strong class="command">dig</strong></span> consults <code class="filename">/etc/resolv.conf</code>
ba208d3f0e9d48f3c841cdd627f200a7bb04cea8Brendan Mmiller and queries the name servers listed there. The reply from the
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller server that responds is displayed.
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller<dt><span class="term"><code class="constant">name</code></span></dt>
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller is the name of the resource record that is to be looked up.
a20f25a11beaf0445cc53f4d56537cef3d26281eBrendan Mmiller<dt><span class="term"><code class="constant">type</code></span></dt>
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller indicates what type of query is required —
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller ANY, A, MX, SIG, etc.
99054f32a1766b8a8f60509cb724359413171d1dBrendan Mmiller <em class="parameter"><code>type</code></em> can be any valid query
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller <em class="parameter"><code>type</code></em> argument is supplied,
3f424ffdb194d6ff7ac053c5b3e53211a2de2d64Brendan Mmiller <span><strong class="command">dig</strong></span> will perform a lookup for an
<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