.TH "khost" "1" "2017-07-14" "CZ.NIC Labs" "Knot DNS, version 1.6.0" .SH NAME .TP 6 .B khost \- Simple DNS lookup utility (libknot equivalent of ISC host) .SH SYNOPSIS .B khost [\fIoptions\fR] \fIname\fR [\fIserver\fR] .SH DESCRIPTION This utility sends a DNS query for the \fIname\fR to the \fIserver\fR and prints a reply in more user\-readable form. For more advanced DNS queries use \fBkdig\fR instead. .TP 4 .I name Is a domain name that is to be looked up. If the \fIname\fR is IPv4 or IPv6 address the \fIPTR\fR query type is used. .TP .I server 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, \fBkhost\fR prints short help. .SH OPTIONS .TP 4 .B \-4 Use IPv4 protocol only. .TP .B \-6 Use IPv6 protocol only. .TP .B \-a Send ANY query with verbose mode. .TP .B \-d Enable debug messages if any. .TP .BR \-h ,\ \-\-help Print help. .TP .B \-r Disable recursion. .TP .B \-s Stop querying next nameserver if SERVFAIL response is received. .TP .B \-T Use TCP protocol. .TP .B \-v Enable verbose output. .TP .BR \-V ,\ \-\-version Print program version. .TP .B \-w Wait forever for the reply. .TP .BI \-c \ class Set query class (e.g. \fICH\fR, \fICLASS4\fR). The default class is \fIIN\fR. .TP .BI \-t \ type Set query type (e.g. \fINS\fR, \fIIXFR=12345\fR, \fITYPE65535\fR). The default is to send 3 queries (\fIA\fR, \fIAAAA\fR and \fIMX\fR). .TP .BI \-R \ retries The number (>=0) of UDP retries to query a nameserver. The default is \fI1\fR. .TP .BI \-W \ wait The time to wait for a reply in seconds. This timeout applies to each query try. The default is \fI2\fR seconds. .SH NOTES .SS Missing features with regard to ISC host Options \fB\-C, \-i, \-l, \-m, \-N\fR. .SS Differences with regard to ISC host Option \fB\-d\fR is not equivalent to \fB-v\fR, but enables debug messages. .TP The number of retries can be set to zero. .TP Verbose mode has slightly different format (same as \fBkdig\fR). .SH EXAMPLES .B Example 1. Get A, AAAA and MX records for example.com: .TP # khost example.com .TP .B Example 2. Get reverse record for address 192.0.2.1: .TP # khost 192.0.2.1 .TP .B Example 3. Perform verbose zone transfer for zone example.com: .TP # khost \-t AXFR \-v example.com .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 kdig (1), .BR knsupdate (1).