dig.docbook revision 1059bc2e42e8214f8b73d3b4cd181d8394a94a6a
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
a908d41cb4b0658c958383375c5a8f0bcaaf843dFrancis Dupont [<!ENTITY mdash "—">]>
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - Copyright (C) 2004-2011, 2013, 2014 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - Copyright (C) 2000-2003 Internet Software Consortium.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - Permission to use, copy, modify, and/or distribute this software for any
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - purpose with or without fee is hereby granted, provided that the above
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - copyright notice and this permission notice appear in all copies.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
dbb012765c735ee0d82dedb116cdc7cf18957814Evan Hunt - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews - PERFORMANCE OF THIS SOFTWARE.
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <refentryinfo>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </refentryinfo>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <refnamediv>
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt </refnamediv>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </copyright>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </copyright>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <refsynopsisdiv>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <cmdsynopsis>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <arg><option>-b <replaceable class="parameter">address</replaceable></option></arg>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <arg><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <arg><option>-k <replaceable class="parameter">filename</replaceable></option></arg>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <arg><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <arg><option>-q <replaceable class="parameter">name</replaceable></option></arg>
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <arg><option>-x <replaceable class="parameter">addr</replaceable></option></arg>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <arg><option>-y <replaceable class="parameter"><optional>hmac:</optional>name:key</replaceable></option></arg>
095c47be5456c17087d7b39dfc97ebee65e0dfbbMark Andrews </cmdsynopsis>
095c47be5456c17087d7b39dfc97ebee65e0dfbbMark Andrews <cmdsynopsis>
095c47be5456c17087d7b39dfc97ebee65e0dfbbMark Andrews </cmdsynopsis>
095c47be5456c17087d7b39dfc97ebee65e0dfbbMark Andrews <cmdsynopsis>
9f5443280fcfd625a06f63a1b457ed2335840278Mark Andrews <arg choice="opt" rep="repeat">global-queryopt</arg>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </cmdsynopsis>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </refsynopsisdiv>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews (domain information groper) is a flexible tool
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews for interrogating DNS name servers. It performs DNS lookups and
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews displays the answers that are returned from the name server(s) that
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews were queried. Most DNS administrators use <command>dig</command> to
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews troubleshoot DNS problems because of its flexibility, ease of use and
1059bc2e42e8214f8b73d3b4cd181d8394a94a6aFrancis Dupont clarity of output. Other lookup tools tend to have less functionality
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Although <command>dig</command> is normally used with
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews command-line
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews arguments, it also has a batch mode of operation for reading lookup
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews requests from a file. A brief summary of its command-line arguments
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews and options is printed when the <option>-h</option> option is given.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Unlike earlier versions, the BIND 9 implementation of
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <command>dig</command> allows multiple lookups to be issued
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews command line.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Unless it is told to query a specific name server,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <command>dig</command> will try each of the servers listed in
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <filename>/etc/resolv.conf</filename>. If no usable server addresses
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews are found, <command>dig</command> will send the query to the local
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews When no command line arguments or options are given,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <command>dig</command> will perform an NS query for "." (the root).
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki It is possible to set per-user defaults for <command>dig</command> via
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <filename>${HOME}/.digrc</filename>. This file is read and
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki any options in it
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki are applied before the command line arguments.
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki The IN and CH class names overlap with the IN and CH top level
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki domain names. Either use the <option>-t</option> and
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <option>-c</option> options to specify the type and class,
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki use the <option>-q</option> the specify the domain name, or
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki use "IN." and "CH." when looking up these top level domains.
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki A typical invocation of <command>dig</command> looks like:
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <programlisting> dig @server name type </programlisting>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <variablelist>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews is the name or IP address of the name server to query. This
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews can be an IPv4 address in dotted-decimal notation or an IPv6
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews address in colon-delimited notation. When the supplied
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>server</parameter> argument is a hostname,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <command>dig</command> resolves that name before querying
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews that name server.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews If no <parameter>server</parameter> argument is
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews address is found there, it queries the name server at
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews that address. If either of the <option>-4</option> or
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews only addresses for the corresponding transport
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews will be tried. If no usable addresses are found,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <command>dig</command> will send the query to the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews local host. The reply from the name server that
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews responds is displayed.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews is the name of the resource record that is to be looked up.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews indicates what type of query is required —
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews ANY, A, MX, SIG, etc.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>type</parameter> can be any valid query
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>type</parameter> argument is supplied,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <command>dig</command> will perform a lookup for an
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt </varlistentry>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt </variablelist>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The <option>-b</option> option sets the source IP address of the query
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews to <parameter>address</parameter>. This must be a valid
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews one of the host's network interfaces or "0.0.0.0" or "::". An optional
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews may be specified by appending "#<port>"
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The default query class (IN for internet) is overridden by the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <option>-c</option> option. <parameter>class</parameter> is
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews class, such as HS for Hesiod records or CH for Chaosnet records.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The <option>-f</option> option makes <command>dig </command>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews in batch mode by reading a list of lookup requests to process from the
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt file <parameter>filename</parameter>. The file contains a
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews queries, one per line. Each entry in the file should be organized in
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the same way they would be presented as queries to
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <command>dig</command> using the command-line interface.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The <option>-m</option> option enables memory usage debugging.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <!-- It enables ISC_MEM_DEBUGTRACE and ISC_MEM_DEBUGRECORD
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews documented in include/isc/mem.h -->
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews If a non-standard port number is to be queried, the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <option>-p</option> option is used. <parameter>port#</parameter> is
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the port number that <command>dig</command> will send its
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews instead of the standard DNS port number 53. This option would be used
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews to test a name server that has been configured to listen for queries
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews on a non-standard port number.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The <option>-4</option> option forces <command>dig</command>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews use IPv4 query transport. The <option>-6</option> option forces
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <command>dig</command> to only use IPv6 query transport.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The <option>-t</option> option sets the query type to
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>type</parameter>. It can be any valid query type
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews supported in BIND 9. The default query type is "A", unless the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <option>-x</option> option is supplied to indicate a reverse lookup.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews A zone transfer can be requested by specifying a type of AXFR. When
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews an incremental zone transfer (IXFR) is required,
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt <parameter>type</parameter> is set to <literal>ixfr=N</literal>.
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt The incremental zone transfer will contain the changes made to the zone
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews since the serial number in the zone's SOA record was
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The <option>-q</option> option sets the query name to
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>name</parameter>. This is useful to distinguish the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>name</parameter> from other arguments.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The <option>-v</option> causes <command>dig</command> to
1059bc2e42e8214f8b73d3b4cd181d8394a94a6aFrancis Dupont print the version number and exit.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Reverse lookups — mapping addresses to names — are simplified by the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <option>-x</option> option. <parameter>addr</parameter> is
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews address in dotted-decimal notation, or a colon-delimited IPv6 address.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews When this option is used, there is no need to provide the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>name</parameter>, <parameter>class</parameter> and
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>type</parameter> arguments. <command>dig</command>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews automatically performs a lookup for a name like
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <literal>11.12.13.10.in-addr.arpa</literal> and sets the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews query type and
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews class to PTR and IN respectively. By default, IPv6 addresses are
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews looked up using nibble format under the IP6.ARPA domain.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews To use the older RFC1886 method using the IP6.INT domain
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews specify the <option>-i</option> option. Bit string labels (RFC2874)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews are now experimental and are not attempted.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews To sign the DNS queries sent by <command>dig</command> and
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews responses using transaction signatures (TSIG), specify a TSIG key file
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews using the <option>-k</option> option. You can also specify the TSIG
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki key itself on the command line using the <option>-y</option> option;
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <parameter>hmac</parameter> is the type of the TSIG, default HMAC-MD5,
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <parameter>name</parameter> is the name of the TSIG key and
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <parameter>key</parameter> is the actual key. The key is a
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki encoded string, typically generated by
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <citerefentry>
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki </citerefentry>.
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki Caution should be taken when using the <option>-y</option> option on
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki multi-user systems as the key can be visible in the output from
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <citerefentry>
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum>
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki </citerefentry>
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki or in the shell's history file. When
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki using TSIG authentication with <command>dig</command>, the name
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki server that is queried needs to know the key and algorithm that is
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki being used. In BIND, this is done by providing appropriate
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <command>key</command> and <command>server</command> statements in
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews provides a number of query options which affect
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the way in which lookups are made and the results displayed. Some of
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews these set or reset flag bits in the query header, some determine which
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki sections of the answer get printed, and others determine the timeout
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki and retry strategies.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Each query option is identified by a keyword preceded by a plus sign
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews (<literal>+</literal>). Some keywords set or reset an
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews option. These may be preceded
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews by the string <literal>no</literal> to negate the meaning of
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews that keyword. Other
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews keywords assign values to options like the timeout interval. They
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The query options are:
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <variablelist>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews A synonym for <parameter>+[no]aaonly</parameter>.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the "aa" flag in the query.
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Display [do not display] the additional section of a
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews reply. The default is to display it.
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt </varlistentry>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt <varlistentry>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt Set [do not set] the AD (authentic data) bit in the
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt query. This requests the server to return whether
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt all of the answer and authority sections have all
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt been validated as secure according to the security
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt policy of the server. AD=1 indicates that all records
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt have been validated as secure and the answer is not
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews from a OPT-OUT range. AD=0 indicate that some part
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews of the answer was insecure or not validated. This
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews bit is set by default.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt Set or clear all display flags.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Display [do not display] the answer section of a
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt reply. The default is to display it.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Display [do not display] the authority section of a
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont reply. The default is to display it.
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont </varlistentry>
12bf5d4796505b4c20680531da96a31e6c2c1144Evan Hunt <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Attempt to display the contents of messages which are
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews malformed. The default is to not display malformed
cf24cbd837617c5cb89f04ba97b262be21a925bfEvan Hunt </varlistentry>
821ff5e8fa1df2e09fea157ee3e298eef6cf4ec9Evan Hunt <varlistentry>
1bb2f53b9f74a8ca9812cbe9243ef41190b4da14Evan Hunt Set the UDP message buffer size advertised using EDNS0
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt to <parameter>B</parameter> bytes. The maximum and
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt minimum sizes of this buffer are 65535 and 0 respectively.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Values outside this range are rounded up or down
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki appropriately. Values other than zero will cause a
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki EDNS query to be sent.
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki </varlistentry>
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <varlistentry>
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki Set [do not set] the CD (checking disabled) bit in
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki the query. This requests the server to not perform
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki DNSSEC validation of responses.
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Display [do not display] the CLASS when printing the
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Toggles the printing of the initial comment in the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews output identifying the version of <command>dig</command>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews and the query options that have been applied. This
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews comment is printed by default.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Toggle the display of comment lines in the output.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The default is to print comments.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Toggle the display of cryptographic fields in DNSSEC
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews records. The contents of these field are unnecessary
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont to debug most DNSSEC validation failures and removing
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont them makes it easier to see the common failures. The
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews default is to display the fields. When omitted they
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews are replaced by the string "[omitted]" or in the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews DNSKEY case the key id is displayed as the replacement,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews e.g. "[ key id = value ]".
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Deprecated, treated as a synonym for
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Requests DNSSEC records be sent by setting the DNSSEC
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews OK bit (DO) in the OPT record in the additional section
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews of the query.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Set the search list to contain the single domain
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>somename</parameter>, as if specified in
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <filename>/etc/resolv.conf</filename>, and enable
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews search list processing as if the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>+search</parameter> option were given.
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <term><option>+dscp=value</option></term> <listitem>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Set the DSCP code point to be used when sending the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews query. Valid DSCP code points are in the range
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews [0..63]. By default no code point is explicitly set.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Specify the EDNS version to query with. Valid values
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews are 0 to 255. Setting the EDNS version will cause
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews a EDNS query to be sent. <option>+noedns</option>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews clears the remembered EDNS version. EDNS is set to
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews 0 by default.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <term><option>+[no]ednsflags[=#]</option></term>
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont Set the must-be-zero EDNS flags bits (Z bits) to the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews specified value. Decimal, hex and octal encodings are
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews accepted. Setting a named flag (e.g. DO) will silently be
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews ignored. By default, no Z bits are set.
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <term><option>+[no]ednsnegotiation</option></term>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Enable / disable EDNS version negotiation. By default
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews EDNS version negotiation is enabled.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt <term><option>+[no]ednsopt[=code[:value]]</option></term>
98091cb21da79b0c7fd329fd64497dcb03402467Evan Hunt Specify EDNS option with code point <option>code</option>
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont and optionally payload of <option>value</option> as a
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont hexadecimal string. <option>+noednsopt</option>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews clears the EDNS options to be sent.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Send an EDNS Expire option.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Do not try the next server if you receive a SERVFAIL.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The default is to not try the next server which is
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the reverse of normal stub resolver behavior.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Send a query with a DNS header without a question section.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The default is to add a question section. The query type
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews and query name are ignored when this is set.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Show [or do not show] the IP address and port number
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews that supplied the answer when the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>+short</parameter> option is enabled. If
12bf5d4796505b4c20680531da96a31e6c2c1144Evan Hunt short form answers are requested, the default is not
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt to show the source address and port number of the
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont server that provided the answer.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt Ignore truncation in UDP responses instead of retrying
98091cb21da79b0c7fd329fd64497dcb03402467Evan Hunt with TCP. By default, TCP retries are performed.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Keep the TCP socket open between queries and reuse
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews it rather than creating a new TCP socket for each
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews lookup. The default is <option>+nokeepopen</option>.
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
84f95ddb2572641022619950a211aff49e331c98Mukund Sivaraman Print records like the SOA records in a verbose
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews multi-line format with human-readable comments. The
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews default is to print each record on a single line, to
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews facilitate machine parsing of the <command>dig</command>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
12bf5d4796505b4c20680531da96a31e6c2c1144Evan Hunt Set the number of dots that have to appear in
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt <parameter>name</parameter> to <parameter>D</parameter>
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont for it to be considered absolute. The default value
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews is that defined using the ndots statement in
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <filename>/etc/resolv.conf</filename>, or 1 if no
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews ndots statement is present. Names with fewer dots
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews are interpreted as relative names and will be searched
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews for in the domains listed in the <option>search</option>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Include an EDNS name server ID request when sending
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews When this option is set, <command>dig</command>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews attempts to find the authoritative name servers for
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the zone containing the name being looked up and
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews display the SOA record that each name server has for
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
f03747965c663e5d21af52dd111460efea9e8dd7Francis Dupont Print only one (starting) SOA record when performing
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews an AXFR. The default is to print both the starting
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews and ending SOA records.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Print [do not print] the query as it is sent. By
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews default, the query is not printed.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Print [do not print] the question section of a query
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews when an answer is returned. The default is to print
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the question section as a comment.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Toggle the setting of the RD (recursion desired) bit
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews in the query. This bit is set by default, which means
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <command>dig</command> normally sends recursive
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews queries. Recursion is automatically disabled when
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>+trace</parameter> query options are used.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
cf24cbd837617c5cb89f04ba97b262be21a925bfEvan Hunt <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the number of times to retry UDP queries to
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews server to <parameter>T</parameter> instead of the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews this does not include the initial query.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont <varlistentry>
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont <term><option>+[no]rrcomments</option></term>
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont Toggle the display of per-record comments in the
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont output (for example, human-readable key information
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont about DNSKEY records). The default is not to print
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont record comments unless multiline mode is active.
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont </varlistentry>
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont <varlistentry>
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont Use [do not use] the search list defined by the
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont searchlist or domain directive in
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont <filename>resolv.conf</filename> (if any). The search
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont list is not used by default.
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont 'ndots' from <filename>resolv.conf</filename> (default 1)
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont which may be overridden by <parameter>+ndots</parameter>
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont determines if the name will be treated as relative
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont or not and hence whether a search is eventually
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont performed or not.
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont </varlistentry>
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont <varlistentry>
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont Provide a terse answer. The default is to print the
b7c6138405d62bae04bd4d065d4a2057ff125707Francis Dupont answer in a verbose form.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Perform [do not perform] a search showing intermediate
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Chase DNSSEC signature chains. Requires dig be
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews compiled with -DDIG_SIGCHASE.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <term><option>+[no]sit<optional>=####</optional></option></term>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Send a Source Identity Token EDNS option, with optional
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews value. Replaying a SIT from a previous response will
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews allow the server to identify a previous client. The
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews default is <option>+nosit</option>. Currently using
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt experimental value 65001 for the option code.
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Split long hex- or base64-formatted fields in resource
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews records into chunks of <parameter>W</parameter>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews characters (where <parameter>W</parameter> is rounded
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews up to the nearest multiple of 4).
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>+split=0</parameter> causes fields not to
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews be split at all. The default is 56 characters, or
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews 44 characters when multiline mode is active.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews This query option toggles the printing of statistics:
84f95ddb2572641022619950a211aff49e331c98Mukund Sivaraman when the query was made, the size of the reply and
84f95ddb2572641022619950a211aff49e331c98Mukund Sivaraman so on. The default behavior is to print the query
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <term><option>+[no]subnet=addr/prefix</option></term>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Send an EDNS Client Subnet option with the specified
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews IP address or network prefix.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Use [do not use] TCP when querying name servers. The
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews default behavior is to use UDP unless an
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <literal>ixfr=N</literal> query is requested, in which
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews case the default is TCP. AXFR queries always use
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the timeout for a query to
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews timeout is 5 seconds.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews An attempt to set <parameter>T</parameter> to less
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews than 1 will result
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews in a query timeout of 1 second being applied.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews When chasing DNSSEC signature chains perform a top-down
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews validation. Requires dig be compiled with -DDIG_SIGCHASE.
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki </varlistentry>
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <varlistentry>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt Toggle tracing of the delegation path from the root
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt name servers for the name being looked up. Tracing
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews is disabled by default. When tracing is enabled,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <command>dig</command> makes iterative queries to
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews resolve the name being looked up. It will follow
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews referrals from the root servers, showing the answer
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews from each server that was used to resolve the lookup.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <command>+dnssec</command> is also set when +trace
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews is set to better emulate the default queries from a
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Sets the number of times to try UDP queries to server
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews to <parameter>T</parameter> instead of the default,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews 3. If <parameter>T</parameter> is less than or equal
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews to zero, the number of tries is silently rounded up
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
12bf5d4796505b4c20680531da96a31e6c2c1144Evan Hunt <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <term><option>+trusted-key=####</option></term>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt Specifies a file containing trusted keys to be used
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt with <option>+sigchase</option>. Each DNSKEY record
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt must be on its own line.
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont If not specified, <command>dig</command> will look
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont for <filename>/etc/trusted-key.key</filename> then
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <filename>trusted-key.key</filename> in the current
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Requires dig be compiled with -DDIG_SIGCHASE.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Display [do not display] the TTL when printing the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Display [do not display] the TTL in friendly human-readable
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews time units of "s", "m", "h", "d", and "w", representing
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews seconds, minutes, hours, days and weeks. Implies +ttlid.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Use [do not use] TCP when querying name servers. This
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews alternate syntax to <parameter>+[no]tcp</parameter>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews is provided for backwards compatibility. The "vc"
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews stands for "virtual circuit".
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <varlistentry>
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont Set [do not set] the last unassigned DNS header flag in a
343aeac7176d28c4a1b9d246b1f7311b4cd5da7dFrancis Dupont DNS query. This flag is off by default.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </varlistentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </variablelist>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The BIND 9 implementation of <command>dig </command>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews specifying multiple queries on the command line (in addition to
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews supporting the <option>-f</option> batch file option). Each of those
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews queries can be supplied with its own set of flags, options and query
98091cb21da79b0c7fd329fd64497dcb03402467Evan Hunt In this case, each <parameter>query</parameter> argument
98091cb21da79b0c7fd329fd64497dcb03402467Evan Hunt represent an
98091cb21da79b0c7fd329fd64497dcb03402467Evan Hunt individual query in the command-line syntax described above. Each
98091cb21da79b0c7fd329fd64497dcb03402467Evan Hunt consists of any of the standard options and flags, the name to be
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews looked up, an optional query type and class and any query options that
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews should be applied to that query.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews A global set of query options, which should be applied to all queries,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews can also be supplied. These global query options must precede the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews first tuple of name, class, type, options, flags, and query options
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews supplied on the command line. Any global query options (except
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt overridden by a query-specific set of query options. For example:
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt <programlisting>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Huntdig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt</programlisting>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt shows how <command>dig</command> could be used from the
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt command line
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt to make three lookups: an ANY query for <literal>www.isc.org</literal>, a
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt reverse lookup of 127.0.0.1 and a query for the NS records of
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt A global query option of <parameter>+qr</parameter> is
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt that <command>dig</command> shows the initial query it made
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews lookup. The final query has a local query option of
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <parameter>+noqr</parameter> which means that <command>dig</command>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews will not print the initial query when it looks up the NS records for
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki If <command>dig</command> has been built with IDN (internationalized
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki domain name) support, it can accept and display non-ASCII domain names.
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki <command>dig</command> appropriately converts character encoding of
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki domain name before sending a request to DNS server or displaying a
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews reply from the server.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews If you'd like to turn off the IDN support for some reason, defines
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews the <envar>IDN_DISABLE</envar> environment variable.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews The IDN support is disabled if the variable is set when
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </citerefentry>,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <citerefentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </citerefentry>,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <citerefentry>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews </citerefentry>,
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews There are probably too many query options.
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt - Local variables:
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt - mode: sgml