man.dig.html revision dca44b90c96352111e0f1cdfdeccde1a13732161
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung - Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
a0576ea10221aa5c469db9b188e85cf4254093ffMario Amelung - Copyright (C) 2000-2003 Internet Software Consortium.
8e2d2e537700b0760344a69708799ffe9685e529Frans van Dunne - Permission to use, copy, modify, and distribute this software for any
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung - purpose with or without fee is hereby granted, provided that the above
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung - copyright notice and this permission notice appear in all copies.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung - PERFORMANCE OF THIS SOFTWARE.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<!-- $Id: man.dig.html,v 1.21 2006/02/17 02:06:13 marka Exp $ -->
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
8e2d2e537700b0760344a69708799ffe9685e529Frans van Dunne<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
a0576ea10221aa5c469db9b188e85cf4254093ffMario Amelung<link rel="prev" href="Bv9ARM.ch10.html" title="Manual pages">
8e2d2e537700b0760344a69708799ffe9685e529Frans van Dunne<link rel="next" href="man.host.html" title="host">
8e2d2e537700b0760344a69708799ffe9685e529Frans van Dunne<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<table width="100%" summary="Navigation header">
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<tr><th colspan="3" align="center">dig</th></tr>
8e2d2e537700b0760344a69708799ffe9685e529Frans van Dunne<a accesskey="p" href="Bv9ARM.ch10.html">Prev</a>�</td>
8e2d2e537700b0760344a69708799ffe9685e529Frans van Dunne<th width="60%" align="center">Manual pages</th>
8e2d2e537700b0760344a69708799ffe9685e529Frans van Dunne<td width="20%" align="right">�<a accesskey="n" href="man.host.html">Next</a>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<a name="man.dig"></a><div class="titlepage"></div>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<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>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<div class="cmdsynopsis"><p><code class="command">dig</code> [<code class="option">-h</code>]</p></div>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<p><span><strong class="command">dig</strong></span>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung (domain information groper) is a flexible tool
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung for interrogating DNS name servers. It performs DNS lookups and
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung displays the answers that are returned from the name server(s) that
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung troubleshoot DNS problems because of its flexibility, ease of use and
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung clarity of output. Other lookup tools tend to have less functionality
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung than <span><strong class="command">dig</strong></span>.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung Although <span><strong class="command">dig</strong></span> is normally used with
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung arguments, it also has a batch mode of operation for reading lookup
8e2d2e537700b0760344a69708799ffe9685e529Frans van Dunne requests from a file. A brief summary of its command-line arguments
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung and options is printed when the <code class="option">-h</code> option is given.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung Unlike earlier versions, the BIND9 implementation of
8e2d2e537700b0760344a69708799ffe9685e529Frans van Dunne <span><strong class="command">dig</strong></span> allows multiple lookups to be issued
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung command line.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung Unless it is told to query a specific name server,
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <span><strong class="command">dig</strong></span> will try each of the servers listed
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <code class="filename">/etc/resolv.conf</code>.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung When no command line arguments or options are given, will perform an
8e2d2e537700b0760344a69708799ffe9685e529Frans van Dunne NS query for "." (the root).
09f2079070745df30fd92d42151f8e029637659cFrans van Dunne It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <code class="filename">${HOME}/.digrc</code>. This file is read and
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung any options in it
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung are applied before the command line arguments.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung A typical invocation of <span><strong class="command">dig</strong></span> looks like:
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<pre class="programlisting"> dig @server name type </pre>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<dt><span class="term"><code class="constant">server</code></span></dt>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung is the name or IP address of the name server to query. This can
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung address in dotted-decimal notation or an IPv6
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung address in colon-delimited notation. When the supplied
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <em class="parameter"><code>server</code></em> argument is a
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <span><strong class="command">dig</strong></span> resolves that name before
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung querying that name
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung server. If no <em class="parameter"><code>server</code></em>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung argument is provided,
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <span><strong class="command">dig</strong></span> consults <code class="filename">/etc/resolv.conf</code>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung and queries the name servers listed there. The reply from the
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung server that responds is displayed.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<dt><span class="term"><code class="constant">name</code></span></dt>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung is the name of the resource record that is to be looked up.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung<dt><span class="term"><code class="constant">type</code></span></dt>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung indicates what type of query is required —
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung ANY, A, MX, SIG, etc.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <em class="parameter"><code>type</code></em> can be any valid query
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <em class="parameter"><code>type</code></em> argument is supplied,
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <span><strong class="command">dig</strong></span> will perform a lookup for an
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung The <code class="option">-b</code> option sets the source IP address of the query
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung to <em class="parameter"><code>address</code></em>. This must be a valid
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung one of the host's network interfaces or "0.0.0.0" or "::". An optional
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung may be specified by appending "#<port>"
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung The default query class (IN for internet) is overridden by the
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <code class="option">-c</code> option. <em class="parameter"><code>class</code></em> is
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung class, such as HS for Hesiod records or CH for CHAOSNET records.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung The <code class="option">-f</code> option makes <span><strong class="command">dig </strong></span>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung in batch mode by reading a list of lookup requests to process from the
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung file <em class="parameter"><code>filename</code></em>. The file contains a
8e2d2e537700b0760344a69708799ffe9685e529Frans van Dunne queries, one per line. Each entry in the file should be organised in
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung the same way they would be presented as queries to
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <span><strong class="command">dig</strong></span> using the command-line interface.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung If a non-standard port number is to be queried, the
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <code class="option">-p</code> option is used. <em class="parameter"><code>port#</code></em> is
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung the port number that <span><strong class="command">dig</strong></span> will send its
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung instead of the standard DNS port number 53. This option would be used
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung to test a name server that has been configured to listen for queries
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung on a non-standard port number.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung use IPv4 query transport. The <code class="option">-6</code> option forces
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <span><strong class="command">dig</strong></span> to only use IPv6 query transport.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung The <code class="option">-t</code> option sets the query type to
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <em class="parameter"><code>type</code></em>. It can be any valid query type
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung supported in BIND9. The default query type "A", unless the
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <code class="option">-x</code> option is supplied to indicate a reverse lookup.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung A zone transfer can be requested by specifying a type of AXFR. When
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung an incremental zone transfer (IXFR) is required,
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <em class="parameter"><code>type</code></em> is set to <code class="literal">ixfr=N</code>.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung The incremental zone transfer will contain the changes made to the zone
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung since the serial number in the zone's SOA record was
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung The <code class="option">-q</code> option sets the query name to
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <em class="parameter"><code>name</code></em>. This useful do distingish the
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <em class="parameter"><code>name</code></em> from other arguments.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung Reverse lookups - mapping addresses to names - are simplified by the
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <code class="option">-x</code> option. <em class="parameter"><code>addr</code></em> is
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung address in dotted-decimal notation, or a colon-delimited IPv6 address.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung When this option is used, there is no need to provide the
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em> and
8e2d2e537700b0760344a69708799ffe9685e529Frans van Dunne <em class="parameter"><code>type</code></em> arguments. <span><strong class="command">dig</strong></span>
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung automatically performs a lookup for a name like
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung <code class="literal">11.12.13.10.in-addr.arpa</code> and sets the
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung query type and
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung class to PTR and IN respectively. By default, IPv6 addresses are
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung looked up using nibble format under the IP6.ARPA domain.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung To use the older RFC1886 method using the IP6.INT domain
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung specify the <code class="option">-i</code> option. Bit string labels (RFC2874)
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung are now experimental and are not attempted.
<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