summaryrefslogtreecommitdiff
path: root/man/kdig.1
blob: 2fd8b485f1a2a3a5a4ddfa498768fdd65742bfef (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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
.TH "kdig" "1" "5 August 2013" "CZ.NIC Labs" "Knot DNS, version 1.3.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
.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.
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 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 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
.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.
.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
.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 ] rec
.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 ] edns
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 ] stats
Show trailing packet statistics.
.TP
.BR + [ no ] cl
Show DNS class.
.TP
.BR + [ no ] ttl
Show TTL value.
.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).
.TP
.BR + [ no ] tcp
Use TCP protocol (default is UDP for standard query and TCP for AXFR/IXFR).
.TP
.BR + [ no ] fail
Stop quering 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).
.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.
.SS Differences with regard to ISC dig
Optional port specification has a form of [address]:port instead of address#port.
.TP
.BR + [ no ] ttl " instead of " + [ no ] ttlid
.TP
Trailing information is formatted slightly different.
.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. 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
.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).