~andreserl/ubuntu/lucid/bind9/bind9-apport-533601

« back to all changes in this revision

Viewing changes to bin/dig/dig.html

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2006-01-05 12:29:28 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060105122928-oih7ttkkmpb90q8q
Tags: 1:9.3.2-1
* New upstream
* use lsb-base for start/stop messages in init.d.
* switch to debhelper 4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!--
2
 
 - Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
3
 
 - Copyright (C) 2000-2003  Internet Software Consortium.
4
 
 -
 
2
 - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
 
3
 - Copyright (C) 2000-2003 Internet Software Consortium.
 
4
 - 
5
5
 - Permission to use, copy, modify, and distribute this software for any
6
6
 - purpose with or without fee is hereby granted, provided that the above
7
7
 - copyright notice and this permission notice appear in all copies.
8
 
 -
 
8
 - 
9
9
 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10
10
 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
 
 - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
 
11
 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12
12
 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
13
 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14
14
 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
15
 - PERFORMANCE OF THIS SOFTWARE.
16
16
-->
17
 
 
18
 
<!-- $Id: dig.html,v 1.6.2.4.2.7 2004/08/22 23:38:57 marka Exp $ -->
19
 
 
20
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
21
 
<HTML
22
 
><HEAD
23
 
><TITLE
24
 
>dig</TITLE
25
 
><META
26
 
NAME="GENERATOR"
27
 
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
28
 
><BODY
29
 
CLASS="REFENTRY"
30
 
BGCOLOR="#FFFFFF"
31
 
TEXT="#000000"
32
 
LINK="#0000FF"
33
 
VLINK="#840084"
34
 
ALINK="#0000FF"
35
 
><H1
36
 
><A
37
 
NAME="AEN1"
38
 
></A
39
 
>dig</H1
40
 
><DIV
41
 
CLASS="REFNAMEDIV"
42
 
><A
43
 
NAME="AEN8"
44
 
></A
45
 
><H2
46
 
>Name</H2
47
 
>dig&nbsp;--&nbsp;DNS lookup utility</DIV
48
 
><DIV
49
 
CLASS="REFSYNOPSISDIV"
50
 
><A
51
 
NAME="AEN11"
52
 
></A
53
 
><H2
54
 
>Synopsis</H2
55
 
><P
56
 
><B
57
 
CLASS="COMMAND"
58
 
>dig</B
59
 
>  [@server] [<VAR
60
 
CLASS="OPTION"
61
 
>-b <VAR
62
 
CLASS="REPLACEABLE"
63
 
>address</VAR
64
 
></VAR
65
 
>] [<VAR
66
 
CLASS="OPTION"
67
 
>-c <VAR
68
 
CLASS="REPLACEABLE"
69
 
>class</VAR
70
 
></VAR
71
 
>] [<VAR
72
 
CLASS="OPTION"
73
 
>-f <VAR
74
 
CLASS="REPLACEABLE"
75
 
>filename</VAR
76
 
></VAR
77
 
>] [<VAR
78
 
CLASS="OPTION"
79
 
>-k <VAR
80
 
CLASS="REPLACEABLE"
81
 
>filename</VAR
82
 
></VAR
83
 
>] [<VAR
84
 
CLASS="OPTION"
85
 
>-p <VAR
86
 
CLASS="REPLACEABLE"
87
 
>port#</VAR
88
 
></VAR
89
 
>] [<VAR
90
 
CLASS="OPTION"
91
 
>-t <VAR
92
 
CLASS="REPLACEABLE"
93
 
>type</VAR
94
 
></VAR
95
 
>] [<VAR
96
 
CLASS="OPTION"
97
 
>-x <VAR
98
 
CLASS="REPLACEABLE"
99
 
>addr</VAR
100
 
></VAR
101
 
>] [<VAR
102
 
CLASS="OPTION"
103
 
>-y <VAR
104
 
CLASS="REPLACEABLE"
105
 
>name:key</VAR
106
 
></VAR
107
 
>] [<VAR
108
 
CLASS="OPTION"
109
 
>-4</VAR
110
 
>] [<VAR
111
 
CLASS="OPTION"
112
 
>-6</VAR
113
 
>] [name] [type] [class] [queryopt...]</P
114
 
><P
115
 
><B
116
 
CLASS="COMMAND"
117
 
>dig</B
118
 
>  [<VAR
119
 
CLASS="OPTION"
120
 
>-h</VAR
121
 
>]</P
122
 
><P
123
 
><B
124
 
CLASS="COMMAND"
125
 
>dig</B
126
 
>  [global-queryopt...] [query...]</P
127
 
></DIV
128
 
><DIV
129
 
CLASS="REFSECT1"
130
 
><A
131
 
NAME="AEN55"
132
 
></A
133
 
><H2
134
 
>DESCRIPTION</H2
135
 
><P
136
 
><B
137
 
CLASS="COMMAND"
138
 
>dig</B
139
 
> (domain information groper) is a flexible tool
 
17
<!-- $Id: dig.html,v 1.6.2.4.2.13 2005/10/13 02:33:43 marka Exp $ -->
 
18
<html>
 
19
<head>
 
20
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 
21
<title>dig</title>
 
22
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
 
23
</head>
 
24
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
 
25
<a name="id2463721"></a><div class="titlepage"></div>
 
26
<div class="refnamediv">
 
27
<h2>Name</h2>
 
28
<p>dig &#8212; DNS lookup utility</p>
 
29
</div>
 
30
<div class="refsynopsisdiv">
 
31
<h2>Synopsis</h2>
 
32
<div class="cmdsynopsis"><p><code class="command">dig</code>  [@server] [<code class="option">-b <em class="replaceable"><code>address</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-f <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-k <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port#</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-x <em class="replaceable"><code>addr</code></em></code>] [<code class="option">-y <em class="replaceable"><code>name:key</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] [name] [type] [class] [queryopt...]</p></div>
 
33
<div class="cmdsynopsis"><p><code class="command">dig</code>  [<code class="option">-h</code>]</p></div>
 
34
<div class="cmdsynopsis"><p><code class="command">dig</code>  [global-queryopt...] [query...]</p></div>
 
35
</div>
 
36
<div class="refsect1" lang="en">
 
37
<a name="id2525976"></a><h2>DESCRIPTION</h2>
 
38
<p>
 
39
<span><strong class="command">dig</strong></span> (domain information groper) is a flexible tool
140
40
for interrogating DNS name servers.  It performs DNS lookups and
141
41
displays the answers that are returned from the name server(s) that
142
 
were queried.  Most DNS administrators use <B
143
 
CLASS="COMMAND"
144
 
>dig</B
145
 
> to
 
42
were queried.  Most DNS administrators use <span><strong class="command">dig</strong></span> to
146
43
troubleshoot DNS problems because of its flexibility, ease of use and
147
44
clarity of output.  Other lookup tools tend to have less functionality
148
 
than <B
149
 
CLASS="COMMAND"
150
 
>dig</B
151
 
>.</P
152
 
><P
153
 
>Although <B
154
 
CLASS="COMMAND"
155
 
>dig</B
156
 
> is normally used with command-line
 
45
than <span><strong class="command">dig</strong></span>.
 
46
</p>
 
47
<p>
 
48
Although <span><strong class="command">dig</strong></span> is normally used with command-line
157
49
arguments, it also has a batch mode of operation for reading lookup
158
50
requests from a file.  A brief summary of its command-line arguments
159
 
and options is printed when the <VAR
160
 
CLASS="OPTION"
161
 
>-h</VAR
162
 
> option is given.
 
51
and options is printed when the <code class="option">-h</code> option is given.
163
52
Unlike earlier versions, the BIND9 implementation of
164
 
<B
165
 
CLASS="COMMAND"
166
 
>dig</B
167
 
> allows multiple lookups to be issued from the
168
 
command line.</P
169
 
><P
170
 
>Unless it is told to query a specific name server,
171
 
<B
172
 
CLASS="COMMAND"
173
 
>dig</B
174
 
> will try each of the servers listed in
175
 
<TT
176
 
CLASS="FILENAME"
177
 
>/etc/resolv.conf</TT
178
 
>.</P
179
 
><P
180
 
>When no command line arguments or options are given, will perform an
181
 
NS query for "." (the root).</P
182
 
><P
183
 
>It is possible to set per-user defaults for <B
184
 
CLASS="COMMAND"
185
 
>dig</B
186
 
> via
187
 
<TT
188
 
CLASS="FILENAME"
189
 
>${HOME}/.digrc</TT
190
 
>.  This file is read and any options in it
191
 
are applied before the command line arguments.</P
192
 
></DIV
193
 
><DIV
194
 
CLASS="REFSECT1"
195
 
><A
196
 
NAME="AEN72"
197
 
></A
198
 
><H2
199
 
>SIMPLE USAGE</H2
200
 
><P
201
 
>A typical invocation of <B
202
 
CLASS="COMMAND"
203
 
>dig</B
204
 
> looks like:
205
 
<PRE
206
 
CLASS="PROGRAMLISTING"
207
 
> dig @server name type </PRE
208
 
> where:
 
53
<span><strong class="command">dig</strong></span> allows multiple lookups to be issued from the
 
54
command line.
 
55
</p>
 
56
<p>
 
57
Unless it is told to query a specific name server,
 
58
<span><strong class="command">dig</strong></span> will try each of the servers listed in
 
59
<code class="filename">/etc/resolv.conf</code>.
 
60
</p>
 
61
<p>
 
62
When no command line arguments or options are given, will perform an
 
63
NS query for "." (the root).
 
64
</p>
 
65
<p>
 
66
It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
 
67
<code class="filename">${HOME}/.digrc</code>.  This file is read and any options in it
 
68
are applied before the command line arguments.
 
69
</p>
 
70
</div>
 
71
<div class="refsect1" lang="en">
 
72
<a name="id2526035"></a><h2>SIMPLE USAGE</h2>
 
73
<p>
 
74
A typical invocation of <span><strong class="command">dig</strong></span> looks like:
 
75
</p>
 
76
<pre class="programlisting"> dig @server name type </pre>
 
77
<p> where:
209
78
 
210
 
<P
211
 
></P
212
 
><DIV
213
 
CLASS="VARIABLELIST"
214
 
><DL
215
 
><DT
216
 
><CODE
217
 
CLASS="CONSTANT"
218
 
>server</CODE
219
 
></DT
220
 
><DD
221
 
><P
222
 
>is the name or IP address of the name server to query.  This can be an IPv4
 
79
</p>
 
80
<div class="variablelist"><dl>
 
81
<dt><span class="term"><code class="constant">server</code></span></dt>
 
82
<dd><p>
 
83
is the name or IP address of the name server to query.  This can be an IPv4
223
84
address in dotted-decimal notation or an IPv6
224
85
address in colon-delimited notation.  When the supplied
225
 
<VAR
226
 
CLASS="PARAMETER"
227
 
>server</VAR
228
 
> argument is a hostname,
229
 
<B
230
 
CLASS="COMMAND"
231
 
>dig</B
232
 
> resolves that name before querying that name
233
 
server.  If no <VAR
234
 
CLASS="PARAMETER"
235
 
>server</VAR
236
 
> argument is provided,
237
 
<B
238
 
CLASS="COMMAND"
239
 
>dig</B
240
 
> consults <TT
241
 
CLASS="FILENAME"
242
 
>/etc/resolv.conf</TT
243
 
>
 
86
<em class="parameter"><code>server</code></em> argument is a hostname,
 
87
<span><strong class="command">dig</strong></span> resolves that name before querying that name
 
88
server.  If no <em class="parameter"><code>server</code></em> argument is provided,
 
89
<span><strong class="command">dig</strong></span> consults <code class="filename">/etc/resolv.conf</code>
244
90
and queries the name servers listed there.  The reply from the name
245
 
server that responds is displayed.</P
246
 
></DD
247
 
><DT
248
 
><CODE
249
 
CLASS="CONSTANT"
250
 
>name</CODE
251
 
></DT
252
 
><DD
253
 
><P
254
 
>is the name of the resource record that is to be looked up.</P
255
 
></DD
256
 
><DT
257
 
><CODE
258
 
CLASS="CONSTANT"
259
 
>type</CODE
260
 
></DT
261
 
><DD
262
 
><P
263
 
>indicates what type of query is required &mdash;
 
91
server that responds is displayed.
 
92
</p></dd>
 
93
<dt><span class="term"><code class="constant">name</code></span></dt>
 
94
<dd><p>
 
95
is the name of the resource record that is to be looked up.
 
96
</p></dd>
 
97
<dt><span class="term"><code class="constant">type</code></span></dt>
 
98
<dd><p>
 
99
indicates what type of query is required &#8212;
264
100
ANY, A, MX, SIG, etc.
265
 
<VAR
266
 
CLASS="PARAMETER"
267
 
>type</VAR
268
 
> can be any valid query type.  If no
269
 
<VAR
270
 
CLASS="PARAMETER"
271
 
>type</VAR
272
 
> argument is supplied,
273
 
<B
274
 
CLASS="COMMAND"
275
 
>dig</B
276
 
> will perform a lookup for an A record.</P
277
 
></DD
278
 
></DL
279
 
></DIV
280
 
></P
281
 
></DIV
282
 
><DIV
283
 
CLASS="REFSECT1"
284
 
><A
285
 
NAME="AEN101"
286
 
></A
287
 
><H2
288
 
>OPTIONS</H2
289
 
><P
290
 
>The <VAR
291
 
CLASS="OPTION"
292
 
>-b</VAR
293
 
> option sets the source IP address of the query
294
 
to <VAR
295
 
CLASS="PARAMETER"
296
 
>address</VAR
297
 
>.  This must be a valid address on
 
101
<em class="parameter"><code>type</code></em> can be any valid query type.  If no
 
102
<em class="parameter"><code>type</code></em> argument is supplied,
 
103
<span><strong class="command">dig</strong></span> will perform a lookup for an A record.
 
104
</p></dd>
 
105
</dl></div>
 
106
<p>
 
107
</p>
 
108
</div>
 
109
<div class="refsect1" lang="en">
 
110
<a name="id2526114"></a><h2>OPTIONS</h2>
 
111
<p>
 
112
The <code class="option">-b</code> option sets the source IP address of the query
 
113
to <em class="parameter"><code>address</code></em>.  This must be a valid address on
298
114
one of the host's network interfaces or "0.0.0.0" or "::".  An optional port
299
 
may be specified by appending "#&lt;port&gt;"</P
300
 
><P
301
 
>The default query class (IN for internet) is overridden by the
302
 
<VAR
303
 
CLASS="OPTION"
304
 
>-c</VAR
305
 
> option.  <VAR
306
 
CLASS="PARAMETER"
307
 
>class</VAR
308
 
> is any valid
309
 
class, such as HS for Hesiod records or CH for CHAOSNET records.</P
310
 
><P
311
 
>The <VAR
312
 
CLASS="OPTION"
313
 
>-f</VAR
314
 
> option makes <B
315
 
CLASS="COMMAND"
316
 
>dig </B
317
 
> operate
 
115
may be specified by appending "#&lt;port&gt;"
 
116
</p>
 
117
<p>
 
118
The default query class (IN for internet) is overridden by the
 
119
<code class="option">-c</code> option.  <em class="parameter"><code>class</code></em> is any valid
 
120
class, such as HS for Hesiod records or CH for CHAOSNET records.
 
121
</p>
 
122
<p>
 
123
The <code class="option">-f</code> option makes <span><strong class="command">dig </strong></span> operate
318
124
in batch mode by reading a list of lookup requests to process from the
319
 
file <VAR
320
 
CLASS="PARAMETER"
321
 
>filename</VAR
322
 
>.  The file contains a number of
 
125
file <em class="parameter"><code>filename</code></em>.  The file contains a number of
323
126
queries, one per line.  Each entry in the file should be organised in
324
127
the same way they would be presented as queries to
325
 
<B
326
 
CLASS="COMMAND"
327
 
>dig</B
328
 
> using the command-line interface.</P
329
 
><P
330
 
>If a non-standard port number is to be queried, the
331
 
<VAR
332
 
CLASS="OPTION"
333
 
>-p</VAR
334
 
> option is used.  <VAR
335
 
CLASS="PARAMETER"
336
 
>port#</VAR
337
 
> is
338
 
the port number that <B
339
 
CLASS="COMMAND"
340
 
>dig</B
341
 
> will send its queries
 
128
<span><strong class="command">dig</strong></span> using the command-line interface.
 
129
</p>
 
130
<p>
 
131
If a non-standard port number is to be queried, the
 
132
<code class="option">-p</code> option is used.  <em class="parameter"><code>port#</code></em> is
 
133
the port number that <span><strong class="command">dig</strong></span> will send its queries
342
134
instead of the standard DNS port number 53.  This option would be used
343
135
to test a name server that has been configured to listen for queries
344
 
on a non-standard port number.</P
345
 
><P
346
 
>The <VAR
347
 
CLASS="OPTION"
348
 
>-4</VAR
349
 
> option forces <B
350
 
CLASS="COMMAND"
351
 
>dig</B
352
 
> to only
353
 
use IPv4 query transport.  The <VAR
354
 
CLASS="OPTION"
355
 
>-6</VAR
356
 
> option forces
357
 
<B
358
 
CLASS="COMMAND"
359
 
>dig</B
360
 
> to only use IPv6 query transport.</P
361
 
><P
362
 
>The <VAR
363
 
CLASS="OPTION"
364
 
>-t</VAR
365
 
> option sets the query type to
366
 
<VAR
367
 
CLASS="PARAMETER"
368
 
>type</VAR
369
 
>.  It can be any valid query type which is
 
136
on a non-standard port number.
 
137
</p>
 
138
<p>
 
139
The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span> to only
 
140
use IPv4 query transport.  The <code class="option">-6</code> option forces
 
141
<span><strong class="command">dig</strong></span> to only use IPv6 query transport.
 
142
</p>
 
143
<p>
 
144
The <code class="option">-t</code> option sets the query type to
 
145
<em class="parameter"><code>type</code></em>.  It can be any valid query type which is
370
146
supported in BIND9.  The default query type "A", unless the
371
 
<VAR
372
 
CLASS="OPTION"
373
 
>-x</VAR
374
 
> option is supplied to indicate a reverse lookup.
 
147
<code class="option">-x</code> option is supplied to indicate a reverse lookup.
375
148
A zone transfer can be requested by specifying a type of AXFR.  When
376
149
an incremental zone transfer (IXFR) is required,
377
 
<VAR
378
 
CLASS="PARAMETER"
379
 
>type</VAR
380
 
> is set to <VAR
381
 
CLASS="LITERAL"
382
 
>ixfr=N</VAR
383
 
>.
 
150
<em class="parameter"><code>type</code></em> is set to <code class="literal">ixfr=N</code>.
384
151
The incremental zone transfer will contain the changes made to the zone
385
152
since the serial number in the zone's SOA record was
386
 
<VAR
387
 
CLASS="PARAMETER"
388
 
>N</VAR
389
 
>.</P
390
 
><P
391
 
>Reverse lookups - mapping addresses to names - are simplified by the
392
 
<VAR
393
 
CLASS="OPTION"
394
 
>-x</VAR
395
 
> option.  <VAR
396
 
CLASS="PARAMETER"
397
 
>addr</VAR
398
 
> is an IPv4
 
153
<em class="parameter"><code>N</code></em>.
 
154
</p>
 
155
<p>
 
156
Reverse lookups - mapping addresses to names - are simplified by the
 
157
<code class="option">-x</code> option.  <em class="parameter"><code>addr</code></em> is an IPv4
399
158
address in dotted-decimal notation, or a colon-delimited IPv6 address.
400
159
When this option is used, there is no need to provide the
401
 
<VAR
402
 
CLASS="PARAMETER"
403
 
>name</VAR
404
 
>, <VAR
405
 
CLASS="PARAMETER"
406
 
>class</VAR
407
 
> and
408
 
<VAR
409
 
CLASS="PARAMETER"
410
 
>type</VAR
411
 
> arguments.  <B
412
 
CLASS="COMMAND"
413
 
>dig</B
414
 
>
 
160
<em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em> and
 
161
<em class="parameter"><code>type</code></em> arguments.  <span><strong class="command">dig</strong></span>
415
162
automatically performs a lookup for a name like
416
 
<VAR
417
 
CLASS="LITERAL"
418
 
>11.12.13.10.in-addr.arpa</VAR
419
 
> and sets the query type and
 
163
<code class="literal">11.12.13.10.in-addr.arpa</code> and sets the query type and
420
164
class to PTR and IN respectively.  By default, IPv6 addresses are
421
165
looked up using nibble format under the IP6.ARPA domain.
422
166
To use the older RFC1886 method using the IP6.INT domain 
423
 
specify the <VAR
424
 
CLASS="OPTION"
425
 
>-i</VAR
426
 
> option.  Bit string labels (RFC2874)
427
 
are now experimental and are not attempted.</P
428
 
><P
429
 
>To sign the DNS queries sent by <B
430
 
CLASS="COMMAND"
431
 
>dig</B
432
 
> and their
 
167
specify the <code class="option">-i</code> option.  Bit string labels (RFC2874)
 
168
are now experimental and are not attempted.
 
169
</p>
 
170
<p>
 
171
To sign the DNS queries sent by <span><strong class="command">dig</strong></span> and their
433
172
responses using transaction signatures (TSIG), specify a TSIG key file
434
 
using the <VAR
435
 
CLASS="OPTION"
436
 
>-k</VAR
437
 
> option.  You can also specify the TSIG
438
 
key itself on the command line using the <VAR
439
 
CLASS="OPTION"
440
 
>-y</VAR
441
 
> option;
442
 
<VAR
443
 
CLASS="PARAMETER"
444
 
>name</VAR
445
 
> is the name of the TSIG key and
446
 
<VAR
447
 
CLASS="PARAMETER"
448
 
>key</VAR
449
 
> is the actual key.  The key is a base-64
450
 
encoded string, typically generated by <SPAN
451
 
CLASS="CITEREFENTRY"
452
 
><SPAN
453
 
CLASS="REFENTRYTITLE"
454
 
>dnssec-keygen</SPAN
455
 
>(8)</SPAN
456
 
>.
 
173
using the <code class="option">-k</code> option.  You can also specify the TSIG
 
174
key itself on the command line using the <code class="option">-y</code> option;
 
175
<em class="parameter"><code>name</code></em> is the name of the TSIG key and
 
176
<em class="parameter"><code>key</code></em> is the actual key.  The key is a base-64
 
177
encoded string, typically generated by <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
457
178
 
458
 
Caution should be taken when using the <VAR
459
 
CLASS="OPTION"
460
 
>-y</VAR
461
 
> option on
 
179
Caution should be taken when using the <code class="option">-y</code> option on
462
180
multi-user systems as the key can be visible in the output from
463
 
<SPAN
464
 
CLASS="CITEREFENTRY"
465
 
><SPAN
466
 
CLASS="REFENTRYTITLE"
467
 
>ps</SPAN
468
 
>(1)</SPAN
469
 
> or in the shell's history file.  When
470
 
using TSIG authentication with <B
471
 
CLASS="COMMAND"
472
 
>dig</B
473
 
>, the name
 
181
<span class="citerefentry"><span class="refentrytitle">ps</span>(1
 
182
)</span> or in the shell's history file.  When
 
183
using TSIG authentication with <span><strong class="command">dig</strong></span>, the name
474
184
server that is queried needs to know the key and algorithm that is
475
185
being used.  In BIND, this is done by providing appropriate
476
 
<B
477
 
CLASS="COMMAND"
478
 
>key</B
479
 
> and <B
480
 
CLASS="COMMAND"
481
 
>server</B
482
 
> statements in
483
 
<TT
484
 
CLASS="FILENAME"
485
 
>named.conf</TT
486
 
>.</P
487
 
></DIV
488
 
><DIV
489
 
CLASS="REFSECT1"
490
 
><A
491
 
NAME="AEN156"
492
 
></A
493
 
><H2
494
 
>QUERY OPTIONS</H2
495
 
><P
496
 
><B
497
 
CLASS="COMMAND"
498
 
>dig</B
499
 
> provides a number of query options which affect
 
186
<span><strong class="command">key</strong></span> and <span><strong class="command">server</strong></span> statements in
 
187
<code class="filename">named.conf</code>.
 
188
</p>
 
189
</div>
 
190
<div class="refsect1" lang="en">
 
191
<a name="id2526365"></a><h2>QUERY OPTIONS</h2>
 
192
<p>
 
193
<span><strong class="command">dig</strong></span> provides a number of query options which affect
500
194
the way in which lookups are made and the results displayed.  Some of
501
195
these set or reset flag bits in the query header, some determine which
502
196
sections of the answer get printed, and others determine the timeout
503
 
and retry strategies.</P
504
 
><P
505
 
>Each query option is identified by a keyword preceded by a plus sign
506
 
(<VAR
507
 
CLASS="LITERAL"
508
 
>+</VAR
509
 
>).  Some keywords set or reset an option.  These may be preceded
510
 
by the string <VAR
511
 
CLASS="LITERAL"
512
 
>no</VAR
513
 
> to negate the meaning of that keyword.  Other
 
197
and retry strategies.
 
198
</p>
 
199
<p>
 
200
Each query option is identified by a keyword preceded by a plus sign
 
201
(<code class="literal">+</code>).  Some keywords set or reset an option.  These may be preceded
 
202
by the string <code class="literal">no</code> to negate the meaning of that keyword.  Other
514
203
keywords assign values to options like the timeout interval.  They
515
 
have the form <VAR
516
 
CLASS="OPTION"
517
 
>+keyword=value</VAR
518
 
>.
 
204
have the form <code class="option">+keyword=value</code>.
519
205
The query options are:
520
206
 
521
 
<P
522
 
></P
523
 
><DIV
524
 
CLASS="VARIABLELIST"
525
 
><DL
526
 
><DT
527
 
><VAR
528
 
CLASS="OPTION"
529
 
>+[no]tcp</VAR
530
 
></DT
531
 
><DD
532
 
><P
533
 
>Use [do not use] TCP when querying name servers.  The default
 
207
</p>
 
208
<div class="variablelist"><dl>
 
209
<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
 
210
<dd><p>
 
211
Use [do not use] TCP when querying name servers.  The default
534
212
behaviour is to use UDP unless an AXFR or IXFR query is requested, in
535
 
which case a TCP connection is used.</P
536
 
></DD
537
 
><DT
538
 
><VAR
539
 
CLASS="OPTION"
540
 
>+[no]vc</VAR
541
 
></DT
542
 
><DD
543
 
><P
544
 
>Use [do not use] TCP when querying name servers.  This alternate
545
 
syntax to <VAR
546
 
CLASS="PARAMETER"
547
 
>+[no]tcp</VAR
548
 
> is provided for backwards
549
 
compatibility.  The "vc" stands for "virtual circuit".</P
550
 
></DD
551
 
><DT
552
 
><VAR
553
 
CLASS="OPTION"
554
 
>+[no]ignore</VAR
555
 
></DT
556
 
><DD
557
 
><P
558
 
>Ignore truncation in UDP responses instead of retrying with TCP.  By
559
 
default, TCP retries are performed.</P
560
 
></DD
561
 
><DT
562
 
><VAR
563
 
CLASS="OPTION"
564
 
>+domain=somename</VAR
565
 
></DT
566
 
><DD
567
 
><P
568
 
>Set the search list to contain the single domain
569
 
<VAR
570
 
CLASS="PARAMETER"
571
 
>somename</VAR
572
 
>, as if specified in a
573
 
<B
574
 
CLASS="COMMAND"
575
 
>domain</B
576
 
> directive in
577
 
<TT
578
 
CLASS="FILENAME"
579
 
>/etc/resolv.conf</TT
580
 
>, and enable search list
581
 
processing as if the <VAR
582
 
CLASS="PARAMETER"
583
 
>+search</VAR
584
 
> option were given.</P
585
 
></DD
586
 
><DT
587
 
><VAR
588
 
CLASS="OPTION"
589
 
>+[no]search</VAR
590
 
></DT
591
 
><DD
592
 
><P
593
 
>Use [do not use] the search list defined by the searchlist or domain
594
 
directive in <TT
595
 
CLASS="FILENAME"
596
 
>resolv.conf</TT
597
 
> (if any).
598
 
The search list is not used by default.</P
599
 
></DD
600
 
><DT
601
 
><VAR
602
 
CLASS="OPTION"
603
 
>+[no]defname</VAR
604
 
></DT
605
 
><DD
606
 
><P
607
 
>Deprecated, treated as a synonym for <VAR
608
 
CLASS="PARAMETER"
609
 
>+[no]search</VAR
610
 
></P
611
 
></DD
612
 
><DT
613
 
><VAR
614
 
CLASS="OPTION"
615
 
>+[no]aaonly</VAR
616
 
></DT
617
 
><DD
618
 
><P
619
 
>Sets the "aa" flag in the query.</P
620
 
></DD
621
 
><DT
622
 
><VAR
623
 
CLASS="OPTION"
624
 
>+[no]aaflag</VAR
625
 
></DT
626
 
><DD
627
 
><P
628
 
>A synonym for <VAR
629
 
CLASS="PARAMETER"
630
 
>+[no]aaonly</VAR
631
 
>.</P
632
 
></DD
633
 
><DT
634
 
><VAR
635
 
CLASS="OPTION"
636
 
>+[no]adflag</VAR
637
 
></DT
638
 
><DD
639
 
><P
640
 
>Set [do not set] the AD (authentic data) bit in the query.  The AD bit
 
213
which case a TCP connection is used.
 
214
</p></dd>
 
215
<dt><span class="term"><code class="option">+[no]vc</code></span></dt>
 
216
<dd><p>
 
217
Use [do not use] TCP when querying name servers.  This alternate
 
218
syntax to <em class="parameter"><code>+[no]tcp</code></em> is provided for backwards
 
219
compatibility.  The "vc" stands for "virtual circuit".
 
220
</p></dd>
 
221
<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
 
222
<dd><p>
 
223
Ignore truncation in UDP responses instead of retrying with TCP.  By
 
224
default, TCP retries are performed.
 
225
</p></dd>
 
226
<dt><span class="term"><code class="option">+domain=somename</code></span></dt>
 
227
<dd><p>
 
228
Set the search list to contain the single domain
 
229
<em class="parameter"><code>somename</code></em>, as if specified in a
 
230
<span><strong class="command">domain</strong></span> directive in
 
231
<code class="filename">/etc/resolv.conf</code>, and enable search list
 
232
processing as if the <em class="parameter"><code>+search</code></em> option were given.
 
233
</p></dd>
 
234
<dt><span class="term"><code class="option">+[no]search</code></span></dt>
 
235
<dd><p>
 
236
Use [do not use] the search list defined by the searchlist or domain
 
237
directive in <code class="filename">resolv.conf</code> (if any).
 
238
The search list is not used by default.
 
239
</p></dd>
 
240
<dt><span class="term"><code class="option">+[no]defname</code></span></dt>
 
241
<dd><p>
 
242
Deprecated, treated as a synonym for <em class="parameter"><code>+[no]search</code></em>
 
243
</p></dd>
 
244
<dt><span class="term"><code class="option">+[no]aaonly</code></span></dt>
 
245
<dd><p>
 
246
Sets the "aa" flag in the query.
 
247
</p></dd>
 
248
<dt><span class="term"><code class="option">+[no]aaflag</code></span></dt>
 
249
<dd><p>
 
250
A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
 
251
</p></dd>
 
252
<dt><span class="term"><code class="option">+[no]adflag</code></span></dt>
 
253
<dd><p>
 
254
Set [do not set] the AD (authentic data) bit in the query.  The AD bit
641
255
currently has a standard meaning only in responses, not in queries,
642
256
but the ability to set the bit in the query is provided for
643
 
completeness.</P
644
 
></DD
645
 
><DT
646
 
><VAR
647
 
CLASS="OPTION"
648
 
>+[no]cdflag</VAR
649
 
></DT
650
 
><DD
651
 
><P
652
 
>Set [do not set] the CD (checking disabled) bit in the query.  This
653
 
requests the server to not perform DNSSEC validation of responses.</P
654
 
></DD
655
 
><DT
656
 
><VAR
657
 
CLASS="OPTION"
658
 
>+[no]cl</VAR
659
 
></DT
660
 
><DD
661
 
><P
662
 
>Display [do not display] the CLASS when printing the record.</P
663
 
></DD
664
 
><DT
665
 
><VAR
666
 
CLASS="OPTION"
667
 
>+[no]ttlid</VAR
668
 
></DT
669
 
><DD
670
 
><P
671
 
>Display [do not display] the TTL when printing the record.</P
672
 
></DD
673
 
><DT
674
 
><VAR
675
 
CLASS="OPTION"
676
 
>+[no]recurse</VAR
677
 
></DT
678
 
><DD
679
 
><P
680
 
>Toggle the setting of the RD (recursion desired) bit in the query.
681
 
This bit is set by default, which means <B
682
 
CLASS="COMMAND"
683
 
>dig</B
684
 
>
 
257
completeness.
 
258
</p></dd>
 
259
<dt><span class="term"><code class="option">+[no]cdflag</code></span></dt>
 
260
<dd><p>
 
261
Set [do not set] the CD (checking disabled) bit in the query.  This
 
262
requests the server to not perform DNSSEC validation of responses.
 
263
</p></dd>
 
264
<dt><span class="term"><code class="option">+[no]cl</code></span></dt>
 
265
<dd><p>
 
266
Display [do not display] the CLASS when printing the record.
 
267
</p></dd>
 
268
<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
 
269
<dd><p>
 
270
Display [do not display] the TTL when printing the record.
 
271
</p></dd>
 
272
<dt><span class="term"><code class="option">+[no]recurse</code></span></dt>
 
273
<dd><p>
 
274
Toggle the setting of the RD (recursion desired) bit in the query.
 
275
This bit is set by default, which means <span><strong class="command">dig</strong></span>
685
276
normally sends recursive queries.  Recursion is automatically disabled
686
 
when the <VAR
687
 
CLASS="PARAMETER"
688
 
>+nssearch</VAR
689
 
> or
690
 
<VAR
691
 
CLASS="PARAMETER"
692
 
>+trace</VAR
693
 
> query options are used.</P
694
 
></DD
695
 
><DT
696
 
><VAR
697
 
CLASS="OPTION"
698
 
>+[no]nssearch</VAR
699
 
></DT
700
 
><DD
701
 
><P
702
 
>When this option is set, <B
703
 
CLASS="COMMAND"
704
 
>dig</B
705
 
> attempts to find the
 
277
when the <em class="parameter"><code>+nssearch</code></em> or
 
278
<em class="parameter"><code>+trace</code></em> query options are used.
 
279
</p></dd>
 
280
<dt><span class="term"><code class="option">+[no]nssearch</code></span></dt>
 
281
<dd><p>
 
282
When this option is set, <span><strong class="command">dig</strong></span> attempts to find the
706
283
authoritative name servers for the zone containing the name being
707
284
looked up and display the SOA record that each name server has for the
708
 
zone.</P
709
 
></DD
710
 
><DT
711
 
><VAR
712
 
CLASS="OPTION"
713
 
>+[no]trace</VAR
714
 
></DT
715
 
><DD
716
 
><P
717
 
>Toggle tracing of the delegation path from the root name servers for
 
285
zone.
 
286
</p></dd>
 
287
<dt><span class="term"><code class="option">+[no]trace</code></span></dt>
 
288
<dd><p>
 
289
Toggle tracing of the delegation path from the root name servers for
718
290
the name being looked up.  Tracing is disabled by default.  When
719
 
tracing is enabled, <B
720
 
CLASS="COMMAND"
721
 
>dig</B
722
 
> makes iterative queries to
 
291
tracing is enabled, <span><strong class="command">dig</strong></span> makes iterative queries to
723
292
resolve the name being looked up.  It will follow referrals from the
724
293
root servers, showing the answer from each server that was used to
725
 
resolve the lookup.</P
726
 
></DD
727
 
><DT
728
 
><VAR
729
 
CLASS="OPTION"
730
 
>+[no]cmd</VAR
731
 
></DT
732
 
><DD
733
 
><P
734
 
>toggles the printing of the initial comment in the output identifying
735
 
the version of <B
736
 
CLASS="COMMAND"
737
 
>dig</B
738
 
> and the query options that have
739
 
been applied.  This comment is printed by default.</P
740
 
></DD
741
 
><DT
742
 
><VAR
743
 
CLASS="OPTION"
744
 
>+[no]short</VAR
745
 
></DT
746
 
><DD
747
 
><P
748
 
>Provide a terse answer.  The default is to print the answer in a
749
 
verbose form.</P
750
 
></DD
751
 
><DT
752
 
><VAR
753
 
CLASS="OPTION"
754
 
>+[no]identify</VAR
755
 
></DT
756
 
><DD
757
 
><P
758
 
>Show [or do not show] the IP address and port number that supplied the
759
 
answer when the <VAR
760
 
CLASS="PARAMETER"
761
 
>+short</VAR
762
 
> option is enabled.  If
 
294
resolve the lookup.
 
295
</p></dd>
 
296
<dt><span class="term"><code class="option">+[no]cmd</code></span></dt>
 
297
<dd><p>
 
298
toggles the printing of the initial comment in the output identifying
 
299
the version of <span><strong class="command">dig</strong></span> and the query options that have
 
300
been applied.  This comment is printed by default.
 
301
</p></dd>
 
302
<dt><span class="term"><code class="option">+[no]short</code></span></dt>
 
303
<dd><p>
 
304
Provide a terse answer.  The default is to print the answer in a
 
305
verbose form.
 
306
</p></dd>
 
307
<dt><span class="term"><code class="option">+[no]identify</code></span></dt>
 
308
<dd><p>
 
309
Show [or do not show] the IP address and port number that supplied the
 
310
answer when the <em class="parameter"><code>+short</code></em> option is enabled.  If
763
311
short form answers are requested, the default is not to show the
764
 
source address and port number of the server that provided the answer.</P
765
 
></DD
766
 
><DT
767
 
><VAR
768
 
CLASS="OPTION"
769
 
>+[no]comments</VAR
770
 
></DT
771
 
><DD
772
 
><P
773
 
>Toggle the display of comment lines in the output.  The default is to
774
 
print comments.</P
775
 
></DD
776
 
><DT
777
 
><VAR
778
 
CLASS="OPTION"
779
 
>+[no]stats</VAR
780
 
></DT
781
 
><DD
782
 
><P
783
 
>This query option toggles the printing of statistics: when the query
 
312
source address and port number of the server that provided the answer.
 
313
</p></dd>
 
314
<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
 
315
<dd><p>
 
316
Toggle the display of comment lines in the output.  The default is to
 
317
print comments.
 
318
</p></dd>
 
319
<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
 
320
<dd><p>
 
321
This query option toggles the printing of statistics: when the query
784
322
was made, the size of the reply and so on.  The default behaviour is
785
 
to print the query statistics.</P
786
 
></DD
787
 
><DT
788
 
><VAR
789
 
CLASS="OPTION"
790
 
>+[no]qr</VAR
791
 
></DT
792
 
><DD
793
 
><P
794
 
>Print [do not print] the query as it is sent.
795
 
By default, the query is not printed.</P
796
 
></DD
797
 
><DT
798
 
><VAR
799
 
CLASS="OPTION"
800
 
>+[no]question</VAR
801
 
></DT
802
 
><DD
803
 
><P
804
 
>Print [do not print] the question section of a query when an answer is
805
 
returned.  The default is to print the question section as a comment.</P
806
 
></DD
807
 
><DT
808
 
><VAR
809
 
CLASS="OPTION"
810
 
>+[no]answer</VAR
811
 
></DT
812
 
><DD
813
 
><P
814
 
>Display [do not display] the answer section of a reply.  The default
815
 
is to display it.</P
816
 
></DD
817
 
><DT
818
 
><VAR
819
 
CLASS="OPTION"
820
 
>+[no]authority</VAR
821
 
></DT
822
 
><DD
823
 
><P
824
 
>Display [do not display] the authority section of a reply.  The
825
 
default is to display it.</P
826
 
></DD
827
 
><DT
828
 
><VAR
829
 
CLASS="OPTION"
830
 
>+[no]additional</VAR
831
 
></DT
832
 
><DD
833
 
><P
834
 
>Display [do not display] the additional section of a reply.
835
 
The default is to display it.</P
836
 
></DD
837
 
><DT
838
 
><VAR
839
 
CLASS="OPTION"
840
 
>+[no]all</VAR
841
 
></DT
842
 
><DD
843
 
><P
844
 
>Set or clear all display flags.</P
845
 
></DD
846
 
><DT
847
 
><VAR
848
 
CLASS="OPTION"
849
 
>+time=T</VAR
850
 
></DT
851
 
><DD
852
 
><P
853
 
>&#13;Sets the timeout for a query to
854
 
<VAR
855
 
CLASS="PARAMETER"
856
 
>T</VAR
857
 
> seconds.  The default time out is 5 seconds.
858
 
An attempt to set <VAR
859
 
CLASS="PARAMETER"
860
 
>T</VAR
861
 
> to less than 1 will result
862
 
in a query timeout of 1 second being applied.</P
863
 
></DD
864
 
><DT
865
 
><VAR
866
 
CLASS="OPTION"
867
 
>+tries=T</VAR
868
 
></DT
869
 
><DD
870
 
><P
871
 
>Sets the number of times to try UDP queries to server to
872
 
<VAR
873
 
CLASS="PARAMETER"
874
 
>T</VAR
875
 
> instead of the default, 3.  If
876
 
<VAR
877
 
CLASS="PARAMETER"
878
 
>T</VAR
879
 
> is less than or equal to zero, the number of
880
 
tries is silently rounded up to 1.</P
881
 
></DD
882
 
><DT
883
 
><VAR
884
 
CLASS="OPTION"
885
 
>+retry=T</VAR
886
 
></DT
887
 
><DD
888
 
><P
889
 
>Sets the number of times to retry UDP queries to server to
890
 
<VAR
891
 
CLASS="PARAMETER"
892
 
>T</VAR
893
 
> instead of the default, 2.  Unlike
894
 
<VAR
895
 
CLASS="PARAMETER"
896
 
>+tries</VAR
897
 
>, this does not include the initial
898
 
query.</P
899
 
></DD
900
 
><DT
901
 
><VAR
902
 
CLASS="OPTION"
903
 
>+ndots=D</VAR
904
 
></DT
905
 
><DD
906
 
><P
907
 
>Set the number of dots that have to appear in
908
 
<VAR
909
 
CLASS="PARAMETER"
910
 
>name</VAR
911
 
> to <VAR
912
 
CLASS="PARAMETER"
913
 
>D</VAR
914
 
> for it to be
 
323
to print the query statistics.
 
324
</p></dd>
 
325
<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
 
326
<dd><p>
 
327
Print [do not print] the query as it is sent.
 
328
By default, the query is not printed.
 
329
</p></dd>
 
330
<dt><span class="term"><code class="option">+[no]question</code></span></dt>
 
331
<dd><p>
 
332
Print [do not print] the question section of a query when an answer is
 
333
returned.  The default is to print the question section as a comment.
 
334
</p></dd>
 
335
<dt><span class="term"><code class="option">+[no]answer</code></span></dt>
 
336
<dd><p>
 
337
Display [do not display] the answer section of a reply.  The default
 
338
is to display it.
 
339
</p></dd>
 
340
<dt><span class="term"><code class="option">+[no]authority</code></span></dt>
 
341
<dd><p>
 
342
Display [do not display] the authority section of a reply.  The
 
343
default is to display it.
 
344
</p></dd>
 
345
<dt><span class="term"><code class="option">+[no]additional</code></span></dt>
 
346
<dd><p>
 
347
Display [do not display] the additional section of a reply.
 
348
The default is to display it.
 
349
</p></dd>
 
350
<dt><span class="term"><code class="option">+[no]all</code></span></dt>
 
351
<dd><p>
 
352
Set or clear all display flags.
 
353
</p></dd>
 
354
<dt><span class="term"><code class="option">+time=T</code></span></dt>
 
355
<dd><p>
 
356
 
 
357
Sets the timeout for a query to
 
358
<em class="parameter"><code>T</code></em> seconds.  The default time out is 5 seconds.
 
359
An attempt to set <em class="parameter"><code>T</code></em> to less than 1 will result
 
360
in a query timeout of 1 second being applied.
 
361
</p></dd>
 
362
<dt><span class="term"><code class="option">+tries=T</code></span></dt>
 
363
<dd><p>
 
364
Sets the number of times to try UDP queries to server to
 
365
<em class="parameter"><code>T</code></em> instead of the default, 3.  If
 
366
<em class="parameter"><code>T</code></em> is less than or equal to zero, the number of
 
367
tries is silently rounded up to 1.
 
368
</p></dd>
 
369
<dt><span class="term"><code class="option">+retry=T</code></span></dt>
 
370
<dd><p>
 
371
Sets the number of times to retry UDP queries to server to
 
372
<em class="parameter"><code>T</code></em> instead of the default, 2.  Unlike
 
373
<em class="parameter"><code>+tries</code></em>, this does not include the initial
 
374
query.
 
375
</p></dd>
 
376
<dt><span class="term"><code class="option">+ndots=D</code></span></dt>
 
377
<dd><p>
 
378
Set the number of dots that have to appear in
 
379
<em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em> for it to be
915
380
considered absolute.  The default value is that defined using the
916
 
ndots statement in <TT
917
 
CLASS="FILENAME"
918
 
>/etc/resolv.conf</TT
919
 
>, or 1 if no
 
381
ndots statement in <code class="filename">/etc/resolv.conf</code>, or 1 if no
920
382
ndots statement is present.  Names with fewer dots are interpreted as
921
383
relative names and will be searched for in the domains listed in the
922
 
<VAR
923
 
CLASS="OPTION"
924
 
>search</VAR
925
 
> or <VAR
926
 
CLASS="OPTION"
927
 
>domain</VAR
928
 
> directive in
929
 
<TT
930
 
CLASS="FILENAME"
931
 
>/etc/resolv.conf</TT
932
 
>.</P
933
 
></DD
934
 
><DT
935
 
><VAR
936
 
CLASS="OPTION"
937
 
>+bufsize=B</VAR
938
 
></DT
939
 
><DD
940
 
><P
941
 
>Set the UDP message buffer size advertised using EDNS0 to
942
 
<VAR
943
 
CLASS="PARAMETER"
944
 
>B</VAR
945
 
> bytes.  The maximum and minimum sizes of this
 
384
<code class="option">search</code> or <code class="option">domain</code> directive in
 
385
<code class="filename">/etc/resolv.conf</code>.
 
386
</p></dd>
 
387
<dt><span class="term"><code class="option">+bufsize=B</code></span></dt>
 
388
<dd><p>
 
389
Set the UDP message buffer size advertised using EDNS0 to
 
390
<em class="parameter"><code>B</code></em> bytes.  The maximum and minimum sizes of this
946
391
buffer are 65535 and 0 respectively.  Values outside this range are
947
 
rounded up or down appropriately.</P
948
 
></DD
949
 
><DT
950
 
><VAR
951
 
CLASS="OPTION"
952
 
>+[no]multiline</VAR
953
 
></DT
954
 
><DD
955
 
><P
956
 
>Print records like the SOA records in a verbose multi-line
 
392
rounded up or down appropriately.
 
393
</p></dd>
 
394
<dt><span class="term"><code class="option">+[no]multiline</code></span></dt>
 
395
<dd><p>
 
396
Print records like the SOA records in a verbose multi-line
957
397
format with human-readable comments.  The default is to print
958
398
each record on a single line, to facilitate machine parsing 
959
 
of the <B
960
 
CLASS="COMMAND"
961
 
>dig</B
962
 
> output.</P
963
 
></DD
964
 
><DT
965
 
><VAR
966
 
CLASS="OPTION"
967
 
>+[no]fail</VAR
968
 
></DT
969
 
><DD
970
 
><P
971
 
>Do not try the next server if you receive a SERVFAIL.  The default is
 
399
of the <span><strong class="command">dig</strong></span> output.
 
400
</p></dd>
 
401
<dt><span class="term"><code class="option">+[no]fail</code></span></dt>
 
402
<dd><p>
 
403
Do not try the next server if you receive a SERVFAIL.  The default is
972
404
to not try the next server which is the reverse of normal stub resolver
973
 
behaviour.</P
974
 
></DD
975
 
><DT
976
 
><VAR
977
 
CLASS="OPTION"
978
 
>+[no]besteffort</VAR
979
 
></DT
980
 
><DD
981
 
><P
982
 
>Attempt to display the contents of messages which are malformed.
983
 
The default is to not display malformed answers.</P
984
 
></DD
985
 
><DT
986
 
><VAR
987
 
CLASS="OPTION"
988
 
>+[no]dnssec</VAR
989
 
></DT
990
 
><DD
991
 
><P
992
 
>Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO)
993
 
in the OPT record in the additional section of the query.</P
994
 
></DD
995
 
><DT
996
 
><VAR
997
 
CLASS="OPTION"
998
 
>+[no]sigchase</VAR
999
 
></DT
1000
 
><DD
1001
 
><P
1002
 
>Chase DNSSEC signature chains.  Requires dig be compiled with
1003
 
-DDIG_SIGCHASE.</P
1004
 
></DD
1005
 
><DT
1006
 
><VAR
1007
 
CLASS="OPTION"
1008
 
>+trusted-key=####</VAR
1009
 
></DT
1010
 
><DD
1011
 
><P
1012
 
>Specify a trusted key to be used with <VAR
1013
 
CLASS="OPTION"
1014
 
>+sigchase</VAR
1015
 
>.
1016
 
Requires dig be compiled with -DDIG_SIGCHASE.</P
1017
 
></DD
1018
 
><DT
1019
 
><VAR
1020
 
CLASS="OPTION"
1021
 
>+[no]topdown</VAR
1022
 
></DT
1023
 
><DD
1024
 
><P
1025
 
>When chasing DNSSEC signature chains perform a top down validation.
1026
 
Requires dig be compiled with -DDIG_SIGCHASE.</P
1027
 
></DD
1028
 
></DL
1029
 
></DIV
1030
 
>&#13;</P
1031
 
></DIV
1032
 
><DIV
1033
 
CLASS="REFSECT1"
1034
 
><A
1035
 
NAME="AEN385"
1036
 
></A
1037
 
><H2
1038
 
>MULTIPLE QUERIES</H2
1039
 
><P
1040
 
>The BIND 9 implementation of <B
1041
 
CLASS="COMMAND"
1042
 
>dig </B
1043
 
> supports
 
405
behaviour.
 
406
</p></dd>
 
407
<dt><span class="term"><code class="option">+[no]besteffort</code></span></dt>
 
408
<dd><p>
 
409
Attempt to display the contents of messages which are malformed.
 
410
The default is to not display malformed answers.
 
411
</p></dd>
 
412
<dt><span class="term"><code class="option">+[no]dnssec</code></span></dt>
 
413
<dd><p>
 
414
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO)
 
415
in the OPT record in the additional section of the query.
 
416
</p></dd>
 
417
<dt><span class="term"><code class="option">+[no]sigchase</code></span></dt>
 
418
<dd><p>
 
419
Chase DNSSEC signature chains.  Requires dig be compiled with
 
420
-DDIG_SIGCHASE.
 
421
</p></dd>
 
422
<dt><span class="term"><code class="option">+trusted-key=####</code></span></dt>
 
423
<dd>
 
424
<p>
 
425
              Specifies a file containing trusted keys to be used with
 
426
              <code class="option">+sigchase</code>.  Each DNSKEY record must be
 
427
              on its own line.
 
428
            </p>
 
429
<p>
 
430
              If not specified <span><strong class="command">dig</strong></span> will look for
 
431
              <code class="filename">/etc/trusted-key.key</code> then
 
432
              <code class="filename">trusted-key.key</code> in the current directory.
 
433
            </p>
 
434
<p>
 
435
              Requires dig be compiled with -DDIG_SIGCHASE.
 
436
            </p>
 
437
</dd>
 
438
<dt><span class="term"><code class="option">+[no]topdown</code></span></dt>
 
439
<dd><p>
 
440
When chasing DNSSEC signature chains perform a top down validation.
 
441
Requires dig be compiled with -DDIG_SIGCHASE.
 
442
</p></dd>
 
443
</dl></div>
 
444
<p>
 
445
 
 
446
</p>
 
447
</div>
 
448
<div class="refsect1" lang="en">
 
449
<a name="id2527033"></a><h2>MULTIPLE QUERIES</h2>
 
450
<p>
 
451
The BIND 9 implementation of <span><strong class="command">dig </strong></span> supports
1044
452
specifying multiple queries on the command line (in addition to
1045
 
supporting the <VAR
1046
 
CLASS="OPTION"
1047
 
>-f</VAR
1048
 
> batch file option).  Each of those
 
453
supporting the <code class="option">-f</code> batch file option).  Each of those
1049
454
queries can be supplied with its own set of flags, options and query
1050
 
options.</P
1051
 
><P
1052
 
>In this case, each <VAR
1053
 
CLASS="PARAMETER"
1054
 
>query</VAR
1055
 
> argument represent an
 
455
options.
 
456
</p>
 
457
<p>
 
458
In this case, each <em class="parameter"><code>query</code></em> argument represent an
1056
459
individual query in the command-line syntax described above.  Each
1057
460
consists of any of the standard options and flags, the name to be
1058
461
looked up, an optional query type and class and any query options that
1059
 
should be applied to that query.</P
1060
 
><P
1061
 
>A global set of query options, which should be applied to all queries,
 
462
should be applied to that query.
 
463
</p>
 
464
<p>
 
465
A global set of query options, which should be applied to all queries,
1062
466
can also be supplied.  These global query options must precede the
1063
467
first tuple of name, class, type, options, flags, and query options
1064
468
supplied on the command line.  Any global query options (except
1065
 
the <VAR
1066
 
CLASS="OPTION"
1067
 
>+[no]cmd</VAR
1068
 
> option) can be
 
469
the <code class="option">+[no]cmd</code> option) can be
1069
470
overridden by a query-specific set of query options.  For example:
1070
 
<PRE
1071
 
CLASS="PROGRAMLISTING"
1072
 
>dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr</PRE
1073
 
>
1074
 
shows how <B
1075
 
CLASS="COMMAND"
1076
 
>dig</B
1077
 
> could be used from the command line
1078
 
to make three lookups: an ANY query for <VAR
1079
 
CLASS="LITERAL"
1080
 
>www.isc.org</VAR
1081
 
>, a
 
471
</p>
 
472
<pre class="programlisting">
 
473
dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
 
474
</pre>
 
475
<p>
 
476
shows how <span><strong class="command">dig</strong></span> could be used from the command line
 
477
to make three lookups: an ANY query for <code class="literal">www.isc.org</code>, a
1082
478
reverse lookup of 127.0.0.1 and a query for the NS records of
1083
 
<VAR
1084
 
CLASS="LITERAL"
1085
 
>isc.org</VAR
1086
 
>.
 
479
<code class="literal">isc.org</code>.
1087
480
 
1088
 
A global query option of <VAR
1089
 
CLASS="PARAMETER"
1090
 
>+qr</VAR
1091
 
> is applied, so
1092
 
that <B
1093
 
CLASS="COMMAND"
1094
 
>dig</B
1095
 
> shows the initial query it made for each
 
481
A global query option of <em class="parameter"><code>+qr</code></em> is applied, so
 
482
that <span><strong class="command">dig</strong></span> shows the initial query it made for each
1096
483
lookup.  The final query has a local query option of
1097
 
<VAR
1098
 
CLASS="PARAMETER"
1099
 
>+noqr</VAR
1100
 
> which means that <B
1101
 
CLASS="COMMAND"
1102
 
>dig</B
1103
 
>
 
484
<em class="parameter"><code>+noqr</code></em> which means that <span><strong class="command">dig</strong></span>
1104
485
will not print the initial query when it looks up the NS records for
1105
 
<VAR
1106
 
CLASS="LITERAL"
1107
 
>isc.org</VAR
1108
 
>.</P
1109
 
></DIV
1110
 
><DIV
1111
 
CLASS="REFSECT1"
1112
 
><A
1113
 
NAME="AEN403"
1114
 
></A
1115
 
><H2
1116
 
>FILES</H2
1117
 
><P
1118
 
><TT
1119
 
CLASS="FILENAME"
1120
 
>/etc/resolv.conf</TT
1121
 
></P
1122
 
><P
1123
 
><TT
1124
 
CLASS="FILENAME"
1125
 
>${HOME}/.digrc</TT
1126
 
></P
1127
 
></DIV
1128
 
><DIV
1129
 
CLASS="REFSECT1"
1130
 
><A
1131
 
NAME="AEN409"
1132
 
></A
1133
 
><H2
1134
 
>SEE ALSO</H2
1135
 
><P
1136
 
><SPAN
1137
 
CLASS="CITEREFENTRY"
1138
 
><SPAN
1139
 
CLASS="REFENTRYTITLE"
1140
 
>host</SPAN
1141
 
>(1)</SPAN
1142
 
>,
1143
 
<SPAN
1144
 
CLASS="CITEREFENTRY"
1145
 
><SPAN
1146
 
CLASS="REFENTRYTITLE"
1147
 
>named</SPAN
1148
 
>(8)</SPAN
1149
 
>,
1150
 
<SPAN
1151
 
CLASS="CITEREFENTRY"
1152
 
><SPAN
1153
 
CLASS="REFENTRYTITLE"
1154
 
>dnssec-keygen</SPAN
1155
 
>(8)</SPAN
1156
 
>,
1157
 
<I
1158
 
CLASS="CITETITLE"
1159
 
>RFC1035</I
1160
 
>.</P
1161
 
></DIV
1162
 
><DIV
1163
 
CLASS="REFSECT1"
1164
 
><A
1165
 
NAME="AEN422"
1166
 
></A
1167
 
><H2
1168
 
>BUGS </H2
1169
 
><P
1170
 
>There are probably too many query options. </P
1171
 
></DIV
1172
 
></BODY
1173
 
></HTML
1174
 
>
 
486
<code class="literal">isc.org</code>.
 
487
</p>
 
488
</div>
 
489
<div class="refsect1" lang="en">
 
490
<a name="id2527092"></a><h2>FILES</h2>
 
491
<p>
 
492
<code class="filename">/etc/resolv.conf</code>
 
493
</p>
 
494
<p>
 
495
<code class="filename">${HOME}/.digrc</code>
 
496
</p>
 
497
</div>
 
498
<div class="refsect1" lang="en">
 
499
<a name="id2527111"></a><h2>SEE ALSO</h2>
 
500
<p>
 
501
<span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
 
502
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
 
503
<span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
 
504
<em class="citetitle">RFC1035</em>.
 
505
</p>
 
506
</div>
 
507
<div class="refsect1" lang="en">
 
508
<a name="id2527149"></a><h2>BUGS </h2>
 
509
<p>
 
510
There are probably too many query options. 
 
511
</p>
 
512
</div>
 
513
</div></body>
 
514
</html>