dig.docbook revision 8b9fc7617b8f54641708c985697848e6cc10a5bb
333fe280eb574439ef3f828d8755dd9e243ec855Andreas Gustafsson<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson [<!ENTITY mdash "&#8212;">]>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson<!--
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson - Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews - Copyright (C) 2000-2003 Internet Software Consortium.
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews -
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson - Permission to use, copy, modify, and distribute this software for any
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson - purpose with or without fee is hereby granted, provided that the above
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson - copyright notice and this permission notice appear in all copies.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson -
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
97bb3725292d3f74bcb0a32be6a76b2da34ba494Andreas Gustafsson - PERFORMANCE OF THIS SOFTWARE.
428dc9698871ecfeda63eab31cd3523dd4befb31Mark Andrews-->
97bb3725292d3f74bcb0a32be6a76b2da34ba494Andreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson<!-- $Id: dig.docbook,v 1.36 2007/05/09 06:18:44 marka Exp $ -->
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson<refentry id="man.dig">
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <refentryinfo>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <date>Jun 30, 2000</date>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </refentryinfo>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
97bb3725292d3f74bcb0a32be6a76b2da34ba494Andreas Gustafsson <refmeta>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <refentrytitle>dig</refentrytitle>
8dcabaace18bbfd2f9a09a0cb0f524cbb326cbabMark Andrews <manvolnum>1</manvolnum>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <refmiscinfo>BIND9</refmiscinfo>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </refmeta>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <refnamediv>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <refname>dig</refname>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <refpurpose>DNS lookup utility</refpurpose>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </refnamediv>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <docinfo>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <copyright>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <year>2004</year>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <year>2005</year>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <year>2006</year>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <year>2007</year>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </copyright>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <copyright>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <year>2000</year>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <year>2001</year>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <year>2002</year>
97bb3725292d3f74bcb0a32be6a76b2da34ba494Andreas Gustafsson <year>2003</year>
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews <holder>Internet Software Consortium.</holder>
575e532437cf7f203707765e21767db92fa1e480Mark Andrews </copyright>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </docinfo>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <refsynopsisdiv>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <cmdsynopsis>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <command>dig</command>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg choice="opt">@server</arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg><option>-b <replaceable class="parameter">address</replaceable></option></arg>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <arg><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg><option>-k <replaceable class="parameter">filename</replaceable></option></arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg><option>-q <replaceable class="parameter">name</replaceable></option></arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg><option>-x <replaceable class="parameter">addr</replaceable></option></arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg><option>-y <replaceable class="parameter"><optional>hmac:</optional>name:key</replaceable></option></arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg><option>-4</option></arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg><option>-6</option></arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg choice="opt">name</arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg choice="opt">type</arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg choice="opt">class</arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg choice="opt" rep="repeat">queryopt</arg>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </cmdsynopsis>
20d0c8c5bb06be9925d568adce9a031e08ef7172Andreas Gustafsson
97bb3725292d3f74bcb0a32be6a76b2da34ba494Andreas Gustafsson <cmdsynopsis>
f9cdef0ba5cd21db91318f290c25b0ab3d28f3dfMark Andrews <command>dig</command>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <arg><option>-h</option></arg>
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson </cmdsynopsis>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <cmdsynopsis>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <command>dig</command>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <arg choice="opt" rep="repeat">global-queryopt</arg>
3970098dcd2a7122541667b4b56cea8abce8ccf2Mark Andrews <arg choice="opt" rep="repeat">query</arg>
35541328a8c18ba1f984300dfe30ec8713c90031Mark Andrews </cmdsynopsis>
1fa26403d7679235a30fbf6289f68fed5872df30Mark Andrews </refsynopsisdiv>
c315e5cfead876251ee4ff5600ee67303b2729a4Mark Andrews
b5e4e4da43461f416b19d52ec047495e6960579dMark Andrews <refsect1>
18eedaf157f8c45e2d998b33d2a13fdcb0e49c35Mark Andrews <title>DESCRIPTION</title>
d40b5110ab954fb44fdc3826999b2facbe103b32Mark Andrews <para><command>dig</command>
d40b5110ab954fb44fdc3826999b2facbe103b32Mark Andrews (domain information groper) is a flexible tool
d40b5110ab954fb44fdc3826999b2facbe103b32Mark Andrews for interrogating DNS name servers. It performs DNS lookups and
538a83db7509d598da95a93bd7b74ef3112123a4Mark Andrews displays the answers that are returned from the name server(s) that
538a83db7509d598da95a93bd7b74ef3112123a4Mark Andrews were queried. Most DNS administrators use <command>dig</command> to
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson troubleshoot DNS problems because of its flexibility, ease of use and
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson clarity of output. Other lookup tools tend to have less functionality
15996d1b4ffb38960e1bb3b64026b96007f18f70Mark Andrews than <command>dig</command>.
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson </para>
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson
7208386cd37a2092c70eddf80cf29519b16c4c80Mark Andrews <para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson Although <command>dig</command> is normally used with
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson command-line
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson arguments, it also has a batch mode of operation for reading lookup
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson requests from a file. A brief summary of its command-line arguments
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson and options is printed when the <option>-h</option> option is given.
32374d94830dc91c2aa598ba8438edb5d7fa1331Mark Andrews Unlike earlier versions, the BIND 9 implementation of
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <command>dig</command> allows multiple lookups to be issued
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson from the
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson command line.
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson </para>
97bb3725292d3f74bcb0a32be6a76b2da34ba494Andreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews Unless it is told to query a specific name server,
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <command>dig</command> will try each of the servers listed
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson in
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <filename>/etc/resolv.conf</filename>.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson When no command line arguments or options are given, will perform an
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson NS query for "." (the root).
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews </para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <para>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews It is possible to set per-user defaults for <command>dig</command> via
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <filename>${HOME}/.digrc</filename>. This file is read and
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews any options in it
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews are applied before the command line arguments.
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews </para>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
e1cbf95aec7cb11a66285ccbffa552c501d2ac3cMark Andrews The IN and CH class names overlap with the IN and CH top level
508f61f8d699c46f962b682f388e54b446a7194dMark Andrews domains names. Either use the <option>-t</option> and
3a3705ef7747327df182bf8d009333d2472253d5Mark Andrews <option>-c</option> options to specify the type and class or
3a3705ef7747327df182bf8d009333d2472253d5Mark Andrews use the <option>-q</option> the specify the domain name or
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson use "IN." and "CH." when looking up these top level domains.
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson </para>
4034406393893f4d07ab07b56da3541155493855Andreas Gustafsson
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson </refsect1>
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson
65b15657bf19c983abfb8327304ccc01f60c8cddMark Andrews <refsect1>
65b15657bf19c983abfb8327304ccc01f60c8cddMark Andrews <title>SIMPLE USAGE</title>
c011a692803976aa5100f7a4e6a1fa8a1ea2c3f3Andreas Gustafsson
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson A typical invocation of <command>dig</command> looks like:
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <programlisting> dig @server name type </programlisting>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews where:
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <variablelist>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
20d0c8c5bb06be9925d568adce9a031e08ef7172Andreas Gustafsson <varlistentry>
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson <term><constant>server</constant></term>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson is the name or IP address of the name server to query. This can
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson be an IPv4
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson address in dotted-decimal notation or an IPv6
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson address in colon-delimited notation. When the supplied
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <parameter>server</parameter> argument is a
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson hostname,
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <command>dig</command> resolves that name before
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson querying that name
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson server. If no <parameter>server</parameter>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson argument is provided,
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <command>dig</command> consults <filename>/etc/resolv.conf</filename>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson and queries the name servers listed there. The reply from the
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson name
20d0c8c5bb06be9925d568adce9a031e08ef7172Andreas Gustafsson server that responds is displayed.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </varlistentry>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
3970098dcd2a7122541667b4b56cea8abce8ccf2Mark Andrews <varlistentry>
3970098dcd2a7122541667b4b56cea8abce8ccf2Mark Andrews <term><constant>name</constant></term>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <listitem>
32d1434aff6112327dffe188e3585ee0157c6e5fMark Andrews <para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson is the name of the resource record that is to be looked up.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </para>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews </listitem>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews </varlistentry>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <varlistentry>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <term><constant>type</constant></term>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
3970098dcd2a7122541667b4b56cea8abce8ccf2Mark Andrews indicates what type of query is required &mdash;
f9cdef0ba5cd21db91318f290c25b0ab3d28f3dfMark Andrews ANY, A, MX, SIG, etc.
18eedaf157f8c45e2d998b33d2a13fdcb0e49c35Mark Andrews <parameter>type</parameter> can be any valid query
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson type. If no
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <parameter>type</parameter> argument is supplied,
15996d1b4ffb38960e1bb3b64026b96007f18f70Mark Andrews <command>dig</command> will perform a lookup for an
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson A record.
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson </para>
7208386cd37a2092c70eddf80cf29519b16c4c80Mark Andrews </listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </varlistentry>
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson </variablelist>
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson </para>
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson </refsect1>
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson
32374d94830dc91c2aa598ba8438edb5d7fa1331Mark Andrews <refsect1>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <title>OPTIONS</title>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson <para>
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson The <option>-b</option> option sets the source IP address of the query
97bb3725292d3f74bcb0a32be6a76b2da34ba494Andreas Gustafsson to <parameter>address</parameter>. This must be a valid
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson address on
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews one of the host's network interfaces or "0.0.0.0" or "::". An optional
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson port
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson may be specified by appending "#&lt;port&gt;"
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson The default query class (IN for internet) is overridden by the
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <option>-c</option> option. <parameter>class</parameter> is
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson any valid
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews class, such as HS for Hesiod records or CH for CHAOSNET records.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </para>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <para>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews The <option>-f</option> option makes <command>dig </command>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews operate
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews in batch mode by reading a list of lookup requests to process from the
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews file <parameter>filename</parameter>. The file contains a
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews number of
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews queries, one per line. Each entry in the file should be organized in
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews the same way they would be presented as queries to
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <command>dig</command> using the command-line interface.
e1cbf95aec7cb11a66285ccbffa552c501d2ac3cMark Andrews </para>
508f61f8d699c46f962b682f388e54b446a7194dMark Andrews
3a3705ef7747327df182bf8d009333d2472253d5Mark Andrews <para>
3a3705ef7747327df182bf8d009333d2472253d5Mark Andrews If a non-standard port number is to be queried, the
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <option>-p</option> option is used. <parameter>port#</parameter> is
e0172ab8e2bf2fd2315f5c9b34cae8e013c71ddaMark Andrews the port number that <command>dig</command> will send its
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson queries
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson instead of the standard DNS port number 53. This option would be used
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson to test a name server that has been configured to listen for queries
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson on a non-standard port number.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson The <option>-4</option> option forces <command>dig</command>
1c153afce556ff3c687986fb7c4a0b0a7f5e7cd8Mark Andrews to only
3970098dcd2a7122541667b4b56cea8abce8ccf2Mark Andrews use IPv4 query transport. The <option>-6</option> option forces
3970098dcd2a7122541667b4b56cea8abce8ccf2Mark Andrews <command>dig</command> to only use IPv6 query transport.
3970098dcd2a7122541667b4b56cea8abce8ccf2Mark Andrews </para>
3970098dcd2a7122541667b4b56cea8abce8ccf2Mark Andrews
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson The <option>-t</option> option sets the query type to
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <parameter>type</parameter>. It can be any valid query type
575e532437cf7f203707765e21767db92fa1e480Mark Andrews which is
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson supported in BIND 9. The default query type is "A", unless the
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <option>-x</option> option is supplied to indicate a reverse lookup.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson A zone transfer can be requested by specifying a type of AXFR. When
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson an incremental zone transfer (IXFR) is required,
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <parameter>type</parameter> is set to <literal>ixfr=N</literal>.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson The incremental zone transfer will contain the changes made to the zone
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson since the serial number in the zone's SOA record was
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <parameter>N</parameter>.
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews </para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson The <option>-q</option> option sets the query name to
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <parameter>name</parameter>. This useful do distinguish the
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <parameter>name</parameter> from other arguments.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson Reverse lookups &mdash; mapping addresses to names &mdash; are simplified by the
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <option>-x</option> option. <parameter>addr</parameter> is
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson an IPv4
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson address in dotted-decimal notation, or a colon-delimited IPv6 address.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson When this option is used, there is no need to provide the
20d0c8c5bb06be9925d568adce9a031e08ef7172Andreas Gustafsson <parameter>name</parameter>, <parameter>class</parameter> and
97bb3725292d3f74bcb0a32be6a76b2da34ba494Andreas Gustafsson <parameter>type</parameter> arguments. <command>dig</command>
f9cdef0ba5cd21db91318f290c25b0ab3d28f3dfMark Andrews automatically performs a lookup for a name like
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <literal>11.12.13.10.in-addr.arpa</literal> and sets the
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson query type and
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews class to PTR and IN respectively. By default, IPv6 addresses are
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews looked up using nibble format under the IP6.ARPA domain.
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews To use the older RFC1886 method using the IP6.INT domain
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews specify the <option>-i</option> option. Bit string labels (RFC2874)
3970098dcd2a7122541667b4b56cea8abce8ccf2Mark Andrews are now experimental and are not attempted.
35541328a8c18ba1f984300dfe30ec8713c90031Mark Andrews </para>
1fa26403d7679235a30fbf6289f68fed5872df30Mark Andrews
c315e5cfead876251ee4ff5600ee67303b2729a4Mark Andrews <para>
b5e4e4da43461f416b19d52ec047495e6960579dMark Andrews To sign the DNS queries sent by <command>dig</command> and
18eedaf157f8c45e2d998b33d2a13fdcb0e49c35Mark Andrews their
d40b5110ab954fb44fdc3826999b2facbe103b32Mark Andrews responses using transaction signatures (TSIG), specify a TSIG key file
d40b5110ab954fb44fdc3826999b2facbe103b32Mark Andrews using the <option>-k</option> option. You can also specify the TSIG
d40b5110ab954fb44fdc3826999b2facbe103b32Mark Andrews key itself on the command line using the <option>-y</option> option;
538a83db7509d598da95a93bd7b74ef3112123a4Mark Andrews <parameter>hmac</parameter> is the type of the TSIG, default HMAC-MD5,
538a83db7509d598da95a93bd7b74ef3112123a4Mark Andrews <parameter>name</parameter> is the name of the TSIG key and
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <parameter>key</parameter> is the actual key. The key is a
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson base-64
15996d1b4ffb38960e1bb3b64026b96007f18f70Mark Andrews encoded string, typically generated by
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson <citerefentry>
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
7208386cd37a2092c70eddf80cf29519b16c4c80Mark Andrews </citerefentry>.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson Caution should be taken when using the <option>-y</option> option on
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson multi-user systems as the key can be visible in the output from
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson <citerefentry>
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson <refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum>
32374d94830dc91c2aa598ba8438edb5d7fa1331Mark Andrews </citerefentry>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson or in the shell's history file. When
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson using TSIG authentication with <command>dig</command>, the name
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson server that is queried needs to know the key and algorithm that is
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson being used. In BIND, this is done by providing appropriate
97bb3725292d3f74bcb0a32be6a76b2da34ba494Andreas Gustafsson <command>key</command> and <command>server</command> statements in
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <filename>named.conf</filename>.
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews </para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </refsect1>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <refsect1>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <title>QUERY OPTIONS</title>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para><command>dig</command>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson provides a number of query options which affect
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews the way in which lookups are made and the results displayed. Some of
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson these set or reset flag bits in the query header, some determine which
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews sections of the answer get printed, and others determine the timeout
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews and retry strategies.
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews </para>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <para>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews Each query option is identified by a keyword preceded by a plus sign
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews (<literal>+</literal>). Some keywords set or reset an
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson option. These may be preceded
e1cbf95aec7cb11a66285ccbffa552c501d2ac3cMark Andrews by the string <literal>no</literal> to negate the meaning of
508f61f8d699c46f962b682f388e54b446a7194dMark Andrews that keyword. Other
3a3705ef7747327df182bf8d009333d2472253d5Mark Andrews keywords assign values to options like the timeout interval. They
3a3705ef7747327df182bf8d009333d2472253d5Mark Andrews have the form <option>+keyword=value</option>.
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson The query options are:
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <variablelist>
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson <varlistentry>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <term><option>+[no]tcp</option></term>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson Use [do not use] TCP when querying name servers. The default
335a4599898f181f18b618a5ac4fe4e083ecd308Andreas Gustafsson behavior is to use UDP unless an AXFR or IXFR query is
20d0c8c5bb06be9925d568adce9a031e08ef7172Andreas Gustafsson requested, in
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson which case a TCP connection is used.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </para>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson </listitem>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson </varlistentry>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
3970098dcd2a7122541667b4b56cea8abce8ccf2Mark Andrews <varlistentry>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <term><option>+[no]vc</option></term>
32d1434aff6112327dffe188e3585ee0157c6e5fMark Andrews <listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson Use [do not use] TCP when querying name servers. This alternate
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews syntax to <parameter>+[no]tcp</parameter> is
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews provided for backwards
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson compatibility. The "vc" stands for "virtual circuit".
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </varlistentry>
3970098dcd2a7122541667b4b56cea8abce8ccf2Mark Andrews
f9cdef0ba5cd21db91318f290c25b0ab3d28f3dfMark Andrews <varlistentry>
18eedaf157f8c45e2d998b33d2a13fdcb0e49c35Mark Andrews <term><option>+[no]ignore</option></term>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
15996d1b4ffb38960e1bb3b64026b96007f18f70Mark Andrews Ignore truncation in UDP responses instead of retrying with TCP.
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson By
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson default, TCP retries are performed.
7208386cd37a2092c70eddf80cf29519b16c4c80Mark Andrews </para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </listitem>
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson </varlistentry>
669e9657c731176df235832367f61435f7b83ddfAndreas Gustafsson
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson <varlistentry>
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson <term><option>+domain=somename</option></term>
32374d94830dc91c2aa598ba8438edb5d7fa1331Mark Andrews <listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson Set the search list to contain the single domain
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson <parameter>somename</parameter>, as if specified in
a6a23642eaf383add7a0be045c01e7dd8278ccafAndreas Gustafsson a
97bb3725292d3f74bcb0a32be6a76b2da34ba494Andreas Gustafsson <command>domain</command> directive in
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <filename>/etc/resolv.conf</filename>, and enable
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews search list
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson processing as if the <parameter>+search</parameter>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson option were given.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </varlistentry>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <varlistentry>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <term><option>+[no]search</option></term>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews <listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews Use [do not use] the search list defined by the searchlist or
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews domain
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews directive in <filename>resolv.conf</filename> (if
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews any).
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews The search list is not used by default.
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews </para>
2fd63cf561135572339d4e2ff0c06695e3dcf1baMark Andrews </listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </varlistentry>
e1cbf95aec7cb11a66285ccbffa552c501d2ac3cMark Andrews
508f61f8d699c46f962b682f388e54b446a7194dMark Andrews <varlistentry>
3a3705ef7747327df182bf8d009333d2472253d5Mark Andrews <term><option>+[no]showsearch</option></term>
3a3705ef7747327df182bf8d009333d2472253d5Mark Andrews <listitem>
250ed9e230b3903b1b264dd1ed2f691fc7cd2f8fAndreas Gustafsson <para>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson Perform [do not perform] a search showing intermediate
e0172ab8e2bf2fd2315f5c9b34cae8e013c71ddaMark Andrews results.
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </para>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson </varlistentry>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <varlistentry>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <term><option>+[no]defname</option></term>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <listitem>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <para>
1c153afce556ff3c687986fb7c4a0b0a7f5e7cd8Mark Andrews Deprecated, treated as a synonym for <parameter>+[no]search</parameter>
3970098dcd2a7122541667b4b56cea8abce8ccf2Mark Andrews </para>
3970098dcd2a7122541667b4b56cea8abce8ccf2Mark Andrews </listitem>
113251976d99be74da788bdb78300957b77a1381Andreas Gustafsson </varlistentry>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <varlistentry>
22f0b13f28a7df3b348b18848d0ccd745ea88c3cAndreas Gustafsson <term><option>+[no]aaonly</option></term>
<listitem>
<para>
Sets the "aa" flag in the query.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]aaflag</option></term>
<listitem>
<para>
A synonym for <parameter>+[no]aaonly</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]adflag</option></term>
<listitem>
<para>
Set [do not set] the AD (authentic data) bit in the query. The
AD bit
currently has a standard meaning only in responses, not in
queries,
but the ability to set the bit in the query is provided for
completeness.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]cdflag</option></term>
<listitem>
<para>
Set [do not set] the CD (checking disabled) bit in the query.
This
requests the server to not perform DNSSEC validation of
responses.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]cl</option></term>
<listitem>
<para>
Display [do not display] the CLASS when printing the record.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]ttlid</option></term>
<listitem>
<para>
Display [do not display] the TTL when printing the record.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]recurse</option></term>
<listitem>
<para>
Toggle the setting of the RD (recursion desired) bit in the
query.
This bit is set by default, which means <command>dig</command>
normally sends recursive queries. Recursion is automatically
disabled
when the <parameter>+nssearch</parameter> or
<parameter>+trace</parameter> query options are
used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]nssearch</option></term>
<listitem>
<para>
When this option is set, <command>dig</command>
attempts to find the
authoritative name servers for the zone containing the name
being
looked up and display the SOA record that each name server has
for the
zone.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]trace</option></term>
<listitem>
<para>
Toggle tracing of the delegation path from the root name servers
for
the name being looked up. Tracing is disabled by default. When
tracing is enabled, <command>dig</command> makes
iterative queries to
resolve the name being looked up. It will follow referrals from
the
root servers, showing the answer from each server that was used
to
resolve the lookup.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]cmd</option></term>
<listitem>
<para>
toggles the printing of the initial comment in the output
identifying
the version of <command>dig</command> and the query
options that have
been applied. This comment is printed by default.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]short</option></term>
<listitem>
<para>
Provide a terse answer. The default is to print the answer in a
verbose form.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]identify</option></term>
<listitem>
<para>
Show [or do not show] the IP address and port number that
supplied the
answer when the <parameter>+short</parameter> option
is enabled. If
short form answers are requested, the default is not to show the
source address and port number of the server that provided the
answer.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]comments</option></term>
<listitem>
<para>
Toggle the display of comment lines in the output. The default
is to
print comments.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]stats</option></term>
<listitem>
<para>
This query option toggles the printing of statistics: when the
query
was made, the size of the reply and so on. The default
behavior is
to print the query statistics.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]qr</option></term>
<listitem>
<para>
Print [do not print] the query as it is sent.
By default, the query is not printed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]question</option></term>
<listitem>
<para>
Print [do not print] the question section of a query when an
answer is
returned. The default is to print the question section as a
comment.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]answer</option></term>
<listitem>
<para>
Display [do not display] the answer section of a reply. The
default
is to display it.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]authority</option></term>
<listitem>
<para>
Display [do not display] the authority section of a reply. The
default is to display it.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]additional</option></term>
<listitem>
<para>
Display [do not display] the additional section of a reply.
The default is to display it.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]all</option></term>
<listitem>
<para>
Set or clear all display flags.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+time=T</option></term>
<listitem>
<para>
Sets the timeout for a query to
<parameter>T</parameter> seconds. The default
timeout is 5 seconds.
An attempt to set <parameter>T</parameter> to less
than 1 will result
in a query timeout of 1 second being applied.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+tries=T</option></term>
<listitem>
<para>
Sets the number of times to try UDP queries to server to
<parameter>T</parameter> instead of the default, 3.
If
<parameter>T</parameter> is less than or equal to
zero, the number of
tries is silently rounded up to 1.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+retry=T</option></term>
<listitem>
<para>
Sets the number of times to retry UDP queries to server to
<parameter>T</parameter> instead of the default, 2.
Unlike
<parameter>+tries</parameter>, this does not include
the initial
query.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+ndots=D</option></term>
<listitem>
<para>
Set the number of dots that have to appear in
<parameter>name</parameter> to <parameter>D</parameter> for it to be
considered absolute. The default value is that defined using
the
ndots statement in <filename>/etc/resolv.conf</filename>, or 1 if no
ndots statement is present. Names with fewer dots are
interpreted as
relative names and will be searched for in the domains listed in
the
<option>search</option> or <option>domain</option> directive in
<filename>/etc/resolv.conf</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+bufsize=B</option></term>
<listitem>
<para>
Set the UDP message buffer size advertised using EDNS0 to
<parameter>B</parameter> bytes. The maximum and minimum sizes
of this buffer are 65535 and 0 respectively. Values outside
this range are rounded up or down appropriately.
Values other than zero will cause a EDNS query to be sent.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+edns=#</option></term>
<listitem>
<para>
Specify the EDNS version to query with. Valid values
are 0 to 255. Setting the EDNS version will cause a
EDNS query to be sent. <option>+noedns</option> clears the
remembered EDNS version.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]multiline</option></term>
<listitem>
<para>
Print records like the SOA records in a verbose multi-line
format with human-readable comments. The default is to print
each record on a single line, to facilitate machine parsing
of the <command>dig</command> output.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]fail</option></term>
<listitem>
<para>
Do not try the next server if you receive a SERVFAIL. The
default is
to not try the next server which is the reverse of normal stub
resolver
behavior.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]besteffort</option></term>
<listitem>
<para>
Attempt to display the contents of messages which are malformed.
The default is to not display malformed answers.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]dnssec</option></term>
<listitem>
<para>
Requests DNSSEC records be sent by setting the DNSSEC OK bit
(DO)
in the OPT record in the additional section of the query.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]sigchase</option></term>
<listitem>
<para>
Chase DNSSEC signature chains. Requires dig be compiled with
-DDIG_SIGCHASE.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+trusted-key=####</option></term>
<listitem>
<para>
Specifies a file containing trusted keys to be used with
<option>+sigchase</option>. Each DNSKEY record must be
on its own line.
</para>
<para>
If not specified <command>dig</command> will look for
<filename>/etc/trusted-key.key</filename> then
<filename>trusted-key.key</filename> in the current directory.
</para>
<para>
Requires dig be compiled with -DDIG_SIGCHASE.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]topdown</option></term>
<listitem>
<para>
When chasing DNSSEC signature chains perform a top-down
validation.
Requires dig be compiled with -DDIG_SIGCHASE.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1>
<title>MULTIPLE QUERIES</title>
<para>
The BIND 9 implementation of <command>dig </command>
supports
specifying multiple queries on the command line (in addition to
supporting the <option>-f</option> batch file option). Each of those
queries can be supplied with its own set of flags, options and query
options.
</para>
<para>
In this case, each <parameter>query</parameter> argument
represent an
individual query in the command-line syntax described above. Each
consists of any of the standard options and flags, the name to be
looked up, an optional query type and class and any query options that
should be applied to that query.
</para>
<para>
A global set of query options, which should be applied to all queries,
can also be supplied. These global query options must precede the
first tuple of name, class, type, options, flags, and query options
supplied on the command line. Any global query options (except
the <option>+[no]cmd</option> option) can be
overridden by a query-specific set of query options. For example:
<programlisting>
dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
</programlisting>
shows how <command>dig</command> could be used from the
command line
to make three lookups: an ANY query for <literal>www.isc.org</literal>, a
reverse lookup of 127.0.0.1 and a query for the NS records of
<literal>isc.org</literal>.
A global query option of <parameter>+qr</parameter> is
applied, so
that <command>dig</command> shows the initial query it made
for each
lookup. The final query has a local query option of
<parameter>+noqr</parameter> which means that <command>dig</command>
will not print the initial query when it looks up the NS records for
<literal>isc.org</literal>.
</para>
</refsect1>
<refsect1>
<title>IDN SUPPORT</title>
<para>
If <command>dig</command> has been built with IDN (internationalized
domain name) support, it can accept and display non-ASCII domain names.
<command>dig</command> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a
reply from the server.
If you'd like to turn off the IDN support for some reason, defines
the <envar>IDN_DISABLE</envar> environment variable.
The IDN support is disabled if the variable is set when
<command>dig</command> runs.
</para>
</refsect1>
<refsect1>
<title>FILES</title>
<para><filename>/etc/resolv.conf</filename>
</para>
<para><filename>${HOME}/.digrc</filename>
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para><citerefentry>
<refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>RFC1035</citetitle>.
</para>
</refsect1>
<refsect1>
<title>BUGS</title>
<para>
There are probably too many query options.
</para>
</refsect1>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->