idnits 2.17.1 draft-pauly-quic-datagram-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (September 10, 2018) is 2027 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-34) exists of draft-ietf-quic-transport-14 -- Obsolete informational reference (is this intentional?): RFC 6347 (Obsoleted by RFC 9147) Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group T. Pauly 3 Internet-Draft E. Kinnear 4 Intended status: Standards Track D. Schinazi 5 Expires: March 14, 2019 Apple Inc. 6 September 10, 2018 8 An Unreliable Datagram Extension to QUIC 9 draft-pauly-quic-datagram-00 11 Abstract 13 This document defines an extension to the QUIC transport protocol to 14 add support for sending and receiving unreliable datagrams over a 15 QUIC connection. 17 Status of This Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at https://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on March 14, 2019. 34 Copyright Notice 36 Copyright (c) 2018 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (https://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 52 1.1. Specification of Requirements . . . . . . . . . . . . . . 2 53 2. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . 2 54 3. Transport Parameter . . . . . . . . . . . . . . . . . . . . . 3 55 4. Datagram Frame Type . . . . . . . . . . . . . . . . . . . . . 3 56 5. Behavior and Usage . . . . . . . . . . . . . . . . . . . . . 4 57 5.1. Flow Control and Acknowledgements . . . . . . . . . . . . 4 58 6. Security Considerations . . . . . . . . . . . . . . . . . . . 5 59 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 60 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 5 61 9. Informative References . . . . . . . . . . . . . . . . . . . 5 62 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6 64 1. Introduction 66 The QUIC Transport Protocol [I-D.ietf-quic-transport] provides a 67 secure, multiplexed connection for transmitting reliable streams of 68 application data. Reliability within QUIC is performed on a per- 69 stream basis, so some frame types are not eligible for 70 retransmission. 72 Some applications, particularly those that need to transmit real-time 73 data, prefer to transmit data unreliably. These applications can 74 build directly upon UDP [RFC0768] as a transport, and can add 75 security with DTLS [RFC6347]. Extending QUIC to support transmitting 76 unreliable application data would provide another option for secure 77 datagrams, with the added benefit of sharing a cryptographic and 78 authentication context used for reliable streams. 80 This document defines two new DATAGRAM QUIC frame types, which carry 81 application data without requiring retransmissions. 83 1.1. Specification of Requirements 85 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 86 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 87 "OPTIONAL" in this document are to be interpreted as described in BCP 88 14 [RFC2119] [RFC8174] when, and only when, they appear in all 89 capitals, as shown here. 91 2. Motivation 93 Transmitting unreliable data over QUIC provides benefits over 94 existing solutions: 96 o Applications that open both a reliable TLS stream and an 97 unreliable DTLS flow to the same peer can benefit by sharing a 98 single handshake and authentication context between a reliable 99 QUIC stream and flow of unreliable QUIC datagrams. This can 100 reduce the latency required for handshakes. 102 o QUIC uses a more nuanced loss recovery mechanism than the DTLS 103 handshake, which has a basic packet loss retransmission timer. 104 This may allow loss recovery to occur more quickly for QUIC data. 106 o QUIC datagrams, while unreliable, can support acknowledgements, 107 allowing applications to be aware of if a datagram was 108 successfully received. 110 These reductions in connection latency, and application insight into 111 the delivery of datagrams, can be useful for optimizing audio/video 112 streaming applications, gaming applications, and other real-time 113 network applications. 115 Unreliable QUIC datagrams can also be used to implement an IP packet 116 tunnel over QUIC, such as for a Virtual Private Network (VPN). 117 Internet-layer tunneling protocols generally require a reliable and 118 authenticated handshake, followed by unreliable secure transmission 119 of IP packets. This can, for example, require a TLS connection for 120 the control data, and DTLS for tunneling IP packets. A single QUIC 121 connection could support both parts with the use of unreliable 122 datagrams. 124 3. Transport Parameter 126 Support for receiving the DATAGRAM frame types is advertised by means 127 of a QUIC Transport Parameter (name=accepts_datagrams, value=12). An 128 endpoint that includes this parameter supports the DATAGRAM frame 129 types and is willing to receive such frames on this connection. 130 Endpoints MUST NOT send DATAGRAM frames until they have sent and 131 received the accepts_datagrams transport parameter. An endpoint that 132 receives a DATAGRAM frame when it has not sent the accepts_datagrams 133 transport parameter MUST terminate the connection with error 134 PROTOCOL_VIOLATION. 136 4. Datagram Frame Type 138 DATAGRAM frames are used to transmit application data in an 139 unreliable manner. The DATAGRAM frame type takes the form 0b0001110X 140 (or the set of values from 0x1c to 0x1d). The least significant byte 141 of the DATAGRAM frame type is the LEN bit (0x01). It indicates that 142 there is a Length field present. If this bit is set to 0, the Length 143 field is absent and the Stream Data field extends to the end of the 144 packet. If this bit is set to 1, the Length field is present. 146 A DATAGRAM frame is shown below. 148 0 1 2 3 149 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 150 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 151 | [Length (i)] ... 152 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 153 | Datagram Data (*) ... 154 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 156 Figure 1: DATAGRAM Frame Format 158 The fields of a DATAGRAM frame are as follows: 160 Length: A variable-length integer specifying the length of the 161 datagram in bytes. If the length is zero, the data extends to the 162 end of the QUIC packet. 164 Datagram Data: The bytes of the datagram to be delivered. 166 5. Behavior and Usage 168 When an application sends an unreliable datagram over a QUIC 169 connection, QUIC will generate a new DATAGRAM frame and send it in 170 the first available packet. This frame SHOULD NOT be delayed, but 171 MAY be coalesced with other STREAM or DATAGRAM frames. 173 When a QUIC endpoint receives a valid DATAGRAM frame, it SHOULD 174 deliver the data to the application immediately. 176 DATAGRAM frames MUST be protected with either 0-RTT or 1-RTT keys. 178 Note that the DATAGRAM frame does not support identifying separate 179 flows of datagrams within a single QUIC connection, as the Stream ID 180 does for STREAM frames. Demultiplexing datagram data is the 181 responsibility of the application. 183 5.1. Flow Control and Acknowledgements 185 Although the DATAGRAM frame is not retransmitted upon loss detection, 186 it does contribute to the maximum data for the overall connection. 187 Packets that contain only DATAGRAM frames do need to be acknowledged, 188 but implementations SHOULD defer and batch acknowledgements since the 189 timing of these acknowledgements is not used for loss recovery. 191 The DATAGRAM frame does not provide any explicit flow control 192 signaling apart from the connection-level flow control. DATAGRAM 193 frames are flow controlled only when the maximum data for the 194 connection is hit, at which point the BLOCKED frame is sent. 196 In cases in which a DATAGRAM frame is blocked due to connection-level 197 flow control or congestion control, an implementation MAY drop the 198 frame without sending it. 200 6. Security Considerations 202 The DATAGRAM frame shares the same security properties as the rest of 203 the data transmitted within a QUIC connection. All application data 204 transmitted with the DATAGRAM frame, like the STREAM frame, MUST be 205 protected either by 0-RTT or 1-RTT keys. 207 7. IANA Considerations 209 This document registers a new value in the QUIC Transport Parameters: 211 Value: 12 (if this document is approved) 213 Parameter Name: accepts_datagrams 215 Specification: Indicates that the connection should enable support 216 for unreliable DATAGRAM frames. An endpoint that advertises this 217 transport parameter can receive datagrams frames from the other 218 endpoint. 220 This document also registers a new value in the QUIC Frame Type 221 registry: 223 Value: 0x1c - 0x1d (if this document is approved) 225 Frame Name: DATAGRAM 227 Specification: Unreliable application data 229 8. Acknowledgments 231 Thanks to Ian Swett, who inspired this proposal. 233 9. Informative References 235 [I-D.ietf-quic-transport] 236 Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed 237 and Secure Transport", draft-ietf-quic-transport-14 (work 238 in progress), August 2018. 240 [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 241 DOI 10.17487/RFC0768, August 1980, 242 . 244 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 245 Requirement Levels", BCP 14, RFC 2119, 246 DOI 10.17487/RFC2119, March 1997, 247 . 249 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 250 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 251 January 2012, . 253 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 254 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 255 May 2017, . 257 Authors' Addresses 259 Tommy Pauly 260 Apple Inc. 261 One Apple Park Way 262 Cupertino, California 95014 263 United States of America 265 Email: tpauly@apple.com 267 Eric Kinnear 268 Apple Inc. 269 One Apple Park Way 270 Cupertino, California 95014 271 United States of America 273 Email: ekinnear@apple.com 275 David Schinazi 276 Apple Inc. 277 One Apple Park Way 278 Cupertino, California 95014 279 United States of America 281 Email: dschinazi@apple.com