a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt<!ENTITY mdash "—">]>
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews - Copyright (C) 2000-2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews - This Source Code Form is subject to the terms of the Mozilla Public
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt - License, v. 2.0. If a copy of the MPL was not distributed with this
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt - file, You can obtain one at http://mozilla.org/MPL/2.0/.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt<!-- Converted by db4-upgrade version 1.0 -->
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.dig">
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <refentryinfo>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt </refentryinfo>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <refnamediv>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt </refnamediv>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </copyright>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <refsynopsisdiv>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-b <replaceable class="parameter">address</replaceable></option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">filename</replaceable></option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-m</option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-q <replaceable class="parameter">name</replaceable></option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-v</option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-x <replaceable class="parameter">addr</replaceable></option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-y <replaceable class="parameter"><optional>hmac:</optional>name:key</replaceable></option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-4</option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-6</option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </cmdsynopsis>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="norepeat"><option>-h</option></arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </cmdsynopsis>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <arg choice="opt" rep="repeat">global-queryopt</arg>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </cmdsynopsis>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </refsynopsisdiv>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <refsection><info><title>DESCRIPTION</title></info>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt for interrogating DNS name servers. It performs DNS lookups and
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt displays the answers that are returned from the name server(s) that
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt were queried. Most DNS administrators use <command>dig</command> to
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt troubleshoot DNS problems because of its flexibility, ease of use and
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt clarity of output. Other lookup tools tend to have less functionality
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt Although <command>dig</command> is normally used with
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt command-line
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt arguments, it also has a batch mode of operation for reading lookup
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt requests from a file. A brief summary of its command-line arguments
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt and options is printed when the <option>-h</option> option is given.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt Unlike earlier versions, the BIND 9 implementation of
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <command>dig</command> allows multiple lookups to be issued
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt command line.
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews Unless it is told to query a specific name server,
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews <command>dig</command> will try each of the servers listed in
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews <filename>/etc/resolv.conf</filename>. If no usable server addresses
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt are found, <command>dig</command> will send the query to the local
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt When no command line arguments or options are given,
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <command>dig</command> will perform an NS query for "." (the root).
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt It is possible to set per-user defaults for <command>dig</command> via
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <filename>${HOME}/.digrc</filename>. This file is read and
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt any options in it
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt are applied before the command line arguments.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt The IN and CH class names overlap with the IN and CH top level
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt domain names. Either use the <option>-t</option> and
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <option>-c</option> options to specify the type and class,
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt use the <option>-q</option> the specify the domain name, or
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt use "IN." and "CH." when looking up these top level domains.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </refsection>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <refsection><info><title>SIMPLE USAGE</title></info>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt A typical invocation of <command>dig</command> looks like:
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <programlisting> dig @server name type </programlisting>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <variablelist>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <varlistentry>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt is the name or IP address of the name server to query. This
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt can be an IPv4 address in dotted-decimal notation or an IPv6
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt address in colon-delimited notation. When the supplied
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <parameter>server</parameter> argument is a hostname,
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <command>dig</command> resolves that name before querying
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt that name server.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt address is found there, it queries the name server at
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt that address. If either of the <option>-4</option> or
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt only addresses for the corresponding transport
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt will be tried. If no usable addresses are found,
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt local host. The reply from the name server that
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt responds is displayed.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </varlistentry>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <varlistentry>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt is the name of the resource record that is to be looked up.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </varlistentry>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <varlistentry>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt indicates what type of query is required —
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt ANY, A, MX, SIG, etc.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <parameter>type</parameter> can be any valid query
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <command>dig</command> will perform a lookup for an
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </varlistentry>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </variablelist>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </refsection>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <variablelist>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <varlistentry>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt Use IPv4 only.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </varlistentry>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt <varlistentry>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt Use IPv6 only.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <term>-b <replaceable class="parameter">address<optional>#port</optional></replaceable></term>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt Set the source IP address of the query.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt The <parameter>address</parameter> must be a valid address on
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt one of the host's network interfaces, or "0.0.0.0" or "::". An
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt optional port may be specified by appending "#<port>"
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt </varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <term>-c <replaceable class="parameter">class</replaceable></term>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt Set the query class. The
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt default <parameter>class</parameter> is IN; other classes
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt are HS for Hesiod records or CH for Chaosnet records.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt </varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <varlistentry>
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews <term>-f <replaceable class="parameter">file</replaceable></term>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt Batch mode: <command>dig</command> reads a list of lookup
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt requests to process from the
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt given <parameter>file</parameter>. Each line in the file
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt should be organized in the same way they would be
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt presented as queries to
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <command>dig</command> using the command-line interface.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt </varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <varlistentry>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt Do reverse IPv6 lookups using the obsolete RFC1886 IP6.INT
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt domain, which is no longer in use. Obsolete bit string
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt label queries (RFC2874) are not attempted.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt </varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <term>-k <replaceable class="parameter">keyfile</replaceable></term>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt Sign queries using TSIG using a key read from the given file.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt Key files can be generated using
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <citerefentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <refentrytitle>tsig-keygen</refentrytitle><manvolnum>8</manvolnum>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt </citerefentry>.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt When using TSIG authentication with <command>dig</command>,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt the name server that is queried needs to know the key and
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt algorithm that is being used. In BIND, this is done by
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt </varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <varlistentry>
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt Enable memory usage debugging.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <!-- It enables ISC_MEM_DEBUGTRACE and ISC_MEM_DEBUGRECORD
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt documented in include/isc/mem.h -->
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt </varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <term>-p <replaceable class="parameter">port</replaceable></term>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt Send the query to a non-standard port on the server,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt instead of the default port 53. This option would be used
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt to test a name server that has been configured to listen
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt for queries on a non-standard port number.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt </varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <term>-q <replaceable class="parameter">name</replaceable></term>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt The domain name to query. This is useful to distinguish
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt the <parameter>name</parameter> from other arguments.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt </varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <varlistentry>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <term>-t <replaceable class="parameter">type</replaceable></term>
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt The resource record type to query. It can be any valid query type
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt supported in BIND 9. The default query type is "A", unless the
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <option>-x</option> option is supplied to indicate a reverse lookup.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt A zone transfer can be requested by specifying a type of AXFR. When
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt an incremental zone transfer (IXFR) is required, set the
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt <parameter>type</parameter> to <literal>ixfr=N</literal>.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt The incremental zone transfer will contain the changes
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews made to the zone since the serial number in the zone's SOA
<term>-y <replaceable class="parameter"><optional>hmac:</optional>keyname:secret</replaceable></term>
e.g. "[ key id = value ]".
accepted. Setting a named flag (e.g. DO) will silently be