dig.docbook revision c6d4f781529d2f28693546b25b2967d44ec89e60
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
1fdd2470b625a58b57d0b155e6caf8c4fc0afe8aAutomatic Updater "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews [<!ENTITY mdash "&#8212;">]>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<!--
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - Copyright (C) 2000-2003 Internet Software Consortium.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - Permission to use, copy, modify, and distribute this software for any
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - purpose with or without fee is hereby granted, provided that the above
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - copyright notice and this permission notice appear in all copies.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews-->
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<!-- $Id: dig.docbook,v 1.29 2006/01/27 02:35:14 marka Exp $ -->
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews<refentry id="man.dig">
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <refentryinfo>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont <date>Jun 30, 2000</date>
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater </refentryinfo>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <refmeta>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <refentrytitle>dig</refentrytitle>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <manvolnum>1</manvolnum>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <refmiscinfo>BIND9</refmiscinfo>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </refmeta>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
28b3569d6248168e6c00caab951521cc8141a49dAutomatic Updater <refnamediv>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <refname>dig</refname>
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater <refpurpose>DNS lookup utility</refpurpose>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </refnamediv>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <docinfo>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <copyright>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <year>2004</year>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <year>2005</year>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </copyright>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <copyright>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <year>2000</year>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <year>2001</year>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <year>2002</year>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <year>2003</year>
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater <holder>Internet Software Consortium.</holder>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </copyright>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </docinfo>
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <refsynopsisdiv>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <cmdsynopsis>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews <command>dig</command>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <arg choice="opt">@server</arg>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <arg><option>-b <replaceable class="parameter">address</replaceable></option></arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
ad671240d635376dd8681550eebee799d2e3d1fdAutomatic Updater <arg><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
ad671240d635376dd8681550eebee799d2e3d1fdAutomatic Updater <arg><option>-k <replaceable class="parameter">filename</replaceable></option></arg>
ad671240d635376dd8681550eebee799d2e3d1fdAutomatic Updater <arg><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
ad671240d635376dd8681550eebee799d2e3d1fdAutomatic Updater <arg><option>-q <replaceable class="parameter">name</replaceable></option></arg>
ad671240d635376dd8681550eebee799d2e3d1fdAutomatic Updater <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <arg><option>-x <replaceable class="parameter">addr</replaceable></option></arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <arg><option>-y <replaceable class="parameter"><optional>hmac:</optional>name:key</replaceable></option></arg>
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater <arg><option>-4</option></arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <arg><option>-6</option></arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <arg choice="opt">name</arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <arg choice="opt">type</arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <arg choice="opt">class</arg>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <arg choice="opt" rep="repeat">queryopt</arg>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </cmdsynopsis>
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater <cmdsynopsis>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <command>dig</command>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <arg><option>-h</option></arg>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </cmdsynopsis>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <cmdsynopsis>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <command>dig</command>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <arg choice="opt" rep="repeat">global-queryopt</arg>
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater <arg choice="opt" rep="repeat">query</arg>
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater </cmdsynopsis>
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater </refsynopsisdiv>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <refsect1>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <title>DESCRIPTION</title>
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater <para><command>dig</command>
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater (domain information groper) is a flexible tool
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews for interrogating DNS name servers. It performs DNS lookups and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews displays the answers that are returned from the name server(s) that
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater were queried. Most DNS administrators use <command>dig</command> to
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater troubleshoot DNS problems because of its flexibility, ease of use and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews clarity of output. Other lookup tools tend to have less functionality
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews than <command>dig</command>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </para>
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic Updater
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic Updater <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Although <command>dig</command> is normally used with
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater command-line
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic Updater arguments, it also has a batch mode of operation for reading lookup
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews requests from a file. A brief summary of its command-line arguments
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater and options is printed when the <option>-h</option> option is given.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Unlike earlier versions, the BIND9 implementation of
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic Updater <command>dig</command> allows multiple lookups to be issued
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater from the
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater command line.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater Unless it is told to query a specific name server,
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <command>dig</command> will try each of the servers listed
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater in
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic Updater <filename>/etc/resolv.conf</filename>.
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic Updater </para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews When no command line arguments or options are given, will perform an
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews NS query for "." (the root).
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
2f8d63983c297c62630044d28a6f66676b4d339dMark Andrews It is possible to set per-user defaults for <command>dig</command> via
2f8d63983c297c62630044d28a6f66676b4d339dMark Andrews <filename>${HOME}/.digrc</filename>. This file is read and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews any options in it
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater are applied before the command line arguments.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </refsect1>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater <refsect1>
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater <title>SIMPLE USAGE</title>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater A typical invocation of <command>dig</command> looks like:
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <programlisting> dig @server name type </programlisting>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater where:
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <variablelist>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <varlistentry>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <term><constant>server</constant></term>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <listitem>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews is the name or IP address of the name server to query. This can
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews be an IPv4
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews address in dotted-decimal notation or an IPv6
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews address in colon-delimited notation. When the supplied
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater <parameter>server</parameter> argument is a
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater hostname,
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater <command>dig</command> resolves that name before
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater querying that name
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater server. If no <parameter>server</parameter>
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater argument is provided,
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater <command>dig</command> consults <filename>/etc/resolv.conf</filename>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews and queries the name servers listed there. The reply from the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews name
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews server that responds is displayed.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </listitem>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <term><constant>name</constant></term>
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater <listitem>
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater <para>
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater is the name of the resource record that is to be looked up.
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater </para>
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater </listitem>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <term><constant>type</constant></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <listitem>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews indicates what type of query is required &mdash;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ANY, A, MX, SIG, etc.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <parameter>type</parameter> can be any valid query
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews type. If no
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <parameter>type</parameter> argument is supplied,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <command>dig</command> will perform a lookup for an
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater A record.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </listitem>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </variablelist>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </refsect1>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <refsect1>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <title>OPTIONS</title>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The <option>-b</option> option sets the source IP address of the query
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater to <parameter>address</parameter>. This must be a valid
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater address on
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater one of the host's network interfaces or "0.0.0.0" or "::". An optional
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater port
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater may be specified by appending "#&lt;port&gt;"
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater </para>
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater <para>
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater The default query class (IN for internet) is overridden by the
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater <option>-c</option> option. <parameter>class</parameter> is
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater any valid
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater class, such as HS for Hesiod records or CH for CHAOSNET records.
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater </para>
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The <option>-f</option> option makes <command>dig </command>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews operate
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews in batch mode by reading a list of lookup requests to process from the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews file <parameter>filename</parameter>. The file contains a
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews number of
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews queries, one per line. Each entry in the file should be organised in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews the same way they would be presented as queries to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <command>dig</command> using the command-line interface.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews If a non-standard port number is to be queried, the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <option>-p</option> option is used. <parameter>port#</parameter> is
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews the port number that <command>dig</command> will send its
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews queries
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews instead of the standard DNS port number 53. This option would be used
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews to test a name server that has been configured to listen for queries
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater on a non-standard port number.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater The <option>-4</option> option forces <command>dig</command>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater to only
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater use IPv4 query transport. The <option>-6</option> option forces
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <command>dig</command> to only use IPv6 query transport.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater The <option>-t</option> option sets the query type to
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <parameter>type</parameter>. It can be any valid query type
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater which is
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater supported in BIND9. The default query type "A", unless the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <option>-x</option> option is supplied to indicate a reverse lookup.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews A zone transfer can be requested by specifying a type of AXFR. When
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews an incremental zone transfer (IXFR) is required,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <parameter>type</parameter> is set to <literal>ixfr=N</literal>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The incremental zone transfer will contain the changes made to the zone
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews since the serial number in the zone's SOA record was
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <parameter>N</parameter>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The <option>-q</option> option sets the query name to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <parameter>name</parameter>. This useful do distingish the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <parameter>name</parameter> from other arguments.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </para>
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater Reverse lookups - mapping addresses to names - are simplified by the
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <option>-x</option> option. <parameter>addr</parameter> is
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater an IPv4
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater address in dotted-decimal notation, or a colon-delimited IPv6 address.
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater When this option is used, there is no need to provide the
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater <parameter>name</parameter>, <parameter>class</parameter> and
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater <parameter>type</parameter> arguments. <command>dig</command>
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater automatically performs a lookup for a name like
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <literal>11.12.13.10.in-addr.arpa</literal> and sets the
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater query type and
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater class to PTR and IN respectively. By default, IPv6 addresses are
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater looked up using nibble format under the IP6.ARPA domain.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater To use the older RFC1886 method using the IP6.INT domain
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater specify the <option>-i</option> option. Bit string labels (RFC2874)
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater are now experimental and are not attempted.
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater </para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater To sign the DNS queries sent by <command>dig</command> and
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater their
5a24d24c8fba3480d707c0c902379ddb36501e12Automatic Updater responses using transaction signatures (TSIG), specify a TSIG key file
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater using the <option>-k</option> option. You can also specify the TSIG
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater key itself on the command line using the <option>-y</option> option;
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <parameter>hmac</parameter> is the type of the TSIG, default HMAC-MD5,
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <parameter>name</parameter> is the name of the TSIG key and
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <parameter>key</parameter> is the actual key. The key is a
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater base-64
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater encoded string, typically generated by
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <citerefentry>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater </citerefentry>.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater Caution should be taken when using the <option>-y</option> option on
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater multi-user systems as the key can be visible in the output from
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater <citerefentry>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </citerefentry>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater or in the shell's history file. When
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater using TSIG authentication with <command>dig</command>, the name
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater server that is queried needs to know the key and algorithm that is
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updater being used. In BIND, this is done by providing appropriate
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <command>key</command> and <command>server</command> statements in
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater <filename>named.conf</filename>.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater </para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater </refsect1>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <refsect1>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <title>QUERY OPTIONS</title>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para><command>dig</command>
90153b6536f7a5078e1c157c980110dbcd7fe205Mark Andrews provides a number of query options which affect
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews the way in which lookups are made and the results displayed. Some of
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews these set or reset flag bits in the query header, some determine which
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews sections of the answer get printed, and others determine the timeout
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews and retry strategies.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Each query option is identified by a keyword preceded by a plus sign
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews (<literal>+</literal>). Some keywords set or reset an
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews option. These may be preceded
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews by the string <literal>no</literal> to negate the meaning of
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews that keyword. Other
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews keywords assign values to options like the timeout interval. They
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews have the form <option>+keyword=value</option>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The query options are:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <variablelist>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <term><option>+[no]tcp</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <listitem>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Use [do not use] TCP when querying name servers. The default
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews behaviour is to use UDP unless an AXFR or IXFR query is
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews requested, in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews which case a TCP connection is used.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </para>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews </listitem>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews </varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <term><option>+[no]vc</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <listitem>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews Use [do not use] TCP when querying name servers. This alternate
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews syntax to <parameter>+[no]tcp</parameter> is
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews provided for backwards
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews compatibility. The "vc" stands for "virtual circuit".
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </para>
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater </listitem>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <term><option>+[no]ignore</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <listitem>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Ignore truncation in UDP responses instead of retrying with TCP.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews By
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews default, TCP retries are performed.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </listitem>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <term><option>+domain=somename</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <listitem>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Set the search list to contain the single domain
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <parameter>somename</parameter>, as if specified in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews a
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater <command>domain</command> directive in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <filename>/etc/resolv.conf</filename>, and enable
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews search list
c6c78f699b55b3344fb6b17ddc854cbae4610468Automatic Updater processing as if the <parameter>+search</parameter>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews option were given.
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater </para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </listitem>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater <varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <term><option>+[no]search</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <listitem>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Use [do not use] the search list defined by the searchlist or
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews domain
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews directive in <filename>resolv.conf</filename> (if
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews any).
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The search list is not used by default.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </para>
28b3569d6248168e6c00caab951521cc8141a49dAutomatic Updater </listitem>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </varlistentry>
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <term><option>+[no]showsearch</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <listitem>
28b3569d6248168e6c00caab951521cc8141a49dAutomatic Updater <para>
28b3569d6248168e6c00caab951521cc8141a49dAutomatic Updater Perform [do not perform] a search showing intermediate
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews results.
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater </para>
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews </listitem>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <term><option>+[no]defname</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <listitem>
<para>
Deprecated, treated as a synonym for <parameter>+[no]search</parameter>
</para>
</listitem>
</varlistentry>
<varlistentry>
<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
behaviour 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 time
out 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
behaviour.
</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:
-->