dig.docbook revision feb1f6a4ac42988558ecb8dc5dc0c974ec1f0509
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - Copyright (C) 2000, 2001 Internet Software Consortium.
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - Permission to use, copy, modify, and distribute this software for any
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - purpose with or without fee is hereby granted, provided that the above
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - copyright notice and this permission notice appear in all copies.
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1c57c3f79db0bf0358bbe6d7b5ad650c0c852f4bTinderbox User<!-- $Id: dig.docbook,v 1.7 2001/09/18 18:25:14 bwelling Exp $ -->
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<refentryinfo>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt</refentryinfo>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt</refnamediv>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<refsynopsisdiv>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<cmdsynopsis>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<arg><option>-b <replaceable class="parameter">address</replaceable></option></arg>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<arg><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<arg><option>-k <replaceable class="parameter">filename</replaceable></option></arg>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<arg><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
c42708dcc8ca18a41152251654d29f0cdd5b9533Tinderbox User<arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
c42708dcc8ca18a41152251654d29f0cdd5b9533Tinderbox User<arg><option>-x <replaceable class="parameter">addr</replaceable></option></arg>
c42708dcc8ca18a41152251654d29f0cdd5b9533Tinderbox User<arg><option>-y <replaceable class="parameter">name:key</replaceable></option></arg>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User</cmdsynopsis>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<cmdsynopsis>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt</cmdsynopsis>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<cmdsynopsis>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt</cmdsynopsis>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt</refsynopsisdiv>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<command>dig</command> (domain information groper) is a flexible tool
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntfor interrogating DNS name servers. It performs DNS lookups and
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntdisplays the answers that are returned from the name server(s) that
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userwere queried. Most DNS administrators use <command>dig</command> to
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunttroubleshoot DNS problems because of its flexibility, ease of use and
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntclarity of output. Other lookup tools tend to have less functionality
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntAlthough <command>dig</command> is normally used with command-line
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntarguments, it also has a batch mode of operation for reading lookup
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntrequests from a file. A brief summary of its command-line arguments
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntand options is printed when the <option>-h</option> option is given.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserUnlike earlier versions, the BIND9 implementation of
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<command>dig</command> allows multiple lookups to be issued from the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntcommand line.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserUnless it is told to query a specific name server,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<command>dig</command> will try each of the servers listed in
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntWhen no command line arguments or options are given, will perform an
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntNS query for "." (the root).
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntIt is possible to set per-user defaults for <command>dig</command> via
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<filename>${HOME}/.digrc</filename>. This file is read and any options in it
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userare applied before the command line arguments.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntA typical invocation of <command>dig</command> looks like:
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<programlisting> dig @server name type </programlisting> where:
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<variablelist>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><constant>server</constant></term>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Useris the name or IP address of the name server to query. This can be an IPv4
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntaddress in dotted-decimal notation or an IPv6
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntaddress in colon-delimited notation. When the supplied
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<parameter>server</parameter> argument is a hostname,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<command>dig</command> resolves that name before querying that name
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userserver. If no <parameter>server</parameter> argument is provided,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<command>dig</command> consults <filename>/etc/resolv.conf</filename>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntand queries the name servers listed there. The reply from the name
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntserver that responds is displayed.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<varlistentry><term><constant>name</constant></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntis the name of the resource record that is to be looked up.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><constant>type</constant></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntindicates what type of query is required —
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserANY, A, MX, SIG, etc.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<parameter>type</parameter> can be any valid query type. If no
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<command>dig</command> will perform a lookup for an A record.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt</variablelist>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserThe <option>-b</option> option sets the source IP address of the query
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntto <parameter>address</parameter>. This must be a valid address on
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntone of the host's network interfaces.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserThe default query class (IN for internet) is overridden by the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<option>-c</option> option. <parameter>class</parameter> is any valid
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntclass, such as HS for Hesiod records or CH for CHAOSNET records.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntThe <option>-f</option> option makes <command>dig </command> operate
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntin batch mode by reading a list of lookup requests to process from the
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userfile <parameter>filename</parameter>. The file contains a number of
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntqueries, one per line. Each entry in the file should be organised in
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntthe same way they would be presented as queries to
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<command>dig</command> using the command-line interface.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserIf a non-standard port number is to be queried, the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<option>-p</option> option is used. <parameter>port#</parameter> is
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userthe port number that <command>dig</command> will send its queries
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntinstead of the standard DNS port number 53. This option would be used
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntto test a name server that has been configured to listen for queries
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunton a non-standard port number.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntThe <option>-t</option> option sets the query type to
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<parameter>type</parameter>. It can be any valid query type which is
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usersupported in BIND9. The default query type "A", unless the
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<option>-x</option> option is supplied to indicate a reverse lookup.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntA zone transfer can be requested by specifying a type of AXFR. When
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntan incremental zone transfer (IXFR) is required,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<parameter>type</parameter> is set to <literal>ixfr=N</literal>.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntThe incremental zone transfer will contain the changes made to the zone
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntsince the serial number in the zone's SOA record was
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntReverse lookups - mapping addresses to names - are simplified by the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<option>-x</option> option. <parameter>addr</parameter> is an IPv4
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntaddress in dotted-decimal notation, or a colon-delimited IPv6 address.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntWhen this option is used, there is no need to provide the
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<parameter>name</parameter>, <parameter>class</parameter> and
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<parameter>type</parameter> arguments. <command>dig</command>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userautomatically performs a lookup for a name like
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<literal>11.12.13.10.in-addr.arpa</literal> and sets the query type and
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntclass to PTR and IN respectively. By default, IPv6 addresses are
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntlooked up using the IP6.ARPA domain and binary labels as defined in
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserRFC2874. To use the older RFC1886 method using the IP6.INT domain and
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt"nibble" labels, specify the <option>-n</option> (nibble) option.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntTo sign the DNS queries sent by <command>dig</command> and their
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntresponses using transaction signatures (TSIG), specify a TSIG key file
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntusing the <option>-k</option> option. You can also specify the TSIG
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userkey itself on the command line using the <option>-y</option> option;
9d557856c2a19ec95ee73245f60a92f8675cf5baTinderbox User<parameter>name</parameter> is the name of the TSIG key and
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<parameter>key</parameter> is the actual key. The key is a base-64
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntencoded string, typically generated by <citerefentry>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt</citerefentry>.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCaution should be taken when using the <option>-y</option> option on
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntmulti-user systems as the key can be visible in the output from
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<citerefentry> <refentrytitle>ps</refentrytitle><manvolnum>1
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt</manvolnum> </citerefentry> or in the shell's history file. When
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userusing TSIG authentication with <command>dig</command>, the name
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntserver that is queried needs to know the key and algorithm that is
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userbeing used. In BIND, this is done by providing appropriate
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<command>key</command> and <command>server</command> statements in
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<command>dig</command> provides a number of query options which affect
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntthe way in which lookups are made and the results displayed. Some of
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userthese set or reset flag bits in the query header, some determine which
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usersections of the answer get printed, and others determine the timeout
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userand retry strategies.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntEach query option is identified by a keyword preceded by a plus sign
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt(<literal>+</literal>). Some keywords set or reset an option. These may be preceded
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntby the string <literal>no</literal> to negate the meaning of that keyword. Other
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntkeywords assign values to options like the timeout interval. They
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userhave the form <option>+keyword=value</option>.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserThe query options are:
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<variablelist>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]tcp</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntUse [do not use] TCP when querying name servers. The default
e2b184f84e846bbcb764b6f0aef5dcd583d3d7a1Tinderbox Userbehaviour is to use UDP unless an AXFR or IXFR query is requested, in
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntwhich case a TCP connection is used.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]vc</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntUse [do not use] TCP when querying name servers. This alternate
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntsyntax to <parameter>+[no]tcp</parameter> is provided for backwards
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntcompatibility. The "vc" stands for "virtual circuit".
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]ignore</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntIgnore truncation in UDP responses instead of retrying with TCP. By
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntdefault, TCP retries are performed.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+domain=somename</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntSet the search list to contain the single domain
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<parameter>somename</parameter>, as if specified in a
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<filename>/etc/resolv.conf</filename>, and enable search list
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userprocessing as if the <parameter>+search</parameter> option were given.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]search</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntUse [do not use] the search list defined by the searchlist or domain
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userdirective in <filename>resolv.conf</filename> (if any).
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserThe search list is not used by default.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]defname</option></term>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserDeprecated, treated as a synonym for <parameter>+[no]search</parameter>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]aaonly</option></term>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserThis option does nothing. It is provided for compatibilty with old
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntversions of <command>dig</command> where it set an unimplemented
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntresolver flag.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]adflag</option></term>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserSet [do not set] the AD (authentic data) bit in the query. The AD bit
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usercurrently has a standard meaning only in responses, not in queries,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntbut the ability to set the bit in the query is provided for
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntcompleteness.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]cdflag</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntSet [do not set] the CD (checking disabled) bit in the query. This
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userrequests the server to not perform DNSSEC validation of responses.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]recursive</option></term>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserToggle the setting of the RD (recursion desired) bit in the query.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntThis bit is set by default, which means <command>dig</command>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntnormally sends recursive queries. Recursion is automatically disabled
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<parameter>+trace</parameter> query options are used.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]nssearch</option></term>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserWhen this option is set, <command>dig</command> attempts to find the
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userauthoritative name servers for the zone containing the name being
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntlooked up and display the SOA record that each name server has for the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]trace</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntToggle tracing of the delegation path from the root name servers for
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userthe name being looked up. Tracing is disabled by default. When
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usertracing is enabled, <command>dig</command> makes iterative queries to
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntresolve the name being looked up. It will follow referrals from the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntroot servers, showing the answer from each server that was used to
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntresolve the lookup.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]cmd</option></term>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usertoggles the printing of the initial comment in the output identifying
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userthe version of <command>dig</command> and the query options that have
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntbeen applied. This comment is printed by default.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]short</option></term>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserProvide a terse answer. The default is to print the answer in a
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<varlistentry><term><option>+[no]identify</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntShow [or do not show] the IP address and port number that supplied the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntanswer when the <parameter>+short</parameter> option is enabled. If
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usershort form answers are requested, the default is not to show the
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usersource address and port number of the server that provided the answer.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]comments</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntToggle the display of comment lines in the output. The default is to
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntprint comments.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]stats</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntThis query option toggles the printing of statistics: when the query
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userwas made, the size of the reply and so on. The default behaviour is
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userto print the query statistics.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]qr</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntPrint [do not print] the query as it is sent.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntBy default, the query is not printed.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<varlistentry><term><option>+[no]question</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntPrint [do not print] the question section of a query when an answer is
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userreturned. The default is to print the question section as a comment.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]answer</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntDisplay [do not display] the answer section of a reply. The default
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Useris to display it.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]authority</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntDisplay [do not display] the authority section of a reply. The
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntdefault is to display it.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]additional</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntDisplay [do not display] the additional section of a reply.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntThe default is to display it.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+[no]all</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntSet or clear all display flags.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<varlistentry><term><option>+time=T</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntSets the timeout for a query to
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<parameter>T</parameter> seconds. The default time out is 5 seconds.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntAn attempt to set <parameter>T</parameter> to less than 1 will result
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userin a query timeout of 1 second being applied.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+tries=A</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntSets the number of times to try UDP queries to server to
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<parameter>T</parameter> instead of the default, 3. If
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<parameter>T</parameter> is less than or equal to zero, the number of
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userretries is silently rounded up to 1.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+retries=A</option></term>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserSets the number of times to retry UDP queries to server to
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<parameter>T</parameter> instead of the default, 2. Unlike
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<parameter>+tries</parameter>, this does not include the initial
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<varlistentry><term><option>+ndots=D</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntSet the number of dots that have to appear in
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<parameter>name</parameter> to <parameter>D</parameter> for it to be
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntconsidered absolute. The default value is that defined using the
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userndots statement in <filename>/etc/resolv.conf</filename>, or 1 if no
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userndots statement is present. Names with fewer dots are interpreted as
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntrelative names and will be searched for in the domains listed in the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<option>search</option> or <option>domain</option> directive in
e62b9c9ce6413fb183c8116381e75dcd07ca5517Tinderbox User<varlistentry><term><option>+bufsize=B</option></term>
e62b9c9ce6413fb183c8116381e75dcd07ca5517Tinderbox UserSet the UDP message buffer size advertised using EDNS0 to
e62b9c9ce6413fb183c8116381e75dcd07ca5517Tinderbox User<parameter>B</parameter> bytes. The maximum and minimum sizes of this
e62b9c9ce6413fb183c8116381e75dcd07ca5517Tinderbox Userbuffer are 65535 and 0 respectively. Values outside this range are
d7a61cfbe56ebfa1682e949e48b4d08840234d8fTinderbox Userrounded up or down appropriately.
d7a61cfbe56ebfa1682e949e48b4d08840234d8fTinderbox User<varlistentry><term><option>+[no]multiline</option></term>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntPrint records like the SOA records in a verbose multi-line
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userformat with human-readable comments. The default is to print
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usereach record on a single line, to facilitate machine parsing
909a8e59a460dd24588b857976abddbbab9894caTinderbox User</variablelist>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserThe BIND 9 implementation of <command>dig </command> supports
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userspecifying multiple queries on the command line (in addition to
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntsupporting the <option>-f</option> batch file option). Each of those
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntqueries can be supplied with its own set of flags, options and query
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntIn this case, each <parameter>query</parameter> argument represent an
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntindividual query in the command-line syntax described above. Each
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntconsists of any of the standard options and flags, the name to be
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntlooked up, an optional query type and class and any query options that
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntshould be applied to that query.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserA global set of query options, which should be applied to all queries,
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usercan also be supplied. These global query options must precede the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntfirst tuple of name, class, type, options, flags, and query options
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntsupplied on the command line. Any global query options can be
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Useroverridden by a query-specific set of query options. For example:
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<programlisting>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntdig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt</programlisting>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntshows how <command>dig</command> could be used from the command line
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntto make three lookups: an ANY query for <literal>www.isc.org</literal>, a
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userreverse lookup of 127.0.0.1 and a query for the NS records of
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserA global query option of <parameter>+qr</parameter> is applied, so
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userthat <command>dig</command> shows the initial query it made for each
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntlookup. The final query has a local query option of
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<parameter>+noqr</parameter> which means that <command>dig</command>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntwill not print the initial query when it looks up the NS records for
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<citerefentry>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User</citerefentry>,
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<citerefentry>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt</citerefentry>,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<citerefentry>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt</citerefentry>,
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserThere are probably too many query options.