RFC 9443

Multiplexing Scheme Updates for QUIC

πŸ“… published July 2023, from ietf

RFC 9443: Multiplexing Scheme Updates for QUIC πŸ’–

Okay bestie, RFC 9443 is an IETF Standards Track doc from July 2023 (ISSN 2070-1721) πŸŽ€. The authors are B. Aboba at Microsoft Corporation, G. Salgueiro at Cisco Systems, and C. Perkins at the University of Glasgow 🫢. It updates RFC 5764 and RFC 7983. Its header has no Obsoletes line, so it isn't replacing anything 🧚.

Abstract πŸ“–

RFC 7983 is the spec that tells an RTP receiver how to sort out DTLS, STUN, SRTP/SRTCP, ZRTP, and TURN channel packets when they all show up on one port πŸ’…. This doc updates RFC 7983 and RFC 5764 so QUIC packets can get multiplexed on a single receiving socket too πŸ¦‹.

Status of This Memo πŸ“œ

Okay so this is an Internet Standards Track document 🌈. It's a product of the Internet Engineering Task Force (IETF), which means it represents the consensus of the IETF community 🫢. It got public review and was approved for publication by the Internet Engineering Steering Group (IESG) ✨. If you want more on Internet Standards, check Section 2 of RFC 7841. Info about the current status, any errata, and how to send feedback lives at https://www.rfc-editor.org/info/rfc9443 πŸ’œ.

Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved πŸ’….

This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication. Please read those carefully, because they spell out your rights and restrictions for this document πŸ“–. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions. They're provided without warranty, as described in the Revised BSD License πŸ”₯.

Table of Contents πŸ—‚οΈ

   1.  Introduction
     1.1.  Terminology
   2.  Multiplexing of TURN Channels
   3.  Updates to RFC 7983
   4.  Security Considerations
   5.  IANA Considerations
   6.  References
     6.1.  Normative References
     6.2.  Informative References
   Acknowledgments
   Authors' Addresses

1. Introduction πŸŽ€

Okay so RFC 7983, titled "Multiplexing Scheme Updates for Secure Real-time Transport Protocol (SRTP) Extension for Datagram Transport Layer Security (DTLS)" [RFC7983], is the one that tells a Real-time Transport Protocol (RTP) [RFC3550] receiver how to demultiplex DTLS [RFC9147], Session Traversal Utilities for NAT (STUN) [RFC8489], Secure Real-time Transport Protocol (SRTP) / Secure Real-time Transport Control Protocol (SRTCP) [RFC3711], ZRTP [RFC6189], and Traversal Using Relays around NAT (TURN) channel packets arriving on a single port πŸ’…. This doc updates [RFC7983] and "Datagram Transport Layer Security (DTLS) Extension to Establish Keys for the Secure Real-time Transport Protocol (SRTP)" [RFC5764] so QUIC [RFC9000] can be multiplexed on the same port too ✨.

This scheme has multiple use cases 🌸. In the WebRTC scenarios described in [P2P-QUIC] and [P2P-QUIC-TRIAL], SRTP carries audio and video while peer-to-peer QUIC handles the data exchange 🎧. For this use case, SRTP [RFC3711] is keyed using DTLS-SRTP [RFC5764], so SRTP/SRTCP [RFC3550], STUN, TURN, DTLS, and QUIC need to be multiplexed on the same port 🧚. If SRTP were keyed using QUIC-SRTP (not yet specified), then SRTP/SRTCP, STUN, TURN, and QUIC would need to be multiplexed on the same port πŸ™ˆ. Where QUIC is used for peer-to-peer transport of data as well as RTP/RTCP [RTP-OVER-QUIC], STUN, TURN, and QUIC need to be multiplexed on the same port πŸ’œ.

Heads up, bestie 🚨: this scheme is compatible with QUIC version 2 [RFC9369], but it is not compatible with QUIC bit greasing [RFC9287]. So endpoints that wish to use multiplexing on their socket MUST NOT send the grease_quic_bit transport parameter πŸ™….

1.1. Terminology πŸ“š

Okay, the boring-but-iconic bit πŸ™ˆ: 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.

2. Multiplexing of TURN Channels πŸ¦‹

TURN channels are an optimization where data packets are exchanged with a 4-byte prefix instead of the standard 36-byte STUN overhead (see Section 3.5 of [RFC8656]). [RFC7983] allocates the values from 64 to 79 so TURN channels can be demultiplexed when the TURN client does the channel binding request, in combination with the demultiplexing scheme described in [RFC7983] 🌟.

Without QUIC bit greasing, the first octet of a QUIC packet (e.g. a short header packet in QUIC v1 or v2) may fall in the range 64 to 127. That overlaps with the allocated TURN channel range of 64 to 79. In practice though, this overlap is not a problem πŸ™Œ. TURN channel packets will only be received from a TURN server that TURN allocation and channel-binding requests have been sent to. So a TURN client receiving packets from the source IP address and port of a TURN server only needs to tell STUN (i.e., regular TURN) packets apart from TURN channel packets. (S)RTP, (S)RTCP, ZRTP, DTLS, or QUIC packets will not be sent from a source IP address and port that previously responded to TURN allocation or channel-binding requests πŸŽ€.

So if the source IP address and port of a packet don't match those of a responding TURN server, a packet with a first octet of 64 to 127 can be unambiguously demultiplexed as QUIC πŸ’–.

3. Updates to RFC 7983 ✨

This document updates the text in Section 7 of [RFC7983] (which in turn updates [RFC5764]) as follows πŸ‘€:

   OLD TEXT

  |  The process for demultiplexing a packet is as follows.  The
  |  receiver looks at the first byte of the packet.  If the value of
  |  this byte is in between 0 and 3 (inclusive), then the packet is
  |  STUN.  If the value is between 16 and 19 (inclusive), then the
  |  packet is ZRTP.  If the value is between 20 and 63 (inclusive),
  |  then the packet is DTLS.  If the value is between 64 and 79
  |  (inclusive), then the packet is TURN Channel.  If the value is in
  |  between 128 and 191 (inclusive), then the packet is RTP (or RTCP,
  |  if both RTCP and RTP are being multiplexed over the same
  |  destination port).  If the value does not match any known range,
  |  then the packet MUST be dropped and an alert MAY be logged.  This
  |  process is summarized in Figure 3.
  |
  |                   +----------------+
  |                   |        [0..3] -+--> forward to STUN
  |                   |                |
  |                   |      [16..19] -+--> forward to ZRTP
  |                   |                |
  |       packet -->  |      [20..63] -+--> forward to DTLS
  |                   |                |
  |                   |      [64..79] -+--> forward to TURN Channel
  |                   |                |
  |                   |    [128..191] -+--> forward to RTP/RTCP
  |                   +----------------+
  |
  |  Figure 3: The DTLS-SRTP receiver's packet demultiplexing algorithm.

   END OLD TEXT

And here's the new version πŸ₯°:

   NEW TEXT

  |  The process for demultiplexing a packet is as follows.  The
  |  receiver looks at the first byte of the packet.  If the value of
  |  this byte is between 0 and 3 (inclusive), then the packet is STUN.
  |  If the value is between 16 and 19 (inclusive), then the packet is
  |  ZRTP.  If the value is between 20 and 63 (inclusive), then the
  |  packet is DTLS.  If the value is between 128 and 191 (inclusive),
  |  then the packet is RTP (or RTCP, if both RTCP and RTP are being
  |  multiplexed over the same destination port).  If the value is
  |  between 80 and 127 (inclusive) or between 192 and 255 (inclusive),
  |  then the packet is QUIC.  If the value is between 64 and 79
  |  (inclusive) and the packet has a source IP address and port of a
  |  responding TURN server, then the packet is TURN channel; if the
  |  source IP address and port are not that of a responding TURN
  |  server, then the packet is QUIC.
  |
  |  If the value does not match any known range, then the packet MUST
  |  be dropped and an alert MAY be logged.  This process is summarized
  |  in Figure 3.
  |
  |                  +----------------+
  |                  |        [0..3] -+--> forward to STUN
  |                  |                |
  |                  |       [4..15] -+--> DROP
  |                  |                |
  |                  |      [16..19] -+--> forward to ZRTP
  |                  |                |
  |      packet -->  |      [20..63] -+--> forward to DTLS
  |                  |                |
  |                  |      [64..79] -+--> forward to TURN Channel
  |                  |                | (if from TURN server), else QUIC
  |                  |     [80..127] -+--> forward to QUIC
  |                  |                |
  |                  |    [128..191] -+--> forward to RTP/RTCP
  |                  |                |
  |                  |    [192..255] -+--> forward to QUIC
  |                  +----------------+
  |
  |       Figure 3: The receiver's packet demultiplexing algorithm.
  |
  |  Note: Endpoints that wish to demultiplex QUIC MUST NOT send the
  |  grease_quic_bit transport parameter, as described in [RFC9287].

   END NEW TEXT

The big change is in the first-octet ranges. 80 to 127 and 192 to 255 now go to QUIC, and 64 to 79 only counts as TURN channel when it comes from a responding TURN server. Otherwise it's QUIC too πŸ’…πŸ¦‹


6.1. Normative References πŸ’œ

Okay, bestie, this is the reading list the spec needs you to have read. Every one of these is a normative reference, which means the document leans on them for real. No skipping! πŸ“š


6.2. Informative References πŸ¦‹

These ones are the extra-credit reading. They give you the background and the vibes, but the spec doesn't need you to nail them to move forward. 🌸


Acknowledgments 🫢

Huge thank-yous to Martin Thomson, Roni Even, Jonathan Lennox, and the other brilliant people from the IETF QUIC and AVTCORE Working Groups πŸ’– They talked through the QUIC multiplexing issue with us and shared their ideas on possible fixes. Iconic behaviour, honestly. ✨


Authors' Addresses πŸŽ€

Bernard Aboba
Microsoft Corporation
One Microsoft Way
Redmond, WA 98052
United States of America
Email: bernard.aboba@gmail.com
Gonzalo Salgueiro
Cisco Systems
7200-12 Kit Creek Road
Research Triangle Park, NC 27709
United States of America
Email: gsalguei@cisco.com
Colin Perkins
School of Computing Science
University of Glasgow
Glasgow
G12 8QQ
United Kingdom
Email: csp@csperkins.org
πŸ“¦ where this page comes from