2019-03-31 12:49:47 +02:00
|
|
|
.\" Man page generated from reStructuredText.
|
|
|
|
.
|
|
|
|
.TH "DIG" "1" "@RELEASE_DATE@" "@PACKAGE_VERSION@" "BIND 9"
|
|
|
|
.SH NAME
|
|
|
|
dig \- DNS lookup utility
|
|
|
|
.
|
|
|
|
.nr rst2man-indent-level 0
|
|
|
|
.
|
|
|
|
.de1 rstReportMargin
|
|
|
|
\\$1 \\n[an-margin]
|
|
|
|
level \\n[rst2man-indent-level]
|
|
|
|
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
-
|
|
|
|
\\n[rst2man-indent0]
|
|
|
|
\\n[rst2man-indent1]
|
|
|
|
\\n[rst2man-indent2]
|
|
|
|
..
|
|
|
|
.de1 INDENT
|
|
|
|
.\" .rstReportMargin pre:
|
|
|
|
. RS \\$1
|
|
|
|
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
|
|
|
. nr rst2man-indent-level +1
|
|
|
|
.\" .rstReportMargin post:
|
|
|
|
..
|
|
|
|
.de UNINDENT
|
|
|
|
. RE
|
|
|
|
.\" indent \\n[an-margin]
|
|
|
|
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.nr rst2man-indent-level -1
|
|
|
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
|
|
..
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.sp
|
|
|
|
\fBdig\fP [@server] [\fB\-b\fP address] [\fB\-c\fP class] [\fB\-f\fP filename] [\fB\-k\fP filename] [\fB\-m\fP] [\fB\-p\fP port#] [\fB\-q\fP name] [\fB\-t\fP type] [\fB\-v\fP] [\fB\-x\fP addr] [\fB\-y\fP [hmac:]name:key] [ [\fB\-4\fP] | [\fB\-6\fP] ] [name] [type] [class] [queryopt...]
|
|
|
|
.sp
|
|
|
|
\fBdig\fP [\fB\-h\fP]
|
|
|
|
.sp
|
|
|
|
\fBdig\fP [global\-queryopt...] [query...]
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.sp
|
|
|
|
\fBdig\fP 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 \fBdig\fP to
|
|
|
|
troubleshoot DNS problems because of its flexibility, ease of use and
|
|
|
|
clarity of output. Other lookup tools tend to have less functionality
|
|
|
|
than \fBdig\fP\&.
|
|
|
|
.sp
|
|
|
|
Although \fBdig\fP 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 \fB\-h\fP option is given. Unlike earlier versions, the BIND 9
|
|
|
|
implementation of \fBdig\fP allows multiple lookups to be issued from the
|
|
|
|
command line.
|
|
|
|
.sp
|
|
|
|
Unless it is told to query a specific name server, \fBdig\fP will try each
|
|
|
|
of the servers listed in \fB/etc/resolv.conf\fP\&. If no usable server
|
|
|
|
addresses are found, \fBdig\fP will send the query to the local host.
|
|
|
|
.sp
|
|
|
|
When no command line arguments or options are given, \fBdig\fP will
|
|
|
|
perform an NS query for "." (the root).
|
|
|
|
.sp
|
|
|
|
It is possible to set per\-user defaults for \fBdig\fP via
|
|
|
|
\fB${HOME}/.digrc\fP\&. This file is read and any options in it are applied
|
|
|
|
before the command line arguments. The \fB\-r\fP option disables this
|
|
|
|
feature, for scripts that need predictable behaviour.
|
|
|
|
.sp
|
|
|
|
The IN and CH class names overlap with the IN and CH top level domain
|
|
|
|
names. Either use the \fB\-t\fP and \fB\-c\fP options to specify the type and
|
|
|
|
class, use the \fB\-q\fP the specify the domain name, or use "IN." and
|
|
|
|
"CH." when looking up these top level domains.
|
|
|
|
.SH SIMPLE USAGE
|
|
|
|
.sp
|
|
|
|
A typical invocation of \fBdig\fP looks like:
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
dig @server name type
|
|
|
|
.ft P
|
|
|
|
.fi
|
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.sp
|
|
|
|
where:
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B \fBserver\fP
|
|
|
|
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 \fBserver\fP argument is a
|
|
|
|
hostname, \fBdig\fP resolves that name before querying that name
|
|
|
|
server.
|
|
|
|
.sp
|
|
|
|
If no \fBserver\fP argument is provided, \fBdig\fP consults
|
|
|
|
\fB/etc/resolv.conf\fP; if an address is found there, it queries the
|
|
|
|
name server at that address. If either of the \fB\-4\fP or \fB\-6\fP
|
|
|
|
options are in use, then only addresses for the corresponding
|
|
|
|
transport will be tried. If no usable addresses are found, \fBdig\fP
|
|
|
|
will send the query to the local host. The reply from the name server
|
|
|
|
that responds is displayed.
|
|
|
|
.TP
|
|
|
|
.B \fBname\fP
|
|
|
|
is the name of the resource record that is to be looked up.
|
|
|
|
.TP
|
|
|
|
.B \fBtype\fP
|
|
|
|
indicates what type of query is required MDASH ANY, A, MX, SIG, etc.
|
|
|
|
\fBtype\fP can be any valid query type. If no \fBtype\fP argument is
|
|
|
|
supplied, \fBdig\fP will perform a lookup for an A record.
|
|
|
|
.UNINDENT
|
|
|
|
.SH OPTIONS
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
\fB\-4\fP
|
|
|
|
Use IPv4 only.
|
|
|
|
.TP
|
|
|
|
\fB\-6\fP
|
|
|
|
Use IPv6 only.
|
|
|
|
.TP
|
|
|
|
\fB\-b\fP address[#port]
|
|
|
|
Set the source IP address of the query. The \fBaddress\fP must be a
|
|
|
|
valid address on one of the host\(aqs network interfaces, or "0.0.0.0"
|
|
|
|
or "::". An optional port may be specified by appending "#<port>"
|
|
|
|
.TP
|
|
|
|
\fB\-c\fP class
|
|
|
|
Set the query class. The default \fBclass\fP is IN; other classes are
|
|
|
|
HS for Hesiod records or CH for Chaosnet records.
|
|
|
|
.TP
|
|
|
|
\fB\-f\fP file
|
|
|
|
Batch mode: \fBdig\fP reads a list of lookup requests to process from
|
|
|
|
the given \fBfile\fP\&. Each line in the file should be organized in the
|
|
|
|
same way they would be presented as queries to \fBdig\fP using the
|
|
|
|
command\-line interface.
|
|
|
|
.TP
|
|
|
|
\fB\-k\fP keyfile
|
|
|
|
Sign queries using TSIG using a key read from the given file. Key
|
|
|
|
files can be generated using tsig\-keygen8. When using TSIG
|
|
|
|
authentication with \fBdig\fP, 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 \fBkey\fP and \fBserver\fP statements in
|
|
|
|
\fBnamed.conf\fP\&.
|
|
|
|
.TP
|
|
|
|
\fB\-m\fP
|
|
|
|
Enable memory usage debugging.
|
|
|
|
.TP
|
|
|
|
\fB\-p\fP port
|
|
|
|
Send the query to a non\-standard port on the server, instead of the
|
|
|
|
default port 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.
|
|
|
|
.TP
|
|
|
|
\fB\-q\fP name
|
|
|
|
The domain name to query. This is useful to distinguish the \fBname\fP
|
|
|
|
from other arguments.
|
|
|
|
.TP
|
|
|
|
\fB\-r\fP
|
|
|
|
Do not read options from \fB${HOME}/.digrc\fP\&. This is useful for
|
|
|
|
scripts that need predictable behaviour.
|
|
|
|
.TP
|
|
|
|
\fB\-t\fP type
|
|
|
|
The resource record type to query. It can be any valid query type. If
|
|
|
|
it is a resource record type supported in BIND 9, it can be given by
|
|
|
|
the type mnemonic (such as "NS" or "AAAA"). The default query type is
|
|
|
|
"A", unless the \fB\-x\fP 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, set the
|
|
|
|
\fBtype\fP to \fBixfr=N\fP\&. The incremental zone transfer will contain
|
|
|
|
the changes made to the zone since the serial number in the zone\(aqs
|
|
|
|
SOA record was \fBN\fP\&.
|
|
|
|
.sp
|
|
|
|
All resource record types can be expressed as "TYPEnn", where "nn" is
|
|
|
|
the number of the type. If the resource record type is not supported
|
|
|
|
in BIND 9, the result will be displayed as described in \fI\%RFC 3597\fP\&.
|
|
|
|
.TP
|
|
|
|
\fB\-u\fP
|
|
|
|
Print query times in microseconds instead of milliseconds.
|
|
|
|
.TP
|
|
|
|
\fB\-v\fP
|
|
|
|
Print the version number and exit.
|
|
|
|
.TP
|
|
|
|
\fB\-x\fP addr
|
|
|
|
Simplified reverse lookups, for mapping addresses to names. The
|
|
|
|
\fBaddr\fP is an IPv4 address in dotted\-decimal notation, or a
|
|
|
|
colon\-delimited IPv6 address. When the \fB\-x\fP is used, there is no
|
|
|
|
need to provide the \fBname\fP, \fBclass\fP and \fBtype\fP arguments.
|
|
|
|
\fBdig\fP automatically performs a lookup for a name like
|
|
|
|
\fB94.2.0.192.in\-addr.arpa\fP and sets the query type and class to PTR
|
|
|
|
and IN respectively. IPv6 addresses are looked up using nibble format
|
|
|
|
under the IP6.ARPA domain.
|
|
|
|
.TP
|
|
|
|
\fB\-y\fP [hmac:]keyname:secret
|
|
|
|
Sign queries using TSIG with the given authentication key.
|
|
|
|
\fBkeyname\fP is the name of the key, and \fBsecret\fP is the base64
|
|
|
|
encoded shared secret. \fBhmac\fP is the name of the key algorithm;
|
|
|
|
valid choices are \fBhmac\-md5\fP, \fBhmac\-sha1\fP, \fBhmac\-sha224\fP,
|
|
|
|
\fBhmac\-sha256\fP, \fBhmac\-sha384\fP, or \fBhmac\-sha512\fP\&. If \fBhmac\fP is
|
|
|
|
not specified, the default is \fBhmac\-md5\fP or if MD5 was disabled
|
|
|
|
\fBhmac\-sha256\fP\&.
|
|
|
|
.UNINDENT
|
|
|
|
.sp
|
|
|
|
\fBNOTE:\fP
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
|
|
|
You should use the \fB\-k\fP option and avoid the \fB\-y\fP option,
|
|
|
|
because with \fB\-y\fP the shared secret is supplied as a command line
|
|
|
|
argument in clear text. This may be visible in the output from ps1 or
|
|
|
|
in a history file maintained by the user\(aqs shell.
|
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.SH QUERY OPTIONS
|
|
|
|
.sp
|
|
|
|
\fBdig\fP 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.
|
|
|
|
.sp
|
|
|
|
Each query option is identified by a keyword preceded by a plus sign
|
|
|
|
(\fB+\fP). Some keywords set or reset an option. These may be preceded by
|
|
|
|
the string \fBno\fP to negate the meaning of that keyword. Other keywords
|
|
|
|
assign values to options like the timeout interval. They have the form
|
|
|
|
\fB+keyword=value\fP\&. Keywords may be abbreviated, provided the
|
|
|
|
abbreviation is unambiguous; for example, \fB+cd\fP is equivalent to
|
|
|
|
\fB+cdflag\fP\&. The query options are:
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]aaflag\fP
|
|
|
|
A synonym for \fB+[no]aaonly\fP\&.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]aaonly\fP
|
|
|
|
Sets the "aa" flag in the query.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]additional\fP
|
|
|
|
Display [do not display] the additional section of a reply. The
|
|
|
|
default is to display it.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]adflag\fP
|
|
|
|
Set [do not set] the AD (authentic data) bit in the query. This
|
|
|
|
requests the server to return whether all of the answer and authority
|
|
|
|
sections have all been validated as secure according to the security
|
|
|
|
policy of the server. AD=1 indicates that all records have been
|
|
|
|
validated as secure and the answer is not from a OPT\-OUT range. AD=0
|
|
|
|
indicate that some part of the answer was insecure or not validated.
|
|
|
|
This bit is set by default.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]all\fP
|
|
|
|
Set or clear all display flags.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]answer\fP
|
|
|
|
Display [do not display] the answer section of a reply. The default
|
|
|
|
is to display it.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]authority\fP
|
|
|
|
Display [do not display] the authority section of a reply. The
|
|
|
|
default is to display it.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]badcookie\fP
|
|
|
|
Retry lookup with the new server cookie if a BADCOOKIE response is
|
|
|
|
received.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]besteffort\fP
|
|
|
|
Attempt to display the contents of messages which are malformed. The
|
|
|
|
default is to not display malformed answers.
|
|
|
|
.TP
|
|
|
|
.B \fB+bufsize=B\fP
|
|
|
|
Set the UDP message buffer size advertised using EDNS0 to \fBB\fP
|
|
|
|
bytes. The maximum and minimum sizes of this buffer are 65535 and 0
|
|
|
|
respectively. Values outside this range are rounded up or down
|
|
|
|
appropriately. Values other than zero will cause a EDNS query to be
|
|
|
|
sent.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]cdflag\fP
|
|
|
|
Set [do not set] the CD (checking disabled) bit in the query. This
|
|
|
|
requests the server to not perform DNSSEC validation of responses.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]class\fP
|
|
|
|
Display [do not display] the CLASS when printing the record.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]cmd\fP
|
|
|
|
Toggles the printing of the initial comment in the output, identifying the
|
|
|
|
version of \fBdig\fP and the query options that have been applied. This option
|
|
|
|
always has global effect; it cannot be set globally and then overridden on a
|
|
|
|
per\-lookup basis. The default is to print this comment.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]comments\fP
|
|
|
|
Toggles the display of some comment lines in the output, containing
|
|
|
|
information about the packet header and OPT pseudosection, and the names of
|
|
|
|
the response section. The default is to print these comments.
|
|
|
|
.sp
|
|
|
|
Other types of comments in the output are not affected by this option, but
|
|
|
|
can be controlled using other command line switches. These include
|
|
|
|
\fB+[no]cmd\fP, \fB+[no]question\fP, \fB+[no]stats\fP, and \fB+[no]rrcomments\fP\&.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]cookie=####\fP
|
|
|
|
Send a COOKIE EDNS option, with optional value. Replaying a COOKIE
|
|
|
|
from a previous response will allow the server to identify a previous
|
|
|
|
client. The default is \fB+cookie\fP\&.
|
|
|
|
.sp
|
|
|
|
\fB+cookie\fP is also set when +trace is set to better emulate the
|
|
|
|
default queries from a nameserver.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]crypto\fP
|
|
|
|
Toggle the display of cryptographic fields in DNSSEC records. The
|
|
|
|
contents of these field are unnecessary to debug most DNSSEC
|
|
|
|
validation failures and removing them makes it easier to see the
|
|
|
|
common failures. The default is to display the fields. When omitted
|
|
|
|
they are replaced by the string "[omitted]" or in the DNSKEY case the
|
|
|
|
key id is displayed as the replacement, e.g. "[ key id = value ]".
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]defname\fP
|
|
|
|
Deprecated, treated as a synonym for \fB+[no]search\fP
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]dnssec\fP
|
|
|
|
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO) in
|
|
|
|
the OPT record in the additional section of the query.
|
|
|
|
.TP
|
|
|
|
.B \fB+domain=somename\fP
|
|
|
|
Set the search list to contain the single domain \fBsomename\fP, as if
|
|
|
|
specified in a \fBdomain\fP directive in \fB/etc/resolv.conf\fP, and
|
|
|
|
enable search list processing as if the \fB+search\fP option were
|
|
|
|
given.
|
|
|
|
.TP
|
|
|
|
.B \fB+dscp=value\fP
|
|
|
|
Set the DSCP code point to be used when sending the query. Valid DSCP
|
|
|
|
code points are in the range [0..63]. By default no code point is
|
|
|
|
explicitly set.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]edns[=#]\fP
|
|
|
|
Specify the EDNS version to query with. Valid values are 0 to 255.
|
|
|
|
Setting the EDNS version will cause a EDNS query to be sent.
|
|
|
|
\fB+noedns\fP clears the remembered EDNS version. EDNS is set to 0 by
|
|
|
|
default.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]ednsflags[=#]\fP
|
|
|
|
Set the must\-be\-zero EDNS flags bits (Z bits) to the specified value.
|
|
|
|
Decimal, hex and octal encodings are accepted. Setting a named flag
|
|
|
|
(e.g. DO) will silently be ignored. By default, no Z bits are set.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]ednsnegotiation\fP
|
|
|
|
Enable / disable EDNS version negotiation. By default EDNS version
|
|
|
|
negotiation is enabled.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]ednsopt[=code[:value]]\fP
|
|
|
|
Specify EDNS option with code point \fBcode\fP and optionally payload
|
|
|
|
of \fBvalue\fP as a hexadecimal string. \fBcode\fP can be either an EDNS
|
|
|
|
option name (for example, \fBNSID\fP or \fBECS\fP), or an arbitrary
|
|
|
|
numeric value. \fB+noednsopt\fP clears the EDNS options to be sent.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]expire\fP
|
|
|
|
Send an EDNS Expire option.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]fail\fP
|
|
|
|
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 behavior.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]header\-only\fP
|
|
|
|
Send a query with a DNS header without a question section. The
|
|
|
|
default is to add a question section. The query type and query name
|
|
|
|
are ignored when this is set.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]identify\fP
|
|
|
|
Show [or do not show] the IP address and port number that supplied
|
|
|
|
the answer when the \fB+short\fP 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.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]idnin\fP
|
|
|
|
Process [do not process] IDN domain names on input. This requires IDN
|
|
|
|
SUPPORT to have been enabled at compile time.
|
|
|
|
.sp
|
|
|
|
The default is to process IDN input when standard output is a tty.
|
|
|
|
The IDN processing on input is disabled when dig output is redirected
|
|
|
|
to files, pipes, and other non\-tty file descriptors.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]idnout\fP
|
|
|
|
Convert [do not convert] puny code on output. This requires IDN
|
|
|
|
SUPPORT to have been enabled at compile time.
|
|
|
|
.sp
|
|
|
|
The default is to process puny code on output when standard output is
|
|
|
|
a tty. The puny code processing on output is disabled when dig output
|
|
|
|
is redirected to files, pipes, and other non\-tty file descriptors.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]ignore\fP
|
|
|
|
Ignore truncation in UDP responses instead of retrying with TCP. By
|
|
|
|
default, TCP retries are performed.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]keepalive\fP
|
|
|
|
Send [or do not send] an EDNS Keepalive option.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]keepopen\fP
|
|
|
|
Keep the TCP socket open between queries and reuse it rather than
|
|
|
|
creating a new TCP socket for each lookup. The default is
|
|
|
|
\fB+nokeepopen\fP\&.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]mapped\fP
|
|
|
|
Allow mapped IPv4 over IPv6 addresses to be used. The default is
|
|
|
|
\fB+mapped\fP\&.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]multiline\fP
|
|
|
|
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 \fBdig\fP output.
|
|
|
|
.TP
|
|
|
|
.B \fB+ndots=D\fP
|
|
|
|
Set the number of dots that have to appear in \fBname\fP to \fBD\fP for
|
|
|
|
it to be considered absolute. The default value is that defined using
|
|
|
|
the ndots statement in \fB/etc/resolv.conf\fP, 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
|
|
|
|
\fBsearch\fP or \fBdomain\fP directive in \fB/etc/resolv.conf\fP if
|
|
|
|
\fB+search\fP is set.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]nsid\fP
|
|
|
|
Include an EDNS name server ID request when sending a query.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]nssearch\fP
|
|
|
|
When this option is set, \fBdig\fP 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.
|
|
|
|
Addresses of servers that that did not respond are also printed.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]onesoa\fP
|
|
|
|
Print only one (starting) SOA record when performing an AXFR. The
|
|
|
|
default is to print both the starting and ending SOA records.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]opcode=value\fP
|
|
|
|
Set [restore] the DNS message opcode to the specified value. The
|
|
|
|
default value is QUERY (0).
|
|
|
|
.TP
|
|
|
|
.B \fB+padding=value\fP
|
|
|
|
Pad the size of the query packet using the EDNS Padding option to
|
|
|
|
blocks of \fBvalue\fP bytes. For example, \fB+padding=32\fP would cause a
|
|
|
|
48\-byte query to be padded to 64 bytes. The default block size is 0,
|
|
|
|
which disables padding. The maximum is 512. Values are ordinarily
|
|
|
|
expected to be powers of two, such as 128; however, this is not
|
|
|
|
mandatory. Responses to padded queries may also be padded, but only
|
|
|
|
if the query uses TCP or DNS COOKIE.
|
2020-06-22 13:48:39 +02:00
|
|
|
.UNINDENT
|
|
|
|
.sp
|
|
|
|
\fB+qid=value\fP
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
|
|
|
Specify the query ID to use when sending queries.
|
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2019-03-31 12:49:47 +02:00
|
|
|
.TP
|
|
|
|
.B \fB+[no]qr\fP
|
|
|
|
Toggles the display of the query message as it is sent. By default, the query
|
|
|
|
is not printed.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]question\fP
|
|
|
|
Toggles the display of the question section of a query when an answer is
|
|
|
|
returned. The default is to print the question section as a comment.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]raflag\fP
|
|
|
|
Set [do not set] the RA (Recursion Available) bit in the query. The
|
|
|
|
default is +noraflag. This bit should be ignored by the server for
|
|
|
|
QUERY.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]rdflag\fP
|
|
|
|
A synonym for \fB+[no]recurse\fP\&.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]recurse\fP
|
|
|
|
Toggle the setting of the RD (recursion desired) bit in the query.
|
|
|
|
This bit is set by default, which means \fBdig\fP normally sends
|
|
|
|
recursive queries. Recursion is automatically disabled when the
|
|
|
|
\fB+nssearch\fP or \fB+trace\fP query options are used.
|
|
|
|
.TP
|
|
|
|
.B \fB+retry=T\fP
|
|
|
|
Sets the number of times to retry UDP queries to server to \fBT\fP
|
|
|
|
instead of the default, 2. Unlike \fB+tries\fP, this does not include
|
|
|
|
the initial query.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]rrcomments\fP
|
|
|
|
Toggle the display of per\-record comments in the output (for example,
|
|
|
|
human\-readable key information about DNSKEY records). The default is
|
|
|
|
not to print record comments unless multiline mode is active.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]search\fP
|
|
|
|
Use [do not use] the search list defined by the searchlist or domain
|
|
|
|
directive in \fBresolv.conf\fP (if any). The search list is not used by
|
|
|
|
default.
|
|
|
|
.sp
|
|
|
|
\(aqndots\(aq from \fBresolv.conf\fP (default 1) which may be overridden by
|
|
|
|
\fB+ndots\fP determines if the name will be treated as relative or not
|
|
|
|
and hence whether a search is eventually performed or not.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]short\fP
|
|
|
|
Provide a terse answer. The default is to print the answer in a verbose
|
|
|
|
form. This option always has global effect; it cannot be set globally and
|
|
|
|
then overridden on a per\-lookup basis.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]showsearch\fP
|
|
|
|
Perform [do not perform] a search showing intermediate results.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]sigchase\fP
|
|
|
|
This feature is now obsolete and has been removed; use \fBdelv\fP
|
|
|
|
instead.
|
|
|
|
.TP
|
|
|
|
.B \fB+split=W\fP
|
|
|
|
Split long hex\- or base64\-formatted fields in resource records into
|
|
|
|
chunks of \fBW\fP characters (where \fBW\fP is rounded up to the nearest
|
|
|
|
multiple of 4). \fB+nosplit\fP or \fB+split=0\fP causes fields not to be
|
|
|
|
split at all. The default is 56 characters, or 44 characters when
|
|
|
|
multiline mode is active.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]stats\fP
|
|
|
|
Toggles the printing of statistics: when the query was made, the size of the
|
|
|
|
reply and so on. The default behavior is to print the query statistics as a
|
|
|
|
comment after each lookup.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]subnet=addr[/prefix\-length]\fP
|
|
|
|
Send (don\(aqt send) an EDNS Client Subnet option with the specified IP
|
|
|
|
address or network prefix.
|
|
|
|
.sp
|
|
|
|
\fBdig +subnet=0.0.0.0/0\fP, or simply \fBdig +subnet=0\fP for short,
|
|
|
|
sends an EDNS CLIENT\-SUBNET option with an empty address and a source
|
|
|
|
prefix\-length of zero, which signals a resolver that the client\(aqs
|
|
|
|
address information must \fInot\fP be used when resolving this query.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]tcflag\fP
|
|
|
|
Set [do not set] the TC (TrunCation) bit in the query. The default is
|
|
|
|
+notcflag. This bit should be ignored by the server for QUERY.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]tcp\fP
|
|
|
|
Use [do not use] TCP when querying name servers. The default behavior
|
|
|
|
is to use UDP unless a type \fBany\fP or \fBixfr=N\fP query is requested,
|
|
|
|
in which case the default is TCP. AXFR queries always use TCP.
|
|
|
|
.TP
|
|
|
|
.B \fB+timeout=T\fP
|
|
|
|
Sets the timeout for a query to \fBT\fP seconds. The default timeout is
|
|
|
|
5 seconds. An attempt to set \fBT\fP to less than 1 will result in a
|
|
|
|
query timeout of 1 second being applied.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]topdown\fP
|
|
|
|
This feature is related to \fBdig +sigchase\fP, which is obsolete and
|
|
|
|
has been removed. Use \fBdelv\fP instead.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]trace\fP
|
|
|
|
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, \fBdig\fP 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.
|
|
|
|
.sp
|
|
|
|
If @server is also specified, it affects only the initial query for
|
|
|
|
the root zone name servers.
|
|
|
|
.sp
|
|
|
|
\fB+dnssec\fP is also set when +trace is set to better emulate the
|
|
|
|
default queries from a nameserver.
|
|
|
|
.TP
|
|
|
|
.B \fB+tries=T\fP
|
|
|
|
Sets the number of times to try UDP queries to server to \fBT\fP
|
|
|
|
instead of the default, 3. If \fBT\fP is less than or equal to zero,
|
|
|
|
the number of tries is silently rounded up to 1.
|
|
|
|
.TP
|
|
|
|
.B \fB+trusted\-key=####\fP
|
|
|
|
Formerly specified trusted keys for use with \fBdig +sigchase\fP\&. This
|
|
|
|
feature is now obsolete and has been removed; use \fBdelv\fP instead.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]ttlid\fP
|
|
|
|
Display [do not display] the TTL when printing the record.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]ttlunits\fP
|
|
|
|
Display [do not display] the TTL in friendly human\-readable time
|
|
|
|
units of "s", "m", "h", "d", and "w", representing seconds, minutes,
|
|
|
|
hours, days and weeks. Implies +ttlid.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]unexpected\fP
|
|
|
|
Accept [do not accept] answers from unexpected sources. By default, \fBdig\fP
|
|
|
|
won\(aqt accept a reply from a source other than the one to which it sent the
|
|
|
|
query.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]unknownformat\fP
|
|
|
|
Print all RDATA in unknown RR type presentation format (\fI\%RFC 3597\fP).
|
|
|
|
The default is to print RDATA for known types in the type\(aqs
|
|
|
|
presentation format.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]vc\fP
|
|
|
|
Use [do not use] TCP when querying name servers. This alternate
|
|
|
|
syntax to \fB+[no]tcp\fP is provided for backwards compatibility. The
|
|
|
|
"vc" stands for "virtual circuit".
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]yaml\fP
|
|
|
|
Print the responses (and, if <option>+qr</option> is in use, also the
|
|
|
|
outgoing queries) in a detailed YAML format.
|
|
|
|
.TP
|
|
|
|
.B \fB+[no]zflag\fP
|
|
|
|
Set [do not set] the last unassigned DNS header flag in a DNS query.
|
|
|
|
This flag is off by default.
|
|
|
|
.UNINDENT
|
|
|
|
.SH MULTIPLE QUERIES
|
|
|
|
.sp
|
|
|
|
The BIND 9 implementation of \fBdig\fP supports specifying multiple
|
|
|
|
queries on the command line (in addition to supporting the \fB\-f\fP batch
|
|
|
|
file option). Each of those queries can be supplied with its own set of
|
|
|
|
flags, options and query options.
|
|
|
|
.sp
|
|
|
|
In this case, each \fBquery\fP 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.
|
|
|
|
.sp
|
|
|
|
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 \fB+[no]cmd\fP and
|
|
|
|
\fB+[no]short\fP options) can be overridden by a query\-specific set of
|
|
|
|
query options. For example:
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
dig +qr www.isc.org any \-x 127.0.0.1 isc.org ns +noqr
|
|
|
|
.ft P
|
|
|
|
.fi
|
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.sp
|
|
|
|
shows how \fBdig\fP could be used from the command line to make three
|
|
|
|
lookups: an ANY query for \fBwww.isc.org\fP, a reverse lookup of 127.0.0.1
|
|
|
|
and a query for the NS records of \fBisc.org\fP\&. A global query option of
|
|
|
|
\fB+qr\fP is applied, so that \fBdig\fP shows the initial query it made for
|
|
|
|
each lookup. The final query has a local query option of \fB+noqr\fP which
|
|
|
|
means that \fBdig\fP will not print the initial query when it looks up the
|
|
|
|
NS records for \fBisc.org\fP\&.
|
|
|
|
.SH IDN SUPPORT
|
|
|
|
.sp
|
|
|
|
If \fBdig\fP has been built with IDN (internationalized domain name)
|
|
|
|
support, it can accept and display non\-ASCII domain names. \fBdig\fP
|
|
|
|
appropriately converts character encoding of domain name before sending
|
|
|
|
a request to DNS server or displaying a reply from the server. If you\(aqd
|
|
|
|
like to turn off the IDN support for some reason, use parameters
|
|
|
|
\fB+noidnin\fP and \fB+noidnout\fP or define the IDN_DISABLE environment
|
|
|
|
variable.
|
|
|
|
.SH FILES
|
|
|
|
.sp
|
|
|
|
\fB/etc/resolv.conf\fP
|
|
|
|
.sp
|
|
|
|
\fB${HOME}/.digrc\fP
|
|
|
|
.SH SEE ALSO
|
|
|
|
.sp
|
|
|
|
\fBdelv(1)\fP, \fBhost(1)\fP, \fBnamed(8)\fP, \fBdnssec\-keygen(8)\fP, \fI\%RFC 1035\fP\&.
|
|
|
|
.SH BUGS
|
|
|
|
.sp
|
|
|
|
There are probably too many query options.
|
|
|
|
.SH AUTHOR
|
|
|
|
Internet Systems Consortium
|
|
|
|
.SH COPYRIGHT
|
|
|
|
2020, Internet Systems Consortium
|
|
|
|
.\" Generated by docutils manpage writer.
|
|
|
|
.
|