dig.1m (2010 09)
d
dig(1M) dig(1M)
(BIND 9.3)
-p port Send queries to a port number, port , instead of to the standard DNS port number 53. Use this
option to test a name server that has been configured to listen for queries on a nonstandard
port number.
-t type Set the query type to type . It can be any valid query type which is supported in BIND 9. For
potential values, see the
set querytype command in nslookup (1) and the Zone File discus-
sion in named.conf (4).
The default query type is
A, unless the
-x 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 type to
IXFR=N. The incremental zone transfer will contain
the changes made to the zone since the serial number in the zone’s
SOA record was N.
-x addr Simplify reverse lookups (mapping addresses to names). addr 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 name, class ,ortype operands.
dig automatically performs a lookup for a name
like
11.12.13.10.in-addr.arpa
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 RFC 1886 method (IP6.INT) domain, also specify the
-i
option.
-y name :key
Specify the TSIG key itself on the command line. name is the name of the TSIG key and key is
the actual key. The key is a base-64 encoded string, typically generated by
dnssec-keygen
(see dnssec-keygen(1)). Be cautious when using the
-y option on multiuser systems as the key
can be visible in the output from
ps(1) or in the shell’s history file. When using TSIG
authentication with dig, 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 key and server statements
in named.conf.
Operands
Operands are order-dependent.
class Set the query class. See the -c option. The class operand overrides any preceding
-c option.
global-queryopt
Query options (see the queryopt operand) at the beginning of the command are "global". They
affect all subsequent queries on the command line (see the query operand).
name The name of the resource record that is to be looked up.
query A set of command-line options, operands, and query options that form a single lookup query,
as shown in the Single Query syntax in SYNOPSIS (without the
dig command word).
queryopt Query options at the end of a query modify the lookup for that query only. They override any
global query options. See the Query Options subsection for details.
type Set the query type. See the
-t option. The type operand overrides any preceding -t option.
Query Options
dig uses a number of query options to modify lookups and the results that are displayed. Some options
set or clear flag bits in the query header, some options determine which sections of the answer get
displayed, and other options determine the timeout and retry strategies.
Query Option Formats
There are two formats:
+[no]keyword The prefix no causes an option to be reset, negated, or cleared. The no action
is described in brackets ([...]).
+keyword=value The keyword assigns a value to an option.
Query Options
The query options are:
+[no]aaflag
A synonym for +[no]aaonly. The default is +noaaflag.
+[no]aaonly
Set [do not set] the AA (authoritative answer) flag in the query. The default is +noaaonly.
2 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: September 2010