man.dig.html revision 2895f101b5585a19015ac2c2c1e1812ac467fa12
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce - Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce - Copyright (C) 2000-2003 Internet Software Consortium.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce - Permission to use, copy, modify, and/or distribute this software for any
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce - purpose with or without fee is hereby granted, provided that the above
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce - copyright notice and this permission notice appear in all copies.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce - PERFORMANCE OF THIS SOFTWARE.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce<!-- $Id: man.dig.html,v 1.122 2009/09/03 01:14:41 tbox Exp $ -->
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce<link rel="prev" href="Bv9ARM.ch10.html" title="Manual pages">
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce<link rel="next" href="man.host.html" title="host">
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce<a accesskey="p" href="Bv9ARM.ch10.html">Prev</a>�</td>
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce<td width="20%" align="right">�<a accesskey="n" href="man.host.html">Next</a>
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce<a name="man.dig"></a><div class="titlepage"></div>
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce<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>
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce<div class="cmdsynopsis"><p><code class="command">dig</code> [<code class="option">-h</code>]</p></div>
edaadf8de0c86a2cfff2d29215775d42919476f3Pavel Březina<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
c1058e96679c7ed1372825bf5226ce7d28a8e6ffPavel Březina<p><span><strong class="command">dig</strong></span>
dee7a89098b698e756f63e4041734d7322ad8b1ePavel Březina (domain information groper) is a flexible tool
ab967283b710dfa05d11ee5b30c7ac916486ceecSimo Sorce for interrogating DNS name servers. It performs DNS lookups and
c6872e79e8496fd075e20aec0343ade99cca725cSimo Sorce displays the answers that are returned from the name server(s) that
c6872e79e8496fd075e20aec0343ade99cca725cSimo Sorce were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
c6872e79e8496fd075e20aec0343ade99cca725cSimo Sorce troubleshoot DNS problems because of its flexibility, ease of use and
7c69221077c780e62f6c536e78675f2dc1c131bcMichal Zidek clarity of output. Other lookup tools tend to have less functionality
22a21e910fd216ec1468fe769dcc29f1621a52a4Ondrej Kos than <span><strong class="command">dig</strong></span>.
ab967283b710dfa05d11ee5b30c7ac916486ceecSimo Sorce Although <span><strong class="command">dig</strong></span> is normally used with
ab967283b710dfa05d11ee5b30c7ac916486ceecSimo Sorce command-line
233a3c6c48972b177e60d6ef4cecfacd3cf31659Simo Sorce arguments, it also has a batch mode of operation for reading lookup
c6872e79e8496fd075e20aec0343ade99cca725cSimo Sorce requests from a file. A brief summary of its command-line arguments
c6872e79e8496fd075e20aec0343ade99cca725cSimo Sorce and options is printed when the <code class="option">-h</code> option is given.
233a3c6c48972b177e60d6ef4cecfacd3cf31659Simo Sorce Unlike earlier versions, the BIND 9 implementation of
233a3c6c48972b177e60d6ef4cecfacd3cf31659Simo Sorce <span><strong class="command">dig</strong></span> allows multiple lookups to be issued
c9b0071bfcb8eb8c71e40248de46d23aceecc0f3Pavel Reichl command line.
f9961e5f82e0ef474d6492371bfdf9e74e208a99Pavel Březina Unless it is told to query a specific name server,
f9961e5f82e0ef474d6492371bfdf9e74e208a99Pavel Březina <span><strong class="command">dig</strong></span> will try each of the servers listed
9cb46bc62f22e0104f1b41a423b014c281ef5fc2Jakub Hrozek <code class="filename">/etc/resolv.conf</code>.
7caf7ed4f2eae1ec1c0717b4ee6ce78bdacd5926Jakub Hrozek When no command line arguments or options are given,
dcc6877aa2e2dd63a9dc9c411a9c58feaeb36b9aStephen Gallagher <span><strong class="command">dig</strong></span> will perform an NS query for "." (the root).
2a96981a0ac781d01e5bba473409ed2bdf4cd4e0Jakub Hrozek It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
e81deec535d11912b87954c81a1edd768c1386c9Jakub Hrozek <code class="filename">${HOME}/.digrc</code>. This file is read and
4dd38025efda88f123eac672f87d3cda12f050c8Jakub Hrozek any options in it
4dd38025efda88f123eac672f87d3cda12f050c8Jakub Hrozek are applied before the command line arguments.
10a28f461c25d788ff4dcffefa881e7aa724a25dPavel Březina The IN and CH class names overlap with the IN and CH top level
60cab26b12df9a2153823972cde0c38ca86e01b9Yassir Elley domains names. Either use the <code class="option">-t</code> and
1319e71fd1680ca4864afe0b1aca2b8c8e4a1ee4Stef Walter <code class="option">-c</code> options to specify the type and class,
0c1d65998907930678da2d091789446f2c344d5dJakub Hrozek use the <code class="option">-q</code> the specify the domain name, or
a2ea3f5d9ef9f17efbb61e942c2bc6cff7d1ebf2Jakub Hrozek use "IN." and "CH." when looking up these top level domains.
1243e093fd31c5660adf1bb3dd477d6935a755beJakub Hrozek A typical invocation of <span><strong class="command">dig</strong></span> looks like:
979e8d8d6ed444007eeff6be5269e8dc5d2bdf68Pavel Reichl<pre class="programlisting"> dig @server name type </pre>
9118a539a5d59f669f551114f880fe91d6bb8741Jakub Hrozek<dt><span class="term"><code class="constant">server</code></span></dt>
19e44537c28f6d5f011cd7ac885c74c1e892605fSimo Sorce is the name or IP address of the name server to query. This can
c30b7a1931211fdcae0564551a7625cc4f6dee9fJakub Hrozek address in dotted-decimal notation or an IPv6
e732d23f3ec986a463d757781a334040e03d1f59Jakub Hrozek address in colon-delimited notation. When the supplied
e732d23f3ec986a463d757781a334040e03d1f59Jakub Hrozek <em class="parameter"><code>server</code></em> argument is a
dd285415d7a8d8376207960cfa3e977524c3b98cJakub Hrozek <span><strong class="command">dig</strong></span> resolves that name before
beec1ee5799570f34a51ea57674c7291c15f7022Jakub Hrozek querying that name
fcbcfa69f9291936f01f24b5fcb5a7672dca46f3Jakub Hrozek server. If no <em class="parameter"><code>server</code></em>
4714118890e51b365fbce543d0a042b4b59b2b25Michal Zidek argument is provided,
efc65e78fa4e01e6cecc8690a9899af61213be62Fabiano Fidêncio <span><strong class="command">dig</strong></span> consults <code class="filename">/etc/resolv.conf</code>
41cd6072648bb7a9e14e56ed38004a2947f67657Jakub Hrozek and queries the name servers listed there. The reply from the
7171a7584dda534dde5409f3e7f4657e845ece15Fabiano Fidêncio server that responds is displayed.
d4757440418c7b73bbecec7e40baf6dfe8cc9460Sumit Bose<dt><span class="term"><code class="constant">name</code></span></dt>
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce is the name of the resource record that is to be looked up.
0c16d2eefbc6ac8331078a4cdcecfee817a71bc6Simo Sorce<dt><span class="term"><code class="constant">type</code></span></dt>
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce indicates what type of query is required —
7650ded4ffa87fcf7ce5adf00920fecf89cffcf5Michal Zidek ANY, A, MX, SIG, etc.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce <em class="parameter"><code>type</code></em> can be any valid query
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce <em class="parameter"><code>type</code></em> argument is supplied,
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce <span><strong class="command">dig</strong></span> will perform a lookup for an
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce The <code class="option">-b</code> option sets the source IP address of the query
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce to <em class="parameter"><code>address</code></em>. This must be a valid
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce one of the host's network interfaces or "0.0.0.0" or "::". An optional
<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