1175 lines
21 KiB
HTML
1175 lines
21 KiB
HTML
<!--
|
|
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
|
- Copyright (C) 2000-2003 Internet Software Consortium.
|
|
-
|
|
- Permission to use, copy, modify, and distribute this software for any
|
|
- purpose with or without fee is hereby granted, provided that the above
|
|
- copyright notice and this permission notice appear in all copies.
|
|
-
|
|
- THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
|
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
|
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
- PERFORMANCE OF THIS SOFTWARE.
|
|
-->
|
|
|
|
<!-- $Id: dig.html,v 1.6.2.4.2.7 2004/08/22 23:38:57 marka Exp $ -->
|
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>dig</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
|
|
><BODY
|
|
CLASS="REFENTRY"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><H1
|
|
><A
|
|
NAME="AEN1"
|
|
></A
|
|
>dig</H1
|
|
><DIV
|
|
CLASS="REFNAMEDIV"
|
|
><A
|
|
NAME="AEN8"
|
|
></A
|
|
><H2
|
|
>Name</H2
|
|
>dig -- DNS lookup utility</DIV
|
|
><DIV
|
|
CLASS="REFSYNOPSISDIV"
|
|
><A
|
|
NAME="AEN11"
|
|
></A
|
|
><H2
|
|
>Synopsis</H2
|
|
><P
|
|
><B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> [@server] [<VAR
|
|
CLASS="OPTION"
|
|
>-b <VAR
|
|
CLASS="REPLACEABLE"
|
|
>address</VAR
|
|
></VAR
|
|
>] [<VAR
|
|
CLASS="OPTION"
|
|
>-c <VAR
|
|
CLASS="REPLACEABLE"
|
|
>class</VAR
|
|
></VAR
|
|
>] [<VAR
|
|
CLASS="OPTION"
|
|
>-f <VAR
|
|
CLASS="REPLACEABLE"
|
|
>filename</VAR
|
|
></VAR
|
|
>] [<VAR
|
|
CLASS="OPTION"
|
|
>-k <VAR
|
|
CLASS="REPLACEABLE"
|
|
>filename</VAR
|
|
></VAR
|
|
>] [<VAR
|
|
CLASS="OPTION"
|
|
>-p <VAR
|
|
CLASS="REPLACEABLE"
|
|
>port#</VAR
|
|
></VAR
|
|
>] [<VAR
|
|
CLASS="OPTION"
|
|
>-t <VAR
|
|
CLASS="REPLACEABLE"
|
|
>type</VAR
|
|
></VAR
|
|
>] [<VAR
|
|
CLASS="OPTION"
|
|
>-x <VAR
|
|
CLASS="REPLACEABLE"
|
|
>addr</VAR
|
|
></VAR
|
|
>] [<VAR
|
|
CLASS="OPTION"
|
|
>-y <VAR
|
|
CLASS="REPLACEABLE"
|
|
>name:key</VAR
|
|
></VAR
|
|
>] [<VAR
|
|
CLASS="OPTION"
|
|
>-4</VAR
|
|
>] [<VAR
|
|
CLASS="OPTION"
|
|
>-6</VAR
|
|
>] [name] [type] [class] [queryopt...]</P
|
|
><P
|
|
><B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> [<VAR
|
|
CLASS="OPTION"
|
|
>-h</VAR
|
|
>]</P
|
|
><P
|
|
><B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> [global-queryopt...] [query...]</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="REFSECT1"
|
|
><A
|
|
NAME="AEN55"
|
|
></A
|
|
><H2
|
|
>DESCRIPTION</H2
|
|
><P
|
|
><B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> (domain information groper) is a flexible tool
|
|
for interrogating DNS name servers. It performs DNS lookups and
|
|
displays the answers that are returned from the name server(s) that
|
|
were queried. Most DNS administrators use <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> to
|
|
troubleshoot DNS problems because of its flexibility, ease of use and
|
|
clarity of output. Other lookup tools tend to have less functionality
|
|
than <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
>.</P
|
|
><P
|
|
>Although <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> is normally used with command-line
|
|
arguments, it also has a batch mode of operation for reading lookup
|
|
requests from a file. A brief summary of its command-line arguments
|
|
and options is printed when the <VAR
|
|
CLASS="OPTION"
|
|
>-h</VAR
|
|
> option is given.
|
|
Unlike earlier versions, the BIND9 implementation of
|
|
<B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> allows multiple lookups to be issued from the
|
|
command line.</P
|
|
><P
|
|
>Unless it is told to query a specific name server,
|
|
<B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> will try each of the servers listed in
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/etc/resolv.conf</TT
|
|
>.</P
|
|
><P
|
|
>When no command line arguments or options are given, will perform an
|
|
NS query for "." (the root).</P
|
|
><P
|
|
>It is possible to set per-user defaults for <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> via
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>${HOME}/.digrc</TT
|
|
>. This file is read and any options in it
|
|
are applied before the command line arguments.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="REFSECT1"
|
|
><A
|
|
NAME="AEN72"
|
|
></A
|
|
><H2
|
|
>SIMPLE USAGE</H2
|
|
><P
|
|
>A typical invocation of <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> looks like:
|
|
<PRE
|
|
CLASS="PROGRAMLISTING"
|
|
> dig @server name type </PRE
|
|
> where:
|
|
|
|
<P
|
|
></P
|
|
><DIV
|
|
CLASS="VARIABLELIST"
|
|
><DL
|
|
><DT
|
|
><CODE
|
|
CLASS="CONSTANT"
|
|
>server</CODE
|
|
></DT
|
|
><DD
|
|
><P
|
|
>is the name or IP address of the name server to query. This can be an IPv4
|
|
address in dotted-decimal notation or an IPv6
|
|
address in colon-delimited notation. When the supplied
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>server</VAR
|
|
> argument is a hostname,
|
|
<B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> resolves that name before querying that name
|
|
server. If no <VAR
|
|
CLASS="PARAMETER"
|
|
>server</VAR
|
|
> argument is provided,
|
|
<B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> consults <TT
|
|
CLASS="FILENAME"
|
|
>/etc/resolv.conf</TT
|
|
>
|
|
and queries the name servers listed there. The reply from the name
|
|
server that responds is displayed.</P
|
|
></DD
|
|
><DT
|
|
><CODE
|
|
CLASS="CONSTANT"
|
|
>name</CODE
|
|
></DT
|
|
><DD
|
|
><P
|
|
>is the name of the resource record that is to be looked up.</P
|
|
></DD
|
|
><DT
|
|
><CODE
|
|
CLASS="CONSTANT"
|
|
>type</CODE
|
|
></DT
|
|
><DD
|
|
><P
|
|
>indicates what type of query is required —
|
|
ANY, A, MX, SIG, etc.
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>type</VAR
|
|
> can be any valid query type. If no
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>type</VAR
|
|
> argument is supplied,
|
|
<B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> will perform a lookup for an A record.</P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
></P
|
|
></DIV
|
|
><DIV
|
|
CLASS="REFSECT1"
|
|
><A
|
|
NAME="AEN101"
|
|
></A
|
|
><H2
|
|
>OPTIONS</H2
|
|
><P
|
|
>The <VAR
|
|
CLASS="OPTION"
|
|
>-b</VAR
|
|
> option sets the source IP address of the query
|
|
to <VAR
|
|
CLASS="PARAMETER"
|
|
>address</VAR
|
|
>. This must be a valid address on
|
|
one of the host's network interfaces or "0.0.0.0" or "::". An optional port
|
|
may be specified by appending "#<port>"</P
|
|
><P
|
|
>The default query class (IN for internet) is overridden by the
|
|
<VAR
|
|
CLASS="OPTION"
|
|
>-c</VAR
|
|
> option. <VAR
|
|
CLASS="PARAMETER"
|
|
>class</VAR
|
|
> is any valid
|
|
class, such as HS for Hesiod records or CH for CHAOSNET records.</P
|
|
><P
|
|
>The <VAR
|
|
CLASS="OPTION"
|
|
>-f</VAR
|
|
> option makes <B
|
|
CLASS="COMMAND"
|
|
>dig </B
|
|
> operate
|
|
in batch mode by reading a list of lookup requests to process from the
|
|
file <VAR
|
|
CLASS="PARAMETER"
|
|
>filename</VAR
|
|
>. The file contains a number of
|
|
queries, one per line. Each entry in the file should be organised in
|
|
the same way they would be presented as queries to
|
|
<B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> using the command-line interface.</P
|
|
><P
|
|
>If a non-standard port number is to be queried, the
|
|
<VAR
|
|
CLASS="OPTION"
|
|
>-p</VAR
|
|
> option is used. <VAR
|
|
CLASS="PARAMETER"
|
|
>port#</VAR
|
|
> is
|
|
the port number that <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> will send its queries
|
|
instead of the standard DNS port number 53. This option would be used
|
|
to test a name server that has been configured to listen for queries
|
|
on a non-standard port number.</P
|
|
><P
|
|
>The <VAR
|
|
CLASS="OPTION"
|
|
>-4</VAR
|
|
> option forces <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> to only
|
|
use IPv4 query transport. The <VAR
|
|
CLASS="OPTION"
|
|
>-6</VAR
|
|
> option forces
|
|
<B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> to only use IPv6 query transport.</P
|
|
><P
|
|
>The <VAR
|
|
CLASS="OPTION"
|
|
>-t</VAR
|
|
> option sets the query type to
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>type</VAR
|
|
>. It can be any valid query type which is
|
|
supported in BIND9. The default query type "A", unless the
|
|
<VAR
|
|
CLASS="OPTION"
|
|
>-x</VAR
|
|
> option is supplied to indicate a reverse lookup.
|
|
A zone transfer can be requested by specifying a type of AXFR. When
|
|
an incremental zone transfer (IXFR) is required,
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>type</VAR
|
|
> is set to <VAR
|
|
CLASS="LITERAL"
|
|
>ixfr=N</VAR
|
|
>.
|
|
The incremental zone transfer will contain the changes made to the zone
|
|
since the serial number in the zone's SOA record was
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>N</VAR
|
|
>.</P
|
|
><P
|
|
>Reverse lookups - mapping addresses to names - are simplified by the
|
|
<VAR
|
|
CLASS="OPTION"
|
|
>-x</VAR
|
|
> option. <VAR
|
|
CLASS="PARAMETER"
|
|
>addr</VAR
|
|
> is an IPv4
|
|
address in dotted-decimal notation, or a colon-delimited IPv6 address.
|
|
When this option is used, there is no need to provide the
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>name</VAR
|
|
>, <VAR
|
|
CLASS="PARAMETER"
|
|
>class</VAR
|
|
> and
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>type</VAR
|
|
> arguments. <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
>
|
|
automatically performs a lookup for a name like
|
|
<VAR
|
|
CLASS="LITERAL"
|
|
>11.12.13.10.in-addr.arpa</VAR
|
|
> and sets the query type and
|
|
class to PTR and IN respectively. By default, IPv6 addresses are
|
|
looked up using nibble format under the IP6.ARPA domain.
|
|
To use the older RFC1886 method using the IP6.INT domain
|
|
specify the <VAR
|
|
CLASS="OPTION"
|
|
>-i</VAR
|
|
> option. Bit string labels (RFC2874)
|
|
are now experimental and are not attempted.</P
|
|
><P
|
|
>To sign the DNS queries sent by <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> and their
|
|
responses using transaction signatures (TSIG), specify a TSIG key file
|
|
using the <VAR
|
|
CLASS="OPTION"
|
|
>-k</VAR
|
|
> option. You can also specify the TSIG
|
|
key itself on the command line using the <VAR
|
|
CLASS="OPTION"
|
|
>-y</VAR
|
|
> option;
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>name</VAR
|
|
> is the name of the TSIG key and
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>key</VAR
|
|
> is the actual key. The key is a base-64
|
|
encoded string, typically generated by <SPAN
|
|
CLASS="CITEREFENTRY"
|
|
><SPAN
|
|
CLASS="REFENTRYTITLE"
|
|
>dnssec-keygen</SPAN
|
|
>(8)</SPAN
|
|
>.
|
|
|
|
Caution should be taken when using the <VAR
|
|
CLASS="OPTION"
|
|
>-y</VAR
|
|
> option on
|
|
multi-user systems as the key can be visible in the output from
|
|
<SPAN
|
|
CLASS="CITEREFENTRY"
|
|
><SPAN
|
|
CLASS="REFENTRYTITLE"
|
|
>ps</SPAN
|
|
>(1)</SPAN
|
|
> or in the shell's history file. When
|
|
using TSIG authentication with <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
>, the name
|
|
server that is queried needs to know the key and algorithm that is
|
|
being used. In BIND, this is done by providing appropriate
|
|
<B
|
|
CLASS="COMMAND"
|
|
>key</B
|
|
> and <B
|
|
CLASS="COMMAND"
|
|
>server</B
|
|
> statements in
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>named.conf</TT
|
|
>.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="REFSECT1"
|
|
><A
|
|
NAME="AEN156"
|
|
></A
|
|
><H2
|
|
>QUERY OPTIONS</H2
|
|
><P
|
|
><B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> provides a number of query options which affect
|
|
the way in which lookups are made and the results displayed. Some of
|
|
these set or reset flag bits in the query header, some determine which
|
|
sections of the answer get printed, and others determine the timeout
|
|
and retry strategies.</P
|
|
><P
|
|
>Each query option is identified by a keyword preceded by a plus sign
|
|
(<VAR
|
|
CLASS="LITERAL"
|
|
>+</VAR
|
|
>). Some keywords set or reset an option. These may be preceded
|
|
by the string <VAR
|
|
CLASS="LITERAL"
|
|
>no</VAR
|
|
> to negate the meaning of that keyword. Other
|
|
keywords assign values to options like the timeout interval. They
|
|
have the form <VAR
|
|
CLASS="OPTION"
|
|
>+keyword=value</VAR
|
|
>.
|
|
The query options are:
|
|
|
|
<P
|
|
></P
|
|
><DIV
|
|
CLASS="VARIABLELIST"
|
|
><DL
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]tcp</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Use [do not use] TCP when querying name servers. The default
|
|
behaviour is to use UDP unless an AXFR or IXFR query is requested, in
|
|
which case a TCP connection is used.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]vc</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Use [do not use] TCP when querying name servers. This alternate
|
|
syntax to <VAR
|
|
CLASS="PARAMETER"
|
|
>+[no]tcp</VAR
|
|
> is provided for backwards
|
|
compatibility. The "vc" stands for "virtual circuit".</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]ignore</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Ignore truncation in UDP responses instead of retrying with TCP. By
|
|
default, TCP retries are performed.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+domain=somename</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Set the search list to contain the single domain
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>somename</VAR
|
|
>, as if specified in a
|
|
<B
|
|
CLASS="COMMAND"
|
|
>domain</B
|
|
> directive in
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/etc/resolv.conf</TT
|
|
>, and enable search list
|
|
processing as if the <VAR
|
|
CLASS="PARAMETER"
|
|
>+search</VAR
|
|
> option were given.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]search</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Use [do not use] the search list defined by the searchlist or domain
|
|
directive in <TT
|
|
CLASS="FILENAME"
|
|
>resolv.conf</TT
|
|
> (if any).
|
|
The search list is not used by default.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]defname</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Deprecated, treated as a synonym for <VAR
|
|
CLASS="PARAMETER"
|
|
>+[no]search</VAR
|
|
></P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]aaonly</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Sets the "aa" flag in the query.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]aaflag</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>A synonym for <VAR
|
|
CLASS="PARAMETER"
|
|
>+[no]aaonly</VAR
|
|
>.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]adflag</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Set [do not set] the AD (authentic data) bit in the query. The AD bit
|
|
currently has a standard meaning only in responses, not in queries,
|
|
but the ability to set the bit in the query is provided for
|
|
completeness.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]cdflag</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Set [do not set] the CD (checking disabled) bit in the query. This
|
|
requests the server to not perform DNSSEC validation of responses.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]cl</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Display [do not display] the CLASS when printing the record.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]ttlid</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Display [do not display] the TTL when printing the record.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]recurse</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Toggle the setting of the RD (recursion desired) bit in the query.
|
|
This bit is set by default, which means <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
>
|
|
normally sends recursive queries. Recursion is automatically disabled
|
|
when the <VAR
|
|
CLASS="PARAMETER"
|
|
>+nssearch</VAR
|
|
> or
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>+trace</VAR
|
|
> query options are used.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]nssearch</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>When this option is set, <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> attempts to find the
|
|
authoritative name servers for the zone containing the name being
|
|
looked up and display the SOA record that each name server has for the
|
|
zone.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]trace</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Toggle tracing of the delegation path from the root name servers for
|
|
the name being looked up. Tracing is disabled by default. When
|
|
tracing is enabled, <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> makes iterative queries to
|
|
resolve the name being looked up. It will follow referrals from the
|
|
root servers, showing the answer from each server that was used to
|
|
resolve the lookup.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]cmd</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>toggles the printing of the initial comment in the output identifying
|
|
the version of <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> and the query options that have
|
|
been applied. This comment is printed by default.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]short</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Provide a terse answer. The default is to print the answer in a
|
|
verbose form.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]identify</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Show [or do not show] the IP address and port number that supplied the
|
|
answer when the <VAR
|
|
CLASS="PARAMETER"
|
|
>+short</VAR
|
|
> option is enabled. If
|
|
short form answers are requested, the default is not to show the
|
|
source address and port number of the server that provided the answer.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]comments</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Toggle the display of comment lines in the output. The default is to
|
|
print comments.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]stats</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>This query option toggles the printing of statistics: when the query
|
|
was made, the size of the reply and so on. The default behaviour is
|
|
to print the query statistics.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]qr</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Print [do not print] the query as it is sent.
|
|
By default, the query is not printed.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]question</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Print [do not print] the question section of a query when an answer is
|
|
returned. The default is to print the question section as a comment.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]answer</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Display [do not display] the answer section of a reply. The default
|
|
is to display it.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]authority</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Display [do not display] the authority section of a reply. The
|
|
default is to display it.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]additional</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Display [do not display] the additional section of a reply.
|
|
The default is to display it.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]all</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Set or clear all display flags.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+time=T</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
> Sets the timeout for a query to
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>T</VAR
|
|
> seconds. The default time out is 5 seconds.
|
|
An attempt to set <VAR
|
|
CLASS="PARAMETER"
|
|
>T</VAR
|
|
> to less than 1 will result
|
|
in a query timeout of 1 second being applied.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+tries=T</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Sets the number of times to try UDP queries to server to
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>T</VAR
|
|
> instead of the default, 3. If
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>T</VAR
|
|
> is less than or equal to zero, the number of
|
|
tries is silently rounded up to 1.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+retry=T</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Sets the number of times to retry UDP queries to server to
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>T</VAR
|
|
> instead of the default, 2. Unlike
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>+tries</VAR
|
|
>, this does not include the initial
|
|
query.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+ndots=D</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Set the number of dots that have to appear in
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>name</VAR
|
|
> to <VAR
|
|
CLASS="PARAMETER"
|
|
>D</VAR
|
|
> for it to be
|
|
considered absolute. The default value is that defined using the
|
|
ndots statement in <TT
|
|
CLASS="FILENAME"
|
|
>/etc/resolv.conf</TT
|
|
>, or 1 if no
|
|
ndots statement is present. Names with fewer dots are interpreted as
|
|
relative names and will be searched for in the domains listed in the
|
|
<VAR
|
|
CLASS="OPTION"
|
|
>search</VAR
|
|
> or <VAR
|
|
CLASS="OPTION"
|
|
>domain</VAR
|
|
> directive in
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/etc/resolv.conf</TT
|
|
>.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+bufsize=B</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Set the UDP message buffer size advertised using EDNS0 to
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>B</VAR
|
|
> bytes. The maximum and minimum sizes of this
|
|
buffer are 65535 and 0 respectively. Values outside this range are
|
|
rounded up or down appropriately.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]multiline</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Print records like the SOA records in a verbose multi-line
|
|
format with human-readable comments. The default is to print
|
|
each record on a single line, to facilitate machine parsing
|
|
of the <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> output.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]fail</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Do not try the next server if you receive a SERVFAIL. The default is
|
|
to not try the next server which is the reverse of normal stub resolver
|
|
behaviour.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]besteffort</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Attempt to display the contents of messages which are malformed.
|
|
The default is to not display malformed answers.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]dnssec</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO)
|
|
in the OPT record in the additional section of the query.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]sigchase</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Chase DNSSEC signature chains. Requires dig be compiled with
|
|
-DDIG_SIGCHASE.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+trusted-key=####</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Specify a trusted key to be used with <VAR
|
|
CLASS="OPTION"
|
|
>+sigchase</VAR
|
|
>.
|
|
Requires dig be compiled with -DDIG_SIGCHASE.</P
|
|
></DD
|
|
><DT
|
|
><VAR
|
|
CLASS="OPTION"
|
|
>+[no]topdown</VAR
|
|
></DT
|
|
><DD
|
|
><P
|
|
>When chasing DNSSEC signature chains perform a top down validation.
|
|
Requires dig be compiled with -DDIG_SIGCHASE.</P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
> </P
|
|
></DIV
|
|
><DIV
|
|
CLASS="REFSECT1"
|
|
><A
|
|
NAME="AEN385"
|
|
></A
|
|
><H2
|
|
>MULTIPLE QUERIES</H2
|
|
><P
|
|
>The BIND 9 implementation of <B
|
|
CLASS="COMMAND"
|
|
>dig </B
|
|
> supports
|
|
specifying multiple queries on the command line (in addition to
|
|
supporting the <VAR
|
|
CLASS="OPTION"
|
|
>-f</VAR
|
|
> batch file option). Each of those
|
|
queries can be supplied with its own set of flags, options and query
|
|
options.</P
|
|
><P
|
|
>In this case, each <VAR
|
|
CLASS="PARAMETER"
|
|
>query</VAR
|
|
> argument represent an
|
|
individual query in the command-line syntax described above. Each
|
|
consists of any of the standard options and flags, the name to be
|
|
looked up, an optional query type and class and any query options that
|
|
should be applied to that query.</P
|
|
><P
|
|
>A global set of query options, which should be applied to all queries,
|
|
can also be supplied. These global query options must precede the
|
|
first tuple of name, class, type, options, flags, and query options
|
|
supplied on the command line. Any global query options (except
|
|
the <VAR
|
|
CLASS="OPTION"
|
|
>+[no]cmd</VAR
|
|
> option) can be
|
|
overridden by a query-specific set of query options. For example:
|
|
<PRE
|
|
CLASS="PROGRAMLISTING"
|
|
>dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr</PRE
|
|
>
|
|
shows how <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> could be used from the command line
|
|
to make three lookups: an ANY query for <VAR
|
|
CLASS="LITERAL"
|
|
>www.isc.org</VAR
|
|
>, a
|
|
reverse lookup of 127.0.0.1 and a query for the NS records of
|
|
<VAR
|
|
CLASS="LITERAL"
|
|
>isc.org</VAR
|
|
>.
|
|
|
|
A global query option of <VAR
|
|
CLASS="PARAMETER"
|
|
>+qr</VAR
|
|
> is applied, so
|
|
that <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
> shows the initial query it made for each
|
|
lookup. The final query has a local query option of
|
|
<VAR
|
|
CLASS="PARAMETER"
|
|
>+noqr</VAR
|
|
> which means that <B
|
|
CLASS="COMMAND"
|
|
>dig</B
|
|
>
|
|
will not print the initial query when it looks up the NS records for
|
|
<VAR
|
|
CLASS="LITERAL"
|
|
>isc.org</VAR
|
|
>.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="REFSECT1"
|
|
><A
|
|
NAME="AEN403"
|
|
></A
|
|
><H2
|
|
>FILES</H2
|
|
><P
|
|
><TT
|
|
CLASS="FILENAME"
|
|
>/etc/resolv.conf</TT
|
|
></P
|
|
><P
|
|
><TT
|
|
CLASS="FILENAME"
|
|
>${HOME}/.digrc</TT
|
|
></P
|
|
></DIV
|
|
><DIV
|
|
CLASS="REFSECT1"
|
|
><A
|
|
NAME="AEN409"
|
|
></A
|
|
><H2
|
|
>SEE ALSO</H2
|
|
><P
|
|
><SPAN
|
|
CLASS="CITEREFENTRY"
|
|
><SPAN
|
|
CLASS="REFENTRYTITLE"
|
|
>host</SPAN
|
|
>(1)</SPAN
|
|
>,
|
|
<SPAN
|
|
CLASS="CITEREFENTRY"
|
|
><SPAN
|
|
CLASS="REFENTRYTITLE"
|
|
>named</SPAN
|
|
>(8)</SPAN
|
|
>,
|
|
<SPAN
|
|
CLASS="CITEREFENTRY"
|
|
><SPAN
|
|
CLASS="REFENTRYTITLE"
|
|
>dnssec-keygen</SPAN
|
|
>(8)</SPAN
|
|
>,
|
|
<I
|
|
CLASS="CITETITLE"
|
|
>RFC1035</I
|
|
>.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="REFSECT1"
|
|
><A
|
|
NAME="AEN422"
|
|
></A
|
|
><H2
|
|
>BUGS </H2
|
|
><P
|
|
>There are probably too many query options. </P
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
>
|