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