Newer
Older
.TH "kdig" "1" "April 2013" "CZ.NIC Labs" "Knot DNS, version @VERSION@"
\- Advanced DNS lookup utility (libknot equivalent of ISC dig)
[\fIcommon-settings\fR] [\fIquery\fR [\fIsettings\fR]]...
This utility sends one or more DNS \fIqueries\fR to a nameserver. Each query can
have individual \fIsettings\fR, or it can be specified globally via \fIcommon-settings\fR,
which must precede \fIquery\fR specification.
\fIquery
\fIname\fR | \fB-q\fR \fIname\fR | \fB-x\fR \fIaddress\fR
.TP
\fIcommon-settings, settings
[\fIclass\fR] [\fItype\fR] [\fB@\fIserver\fR]... [\fIoptions\fR]
.TP
\fIname\fR
Is a domain name that is to be looked up.
.TP
\fIserver\fR
Is a name or an address of the nameserver to send a query to. The address
can be specified using [address]:port notation. If no server is specified
the servers from \fB/etc/resolv.conf\fR are used.
.TP
If no arguments are provided, \fBkdig\fR sends \fINS\fR query for root zone.
.SH OPTIONS
.TP 4
.BI -4
Use IPv4 protocol only.
.TP
.BI -6
Use IPv6 protocol only.
.TP
.BI -b \ address
Set the source IP address of the query to \fIaddress\fR. The address
can be specified using [address]:port notation.
.TP
.BI -c \ class
Set query class (e.g. \fICH\fR, \fICLASS4\fR).
An explicit variant of \fIclass\fR specification.
The default class is \fIIN\fR.
.TP
.BI -d
Enable debug messages if any.
.TP
\fB\-h\fR, \fB\-\-help\fR
Print short help.
.TP
.BI -k \ keyfile
Use TSIG or SIG\-0 key stored in a file \fIkeyfile\fR to authenticate the request.
Supported file format is the same as generated by ISC \fBdnssec\-keygen\fR.
The key comprises of public (.key extension) and private part (.private extension).
Either of these file names or a name without the extension can be specified as \fIkeyfile\fR
parameter.
.TP
.BI -p \ port
Set nameserver port number or service name to send a query to.
The default port is \fI53\fR.
.TP
.BI -q \ name
Set query name. An explicit variant of \fIname\fR specification.
.TP
.BI -t \ type
Set query type (e.g. \fINS\fR, \fIIXFR=12345\fR, \fITYPE65535\fR).
An explicit variant of \fItype\fR specification. The default type is \fIA\fR.
.TP
\fB\-v\fR, \fB\-\-version\fR
Print program version.
.TP
.BI -x \ address
Send \fIPTR\fR query for IPv4 or IPv6 \fIaddress\fR.
.TP
.BI -y \ \fR[\fIalgo:\fR]\fIkeyname:key\fR
Use TSIG key with a name \fIkeyname\fR to authenticate the request. The \fIalgo\fR
part specifies the algorithm (the default is hmac\-md5) and \fIkey\fR specifies
the shared secret encoded in Base64.
.TP
Wrap long records to more lines.
.TP
\fB+\fR[\fBno\fR]\fBrecurse\fR
Same as +\fR[\fBno\fR]\fBrdflag\fR
\fB+\fR[\fBno\fR]\fBrec\fR
Same as +\fR[\fBno\fR]\fBrdflag\fR
.TP
Show all packet sections.
.TP
\fB+\fR[\fBno\fR]\fBedns\fR
Show EDNS pseudosectio.
.TP
Show trailing packet statistics.
.TP
Set wait for reply interval in seconds (default is 5 seconds).
Daniel Salzman
committed
Set number of retries (default is 2). This doesn't apply to AXFR or IXFR.
Set EDNS buffer size in bytes (default is 512 bytes).
Don't use TCP automatically if truncated reply is received.
.TP
Request nameserver identifier (NSID).
.SH NOTE
Options \fB-k\fR and \fB-y\fR cannot be used mutually.
.SH EXAMPLES
.B Example 1. Get A record for example.com:
.TP
# kdig example.com A
.TP
.B Example 2. Perform AXFR for zone example.com from the server 192.0.2.1:
.TP
# kdig example.com -t AXFR @192.0.2.1
.TP 12
.B Example 3. Send one A query for example.com from 192.0.2.1 and one reverse \
lookup for address 2001:DB8::1 from 192.0.2.2. Both using TCP protocol:
.TP
# kdig +tcp example.com -t A @192.0.2.1 -x 2001:DB8::1 @192.0.2.2
.SH FILES
.BI /etc/resolv.conf
.SH AUTHOR
Daniel Salzman (\fBhttp://knot-dns.cz\fR)
.TP
Please send any bugs or comments to \fBknot-dns@labs.nic.cz\fR
.SH SEE ALSO
.BI khost\fR(8),
.BI knsupdate\fR(8).