HP-UX Reference (11i v2 04/09) - 1M System Administration Commands A-M (vol 3)

d
dig(1M) dig(1M)
-f This option is used to perform batch processing. It allows to group queries into one file
and to pass this file to
dig for processing. Example: dig -f /home/bind/some-
file, where some-file contains all the queries that need to be processed as a group.
-k This option is used to sign the DNS queries sent by
dig and their responses using tran-
saction signatures (TSIG).
-p This option can be used when you want to specify a different port for
dig to contact the
name-server for its queries.
-x This option allows queries using an IP address instead of a domain name. This option
cannot be used with IPv6 addresses.
-y This option is used to specify the TSIG key on the command line.
-t & -c
The -t (type) and -c (class) option. Equivalent to
query-type and query-class.
-h Displays usage information of the dig command.
A typical
dig command is:
dig @server domain query-type
where
@server is the name or IP address of the name server, which is to be queried. An IPv4 address can
be provided in a dotted-decimal notation, xxx.xxx.xxx.
dig resolves the host name before querying that
name server. If no argument is provided,
dig consults /etc/resolv.conf
and queries the name
servers listed there. The reply from the name server that responds to the query is displayed.
domain is the name of the resource record, which is to be looked up.
query-type indicates the required query type ie., ANY, A, MX, SIG etc. It can be any valid query type.
The
dig command will perform a lookup for an A record if no query-type argument is specified.
Query Options
dig uses a number of query options to affect lookups and to affect the results that are displayed. Some
options set or reset 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.
Each query option is identified by a keyword preceded by
+[no] which causes an option to be set or reset
or to negate the meaning of that keyword. Other keywords assign values to options like the timeout
interval. They have the form +keyword=value
. The query options are:
+[no]tcp Use [or do not use] TCP when querying name servers. The default behavior is to use UDP
unless an AXFR or IXFR query is requested, in which case a TCP connection is used.
+[no]vc Use [or do not use] virtual circuit when querying name servers. This alternate syntax to
+[no]tcp is provided for backwards compatibility.
+[no]ignore
Ignore [or do not ignore] truncation in UDP responses instead of retrying with TCP. By
default, TCP retries are performed.
+domain=somename
Set the default domain to somename as it is specified in a directive in the
/etc/resolv.conf file.
+[no]search
Use [or do not use] the search list in /etc/resolv.conf (if any). The search list is not
used by default.
+[no]defname
Use [or do not use] the default domain name, if any, in the /etc/resolv.conf file while
making queries. By default, this name is not appended to name while making queries.
+[no]aaonly
Authenticate [or do not authenticate] the client when it queries a server. If this option is set,
whenever a client tries querying a server, the client will be subjected to an authentication
check to make sure that the client has sufficient permissions to query the server.
+[no]adflag
Set [or do not set] the AD (authenticate data) bit in the query. The AD bit currently has a
standard meaning only in responses and not in queries. The ability to set the bit in the query
HP-UX 11i Version 2: September 2004 2 Hewlett-Packard Company Section 1M141