summaryrefslogtreecommitdiff
path: root/man/khost.1.in
blob: e25ba359d06882f465ef072427ac1107f518e5e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
.TH "khost" "1" "@RELEASE_DATE@" "CZ.NIC Labs" "Knot DNS, version @VERSION@"
.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 quering 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).