dig.docbook revision b312748a11d27fe387984973ba79975a9d6863c4
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim - Copyright (C) 2000, 2001 Internet Software Consortium.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim - Permission to use, copy, modify, and distribute this software for any
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim - purpose with or without fee is hereby granted, provided that the above
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim - copyright notice and this permission notice appear in all copies.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<!-- $Id: dig.docbook,v 1.16 2003/02/26 05:05:13 marka Exp $ -->
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<refentryinfo>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim</refentryinfo>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<refnamediv>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim</refnamediv>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<refsynopsisdiv>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<cmdsynopsis>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<arg><option>-b <replaceable class="parameter">address</replaceable></option></arg>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<arg><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<arg><option>-k <replaceable class="parameter">filename</replaceable></option></arg>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<arg><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<arg><option>-x <replaceable class="parameter">addr</replaceable></option></arg>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<arg><option>-y <replaceable class="parameter">name:key</replaceable></option></arg>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim</cmdsynopsis>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<cmdsynopsis>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim</cmdsynopsis>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<cmdsynopsis>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim</cmdsynopsis>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim</refsynopsisdiv>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<command>dig</command> (domain information groper) is a flexible tool
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimfor interrogating DNS name servers. It performs DNS lookups and
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimdisplays the answers that are returned from the name server(s) that
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimwere queried. Most DNS administrators use <command>dig</command> to
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimtroubleshoot DNS problems because of its flexibility, ease of use and
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimclarity of output. Other lookup tools tend to have less functionality
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimAlthough <command>dig</command> is normally used with command-line
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimarguments, it also has a batch mode of operation for reading lookup
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimrequests from a file. A brief summary of its command-line arguments
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimand options is printed when the <option>-h</option> option is given.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimUnlike earlier versions, the BIND9 implementation of
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<command>dig</command> allows multiple lookups to be issued from the
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimcommand line.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimUnless it is told to query a specific name server,
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<command>dig</command> will try each of the servers listed in
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimWhen no command line arguments or options are given, will perform an
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimNS query for "." (the root).
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimIt is possible to set per-user defaults for <command>dig</command> via
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<filename>${HOME}/.digrc</filename>. This file is read and any options in it
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimare applied before the command line arguments.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim</refsect1>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimA typical invocation of <command>dig</command> looks like:
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<programlisting> dig @server name type </programlisting> where:
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<variablelist>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimis the name or IP address of the name server to query. This can be an IPv4
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimaddress in dotted-decimal notation or an IPv6
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimaddress in colon-delimited notation. When the supplied
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<command>dig</command> resolves that name before querying that name
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimserver. If no <parameter>server</parameter> argument is provided,
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<command>dig</command> consults <filename>/etc/resolv.conf</filename>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimand queries the name servers listed there. The reply from the name
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimserver that responds is displayed.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimis the name of the resource record that is to be looked up.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimindicates what type of query is required —
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimANY, A, MX, SIG, etc.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<parameter>type</parameter> can be any valid query type. If no
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<command>dig</command> will perform a lookup for an A record.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim</variablelist>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim</refsect1>
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimThe <option>-b</option> option sets the source IP address of the query
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimto <parameter>address</parameter>. This must be a valid address on
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimone of the host's network interfaces or "0.0.0.0" or "::". An optional port
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimmay be specified by appending "#<port>"
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimThe default query class (IN for internet) is overridden by the
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<option>-c</option> option. <parameter>class</parameter> is any valid
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimclass, such as HS for Hesiod records or CH for CHAOSNET records.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimThe <option>-f</option> option makes <command>dig </command> operate
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimin batch mode by reading a list of lookup requests to process from the
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimfile <parameter>filename</parameter>. The file contains a number of
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimqueries, one per line. Each entry in the file should be organised in
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimthe same way they would be presented as queries to
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimIf a non-standard port number is to be queried, the
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<option>-p</option> option is used. <parameter>port#</parameter> is
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimthe port number that <command>dig</command> will send its queries
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jiminstead of the standard DNS port number 53. This option would be used
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimto test a name server that has been configured to listen for queries
4ef955e505f09413a07d092dd64802e14ce2d6bcjimon a non-standard port number.
ccb1d3d23d96790217807954139c625ec9763350jim<parameter>type</parameter>. It can be any valid query type which is
ccb1d3d23d96790217807954139c625ec9763350jimsupported in BIND9. The default query type "A", unless the
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<option>-x</option> option is supplied to indicate a reverse lookup.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimA zone transfer can be requested by specifying a type of AXFR. When
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jiman incremental zone transfer (IXFR) is required,
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim<parameter>type</parameter> is set to <literal>ixfr=N</literal>.
6415151dcc1f5a7257cfe440efd0558adcccedc3ylavicThe incremental zone transfer will contain the changes made to the zone
6415151dcc1f5a7257cfe440efd0558adcccedc3ylavicsince the serial number in the zone's SOA record was
looked up using nibble format under the IP6.ARPA domain.
To use the older RFC1886 method using the IP6.INT domain