dig.docbook revision 40b28f54029a5399fc17d895dd9e8bbcd97d6b70
5cd4555ad444fd391002ae32450572054369fd42Rob Austein<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
5cd4555ad444fd391002ae32450572054369fd42Rob Austein "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [<!ENTITY mdash "—">]>
938440694b33cd752e9e4b71a526368b4811c177Tinderbox User - Copyright (C) 2004-2011, 2013, 2014 Internet Systems Consortium, Inc. ("ISC")
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews - Copyright (C) 2000-2003 Internet Software Consortium.
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater - Permission to use, copy, modify, and/or distribute this software for any
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - purpose with or without fee is hereby granted, provided that the above
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - copyright notice and this permission notice appear in all copies.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refentryinfo>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </refentryinfo>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refnamediv>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </refnamediv>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </copyright>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson <holder>Internet Software Consortium.</holder>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson <refsynopsisdiv>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <cmdsynopsis>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <arg><option>-b <replaceable class="parameter">address</replaceable></option></arg>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <arg><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson <arg><option>-k <replaceable class="parameter">filename</replaceable></option></arg>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <arg><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <arg><option>-q <replaceable class="parameter">name</replaceable></option></arg>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <arg><option>-x <replaceable class="parameter">addr</replaceable></option></arg>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson <arg><option>-y <replaceable class="parameter"><optional>hmac:</optional>name:key</replaceable></option></arg>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson </cmdsynopsis>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </cmdsynopsis>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <cmdsynopsis>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <arg choice="opt" rep="repeat">global-queryopt</arg>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson <arg choice="opt" rep="repeat">query</arg>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </cmdsynopsis>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </refsynopsisdiv>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein (domain information groper) is a flexible tool
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein for interrogating DNS name servers. It performs DNS lookups and
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein displays the answers that are returned from the name server(s) that
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein were queried. Most DNS administrators use <command>dig</command> to
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein troubleshoot DNS problems because of its flexibility, ease of use and
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein clarity of output. Other lookup tools tend to have less functionality
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Although <command>dig</command> is normally used with
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein command-line
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein arguments, it also has a batch mode of operation for reading lookup
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein requests from a file. A brief summary of its command-line arguments
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein and options is printed when the <option>-h</option> option is given.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Unlike earlier versions, the BIND 9 implementation of
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <command>dig</command> allows multiple lookups to be issued
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein command line.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Unless it is told to query a specific name server,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <command>dig</command> will try each of the servers listed in
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <filename>/etc/resolv.conf</filename>. If no usable server addresses
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein are found, <command>dig</command> will send the query to the local
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein When no command line arguments or options are given,
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson <command>dig</command> will perform an NS query for "." (the root).
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson It is possible to set per-user defaults for <command>dig</command> via
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson <filename>${HOME}/.digrc</filename>. This file is read and
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson any options in it
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson are applied before the command line arguments.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson The IN and CH class names overlap with the IN and CH top level
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein domain names. Either use the <option>-t</option> and
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <option>-c</option> options to specify the type and class,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein use the <option>-q</option> the specify the domain name, or
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein use "IN." and "CH." when looking up these top level domains.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein A typical invocation of <command>dig</command> looks like:
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <programlisting> dig @server name type </programlisting>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <variablelist>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <varlistentry>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein is the name or IP address of the name server to query. This
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein can be an IPv4 address in dotted-decimal notation or an IPv6
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein address in colon-delimited notation. When the supplied
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <parameter>server</parameter> argument is a hostname,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <command>dig</command> resolves that name before querying
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein that name server.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein address is found there, it queries the name server at
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein that address. If either of the <option>-4</option> or
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein only addresses for the corresponding transport
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein will be tried. If no usable addresses are found,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <command>dig</command> will send the query to the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein local host. The reply from the name server that
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein responds is displayed.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </varlistentry>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <varlistentry>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein is the name of the resource record that is to be looked up.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </varlistentry>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <varlistentry>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein indicates what type of query is required —
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein ANY, A, MX, SIG, etc.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <parameter>type</parameter> can be any valid query
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <parameter>type</parameter> argument is supplied,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <command>dig</command> will perform a lookup for an
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </varlistentry>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </variablelist>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein The <option>-b</option> option sets the source IP address of the query
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein to <parameter>address</parameter>. This must be a valid
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein one of the host's network interfaces or "0.0.0.0" or "::". An optional
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein may be specified by appending "#<port>"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein The default query class (IN for internet) is overridden by the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <option>-c</option> option. <parameter>class</parameter> is
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein class, such as HS for Hesiod records or CH for Chaosnet records.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein The <option>-f</option> option makes <command>dig </command>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein in batch mode by reading a list of lookup requests to process from the
looked up using nibble format under the IP6.ARPA domain.
To use the older RFC1886 method using the IP6.INT domain
e.g. "[ key id = value ]".
accepted. Setting a named flag (e.g. DO) will silently be