summaryrefslogtreecommitdiff
path: root/man/kdig.1.in
blob: 473bf69ff2c254dca7250238762750ff91002f58 (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
.TH "kdig" "1" "April 2013" "CZ.NIC Labs" "Knot DNS, version @VERSION@"
.SH NAME
.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
\fB-h\fR
.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
\fIquery
\fIname\fR | \fB-q\fR \fIname\fR | \fB-x\fR \fIaddress\fR
.TP
\fIcommon-settings, settings
[\fIclass\fR] [\fItype\fR] [\fB@\fIserver\fR]... [\fIoptions\fR]
.TP
\fIname\fR
Is a domain name that is to be looked up.
.TP
\fIserver\fR
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, \fBkdig\fR sends \fINS\fR query for root zone.
.SH OPTIONS
.TP 4
.BI -4
Use IPv4 protocol only.
.TP
.BI -6
Use IPv6 protocol only.
.TP
.BI -b \ address
Set the source IP address of the query to \fIaddress\fR. The address
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
.BI -d
Enable debug messages if any.
.TP
\fB\-h\fR, \fB\-\-help\fR
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
\fB\-v\fR, \fB\-\-version\fR
Print program version.
.TP
.BI -x \ address
Send \fIPTR\fR query for IPv4 or IPv6 \fIaddress\fR.
.TP
.BI -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
\fB+\fR[\fBno\fR]\fBmultiline\fR
Wrap long records to more lines.
.TP
\fB+\fR[\fBno\fR]\fBshort\fR
Show record data only.
.TP
\fB+\fR[\fBno\fR]\fBaaflag\fR
Set AA flag.
.TP
\fB+\fR[\fBno\fR]\fBtcflag\fR
Set TC flag.
.TP
\fB+\fR[\fBno\fR]\fBrdflag\fR
Set RD flag.
.TP
\fB+\fR[\fBno\fR]\fBrecurse\fR
Same as +\fR[\fBno\fR]\fBrdflag\fR
.TP
\fB+\fR[\fBno\fR]\fBrec\fR
Same as +\fR[\fBno\fR]\fBrdflag\fR
.TP
\fB+\fR[\fBno\fR]\fBraflag\fR
Set RA flag.
.TP
\fB+\fR[\fBno\fR]\fBzflag\fR
Set zero flag bit.
.TP
\fB+\fR[\fBno\fR]\fBadflag\fR
Set AD flag.
.TP
\fB+\fR[\fBno\fR]\fBcdflag\fR
Set CD flag.
.TP
\fB+\fR[\fBno\fR]\fBdnssec\fR
Set DO flag.
.TP
\fB+\fR[\fBno\fR]\fBall\fR
Show all packet sections.
.TP
\fB+\fR[\fBno\fR]\fBqr\fR
Show query packet.
.TP
\fB+\fR[\fBno\fR]\fBheader\fR
Show packet header.
.TP
\fB+\fR[\fBno\fR]\fBedns\fR
Show EDNS pseudosectio.
.TP
\fB+\fR[\fBno\fR]\fBquestion\fR
Show question section.
.TP
\fB+\fR[\fBno\fR]\fBanswer\fR
Show answer section.
.TP
\fB+\fR[\fBno\fR]\fBauthority\fR
Show authority section.
.TP
\fB+\fR[\fBno\fR]\fBadditional\fR
Show additional section.
.TP
\fB+\fR[\fBno\fR]\fBstats\fR
Show trailing packet statistics.
.TP
\fB+\fR[\fBno\fR]\fBcl\fR
Show DNS class.
.TP
\fB+\fR[\fBno\fR]\fBttl\fR
Show TTL value.
.TP
\fB+time=\fIT\fR
Set wait for reply interval in seconds (default is 5 seconds).
.TP
\fB+retries=\fIN\fR
Set number of retries (default is 2). This doesn't apply to AXFR or IXFR.
.TP
\fB+bufsize=\fIB\fR
Set EDNS buffer size in bytes (default is 512 bytes).
.TP
\fB+\fR[\fBno\fR]\fBtcp\fR
Use TCP protocol.
.TP
\fB+\fR[\fBno\fR]\fBfail\fR
Stop if SERVFAIL.
.TP
\fB+\fR[\fBno\fR]\fBignore\fR
Don't use TCP automatically if truncated reply is received.
.TP
\fB+\fR[\fBno\fR]\fBnsid\fR
Request nameserver identifier (NSID).
.SH NOTE
Options \fB-k\fR and \fB-y\fR cannot be used mutually.
.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 12
.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
.BI /etc/resolv.conf
.SH AUTHOR
Daniel Salzman (\fBhttp://knot-dns.cz\fR)
.TP
Please send any bugs or comments to \fBknot-dns@labs.nic.cz\fR
.SH SEE ALSO
.BI khost\fR(8),
.BI knsupdate\fR(8).