man.dig.html revision cd32f419a8a5432fbb139f56ee73cbf68b9350cc
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor - Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC")
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor - Copyright (C) 2000-2003 Internet Software Consortium.
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor - Permission to use, copy, modify, and/or distribute this software for any
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor - purpose with or without fee is hereby granted, provided that the above
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor - copyright notice and this permission notice appear in all copies.
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor - PERFORMANCE OF THIS SOFTWARE.
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor<!-- $Id$ -->
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor<link rel="up" href="Bv9ARM.ch13.html" title="Manual pages">
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor<link rel="prev" href="Bv9ARM.ch13.html" title="Manual pages">
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor<a accesskey="p" href="Bv9ARM.ch13.html">Prev</a>�</td>
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor<td width="20%" align="right">�<a accesskey="n" href="man.host.html">Next</a>
9597438befbcf432f65d6496ced75c99afcc1b48lgentis<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">-v</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>
9597438befbcf432f65d6496ced75c99afcc1b48lgentis<div class="cmdsynopsis"><p><code class="command">dig</code> [<code class="option">-h</code>]</p></div>
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor (domain information groper) is a flexible tool
d10581bbc764ba94e0373e25ee9c84610ac7f4f0lgentis for interrogating DNS name servers. It performs DNS lookups and
5a884cb4f4b177e207554c26334ef853c5665e79lgentis displays the answers that are returned from the name server(s) that
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor troubleshoot DNS problems because of its flexibility, ease of use and
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor clarity of output. Other lookup tools tend to have less functionality
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor than <span><strong class="command">dig</strong></span>.
5a884cb4f4b177e207554c26334ef853c5665e79lgentis Although <span><strong class="command">dig</strong></span> is normally used with
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor command-line
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor arguments, it also has a batch mode of operation for reading lookup
9597438befbcf432f65d6496ced75c99afcc1b48lgentis requests from a file. A brief summary of its command-line arguments
9597438befbcf432f65d6496ced75c99afcc1b48lgentis and options is printed when the <code class="option">-h</code> option is given.
9597438befbcf432f65d6496ced75c99afcc1b48lgentis Unlike earlier versions, the BIND 9 implementation of
9597438befbcf432f65d6496ced75c99afcc1b48lgentis <span><strong class="command">dig</strong></span> allows multiple lookups to be issued
9597438befbcf432f65d6496ced75c99afcc1b48lgentis command line.
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor Unless it is told to query a specific name server,
d10581bbc764ba94e0373e25ee9c84610ac7f4f0lgentis <span><strong class="command">dig</strong></span> will try each of the servers listed in
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor <code class="filename">/etc/resolv.conf</code>. If no usable server addresses
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor are found, <span><strong class="command">dig</strong></span> will send the query to the local
d10581bbc764ba94e0373e25ee9c84610ac7f4f0lgentis When no command line arguments or options are given,
5a884cb4f4b177e207554c26334ef853c5665e79lgentis <span><strong class="command">dig</strong></span> will perform an NS query for "." (the root).
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor <code class="filename">${HOME}/.digrc</code>. This file is read and
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor any options in it
9597438befbcf432f65d6496ced75c99afcc1b48lgentis are applied before the command line arguments.
9597438befbcf432f65d6496ced75c99afcc1b48lgentis The IN and CH class names overlap with the IN and CH top level
9597438befbcf432f65d6496ced75c99afcc1b48lgentis domain names. Either use the <code class="option">-t</code> and
9597438befbcf432f65d6496ced75c99afcc1b48lgentis <code class="option">-c</code> options to specify the type and class,
9597438befbcf432f65d6496ced75c99afcc1b48lgentis use the <code class="option">-q</code> the specify the domain name, or
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor use "IN." and "CH." when looking up these top level domains.
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor A typical invocation of <span><strong class="command">dig</strong></span> looks like:
9597438befbcf432f65d6496ced75c99afcc1b48lgentis<pre class="programlisting"> dig @server name type </pre>
9597438befbcf432f65d6496ced75c99afcc1b48lgentis<dt><span class="term"><code class="constant">server</code></span></dt>
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor is the name or IP address of the name server to query. This
1b1b6ae3d9cf8a22cd74249fe56d4fab443f9e21lgentis can be an IPv4 address in dotted-decimal notation or an IPv6
5a884cb4f4b177e207554c26334ef853c5665e79lgentis address in colon-delimited notation. When the supplied
1b1b6ae3d9cf8a22cd74249fe56d4fab443f9e21lgentis <em class="parameter"><code>server</code></em> argument is a hostname,
1b1b6ae3d9cf8a22cd74249fe56d4fab443f9e21lgentis <span><strong class="command">dig</strong></span> resolves that name before querying
1b1b6ae3d9cf8a22cd74249fe56d4fab443f9e21lgentis that name server.
1b1b6ae3d9cf8a22cd74249fe56d4fab443f9e21lgentis If no <em class="parameter"><code>server</code></em> argument is
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor provided, <span><strong class="command">dig</strong></span> consults
1b1b6ae3d9cf8a22cd74249fe56d4fab443f9e21lgentis <code class="filename">/etc/resolv.conf</code>; if an
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor address is found there, it queries the name server at
1b1b6ae3d9cf8a22cd74249fe56d4fab443f9e21lgentis that address. If either of the <code class="option">-4</code> or
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor <code class="option">-6</code> options are in use, then
1b1b6ae3d9cf8a22cd74249fe56d4fab443f9e21lgentis only addresses for the corresponding transport
1b1b6ae3d9cf8a22cd74249fe56d4fab443f9e21lgentis will be tried. If no usable addresses are found,
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor <span><strong class="command">dig</strong></span> will send the query to the
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor local host. The reply from the name server that
d10581bbc764ba94e0373e25ee9c84610ac7f4f0lgentis responds is displayed.
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor<dt><span class="term"><code class="constant">name</code></span></dt>
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor is the name of the resource record that is to be looked up.
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor<dt><span class="term"><code class="constant">type</code></span></dt>
d10581bbc764ba94e0373e25ee9c84610ac7f4f0lgentis indicates what type of query is required —
d10581bbc764ba94e0373e25ee9c84610ac7f4f0lgentis ANY, A, MX, SIG, etc.
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor <em class="parameter"><code>type</code></em> can be any valid query
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor type. If no
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor <em class="parameter"><code>type</code></em> argument is supplied,
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor <span><strong class="command">dig</strong></span> will perform a lookup for an
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor The <code class="option">-b</code> option sets the source IP address of the query
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor to <em class="parameter"><code>address</code></em>. This must be a valid
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor one of the host's network interfaces or "0.0.0.0" or "::". An optional
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor may be specified by appending "#<port>"
d10581bbc764ba94e0373e25ee9c84610ac7f4f0lgentis The default query class (IN for internet) is overridden by the
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor <code class="option">-c</code> option. <em class="parameter"><code>class</code></em> is
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor class, such as HS for Hesiod records or CH for Chaosnet records.
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor The <code class="option">-f</code> option makes <span><strong class="command">dig </strong></span>
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor in batch mode by reading a list of lookup requests to process from the
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor file <em class="parameter"><code>filename</code></em>. The file contains a
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor queries, one per line. Each entry in the file should be organized in
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor the same way they would be presented as queries to
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor <span><strong class="command">dig</strong></span> using the command-line interface.
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor The <code class="option">-m</code> option enables memory usage debugging.
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor If a non-standard port number is to be queried, the
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor <code class="option">-p</code> option is used. <em class="parameter"><code>port#</code></em> is
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor the port number that <span><strong class="command">dig</strong></span> will send its
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor instead of the standard DNS port number 53. This option would be used
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor to test a name server that has been configured to listen for queries
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor on a non-standard port number.
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span>
09796a508c72a6aba33aa486753bb8cdea806d43lgentis use IPv4 query transport. The <code class="option">-6</code> option forces
cac3c497ee99fac7d83f6e8bd05cb72eaaf95d8fgryzor <span><strong class="command">dig</strong></span> to only use IPv6 query transport.
<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
e.g. "[ key id = value ]".
accepted. Setting a named flag (e.g. DO) will silently be
<dt><span class="term"><code class="option">+[no]sit[<span class="optional">=####</span>]</code></span></dt>