HP-UX Reference (11i v2 04/09) - 1M System Administration Commands A-M (vol 3)
d
dig(1M) dig(1M)
+tries=A
This option sets the number of times to retry UDP queries to server to A instead of the default,
3. If A is less than or equal to zero, then the number of retries is set to 1.
+ndots=D
Set the number of dots that appear in hostname to D. The default value is to use either the
ndots statement in /etc/resolv.conf
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 search or the domain directive in the
/etc/resolv.conf
file.
+bufsize=B
Set the UDP message buffer size advertised using EDNS0 to B bytes. The maximum and
minimum sizes of this buffer are 65535 and 0 respectively. If the B size is specified outside of
this range, then the size is rounded up or down appropriately.
Multiple Queries
dig allows multiple queries on the command line (in addition to supporting the
-f batch file option).
Each of those queries can be supplied with its own set of options, query class, query type and query
options.
A global set of query options, which should be applied to all queries can also be supplied via global-d-
options.
These global query options must precede the first set of domain, class, type, options, and query options
supplied on the command line. Any global query options can be overridden by a query-specific set of
query options for each individual query.
For example:
dig +qr www.bind.org any -x 127.0.0.1 bind.org ns +noqr
shows how dig can be used from the command line to make three lookups:
www.bind.org any
An ANY query for domain name www.bind.org.
-x 127.0.0.1
A reverse lookup of 127.0.0.1
bind.org ns +noqr
A name server lookup for domain bind.org, suppressing the query display for this query
only (+noqr).
EXAMPLES
1. To look up information about domain
a.example.com
using DNS-Server 10.53.0.2 asking for
host address
a records:
/usr/bin/dig +tcp +noadd +nosea +nostat +noquest +nocmd -p 5300
a.example.com @10.53.0.2 a
2. To query a.example.com using DNS-Server 10.53.0.2 without authentication, asking for
a
records:
/usr/bin/dig +tcp +noadd +nosea +nostat +noquest +nocmd +noauth -p
5300 a.example.com @10.53.0.2 a
3. To request a transfer:
/usr/bin/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd
example.com @10.53.0.2 axfr -p 5300
4. To request a transfer with Transaction Signature (TSIG):
/usr/bin/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd
tsigzone.com @10.53.0.3 axfr -y tsigzone.com:1234abcd8765 -p 5300 where
1234abcd8765 is the key.
To secure server-to-server communication BINDv9 primarily uses TSIG for zone transfer, notify, and
recursive query messages. TSIG is very useful for dynamic updates.
HP-UX 11i Version 2: September 2004 − 4 − Hewlett-Packard Company Section 1M−−143