forked from dnssd-wg/draft-ietf-dnssd-multi-qtypes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
draft-bellis-dnsext-multi-qtypes.txt
392 lines (225 loc) · 13.2 KB
/
draft-bellis-dnsext-multi-qtypes.txt
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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
DNSEXT Working Group R. Bellis
Internet-Draft ISC
Intended status: Standards Track July 02, 2018
Expires: January 3, 2019
DNS Multiple QTYPEs
draft-bellis-dnsext-multi-qtypes-06
Abstract
This document specifies a method for a DNS client to request
additional DNS record types to be delivered alongside the primary
record type specified in the question section of a DNS query.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 3, 2019.
Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Bellis Expires January 3, 2019 [Page 1]
Internet-Draft DNS Multiple QTYPEs July 2018
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology used in this document . . . . . . . . . . . . . . 3
3. Description . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1. Multiple QTYPE EDNS Option Format . . . . . . . . . . . . 3
3.2. Response Generation . . . . . . . . . . . . . . . . . . . 4
3.2.1. Server Side Processing . . . . . . . . . . . . . . . 4
3.2.2. Client Side Processing . . . . . . . . . . . . . . . 5
3.2.3. DNSSEC . . . . . . . . . . . . . . . . . . . . . . . 5
4. Security Considerations . . . . . . . . . . . . . . . . . . . 5
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6
7. Normative References . . . . . . . . . . . . . . . . . . . . 6
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 6
1. Introduction
A commonly requested DNS [RFC1035] feature is the ability to receive
multiple related resource records (RRs) in a single DNS response.
For example, it may be desirable to receive both the A and AAAA
records for a domain name together, rather than having to issue
multiple queries.
The DNS wire protocol in theory supports having multiple questions in
a single packet, but in practise this does not work:
o Each question consists of the tuple (QNAME, QTYPE, QCLASS). Since
each question has its own QNAME field it would be possible for one
name to exist and another to not exist, resulting in an
inconsistent response code.
o The idea that only a single question is allowed is sufficiently
entrenched that many DNS servers will simply return an error (or
fail to response at all) if they receive a query with a question
count (QDCOUNT) of more than one.
To resolve both of these issues, this document constraints the
problem to those cases where only the QTYPE varies by specifying a
new option for the Extension Mechanisms for DNS (EDNS [RFC6891]) that
contains an additional list of QTYPE values that the client wishes to
receive in addition to that in the primary question.
TODO: why not "ANY" ?
Bellis Expires January 3, 2019 [Page 2]
Internet-Draft DNS Multiple QTYPEs July 2018
2. Terminology used in this document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
3. Description
3.1. Multiple QTYPE EDNS Option Format
The overall format of an EDNS option is shown for reference below,
per [RFC6891], followed by the option specific data:
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0: | OPTION-CODE |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
2: | OPTION-LENGTH |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
4: | |
/ OPTION-DATA /
/ /
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
OPTION-CODE: TBD by IANA
OPTION-LENGTH: Size (in octets) of OPTION-DATA.
OPTION-DATA: Option specific, as below:
+0 (MSB) +1 (LSB)
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0: |QTD| reserved | QTCOUNT | QT1 (MSB) |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
2: | QT1 (LSB) | ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| ... /// QTn (MSB) |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| QTn (LSB) |
+---+---+---+---+---+---+---+---+
QTD: this bit indicates the direction of the packet. It MUST be
clear (0) in a query and set (1) in a response.
QTCOUNT: a 3 bit field with range 0 .. 7 specifying the number of QT
fields to follow. NB: Whilst the QTCOUNT could in theory be
Bellis Expires January 3, 2019 [Page 3]
Internet-Draft DNS Multiple QTYPEs July 2018
calculated based on the OPTION-LENGTH field, having it explicitly
specified ensures a sensible constraint its value.
QTn: a 2 byte field (MSB first) specifying a DNS RR type. The RR
type MUST be for a real resource record, and MUST NOT refer to a
pseudo RR type such as "OPT", "IXFR", "TSIG", "*", etc.
3.2. Response Generation
3.2.1. Server Side Processing
A conforming server that receives a Multiple QTYPE Option in a query
MUST return a Multiple QTYPE Option in its response.
The QTD bit in that response MUST be set (1) as protection against
servers which simply echo unknown EDNS options verbatim. If the QTD
bit in a response is zero the client MUST treat the response as if
this option is unsupported.
The server SHOULD attempt to return any resource records known to it
that match the additional (QNAME, QTn, QCLASS) tuples. These records
MUST be returned in the Answer Section of the response, but the
answer for the primary QTYPE from the Question Section MUST be
included first.
For any particular QTn in the query, if the server provides
additional answers, or has knowledge that the RR type type does not
exist for that QNAME (a "negative answer"), it must include that QTn
value in the Multiple QTYPE Option of its response.
A negative answer is therefore indicated by the combination of the
presence of a QTn value in the Multiple QTYPE Option and the absence
of a matching record in the Answer Section. This is necessary (in
the absence of DNSSEC) to differentiate between absence of the record
from the zone and absence of the record from the response.
A server that is authoritative for the specified QNAME on receipt of
a Multiple QTYPE Option MUST attempt to return all specified RR types
except where that would result in truncation in which case it may
omit some (or all) of the records for the additional RR types. Those
RR types MUST then also be omitted from the Multiple QTYPE Option in
the response.
A caching recursive server receiving a Multiple QTYPE Option SHOULD
attempt to fill its positive and negative caches with all of the
specified RR types before returning its response to the client.
Bellis Expires January 3, 2019 [Page 4]
Internet-Draft DNS Multiple QTYPEs July 2018
TODO: is there a case for mandatory answers, i.e. the client saying I
_really_ want all these?
3.2.2. Client Side Processing
Recursive resolvers MAY use this method to obtain multiple records
from an authoritative server. For the purposes of Section 5.4.1 of
[RFC2181] any authoritative answers received MUST be ranked the same
as the answer for the primary question.
3.2.3. DNSSEC
If the DNS client sets the "DNSSEC OK" (DO) bit in the query then the
server MUST also return the related DNSSEC records that would have
been returned in a standalone query for the same QTYPE.
A negative answer from a signed zone MUST contain the appropriate
authenticated denial of existence records, per [RFC4034] and
[RFC5155].
In a signed zone there is a theoretical risk of valid signatures for
one RR type and invalid signatures for another. This is the only
case known to the author where the response code for any particular
QNAME may be inconsistent across different RR types.
Should a validating resolver produce NOERROR for some RR types and
SERVFAIL for others it MUST omit the RR types that failed to validate
from its response and from the QTn fields on the Multiple QTYPE
option. The client MAY then initiate standalone queries for those RR
types.
4. Security Considerations
The method documented here does not change any of the security
properties of the DNS protocol itself.
It should however be noted that this method does increase the
potential amplification factor when the DNS protocol is used as a
vector for a denial of service attack.
5. IANA Considerations
IANA is requested to assign a new value in the DNS EDNS0 Option Codes
registry.
Bellis Expires January 3, 2019 [Page 5]
Internet-Draft DNS Multiple QTYPEs July 2018
6. Acknowledgements
The author wishes to thank the following for their feedback and
reviews during the initial development of this document: Michael
Graff, Olafur Gudmundsson, Matthijs Mekking, Paul Vixie.
7. Normative References
[RFC1035] Mockapetris, P., "Domain names - implementation and
specification", STD 13, RFC 1035, DOI 10.17487/RFC1035,
November 1987, <https://www.rfc-editor.org/info/rfc1035>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/
RFC2119, March 1997, <https://www.rfc-editor.org/info/
rfc2119>.
[RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS
Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997,
<https://www.rfc-editor.org/info/rfc2181>.
[RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "Resource Records for the DNS Security Extensions",
RFC 4034, DOI 10.17487/RFC4034, March 2005,
<https://www.rfc-editor.org/info/rfc4034>.
[RFC5155] Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS
Security (DNSSEC) Hashed Authenticated Denial of
Existence", RFC 5155, DOI 10.17487/RFC5155, March 2008,
<https://www.rfc-editor.org/info/rfc5155>.
[RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms
for DNS (EDNS(0))", STD 75, RFC 6891, DOI 10.17487/
RFC6891, April 2013, <https://www.rfc-editor.org/info/
rfc6891>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
Author's Address
Bellis Expires January 3, 2019 [Page 6]
Internet-Draft DNS Multiple QTYPEs July 2018
Ray Bellis
Internet Systems Consortium, Inc.
950 Charter Street
Redwood City CA 94063
USA
Phone: +1 650 423 1200
Email: [email protected]
Bellis Expires January 3, 2019 [Page 7]