.TH "kdig" "1" "2017-07-14" "CZ.NIC Labs" "Knot DNS, version 1.6.0" .SH NAME .TP 5 .B kdig \- Advanced DNS lookup utility (libknot equivalent of ISC dig) .SH SYNOPSIS .B kdig [\fIcommon\-settings\fR] [\fIquery\fR [\fIsettings\fR]]... .TP 5 .B kdig \-h .SH DESCRIPTION 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. .TP 4 .I query \fIname\fR | \fB\-q\fR \fIname\fR | \fB\-x\fR \fIaddress\fR | \fB\-G\fR \fItapfile\fR .TP .I common\-settings, settings [\fIclass\fR] [\fItype\fR] [\fB@\fIserver\fR]... [\fIoptions\fR] .TP .I name Is a domain name that is to be looked up. .TP .I server Is a domain name or an IPv4 or IPv6 address of the nameserver to send a query to. An additional port can be specified using address:port ([address]:port for IPv6 address) or address@port or 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 the root zone. .SH OPTIONS .TP 4 .B \-4 Use IPv4 protocol only. .TP .B \-6 Use IPv6 protocol only. .TP .BI \-b \ address Set the source IP address of the query to \fIaddress\fR. The address must be a valid address for local interface or :: or 0.0.0.0. Optional port can be specified in the same format as \fIserver\fR value. .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 .B \-d Enable debug messages if any. .TP .BR \-h ,\ \-\-help 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. It is also possible to use \fINOTIFY\fR parameter to send a notify message. .TP .BR \-v ,\ \-\-version Print program version. .TP .BI \-x \ address Send reverse (\fIPTR\fR) query for IPv4 or IPv6 \fIaddress\fR. Correct name, class and type is set automatically. .TP .B \-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 .BI \-E \ tapfile Export a dnstap trace of the query and response messages received to the file \fItapfile\fR. .TP .BI \-G \ tapfile Generate message output from a previously saved dnstap file \fItapfile\fR. .TP .BR + [ no ] multiline Wrap long records to more lines and improve human readability. .TP .BR + [ no ] short Show record data only. .TP .BR + [ no ] aaflag Set AA flag. .TP .BR + [ no ] tcflag Set TC flag. .TP .BR + [ no ] rdflag Set RD flag. .TP .BR + [ no ] recurse .RB "Same as " + [ no ] rdflag .TP .BR + [ no ] raflag Set RA flag. .TP .BR + [ no ] zflag Set zero flag bit. .TP .BR + [ no ] adflag Set AD flag. .TP .BR + [ no ] cdflag Set CD flag. .TP .BR + [ no ] dnssec Set DO flag. .TP .BR + [ no ] all Show all packet sections. .TP .BR + [ no ] qr Show query packet. .TP .BR + [ no ] header Show packet header. .TP .BR + [ no ] opt Show EDNS pseudosection. .TP .BR + [ no ] question Show question section. .TP .BR + [ no ] answer Show answer section. .TP .BR + [ no ] authority Show authority section. .TP .BR + [ no ] additional Show additional section. .TP .BR + [ no ] tsig Show TSIG pseudosection. .TP .BR + [ no ] stats Show trailing packet statistics. .TP .BR + [ no ] class Show DNS class. .TP .BR + [ no ] ttl Show TTL value. .TP .BR + [ no ] tcp Use TCP protocol (default is UDP for standard query and TCP for AXFR/IXFR). .TP .BR + [ no ] fail Stop querying next nameserver if SERVFAIL response is received. .TP .BR + [ no ] ignore Don't use TCP automatically if truncated reply is received. .TP .BR + [ no ] nsid Request nameserver identifier (NSID). .TP .BR + [ no ] edns= N Use EDNS version (default is 0). .TP .BR +noidn Disable IDN transformation to ASCII and vice versa. IDNA2003 support depends on libidn availability during project building! .TP .BI +client= SUBN Set EDNS client subnet SUBN=IP/prefix. .TP .BI +time= T Set wait for reply interval in seconds (default is 5 seconds). This timeout applies to each query try. .TP .BI +retry= N Set number (>=0) of UDP retries (default is 2). This doesn't apply to AXFR/IXFR. .TP .BI +bufsize= B Set EDNS buffer size in bytes (default is 512 bytes). .SH NOTE Options \fB\-k\fR and \fB\-y\fR cannot be used mutually. .SS Missing features with regard to ISC dig Options \fB\-f\fR and \fB\-m\fR and query options: .BR .BR +split=\fIW\fR ,\ +tries=\fIT\fR ,\ +ndots=\fID\fR , .BR .BR +domain=\fIsomename\fR , +trusted\-key=\fI####\fR , .BR .BR + [ no ] vc ,\ + [ no ] search ,\ + [ no ] showsearch , .BR .BR + [ no ] defname ,\ + [ no ] aaonly ,\ + [ no ] cmd , .BR .BR + [ no ] identify ,\ + [ no ] comments ,\ + [ no ] rrcomments , .BR .BR + [ no ] onesoa ,\ + [ no ] besteffort ,\ + [ no ] sigchase , .BR .BR + [ no ] topdown ,\ + [ no ] nssearch ,\ + [ no ] trace. .TP Per-user file configuration via ${HOME}/.digrc. .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 .B Example 3. Get A record for example.com from 192.0.2.1 and 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 .I /etc/resolv.conf .SH AUTHOR Daniel Salzman (\fBwww.knot\-dns.cz\fR) .TP Please send any bug reports or comments to \fBknot\-dns@labs.nic.cz\fR .SH SEE ALSO .BR khost (1), .BR knsupdate (1).