dig.docbook revision 0b07b9482c00060d1ddd551a5dcb8cecbe2c1f65
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
bec154197d3d640b0d5b416cd5218ea58dca5d3aTinderbox User<!--
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - Copyright (C) 2000, 2001 Internet Software Consortium.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater - 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 INTERNET SOFTWARE CONSORTIUM
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User-->
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<!-- $Id: dig.docbook,v 1.10 2001/11/14 06:34:24 marka Exp $ -->
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<refentry>
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<refentryinfo>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<date>Jun 30, 2000</date>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater</refentryinfo>
c3dc968140ab7f04795acc7835e4e89ccb0c0a27Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<refmeta>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<refentrytitle>dig</refentrytitle>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<manvolnum>1</manvolnum>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<refmiscinfo>BIND9</refmiscinfo>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</refmeta>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<refnamediv>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<refname>dig</refname>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<refpurpose>DNS lookup utility</refpurpose>
c3dc968140ab7f04795acc7835e4e89ccb0c0a27Tinderbox User</refnamediv>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<refsynopsisdiv>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<cmdsynopsis>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<command>dig</command>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<arg choice=opt>@server</arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<arg><option>-b <replaceable class="parameter">address</replaceable></option></arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<arg><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<arg><option>-k <replaceable class="parameter">filename</replaceable></option></arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<arg><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<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">name:key</replaceable></option></arg>
97e74139b19368e385a3564746d42db70879195eAutomatic Updater<arg choice=opt>name</arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<arg choice=opt>type</arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<arg choice=opt>class</arg>
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User<arg choice=opt rep=repeat>queryopt</arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</cmdsynopsis>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<cmdsynopsis>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<command>dig</command>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<arg><option>-h</option></arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</cmdsynopsis>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<cmdsynopsis>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<command>dig</command>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<arg choice=opt rep=repeat>global-queryopt</arg>
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User<arg choice=opt rep=repeat>query</arg>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</cmdsynopsis>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</refsynopsisdiv>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<refsect1>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<title>DESCRIPTION</title>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<command>dig</command> (domain information groper) is a flexible tool
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsfor interrogating DNS name servers. It performs DNS lookups and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdisplays the answers that are returned from the name server(s) that
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updaterwere queried. Most DNS administrators use <command>dig</command> to
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updatertroubleshoot DNS problems because of its flexibility, ease of use and
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updaterclarity of output. Other lookup tools tend to have less functionality
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updaterthan <command>dig</command>.
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater</para>
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater<para>
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic UpdaterAlthough <command>dig</command> is normally used with command-line
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updaterarguments, it also has a batch mode of operation for reading lookup
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterrequests from a file. A brief summary of its command-line arguments
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterand options is printed when the <option>-h</option> option is given.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterUnlike earlier versions, the BIND9 implementation of
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<command>dig</command> allows multiple lookups to be issued from the
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updatercommand line.
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater</para>
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater<para>
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic UpdaterUnless it is told to query a specific name server,
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater<command>dig</command> will try each of the servers listed in
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater<filename>/etc/resolv.conf</filename>.
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater</para>
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater
dba3c818ae00b10388d31703e86a28415db398acTinderbox User<para>
43b94483957d3168796a816ed86cf097518817dcTinderbox UserWhen no command line arguments or options are given, will perform an
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic UpdaterNS query for "." (the root).
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater</para>
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater<para>
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic UpdaterIt is possible to set per-user defaults for <command>dig</command> via
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater<filename>${HOME}/.digrc</filename>. This file is read and any options in it
64affc54f96a2c71cbd10ed71e246ce0746259aaAutomatic Updaterare applied before the command line arguments.
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater</para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater</refsect1>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<refsect1>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<title>SIMPLE USAGE</title>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterA typical invocation of <command>dig</command> looks like:
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<programlisting> dig @server name type </programlisting> where:
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<variablelist>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<varlistentry><term><constant>server</constant></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<listitem><para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsis the name or IP address of the name server to query. This can be an IPv4
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsaddress in dotted-decimal notation or an IPv6
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsaddress in colon-delimited notation. When the supplied
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<parameter>server</parameter> argument is a hostname,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<command>dig</command> resolves that name before querying that name
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsserver. If no <parameter>server</parameter> argument is provided,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<command>dig</command> consults <filename>/etc/resolv.conf</filename>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsand queries the name servers listed there. The reply from the name
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsserver that responds is displayed.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para></listitem></varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<varlistentry><term><constant>name</constant></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<listitem><para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsis the name of the resource record that is to be looked up.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para></listitem></varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<varlistentry><term><constant>type</constant></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<listitem><para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsindicates what type of query is required &mdash;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsANY, A, MX, SIG, etc.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<parameter>type</parameter> can be any valid query type. If no
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<parameter>type</parameter> argument is supplied,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<command>dig</command> will perform a lookup for an A record.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para></listitem></varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</variablelist>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para>
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater</refsect1>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater<refsect1>
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater<title>OPTIONS</title>
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater<para>
60a900e83bab52c3f023be66654f3ab023172778Automatic UpdaterThe <option>-b</option> option sets the source IP address of the query
60a900e83bab52c3f023be66654f3ab023172778Automatic Updaterto <parameter>address</parameter>. This must be a valid address on
60a900e83bab52c3f023be66654f3ab023172778Automatic Updaterone of the host's network interfaces.
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater</para>
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater<para>
60a900e83bab52c3f023be66654f3ab023172778Automatic UpdaterThe default query class (IN for internet) is overridden by the
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater<option>-c</option> option. <parameter>class</parameter> is any valid
60a900e83bab52c3f023be66654f3ab023172778Automatic Updaterclass, such as HS for Hesiod records or CH for CHAOSNET records.
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater</para>
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater<para>
60a900e83bab52c3f023be66654f3ab023172778Automatic UpdaterThe <option>-f</option> option makes <command>dig </command> operate
60a900e83bab52c3f023be66654f3ab023172778Automatic Updaterin batch mode by reading a list of lookup requests to process from the
60a900e83bab52c3f023be66654f3ab023172778Automatic Updaterfile <parameter>filename</parameter>. The file contains a number of
60a900e83bab52c3f023be66654f3ab023172778Automatic Updaterqueries, one per line. Each entry in the file should be organised in
60a900e83bab52c3f023be66654f3ab023172778Automatic Updaterthe same way they would be presented as queries to
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater<command>dig</command> using the command-line interface.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsIf a non-standard port number is to be queried, the
2628293c6edaa41ed1407c42bb196083901e087bAutomatic Updater<option>-p</option> option is used. <parameter>port#</parameter> is
2628293c6edaa41ed1407c42bb196083901e087bAutomatic Updaterthe port number that <command>dig</command> will send its queries
2628293c6edaa41ed1407c42bb196083901e087bAutomatic Updaterinstead of the standard DNS port number 53. This option would be used
2628293c6edaa41ed1407c42bb196083901e087bAutomatic Updaterto test a name server that has been configured to listen for queries
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewson a non-standard port number.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsThe <option>-t</option> option sets the query type to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<parameter>type</parameter>. It can be any valid query type which is
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewssupported in BIND9. The default query type "A", unless the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<option>-x</option> option is supplied to indicate a reverse lookup.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsA zone transfer can be requested by specifying a type of AXFR. When
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrewsan incremental zone transfer (IXFR) is required,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<parameter>type</parameter> is set to <literal>ixfr=N</literal>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsThe incremental zone transfer will contain the changes made to the zone
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewssince the serial number in the zone's SOA record was
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<parameter>N</parameter>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsReverse lookups - mapping addresses to names - are simplified by the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<option>-x</option> option. <parameter>addr</parameter> is an IPv4
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsaddress in dotted-decimal notation, or a colon-delimited IPv6 address.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsWhen this option is used, there is no need to provide the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<parameter>name</parameter>, <parameter>class</parameter> and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<parameter>type</parameter> arguments. <command>dig</command>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsautomatically performs a lookup for a name like
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<literal>11.12.13.10.in-addr.arpa</literal> and sets the query type and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsclass to PTR and IN respectively. By default, IPv6 addresses are
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewslooked up using the IP6.ARPA domain and binary labels as defined in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsRFC2874. To use the older RFC1886 method using the IP6.INT domain and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews"nibble" labels, specify the <option>-n</option> (nibble) option.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
dba3c818ae00b10388d31703e86a28415db398acTinderbox User<para>
43b94483957d3168796a816ed86cf097518817dcTinderbox UserTo sign the DNS queries sent by <command>dig</command> and their
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsresponses using transaction signatures (TSIG), specify a TSIG key file
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsusing the <option>-k</option> option. You can also specify the TSIG
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewskey itself on the command line using the <option>-y</option> option;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<parameter>name</parameter> is the name of the TSIG key and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<parameter>key</parameter> is the actual key. The key is a base-64
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsencoded string, typically generated by <citerefentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</citerefentry>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCaution should be taken when using the <option>-y</option> option on
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsmulti-user systems as the key can be visible in the output from
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<citerefentry> <refentrytitle>ps</refentrytitle><manvolnum>1
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews</manvolnum> </citerefentry> or in the shell's history file. When
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrewsusing TSIG authentication with <command>dig</command>, the name
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsserver that is queried needs to know the key and algorithm that is
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsbeing used. In BIND, this is done by providing appropriate
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<command>key</command> and <command>server</command> statements in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<filename>named.conf</filename>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</refsect1>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<refsect1>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<title>QUERY OPTIONS</title>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<command>dig</command> provides a number of query options which affect
97e74139b19368e385a3564746d42db70879195eAutomatic Updaterthe way in which lookups are made and the results displayed. Some of
97e74139b19368e385a3564746d42db70879195eAutomatic Updaterthese set or reset flag bits in the query header, some determine which
43b94483957d3168796a816ed86cf097518817dcTinderbox Usersections of the answer get printed, and others determine the timeout
dba3c818ae00b10388d31703e86a28415db398acTinderbox Userand retry strategies.
dba3c818ae00b10388d31703e86a28415db398acTinderbox User</para>
dba3c818ae00b10388d31703e86a28415db398acTinderbox User
97e74139b19368e385a3564746d42db70879195eAutomatic Updater<para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEach query option is identified by a keyword preceded by a plus sign
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews(<literal>+</literal>). Some keywords set or reset an option. These may be preceded
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsby the string <literal>no</literal> to negate the meaning of that keyword. Other
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewskeywords assign values to options like the timeout interval. They
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewshave the form <option>+keyword=value</option>.
52ece689e0265f9a3e518de5b2539e749f6d35acMark AndrewsThe query options are:
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews<variablelist>
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews<varlistentry><term><option>+[no]tcp</option></term>
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews<listitem><para>
52ece689e0265f9a3e518de5b2539e749f6d35acMark AndrewsUse [do not use] TCP when querying name servers. The default
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrewsbehaviour is to use UDP unless an AXFR or IXFR query is requested, in
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrewswhich case a TCP connection is used.
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews</para></listitem></varlistentry>
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews<varlistentry><term><option>+[no]vc</option></term>
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews<listitem><para>
52ece689e0265f9a3e518de5b2539e749f6d35acMark AndrewsUse [do not use] TCP when querying name servers. This alternate
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrewssyntax to <parameter>+[no]tcp</parameter> is provided for backwards
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrewscompatibility. The "vc" stands for "virtual circuit".
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews</para></listitem></varlistentry>
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews<varlistentry><term><option>+[no]ignore</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<listitem><para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsIgnore truncation in UDP responses instead of retrying with TCP. By
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdefault, TCP retries are performed.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para></listitem></varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<varlistentry><term><option>+domain=somename</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<listitem><para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSet the search list to contain the single domain
dba3c818ae00b10388d31703e86a28415db398acTinderbox User<parameter>somename</parameter>, as if specified in a
dba3c818ae00b10388d31703e86a28415db398acTinderbox User<command>domain</command> directive in
72938578c985138165e7a4b0a38f16daacbad95eAutomatic Updater<filename>/etc/resolv.conf</filename>, and enable search list
dba3c818ae00b10388d31703e86a28415db398acTinderbox Userprocessing as if the <parameter>+search</parameter> option were given.
43b94483957d3168796a816ed86cf097518817dcTinderbox User</para></listitem></varlistentry>
dba3c818ae00b10388d31703e86a28415db398acTinderbox User
dba3c818ae00b10388d31703e86a28415db398acTinderbox User<varlistentry><term><option>+[no]search</option></term>
dba3c818ae00b10388d31703e86a28415db398acTinderbox User<listitem><para>
dba3c818ae00b10388d31703e86a28415db398acTinderbox UserUse [do not use] the search list defined by the searchlist or domain
dba3c818ae00b10388d31703e86a28415db398acTinderbox Userdirective in <filename>resolv.conf</filename> (if any).
dba3c818ae00b10388d31703e86a28415db398acTinderbox UserThe search list is not used by default.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para></listitem></varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<varlistentry><term><option>+[no]defname</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<listitem><para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsDeprecated, treated as a synonym for <parameter>+[no]search</parameter>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para></listitem></varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<varlistentry><term><option>+[no]aaonly</option></term>
6283056805887de88040698685b8e1936a1f7a2dAutomatic Updater<listitem><para>
6283056805887de88040698685b8e1936a1f7a2dAutomatic UpdaterThis option does nothing. It is provided for compatibilty with old
6283056805887de88040698685b8e1936a1f7a2dAutomatic Updaterversions of <command>dig</command> where it set an unimplemented
6283056805887de88040698685b8e1936a1f7a2dAutomatic Updaterresolver flag.
6283056805887de88040698685b8e1936a1f7a2dAutomatic Updater</para></listitem></varlistentry>
6283056805887de88040698685b8e1936a1f7a2dAutomatic Updater
6283056805887de88040698685b8e1936a1f7a2dAutomatic Updater<varlistentry><term><option>+[no]adflag</option></term>
1c51f79aba598e5e20bde66aea0237e347f6d5ceAutomatic Updater<listitem><para>
1c51f79aba598e5e20bde66aea0237e347f6d5ceAutomatic UpdaterSet [do not set] the AD (authentic data) bit in the query. The AD bit
6283056805887de88040698685b8e1936a1f7a2dAutomatic Updatercurrently has a standard meaning only in responses, not in queries,
1c51f79aba598e5e20bde66aea0237e347f6d5ceAutomatic Updaterbut the ability to set the bit in the query is provided for
6283056805887de88040698685b8e1936a1f7a2dAutomatic Updatercompleteness.
6283056805887de88040698685b8e1936a1f7a2dAutomatic Updater</para></listitem></varlistentry>
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic Updater<varlistentry><term><option>+[no]cdflag</option></term>
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic Updater<listitem><para>
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox UserSet [do not set] the CD (checking disabled) bit in the query. This
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic Updaterrequests the server to not perform DNSSEC validation of responses.
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic Updater</para></listitem></varlistentry>
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic Updater
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic Updater<varlistentry><term><option>+[no]recursive</option></term>
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic Updater<listitem><para>
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic UpdaterToggle the setting of the RD (recursion desired) bit in the query.
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic UpdaterThis bit is set by default, which means <command>dig</command>
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox Usernormally sends recursive queries. Recursion is automatically disabled
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox Userwhen the <parameter>+nssearch</parameter> or
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User<parameter>+trace</parameter> query options are used.
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User</para></listitem></varlistentry>
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User<varlistentry><term><option>+[no]nssearch</option></term>
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User<listitem><para>
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox UserWhen this option is set, <command>dig</command> attempts to find the
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox Userauthoritative name servers for the zone containing the name being
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox Userlooked up and display the SOA record that each name server has for the
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox Userzone.
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User</para></listitem></varlistentry>
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User<varlistentry><term><option>+[no]trace</option></term>
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User<listitem><para>
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox UserToggle tracing of the delegation path from the root name servers for
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox Userthe name being looked up. Tracing is disabled by default. When
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox Usertracing is enabled, <command>dig</command> makes iterative queries to
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic Updaterresolve the name being looked up. It will follow referrals from the
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic Updaterroot servers, showing the answer from each server that was used to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsresolve the lookup.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para></listitem></varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<varlistentry><term><option>+[no]cmd</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<listitem><para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewstoggles the printing of the initial comment in the output identifying
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsthe version of <command>dig</command> and the query options that have
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsbeen applied. This comment is printed by default.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para></listitem></varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<varlistentry><term><option>+[no]short</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<listitem><para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterProvide a terse answer. The default is to print the answer in a
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterverbose form.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater</para></listitem></varlistentry>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<varlistentry><term><option>+[no]identify</option></term>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<listitem><para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterShow [or do not show] the IP address and port number that supplied the
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updateranswer when the <parameter>+short</parameter> option is enabled. If
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updatershort form answers are requested, the default is not to show the
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updatersource address and port number of the server that provided the answer.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater</para></listitem></varlistentry>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<varlistentry><term><option>+[no]comments</option></term>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<listitem><para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterToggle the display of comment lines in the output. The default is to
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterprint comments.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater</para></listitem></varlistentry>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<varlistentry><term><option>+[no]stats</option></term>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<listitem><para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterThis query option toggles the printing of statistics: when the query
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterwas made, the size of the reply and so on. The default behaviour is
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterto print the query statistics.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater</para></listitem></varlistentry>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<varlistentry><term><option>+[no]qr</option></term>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<listitem><para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterPrint [do not print] the query as it is sent.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterBy default, the query is not printed.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater</para></listitem></varlistentry>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<varlistentry><term><option>+[no]question</option></term>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<listitem><para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterPrint [do not print] the question section of a query when an answer is
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterreturned. The default is to print the question section as a comment.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater</para></listitem></varlistentry>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<varlistentry><term><option>+[no]answer</option></term>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<listitem><para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterDisplay [do not display] the answer section of a reply. The default
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updateris to display it.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater</para></listitem></varlistentry>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<varlistentry><term><option>+[no]authority</option></term>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<listitem><para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterDisplay [do not display] the authority section of a reply. The
a3f8c8e20780e488141d200acdfea6c5f3303513Automatic Updaterdefault is to display it.
a3f8c8e20780e488141d200acdfea6c5f3303513Automatic Updater</para></listitem></varlistentry>
a3f8c8e20780e488141d200acdfea6c5f3303513Automatic Updater
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater<varlistentry><term><option>+[no]additional</option></term>
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater<listitem><para>
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic UpdaterDisplay [do not display] the additional section of a reply.
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic UpdaterThe default is to display it.
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater</para></listitem></varlistentry>
a3f8c8e20780e488141d200acdfea6c5f3303513Automatic Updater
a3f8c8e20780e488141d200acdfea6c5f3303513Automatic Updater<varlistentry><term><option>+[no]all</option></term>
a3f8c8e20780e488141d200acdfea6c5f3303513Automatic Updater<listitem><para>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterSet or clear all display flags.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para></listitem></varlistentry>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<varlistentry><term><option>+time=T</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<listitem><para>
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updater
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic UpdaterSets the timeout for a query to
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updater<parameter>T</parameter> seconds. The default time out is 5 seconds.
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic UpdaterAn attempt to set <parameter>T</parameter> to less than 1 will result
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updaterin a query timeout of 1 second being applied.
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updater</para></listitem></varlistentry>
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updater
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updater<varlistentry><term><option>+tries=T</option></term>
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updater<listitem><para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSets the number of times to try UDP queries to server to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<parameter>T</parameter> instead of the default, 3. If
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<parameter>T</parameter> is less than or equal to zero, the number of
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewstries is silently rounded up to 1.
8de0d8a6905e397ed0a26054815420685f9b435eAutomatic Updater</para></listitem></varlistentry>
8de0d8a6905e397ed0a26054815420685f9b435eAutomatic Updater
8de0d8a6905e397ed0a26054815420685f9b435eAutomatic Updater<varlistentry><term><option>+retry=T</option></term>
3b2c6af63e0367c6eabe0a21ca23841ca87cd22fAutomatic Updater<listitem><para>
089c63b69cdf6803aa8901aae3f2fbae58969511Automatic UpdaterSets the number of times to retry UDP queries to server to
3b2c6af63e0367c6eabe0a21ca23841ca87cd22fAutomatic Updater<parameter>T</parameter> instead of the default, 2. Unlike
8de0d8a6905e397ed0a26054815420685f9b435eAutomatic Updater<parameter>+tries</parameter>, this does not include the initial
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsquery.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para></listitem></varlistentry>
8de0d8a6905e397ed0a26054815420685f9b435eAutomatic Updater
8de0d8a6905e397ed0a26054815420685f9b435eAutomatic Updater<varlistentry><term><option>+ndots=D</option></term>
3b2c6af63e0367c6eabe0a21ca23841ca87cd22fAutomatic Updater<listitem><para>
3b2c6af63e0367c6eabe0a21ca23841ca87cd22fAutomatic UpdaterSet the number of dots that have to appear in
3b2c6af63e0367c6eabe0a21ca23841ca87cd22fAutomatic Updater<parameter>name</parameter> to <parameter>D</parameter> for it to be
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsconsidered absolute. The default value is that defined using the
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updaterndots statement in <filename>/etc/resolv.conf</filename>, or 1 if no
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updaterndots statement is present. Names with fewer dots are interpreted as
66fec05962ae85e63c4aa568d44a962db5bbc902Automatic Updaterrelative names and will be searched for in the domains listed in the
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater<option>search</option> or <option>domain</option> directive in
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater<filename>/etc/resolv.conf</filename>.
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater</para></listitem></varlistentry>
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater<varlistentry><term><option>+bufsize=B</option></term>
77b7c54f1aa220a2f806b5883161c3027f62b1dbTinderbox User<listitem><para>
66fec05962ae85e63c4aa568d44a962db5bbc902Automatic UpdaterSet the UDP message buffer size advertised using EDNS0 to
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater<parameter>B</parameter> bytes. The maximum and minimum sizes of this
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updaterbuffer are 65535 and 0 respectively. Values outside this range are
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updaterrounded up or down appropriately.
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updater</para>
66fec05962ae85e63c4aa568d44a962db5bbc902Automatic Updater</listitem></varlistentry>
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater<varlistentry><term><option>+[no]multiline</option></term>
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updater<listitem><para>
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic UpdaterPrint records like the SOA records in a verbose multi-line
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updaterformat with human-readable comments. The default is to print
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updatereach record on a single line, to facilitate machine parsing
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updaterof the <command>dig</command> output.
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updater</para>
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updater</listitem></varlistentry>
f3d1a0ba5228251d902a6acf3c8b05cb6842f992Automatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<varlistentry><term><option>+[no]fail</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<listitem><para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsDo not try the next server if you receive a SERVFAIL. The default is
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsto not try the next server which is the reverse of normal stub resolver
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsbehaviour.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews</listitem></varlistentry>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews<varlistentry><term><option>+[no]besteffort</option></term>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews<listitem><para>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark AndrewsAttempt to display the contents of messages which are malformed.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsThe default is to not display malformed answers.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</listitem></varlistentry>
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User<varlistentry><term><option>+[no]dnssec</option></term>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<listitem><para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsRequests DNSSEC records be sent by setting the DNSSEC OK bit (DO)
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrewsin the the OPT record in the additional section of the query.
3b2c6af63e0367c6eabe0a21ca23841ca87cd22fAutomatic Updater</para>
3b2c6af63e0367c6eabe0a21ca23841ca87cd22fAutomatic Updater
3b2c6af63e0367c6eabe0a21ca23841ca87cd22fAutomatic Updater</variablelist>
3b2c6af63e0367c6eabe0a21ca23841ca87cd22fAutomatic Updater
3b2c6af63e0367c6eabe0a21ca23841ca87cd22fAutomatic Updater</para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</refsect1>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews<refsect1>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews<title>MULTIPLE QUERIES</title>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<para>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark AndrewsThe BIND 9 implementation of <command>dig </command> supports
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsspecifying multiple queries on the command line (in addition to
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrewssupporting the <option>-f</option> batch file option). Each of those
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsqueries can be supplied with its own set of flags, options and query
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsoptions.
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews</para>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews<para>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark AndrewsIn this case, each <parameter>query</parameter> argument represent an
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrewsindividual query in the command-line syntax described above. Each
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrewsconsists of any of the standard options and flags, the name to be
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrewslooked up, an optional query type and class and any query options that
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrewsshould be applied to that query.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User<para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsA global set of query options, which should be applied to all queries,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewscan also be supplied. These global query options must precede the
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox Userfirst tuple of name, class, type, options, flags, and query options
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewssupplied on the command line. Any global query options (except
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsthe <option>+[no]cmd</option> option) can be
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsoverridden by a query-specific set of query options. For example:
3f9791eac42b243d9f328d604e117f91a3f67a37Tinderbox User<programlisting>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</programlisting>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsshows how <command>dig</command> could be used from the command line
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsto make three lookups: an ANY query for <literal>www.isc.org</literal>, a
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsreverse lookup of 127.0.0.1 and a query for the NS records of
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<literal>isc.org</literal>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsA global query option of <parameter>+qr</parameter> is applied, so
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsthat <command>dig</command> shows the initial query it made for each
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterlookup. The final query has a local query option of
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<parameter>+noqr</parameter> which means that <command>dig</command>
c3dc968140ab7f04795acc7835e4e89ccb0c0a27Tinderbox Userwill not print the initial query when it looks up the NS records for
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<literal>isc.org</literal>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews</refsect1>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<refsect1>
c3dc968140ab7f04795acc7835e4e89ccb0c0a27Tinderbox User<title>FILES</title>
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews<para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<filename>/etc/resolv.conf</filename>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<filename>${HOME}/.digrc</filename>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews</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>