Debian Codegraph @

doc/man/mdig.1in

raw
1 .\" Man page generated from reStructuredText
2 .\" by the Docutils 0.22.4 manpage writer.
3 .
4 .
5 .nr rst2man-indent-level 0
6 .
7 .de1 rstReportMargin
8 \\$1 \\n[an-margin]
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11 -
12 \\n[rst2man-indent0]
13 \\n[rst2man-indent1]
14 \\n[rst2man-indent2]
15 ..
16 .de1 INDENT
17 .\" .rstReportMargin pre:
18 . RS \\$1
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
22 ..
23 .de UNINDENT
24 . RE
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30 ..
31 .TH "MDIG" "1" "@RELEASE_DATE@" "@PACKAGE_VERSION@" "BIND 9"
32 .SH NAME
33 mdig \- DNS pipelined lookup utility
34 .SH SYNOPSIS
35 .sp
36 \fBmdig\fP \%<{@\:server>} [\fB\-f\fP filename] [\fB\-h\fP] [\fB\-v\fP] [ [\fB\-4\fP] | [\fB\-6\fP] ] [\fB\-m\fP] [\fB\-b\fP address] [\fB\-p\fP port#] [\fB\-c\fP class] [\fB\-t\fP type] [\fB\-i\fP] [\fB\-x\fP addr] [plusopt...]
37 .sp
38 \fBmdig\fP {\fB\-h\fP}
39 .sp
40 \fBmdig\fP [@server] {global\-opt...} { {local\-opt...} {query} ...}
41 .SH DESCRIPTION
42 .sp
43 \fBmdig\fP is a multiple/pipelined query version of \fBdig\fP \%<#\:std-iscman-dig>: instead of
44 waiting for a response after sending each query, it begins by sending
45 all queries. Responses are displayed in the order in which they are
46 received, not in the order the corresponding queries were sent.
47 .sp
48 \fBmdig\fP options are a subset of the \fBdig\fP \%<#\:std-iscman-dig> options, and are divided
49 into \(dqanywhere options,\(dq which can occur anywhere, \(dqglobal options,\(dq which
50 must occur before the query name (or they are ignored with a warning),
51 and \(dqlocal options,\(dq which apply to the next query on the command line.
52 .sp
53 The \fB@server\fP option is a mandatory global option. It is the name or IP
54 address of the name server to query. (Unlike \fBdig\fP \%<#\:std-iscman-dig>, this value is not
55 retrieved from \fB/etc/resolv.conf\fP\&.) It can be an IPv4 address in
56 dotted\-decimal notation, an IPv6 address in colon\-delimited notation, or
57 a hostname. When the supplied \fBserver\fP argument is a hostname,
58 \fBmdig\fP resolves that name before querying the name server.
59 .sp
60 \fBmdig\fP provides a number of query options which affect the way in
61 which lookups are made and the results displayed. Some of these set or
62 reset flag bits in the query header, some determine which sections of
63 the answer get printed, and others determine the timeout and retry
64 strategies.
65 .sp
66 Each query option is identified by a keyword preceded by a plus sign
67 (\fB+\fP). Some keywords set or reset an option. These may be preceded by
68 the string \fBno\fP to negate the meaning of that keyword. Other keywords
69 assign values to options like the timeout interval. They have the form
70 \fB+keyword=value\fP\&.
71 .SH ANYWHERE OPTIONS
72 .INDENT 0.0
73 .TP
74 .B \-f
75 This option makes \fBmdig\fP operate in batch mode by reading a list
76 of lookup requests to process from the file \fBfilename\fP\&. The file
77 contains a number of queries, one per line. Each entry in the file
78 should be organized in the same way they would be presented as queries
79 to \fBmdig\fP using the command\-line interface.
80 .UNINDENT
81 .INDENT 0.0
82 .TP
83 .B \-h
84 This option causes \fBmdig\fP to print detailed help information, with the full list
85 of options, and exit.
86 .UNINDENT
87 .INDENT 0.0
88 .TP
89 .B \-v
90 This option causes \fBmdig\fP to print the version number and exit.
91 .UNINDENT
92 .SH GLOBAL OPTIONS
93 .INDENT 0.0
94 .TP
95 .B \-4
96 This option forces \fBmdig\fP to only use IPv4 query transport.
97 .UNINDENT
98 .INDENT 0.0
99 .TP
100 .B \-6
101 This option forces \fBmdig\fP to only use IPv6 query transport.
102 .UNINDENT
103 .INDENT 0.0
104 .TP
105 .B \-b address
106 This option sets the source IP address of the query to
107 \fBaddress\fP\&. This must be a valid address on one of the host\(aqs network
108 interfaces or \(dq0.0.0.0\(dq or \(dq::\(dq. An optional port may be specified by
109 appending \(dq#<port>\(dq
110 .UNINDENT
111 .INDENT 0.0
112 .TP
113 .B \-m
114 This option enables memory usage debugging.
115 .UNINDENT
116 .INDENT 0.0
117 .TP
118 .B \-p port#
119 This option is used when a non\-standard port number is to be
120 queried. \fBport#\fP is the port number that \fBmdig\fP sends its
121 queries to, instead of the standard DNS port number 53. This option is
122 used to test a name server that has been configured to listen for
123 queries on a non\-standard port number.
124 .UNINDENT
125 .sp
126 The global query options are:
127 .INDENT 0.0
128 .TP
129 .B +additional, +noadditional
130 This option displays [or does not display] the additional section of a reply. The
131 default is to display it.
132 .UNINDENT
133 .INDENT 0.0
134 .TP
135 .B +all, +noall
136 This option sets or clears all display flags.
137 .UNINDENT
138 .INDENT 0.0
139 .TP
140 .B +answer, +noanswer
141 This option displays [or does not display] the answer section of a reply. The default
142 is to display it.
143 .UNINDENT
144 .INDENT 0.0
145 .TP
146 .B +authority, +noauthority
147 This option displays [or does not display] the authority section of a reply. The
148 default is to display it.
149 .UNINDENT
150 .INDENT 0.0
151 .TP
152 .B +besteffort, +nobesteffort
153 This option attempts to display [or does not display] the contents of messages which are malformed. The
154 default is to not display malformed answers.
155 .UNINDENT
156 .INDENT 0.0
157 .TP
158 .B +burst
159 This option delays queries until the start of the next second.
160 .UNINDENT
161 .INDENT 0.0
162 .TP
163 .B +cl, +nocl
164 This option displays [or does not display] the CLASS when printing the record.
165 .UNINDENT
166 .INDENT 0.0
167 .TP
168 .B +comments, +nocomments
169 This option toggles the display of comment lines in the output. The default is to
170 print comments.
171 .UNINDENT
172 .INDENT 0.0
173 .TP
174 .B +continue, +nocontinue
175 This option toggles continuation on errors (e.g. timeouts).
176 .UNINDENT
177 .INDENT 0.0
178 .TP
179 .B +crypto, +nocrypto
180 This option toggles the display of cryptographic fields in DNSSEC records. The
181 contents of these fields are unnecessary to debug most DNSSEC
182 validation failures and removing them makes it easier to see the
183 common failures. The default is to display the fields. When omitted,
184 they are replaced by the string \(dq[omitted]\(dq; in the DNSKEY case, the
185 key ID is displayed as the replacement, e.g., \fB[ key id = value ]\fP\&.
186 .UNINDENT
187 .INDENT 0.0
188 .TP
189 .B +multiline, +nomultiline
190 This option toggles printing of records, like the SOA records, in a verbose multi\-line format
191 with human\-readable comments. The default is to print each record on
192 a single line, to facilitate machine parsing of the \fBmdig\fP output.
193 .UNINDENT
194 .INDENT 0.0
195 .TP
196 .B +question, +noquestion
197 This option prints [or does not print] the question section of a query when an answer
198 is returned. The default is to print the question section as a
199 comment.
200 .UNINDENT
201 .INDENT 0.0
202 .TP
203 .B +rrcomments, +norrcomments
204 This option toggles the display of per\-record comments in the output (for example,
205 human\-readable key information about DNSKEY records). The default is
206 not to print record comments unless multiline mode is active.
207 .UNINDENT
208 .INDENT 0.0
209 .TP
210 .B +short, +noshort
211 This option provides [or does not provide] a terse answer. The default is to print the answer in a
212 verbose form.
213 .UNINDENT
214 .INDENT 0.0
215 .TP
216 .B +split=W
217 This option splits long hex\- or base64\-formatted fields in resource records into
218 chunks of \fBW\fP characters (where \fBW\fP is rounded up to the nearest
219 multiple of 4). \fB+nosplit\fP or \fB+split=0\fP causes fields not to be
220 split. The default is 56 characters, or 44 characters when
221 multiline mode is active.
222 .UNINDENT
223 .INDENT 0.0
224 .TP
225 .B +tcp, +notcp
226 This option uses [or does not use] TCP when querying name servers. The default behavior
227 is to use UDP.
228 .UNINDENT
229 .INDENT 0.0
230 .TP
231 .B +ttlid, +nottlid
232 This option displays [or does not display] the TTL when printing the record.
233 .UNINDENT
234 .INDENT 0.0
235 .TP
236 .B +ttlunits, +nottlunits
237 This option displays [or does not display] the TTL in friendly human\-readable time
238 units of \(dqs\(dq, \(dqm\(dq, \(dqh\(dq, \(dqd\(dq, and \(dqw\(dq, representing seconds, minutes,
239 hours, days, and weeks. This implies +ttlid.
240 .UNINDENT
241 .INDENT 0.0
242 .TP
243 .B +vc, +novc
244 This option uses [or does not use] TCP when querying name servers. This alternate
245 syntax to \fB+tcp\fP is provided for backwards compatibility. The
246 \fBvc\fP stands for \(dqvirtual circuit\(dq.
247 .UNINDENT
248 .SH LOCAL OPTIONS
249 .INDENT 0.0
250 .TP
251 .B \-c class
252 This option sets the query class to \fBclass\fP\&. It can be any valid
253 query class which is supported in BIND 9. The default query class is
254 \(dqIN\(dq.
255 .UNINDENT
256 .INDENT 0.0
257 .TP
258 .B \-t type
259 This option sets the query type to \fBtype\fP\&. It can be any valid
260 query type which is supported in BIND 9. The default query type is \(dqA\(dq,
261 unless the \fB\-x\fP option is supplied to indicate a reverse lookup with
262 the \(dqPTR\(dq query type.
263 .UNINDENT
264 .INDENT 0.0
265 .TP
266 .B \-x addr
267 Reverse lookups \- mapping addresses to names \- are simplified by
268 this option. \fBaddr\fP is an IPv4 address in dotted\-decimal
269 notation, or a colon\-delimited IPv6 address. \fBmdig\fP automatically
270 performs a lookup for a query name like \fB11.12.13.10.in\-addr.arpa\fP and
271 sets the query type and class to PTR and IN respectively. By default,
272 IPv6 addresses are looked up using nibble format under the IP6.ARPA
273 domain.
274 .UNINDENT
275 .sp
276 The local query options are:
277 .INDENT 0.0
278 .TP
279 .B +aaflag, +noaaflag
280 This is a synonym for \fB+aaonly\fP, \fB+noaaonly\fP\&.
281 .UNINDENT
282 .INDENT 0.0
283 .TP
284 .B +aaonly, +noaaonly
285 This sets the \fBaa\fP flag in the query.
286 .UNINDENT
287 .INDENT 0.0
288 .TP
289 .B +adflag, +noadflag
290 This sets [or does not set] the AD (authentic data) bit in the query. This
291 requests the server to return whether all of the answer and authority
292 sections have all been validated as secure, according to the security
293 policy of the server. AD=1 indicates that all records have been
294 validated as secure and the answer is not from a OPT\-OUT range. AD=0
295 indicates that some part of the answer was insecure or not validated.
296 This bit is set by default.
297 .UNINDENT
298 .INDENT 0.0
299 .TP
300 .B +bufsize=B
301 This sets the UDP message buffer size advertised using EDNS0 to \fBB\fP
302 bytes. The maximum and minimum sizes of this buffer are 65535 and 0
303 respectively. Values outside this range are rounded up or down
304 appropriately. Values other than zero cause a EDNS query to be
305 sent.
306 .UNINDENT
307 .INDENT 0.0
308 .TP
309 .B +cdflag, +nocdflag
310 This sets [or does not set] the CD (checking disabled) bit in the query. This
311 requests the server to not perform DNSSEC validation of responses.
312 .UNINDENT
313 .INDENT 0.0
314 .TP
315 .B +cookie=####, +nocookie
316 This sends [or does not send] a COOKIE EDNS option, with an optional value. Replaying a COOKIE
317 from a previous response allows the server to identify a previous
318 client. The default is \fB+nocookie\fP\&.
319 .UNINDENT
320 .INDENT 0.0
321 .TP
322 .B +dnssec, +nodnssec
323 This requests that DNSSEC records be sent by setting the DNSSEC OK (DO) bit in
324 the OPT record in the additional section of the query.
325 .UNINDENT
326 .INDENT 0.0
327 .TP
328 .B +edns[=#], +noedns
329 This specifies [or does not specify] the EDNS version to query with. Valid values are 0 to 255.
330 Setting the EDNS version causes an EDNS query to be sent.
331 \fB+noedns\fP clears the remembered EDNS version. EDNS is set to 0 by
332 default.
333 .UNINDENT
334 .INDENT 0.0
335 .TP
336 .B +ednsflags[=#], +noednsflags
337 This sets the must\-be\-zero EDNS flag bits (Z bits) to the specified value.
338 Decimal, hex, and octal encodings are accepted. Setting a named flag
339 (e.g. DO) is silently ignored. By default, no Z bits are set.
340 .UNINDENT
341 .INDENT 0.0
342 .TP
343 .B +ednsopt[=code[:value]], +noednsopt
344 This specifies [or does not specify] an EDNS option with code point \fBcode\fP and an optional payload
345 of \fBvalue\fP as a hexadecimal string. \fB+noednsopt\fP clears the EDNS
346 options to be sent.
347 .UNINDENT
348 .INDENT 0.0
349 .TP
350 .B +expire, +noexpire
351 This toggles sending of an EDNS Expire option.
352 .UNINDENT
353 .INDENT 0.0
354 .TP
355 .B +nsid, +nonsid
356 This toggles inclusion of an EDNS name server ID request when sending a query.
357 .UNINDENT
358 .INDENT 0.0
359 .TP
360 .B +recurse, +norecurse
361 This toggles the setting of the RD (recursion desired) bit in the query.
362 This bit is set by default, which means \fBmdig\fP normally sends
363 recursive queries.
364 .UNINDENT
365 .INDENT 0.0
366 .TP
367 .B +retry=T
368 This sets the number of times to retry UDP queries to server to \fBT\fP
369 instead of the default, 2. Unlike \fB+tries\fP, this does not include
370 the initial query.
371 .UNINDENT
372 .INDENT 0.0
373 .TP
374 .B +subnet=addr[/prefix\-length], +nosubnet
375 This sends [or does not send] an EDNS Client Subnet option with the specified IP
376 address or network prefix.
377 .UNINDENT
378 .INDENT 0.0
379 .TP
380 .B \fBmdig +subnet=0.0.0.0/0\fP, or simply \fBmdig +subnet=0\fP
381 This sends an EDNS client\-subnet option with an empty address and a source
382 prefix\-length of zero, which signals a resolver that the client\(aqs
383 address information must \fInot\fP be used when resolving this query.
384 .UNINDENT
385 .INDENT 0.0
386 .TP
387 .B +timeout=T
388 This sets the timeout for a query to \fBT\fP seconds. The default timeout is
389 5 seconds for UDP transport and 10 for TCP. An attempt to set \fBT\fP
390 to less than 1 results in a query timeout of 1 second being
391 applied.
392 .UNINDENT
393 .INDENT 0.0
394 .TP
395 .B +tries=T
396 This sets the number of times to try UDP queries to server to \fBT\fP
397 instead of the default, 3. If \fBT\fP is less than or equal to zero,
398 the number of tries is silently rounded up to 1.
399 .UNINDENT
400 .INDENT 0.0
401 .TP
402 .B +udptimeout=T
403 This sets the timeout between UDP query retries to \fBT\fP\&.
404 .UNINDENT
405 .INDENT 0.0
406 .TP
407 .B +unknownformat, +nounknownformat
408 This prints [or does not print] all RDATA in unknown RR\-type presentation format (see \fBRFC 3597\fP \%<https://\:datatracker\:.ietf\:.org/\:doc/\:html/\:rfc3597\:.html>).
409 The default is to print RDATA for known types in the type\(aqs
410 presentation format.
411 .UNINDENT
412 .INDENT 0.0
413 .TP
414 .B +yaml, +noyaml
415 This toggles printing of the responses in a detailed YAML format.
416 .UNINDENT
417 .INDENT 0.0
418 .TP
419 .B +zflag, +nozflag
420 This sets [or does not set] the last unassigned DNS header flag in a DNS query.
421 This flag is off by default.
422 .UNINDENT
423 .SH SEE ALSO
424 .sp
425 \fBdig(1)\fP \%<#\:std-iscman-dig>, \fBRFC 1035\fP \%<https://\:datatracker\:.ietf\:.org/\:doc/\:html/\:rfc1035\:.html>\&.
426 .SH Author
427 Internet Systems Consortium
428 .SH Copyright
429 2026, Internet Systems Consortium
430 .\" End of generated man page.