dig.docbook revision d7b9756a214030b0022ce791b67b12fb7bceeea0
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley [<!ENTITY mdash "—">]>
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley - Copyright (C) 2004-2011, 2013, 2014 Internet Systems Consortium, Inc. ("ISC")
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley - Copyright (C) 2000-2003 Internet Software Consortium.
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley - Permission to use, copy, modify, and/or distribute this software for any
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley - purpose with or without fee is hereby granted, provided that the above
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley - copyright notice and this permission notice appear in all copies.
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence - PERFORMANCE OF THIS SOFTWARE.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence<!-- $Id: dig.docbook,v 1.51 2011/11/04 11:02:50 jreed Exp $ -->
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <refentryinfo>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence </refentryinfo>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence </refnamediv>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <holder>Internet Software Consortium.</holder>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <refsynopsisdiv>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <cmdsynopsis>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <arg><option>-b <replaceable class="parameter">address</replaceable></option></arg>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <arg><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <arg><option>-k <replaceable class="parameter">filename</replaceable></option></arg>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <arg><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <arg><option>-q <replaceable class="parameter">name</replaceable></option></arg>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <arg><option>-x <replaceable class="parameter">addr</replaceable></option></arg>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <arg><option>-y <replaceable class="parameter"><optional>hmac:</optional>name:key</replaceable></option></arg>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <arg choice="opt" rep="repeat">queryopt</arg>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence </cmdsynopsis>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <cmdsynopsis>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence </cmdsynopsis>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <cmdsynopsis>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <arg choice="opt" rep="repeat">global-queryopt</arg>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence </cmdsynopsis>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence </refsynopsisdiv>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence (domain information groper) is a flexible tool
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence for interrogating DNS name servers. It performs DNS lookups and
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence displays the answers that are returned from the name server(s) that
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence were queried. Most DNS administrators use <command>dig</command> to
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence troubleshoot DNS problems because of its flexibility, ease of use and
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence clarity of output. Other lookup tools tend to have less functionality
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence Although <command>dig</command> is normally used with
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence arguments, it also has a batch mode of operation for reading lookup
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence requests from a file. A brief summary of its command-line arguments
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence and options is printed when the <option>-h</option> option is given.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence Unlike earlier versions, the BIND 9 implementation of
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <command>dig</command> allows multiple lookups to be issued
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence command line.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence Unless it is told to query a specific name server,
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <command>dig</command> will try each of the servers listed in
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <filename>/etc/resolv.conf</filename>. If no usable server addresses
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence are found, <command>dig</command> will send the query to the local
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence When no command line arguments or options are given,
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <command>dig</command> will perform an NS query for "." (the root).
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence It is possible to set per-user defaults for <command>dig</command> via
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <filename>${HOME}/.digrc</filename>. This file is read and
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence any options in it
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence are applied before the command line arguments.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence The IN and CH class names overlap with the IN and CH top level
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence domain names. Either use the <option>-t</option> and
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <option>-c</option> options to specify the type and class,
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence use the <option>-q</option> the specify the domain name, or
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence use "IN." and "CH." when looking up these top level domains.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence A typical invocation of <command>dig</command> looks like:
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <programlisting> dig @server name type </programlisting>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <variablelist>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <varlistentry>
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence is the name or IP address of the name server to query. This
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence can be an IPv4 address in dotted-decimal notation or an IPv6
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence address in colon-delimited notation. When the supplied
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <parameter>server</parameter> argument is a hostname,
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <command>dig</command> resolves that name before querying
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence that name server.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence If no <parameter>server</parameter> argument is
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence address is found there, it queries the name server at
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence that address. If either of the <option>-4</option> or
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence only addresses for the corresponding transport
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence will be tried. If no usable addresses are found,
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence <command>dig</command> will send the query to the
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence local host. The reply from the name server that
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence responds is displayed.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence </varlistentry>
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 ]".