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