summaryrefslogtreecommitdiffstats
path: root/doc/man/khost.1in
blob: d0f0e7c6c8474c5b9d2b8ea40524770477b93746 (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "KHOST" "1" "@RELEASE_DATE@" "@VERSION@" "Knot DNS"
.SH NAME
khost \- Simple DNS lookup utility
.SH SYNOPSIS
.sp
\fBkhost\fP [\fIoptions\fP] \fIname\fP [\fIserver\fP]
.SH DESCRIPTION
.sp
This utility sends a DNS query for the \fIname\fP to the \fIserver\fP and prints a reply
in more user\-readable form. For more advanced DNS queries use kdig
instead.
.SS Parameters
.INDENT 0.0
.TP
\fIname\fP
Is a domain name that is to be looked up. If the \fIname\fP is IPv4 or IPv6
address the PTR query type is used.
.TP
\fIserver\fP
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\fP are used.
.UNINDENT
.sp
If no arguments are provided, \fBkhost\fP prints a short help.
.SS Options
.INDENT 0.0
.TP
\fB\-4\fP
Use the IPv4 protocol only.
.TP
\fB\-6\fP
Use the IPv6 protocol only.
.TP
\fB\-a\fP
Send ANY query with verbose mode.
.TP
\fB\-d\fP
Enable debug messages.
.TP
\fB\-h\fP, \fB\-\-help\fP
Print the program help.
.TP
\fB\-r\fP
Disable recursion.
.TP
\fB\-T\fP
Use the TCP protocol.
.TP
\fB\-v\fP
Enable verbose output.
.TP
\fB\-V\fP, \fB\-\-version\fP
Print the program version.
.TP
\fB\-w\fP
Wait forever for the reply.
.TP
\fB\-c\fP \fIclass\fP
Set the query class (e.g. CH, CLASS4). The default class is IN.
.TP
\fB\-t\fP \fItype\fP
Set the query type (e.g. NS, IXFR=12345, TYPE65535). The default is to send 3
queries (A, AAAA and MX).
.TP
\fB\-R\fP \fIretries\fP
The number (>=0) of UDP retries to query a nameserver. The default is 1.
.TP
\fB\-W\fP \fIwait\fP
The time to wait for a reply in seconds. This timeout applies to each query
try. The default is 2 seconds.
.UNINDENT
.SH EXIT VALUES
.sp
Exit status of 0 means successful operation. Any other exit status indicates
an error.
.SH EXAMPLES
.INDENT 0.0
.IP 1. 3
Get the A, AAAA and MX records for example.com:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
$ khost example.com
.ft P
.fi
.UNINDENT
.UNINDENT
.IP 2. 3
Get the reverse record for address 192.0.2.1:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
$ khost 192.0.2.1
.ft P
.fi
.UNINDENT
.UNINDENT
.IP 3. 3
Perform a verbose zone transfer for zone example.com:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
$ khost \-t AXFR \-v example.com
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.SH FILES
.sp
\fB/etc/resolv.conf\fP
.SH SEE ALSO
.sp
\fBkdig(1)\fP, \fBknsupdate(1)\fP\&.
.SH AUTHOR
CZ.NIC Labs <https://www.knot-dns.cz>
.SH COPYRIGHT
Copyright 2010–2023, CZ.NIC, z.s.p.o.
.\" Generated by docutils manpage writer.
.