dig.docbook revision ec3984e9df6fd9b7811daa0dacb1b3dd1423ebf3
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<!--
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson - Copyright (C) 2000, 2001 Internet Software Consortium.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson -
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson - Permission to use, copy, modify, and distribute this software for any
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson - purpose with or without fee is hereby granted, provided that the above
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson - copyright notice and this permission notice appear in all copies.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson -
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson-->
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
ec3984e9df6fd9b7811daa0dacb1b3dd1423ebf3Mark Andrews<!-- $Id: dig.docbook,v 1.12 2002/07/25 05:46:07 marka Exp $ -->
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refentryinfo>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<date>Jun 30, 2000</date>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</refentryinfo>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refmeta>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refentrytitle>dig</refentrytitle>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<manvolnum>1</manvolnum>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refmiscinfo>BIND9</refmiscinfo>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</refmeta>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refnamediv>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refname>dig</refname>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refpurpose>DNS lookup utility</refpurpose>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</refnamediv>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refsynopsisdiv>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<cmdsynopsis>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<command>dig</command>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg choice=opt>@server</arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg><option>-b <replaceable class="parameter">address</replaceable></option></arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg><option>-k <replaceable class="parameter">filename</replaceable></option></arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg><option>-x <replaceable class="parameter">addr</replaceable></option></arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg><option>-y <replaceable class="parameter">name:key</replaceable></option></arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg choice=opt>name</arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg choice=opt>type</arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg choice=opt>class</arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg choice=opt rep=repeat>queryopt</arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</cmdsynopsis>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<cmdsynopsis>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<command>dig</command>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg><option>-h</option></arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</cmdsynopsis>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<cmdsynopsis>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<command>dig</command>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg choice=opt rep=repeat>global-queryopt</arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<arg choice=opt rep=repeat>query</arg>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</cmdsynopsis>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</refsynopsisdiv>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<title>DESCRIPTION</title>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<command>dig</command> (domain information groper) is a flexible tool
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonfor interrogating DNS name servers. It performs DNS lookups and
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssondisplays the answers that are returned from the name server(s) that
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonwere queried. Most DNS administrators use <command>dig</command> to
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssontroubleshoot DNS problems because of its flexibility, ease of use and
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonclarity of output. Other lookup tools tend to have less functionality
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonthan <command>dig</command>.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonAlthough <command>dig</command> is normally used with command-line
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonarguments, it also has a batch mode of operation for reading lookup
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonrequests from a file. A brief summary of its command-line arguments
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonand options is printed when the <option>-h</option> option is given.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonUnlike earlier versions, the BIND9 implementation of
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<command>dig</command> allows multiple lookups to be issued from the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssoncommand line.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonUnless it is told to query a specific name server,
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<command>dig</command> will try each of the servers listed in
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<filename>/etc/resolv.conf</filename>.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonWhen no command line arguments or options are given, will perform an
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonNS query for "." (the root).
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
0262406cea5802a717539247cbaa596ac808efa9Mark Andrews<para>
4c30c4d57282daf10e4cf0562d1b1af514be2bb8Andreas GustafssonIt is possible to set per-user defaults for <command>dig</command> via
0262406cea5802a717539247cbaa596ac808efa9Mark Andrews<filename>${HOME}/.digrc</filename>. This file is read and any options in it
4c30c4d57282daf10e4cf0562d1b1af514be2bb8Andreas Gustafssonare applied before the command line arguments.
0262406cea5802a717539247cbaa596ac808efa9Mark Andrews</para>
0262406cea5802a717539247cbaa596ac808efa9Mark Andrews
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<title>SIMPLE USAGE</title>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonA typical invocation of <command>dig</command> looks like:
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<programlisting> dig @server name type </programlisting> where:
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<variablelist>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><constant>server</constant></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
db5d9614fe7dfd9a1eb7670a589fc2997e20f81fBrian Wellingtonis the name or IP address of the name server to query. This can be an IPv4
db5d9614fe7dfd9a1eb7670a589fc2997e20f81fBrian Wellingtonaddress in dotted-decimal notation or an IPv6
db5d9614fe7dfd9a1eb7670a589fc2997e20f81fBrian Wellingtonaddress in colon-delimited notation. When the supplied
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>server</parameter> argument is a hostname,
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<command>dig</command> resolves that name before querying that name
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonserver. If no <parameter>server</parameter> argument is provided,
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<command>dig</command> consults <filename>/etc/resolv.conf</filename>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonand queries the name servers listed there. The reply from the name
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonserver that responds is displayed.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><constant>name</constant></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonis the name of the resource record that is to be looked up.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><constant>type</constant></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonindicates what type of query is required &mdash;
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonANY, A, MX, SIG, etc.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>type</parameter> can be any valid query type. If no
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>type</parameter> argument is supplied,
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<command>dig</command> will perform a lookup for an A record.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</variablelist>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<title>OPTIONS</title>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonThe <option>-b</option> option sets the source IP address of the query
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonto <parameter>address</parameter>. This must be a valid address on
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonone of the host's network interfaces.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonThe default query class (IN for internet) is overridden by the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<option>-c</option> option. <parameter>class</parameter> is any valid
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonclass, such as HS for Hesiod records or CH for CHAOSNET records.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonThe <option>-f</option> option makes <command>dig </command> operate
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonin batch mode by reading a list of lookup requests to process from the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonfile <parameter>filename</parameter>. The file contains a number of
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonqueries, one per line. Each entry in the file should be organised in
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonthe same way they would be presented as queries to
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<command>dig</command> using the command-line interface.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonIf a non-standard port number is to be queried, the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<option>-p</option> option is used. <parameter>port#</parameter> is
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonthe port number that <command>dig</command> will send its queries
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssoninstead of the standard DNS port number 53. This option would be used
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonto test a name server that has been configured to listen for queries
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonon a non-standard port number.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonThe <option>-t</option> option sets the query type to
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>type</parameter>. It can be any valid query type which is
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonsupported in BIND9. The default query type "A", unless the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<option>-x</option> option is supplied to indicate a reverse lookup.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonA zone transfer can be requested by specifying a type of AXFR. When
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonan incremental zone transfer (IXFR) is required,
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>type</parameter> is set to <literal>ixfr=N</literal>.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonThe incremental zone transfer will contain the changes made to the zone
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonsince the serial number in the zone's SOA record was
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>N</parameter>.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonReverse lookups - mapping addresses to names - are simplified by the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<option>-x</option> option. <parameter>addr</parameter> is an IPv4
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonaddress in dotted-decimal notation, or a colon-delimited IPv6 address.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonWhen this option is used, there is no need to provide the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>name</parameter>, <parameter>class</parameter> and
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>type</parameter> arguments. <command>dig</command>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonautomatically performs a lookup for a name like
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<literal>11.12.13.10.in-addr.arpa</literal> and sets the query type and
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonclass to PTR and IN respectively. By default, IPv6 addresses are
ec3984e9df6fd9b7811daa0dacb1b3dd1423ebf3Mark Andrewslooked up using nibble format under the IP6.ARPA domain.
ec3984e9df6fd9b7811daa0dacb1b3dd1423ebf3Mark AndrewsTo use the older RFC1886 method using the IP6.INT domain
ec3984e9df6fd9b7811daa0dacb1b3dd1423ebf3Mark Andrewsspecify the <option>-i</option> option. Bit string labels (RFC2874)
ec3984e9df6fd9b7811daa0dacb1b3dd1423ebf3Mark Andrewsare now experimental and are not attempted.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonTo sign the DNS queries sent by <command>dig</command> and their
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonresponses using transaction signatures (TSIG), specify a TSIG key file
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonusing the <option>-k</option> option. You can also specify the TSIG
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonkey itself on the command line using the <option>-y</option> option;
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>name</parameter> is the name of the TSIG key and
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>key</parameter> is the actual key. The key is a base-64
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonencoded string, typically generated by <citerefentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</citerefentry>.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCaution should be taken when using the <option>-y</option> option on
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonmulti-user systems as the key can be visible in the output from
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<citerefentry> <refentrytitle>ps</refentrytitle><manvolnum>1
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</manvolnum> </citerefentry> or in the shell's history file. When
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonusing TSIG authentication with <command>dig</command>, the name
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonserver that is queried needs to know the key and algorithm that is
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonbeing used. In BIND, this is done by providing appropriate
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<command>key</command> and <command>server</command> statements in
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<filename>named.conf</filename>.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<title>QUERY OPTIONS</title>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<command>dig</command> provides a number of query options which affect
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonthe way in which lookups are made and the results displayed. Some of
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonthese set or reset flag bits in the query header, some determine which
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonsections of the answer get printed, and others determine the timeout
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonand retry strategies.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonEach query option is identified by a keyword preceded by a plus sign
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson(<literal>+</literal>). Some keywords set or reset an option. These may be preceded
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonby the string <literal>no</literal> to negate the meaning of that keyword. Other
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonkeywords assign values to options like the timeout interval. They
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonhave the form <option>+keyword=value</option>.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonThe query options are:
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<variablelist>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]tcp</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonUse [do not use] TCP when querying name servers. The default
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonbehaviour is to use UDP unless an AXFR or IXFR query is requested, in
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonwhich case a TCP connection is used.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]vc</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonUse [do not use] TCP when querying name servers. This alternate
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonsyntax to <parameter>+[no]tcp</parameter> is provided for backwards
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssoncompatibility. The "vc" stands for "virtual circuit".
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]ignore</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonIgnore truncation in UDP responses instead of retrying with TCP. By
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssondefault, TCP retries are performed.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+domain=somename</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonSet the search list to contain the single domain
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>somename</parameter>, as if specified in a
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<command>domain</command> directive in
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<filename>/etc/resolv.conf</filename>, and enable search list
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonprocessing as if the <parameter>+search</parameter> option were given.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]search</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonUse [do not use] the search list defined by the searchlist or domain
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssondirective in <filename>resolv.conf</filename> (if any).
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonThe search list is not used by default.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]defname</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonDeprecated, treated as a synonym for <parameter>+[no]search</parameter>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]aaonly</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonThis option does nothing. It is provided for compatibilty with old
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonversions of <command>dig</command> where it set an unimplemented
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonresolver flag.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]adflag</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonSet [do not set] the AD (authentic data) bit in the query. The AD bit
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssoncurrently has a standard meaning only in responses, not in queries,
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonbut the ability to set the bit in the query is provided for
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssoncompleteness.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]cdflag</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonSet [do not set] the CD (checking disabled) bit in the query. This
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonrequests the server to not perform DNSSEC validation of responses.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
e7bb307667cc89287e810b95bddd342cb5dcb4e7Mark Andrews<varlistentry><term><option>+[no]cl</option></term>
e7bb307667cc89287e810b95bddd342cb5dcb4e7Mark Andrews<listitem><para>
e7bb307667cc89287e810b95bddd342cb5dcb4e7Mark AndrewsDisplay [do not display] the CLASS when printing the record.
e7bb307667cc89287e810b95bddd342cb5dcb4e7Mark Andrews</para></listitem></varlistentry>
e7bb307667cc89287e810b95bddd342cb5dcb4e7Mark Andrews
e7bb307667cc89287e810b95bddd342cb5dcb4e7Mark Andrews<varlistentry><term><option>+[no]ttlid</option></term>
e7bb307667cc89287e810b95bddd342cb5dcb4e7Mark Andrews<listitem><para>
e7bb307667cc89287e810b95bddd342cb5dcb4e7Mark AndrewsDisplay [do not display] the TTL when printing the record.
e7bb307667cc89287e810b95bddd342cb5dcb4e7Mark Andrews</para></listitem></varlistentry>
e7bb307667cc89287e810b95bddd342cb5dcb4e7Mark Andrews
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]recursive</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonToggle the setting of the RD (recursion desired) bit in the query.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonThis bit is set by default, which means <command>dig</command>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonnormally sends recursive queries. Recursion is automatically disabled
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonwhen the <parameter>+nssearch</parameter> or
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>+trace</parameter> query options are used.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]nssearch</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonWhen this option is set, <command>dig</command> attempts to find the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonauthoritative name servers for the zone containing the name being
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonlooked up and display the SOA record that each name server has for the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonzone.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]trace</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonToggle tracing of the delegation path from the root name servers for
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonthe name being looked up. Tracing is disabled by default. When
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssontracing is enabled, <command>dig</command> makes iterative queries to
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonresolve the name being looked up. It will follow referrals from the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonroot servers, showing the answer from each server that was used to
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonresolve the lookup.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]cmd</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssontoggles the printing of the initial comment in the output identifying
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonthe version of <command>dig</command> and the query options that have
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonbeen applied. This comment is printed by default.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]short</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonProvide a terse answer. The default is to print the answer in a
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonverbose form.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]identify</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonShow [or do not show] the IP address and port number that supplied the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonanswer when the <parameter>+short</parameter> option is enabled. If
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonshort form answers are requested, the default is not to show the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonsource address and port number of the server that provided the answer.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]comments</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonToggle the display of comment lines in the output. The default is to
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonprint comments.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]stats</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonThis query option toggles the printing of statistics: when the query
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonwas made, the size of the reply and so on. The default behaviour is
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonto print the query statistics.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]qr</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonPrint [do not print] the query as it is sent.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonBy default, the query is not printed.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]question</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonPrint [do not print] the question section of a query when an answer is
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonreturned. The default is to print the question section as a comment.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]answer</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonDisplay [do not display] the answer section of a reply. The default
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonis to display it.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]authority</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonDisplay [do not display] the authority section of a reply. The
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssondefault is to display it.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]additional</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonDisplay [do not display] the additional section of a reply.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonThe default is to display it.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+[no]all</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonSet or clear all display flags.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+time=T</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonSets the timeout for a query to
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>T</parameter> seconds. The default time out is 5 seconds.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonAn attempt to set <parameter>T</parameter> to less than 1 will result
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonin a query timeout of 1 second being applied.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews<varlistentry><term><option>+tries=T</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
feb1f6a4ac42988558ecb8dc5dc0c974ec1f0509Brian WellingtonSets the number of times to try UDP queries to server to
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>T</parameter> instead of the default, 3. If
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>T</parameter> is less than or equal to zero, the number of
897adbe920e9614b254a8cfc842aa2d90990c9f1Brian Wellingtontries is silently rounded up to 1.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews<varlistentry><term><option>+retry=T</option></term>
feb1f6a4ac42988558ecb8dc5dc0c974ec1f0509Brian Wellington<listitem><para>
feb1f6a4ac42988558ecb8dc5dc0c974ec1f0509Brian WellingtonSets the number of times to retry UDP queries to server to
feb1f6a4ac42988558ecb8dc5dc0c974ec1f0509Brian Wellington<parameter>T</parameter> instead of the default, 2. Unlike
feb1f6a4ac42988558ecb8dc5dc0c974ec1f0509Brian Wellington<parameter>+tries</parameter>, this does not include the initial
feb1f6a4ac42988558ecb8dc5dc0c974ec1f0509Brian Wellingtonquery.
feb1f6a4ac42988558ecb8dc5dc0c974ec1f0509Brian Wellington</para></listitem></varlistentry>
feb1f6a4ac42988558ecb8dc5dc0c974ec1f0509Brian Wellington
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+ndots=D</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonSet the number of dots that have to appear in
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>name</parameter> to <parameter>D</parameter> for it to be
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonconsidered absolute. The default value is that defined using the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonndots statement in <filename>/etc/resolv.conf</filename>, or 1 if no
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonndots statement is present. Names with fewer dots are interpreted as
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonrelative names and will be searched for in the domains listed in the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<option>search</option> or <option>domain</option> directive in
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<filename>/etc/resolv.conf</filename>.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para></listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<varlistentry><term><option>+bufsize=B</option></term>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<listitem><para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonSet the UDP message buffer size advertised using EDNS0 to
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>B</parameter> bytes. The maximum and minimum sizes of this
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonbuffer are 65535 and 0 respectively. Values outside this range are
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonrounded up or down appropriately.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</listitem></varlistentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
01d9a393ec3f8ab4065de4319684a9254dcd6f21Andreas Gustafsson<varlistentry><term><option>+[no]multiline</option></term>
01d9a393ec3f8ab4065de4319684a9254dcd6f21Andreas Gustafsson<listitem><para>
01d9a393ec3f8ab4065de4319684a9254dcd6f21Andreas GustafssonPrint records like the SOA records in a verbose multi-line
01d9a393ec3f8ab4065de4319684a9254dcd6f21Andreas Gustafssonformat with human-readable comments. The default is to print
01d9a393ec3f8ab4065de4319684a9254dcd6f21Andreas Gustafssoneach record on a single line, to facilitate machine parsing
01d9a393ec3f8ab4065de4319684a9254dcd6f21Andreas Gustafssonof the <command>dig</command> output.
01d9a393ec3f8ab4065de4319684a9254dcd6f21Andreas Gustafsson</para>
01d9a393ec3f8ab4065de4319684a9254dcd6f21Andreas Gustafsson</listitem></varlistentry>
01d9a393ec3f8ab4065de4319684a9254dcd6f21Andreas Gustafsson
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews<varlistentry><term><option>+[no]fail</option></term>
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews<listitem><para>
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark AndrewsDo not try the next server if you receive a SERVFAIL. The default is
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrewsto not try the next server which is the reverse of normal stub resolver
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrewsbehaviour.
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews</para>
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews</listitem></varlistentry>
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews<varlistentry><term><option>+[no]besteffort</option></term>
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews<listitem><para>
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark AndrewsAttempt to display the contents of messages which are malformed.
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark AndrewsThe default is to not display malformed answers.
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews</para>
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews</listitem></varlistentry>
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews<varlistentry><term><option>+[no]dnssec</option></term>
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews<listitem><para>
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark AndrewsRequests DNSSEC records be sent by setting the DNSSEC OK bit (DO)
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrewsin the the OPT record in the additional section of the query.
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews</para>
0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65Mark Andrews
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</variablelist>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<title>MULTIPLE QUERIES</title>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonThe BIND 9 implementation of <command>dig </command> supports
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonspecifying multiple queries on the command line (in addition to
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonsupporting the <option>-f</option> batch file option). Each of those
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonqueries can be supplied with its own set of flags, options and query
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonoptions.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonIn this case, each <parameter>query</parameter> argument represent an
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonindividual query in the command-line syntax described above. Each
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonconsists of any of the standard options and flags, the name to be
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonlooked up, an optional query type and class and any query options that
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonshould be applied to that query.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonA global set of query options, which should be applied to all queries,
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssoncan also be supplied. These global query options must precede the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonfirst tuple of name, class, type, options, flags, and query options
f5385613e25781c804293b41c4d82bb6ac8981e3Andreas Gustafssonsupplied on the command line. Any global query options (except
f5385613e25781c804293b41c4d82bb6ac8981e3Andreas Gustafssonthe <option>+[no]cmd</option> option) can be
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonoverridden by a query-specific set of query options. For example:
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<programlisting>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssondig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</programlisting>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonshows how <command>dig</command> could be used from the command line
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonto make three lookups: an ANY query for <literal>www.isc.org</literal>, a
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonreverse lookup of 127.0.0.1 and a query for the NS records of
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<literal>isc.org</literal>.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonA global query option of <parameter>+qr</parameter> is applied, so
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonthat <command>dig</command> shows the initial query it made for each
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonlookup. The final query has a local query option of
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<parameter>+noqr</parameter> which means that <command>dig</command>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonwill not print the initial query when it looks up the NS records for
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<literal>isc.org</literal>.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<title>FILES</title>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<filename>/etc/resolv.conf</filename>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
0262406cea5802a717539247cbaa596ac808efa9Mark Andrews<para>
0262406cea5802a717539247cbaa596ac808efa9Mark Andrews<filename>${HOME}/.digrc</filename>
0262406cea5802a717539247cbaa596ac808efa9Mark Andrews</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<title>SEE ALSO</title>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<citerefentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</citerefentry>,
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<citerefentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</citerefentry>,
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<citerefentry>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</citerefentry>,
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<citetitle>RFC1035</citetitle>.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<title>BUGS </title>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson<para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonThere are probably too many query options.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</para>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</refsect1>
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson</refentry>