RFC 8837

Differentiated Services Code Point (DSCP) Packet Markings for WebRTC QoS

πŸ“… published January 2021, from ietf

RFC 8837: Differentiated Services Code Point (DSCP) Packet Markings for WebRTC QoS ✨

  • Publisher: Internet Engineering Task Force (IETF) πŸŽ€
  • Category: Standards Track πŸ’–
  • Date: January 2021 🌸
  • ISSN: 2070-1721
  • Authors: P. Jones (Cisco Systems), S. Dhesikan (Individual), C. Jennings (Cisco Systems), and D. Druta (AT&T) πŸ‘‘
  • Obsoletes/Updates: The header doesn't list any RFCs that this one obsoletes or updates πŸ¦‹

Abstract

okay so networks can treat individual packets differently based on their DSCP values, and they do it hop by hop 🧚. This doc gives browsers the recommended DSCP values to use for the different kinds of Web Real-Time Communication (WebRTC) traffic πŸ’….

Status of This Memo

this is an Internet Standards Track document πŸ”₯.

it's a product of the Internet Engineering Task Force (IETF), which means it reflects 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 info on Internet Standards, check out Section 2 of RFC 7841 πŸ’œ.

info about the current status of this doc, any errata, and how to send feedback is at https://www.rfc-editor.org/info/rfc8837 🌈.

Copyright (c) 2021 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) as they stand on the publication date. please actually read those, bestie, because they spell out your rights and restrictions for this doc πŸ™ˆ. any Code Components pulled out of this doc must include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come without warranty, as described in the Simplified BSD License πŸ“.

Table of Contents

1.  Introduction
2.  Terminology
3.  Relation to Other Specifications
4.  Inputs
5.  DSCP Mappings
6.  Security Considerations
7.  IANA Considerations
8.  Downward References
9.  References
  9.1.  Normative References
  9.2.  Informative References
Acknowledgements
Dedication
Authors' Addresses

1. Introduction πŸŽ€

okay so DSCP [RFC2474] packet marking can help give QoS a boost in some environments πŸ’…. this spec gives default packet marking for browsers that support WebRTC apps, but it doesn't change any advice or requirements in other RFCs 🫢. it's meant to be a simple set of implementation recs built on top of earlier RFCs ✨.

these DSCP markings are most likely to help QoS for WebRTC traffic in networks like these πŸ¦‹:

  1. Private, wide-area networks. Network admins control how packets get remarked and how they get treated πŸ‘‘.
  2. Residential Networks. If the congested link is the broadband uplink in a cable or DSL setup, residential routers/NAT often support preferential treatment based on DSCP 🌸.
  3. Wireless Networks. If the congested link is a local wireless network, marking may help πŸ“Ά.

there are cases where these markings don't help. aside from possible priority inversion for "Less-than-Best-Effort traffic" (see Section 5), they rarely make things worse if packets are marked appropriately πŸ’€.

DSCP values are, in principle, site specific. each site picks its own code points to control per-hop behavior and influence QoS for transport-layer flows 🧚. but in WebRTC use cases, browsers need to set something when there's no site-specific info 😭. this doc describes a subset of DSCP code point values, drawn from existing RFCs and common usage, for WebRTC apps to use πŸ’–. these code points are meant to be the default values a WebRTC app uses. other values could be used, but using a non-default value may result in unexpected per-hop behavior πŸ™ˆ. it is RECOMMENDED that WebRTC applications use non-default values only in private networks that are configured to use different values πŸ”₯.

this spec defines the inputs the WebRTC app gives the browser, which help the browser figure out how to set the various packet markings 🌈. it also defines the mapping from abstract QoS policies (flow type, priority level) to those packet markings πŸ‘‘.

2. Terminology πŸ’œ

the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this doc are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here 🫢.

the terms "browser" and "non-browser" are defined in [RFC7742] and mean the same thing in this doc πŸ“.

3. Relation to Other Specifications πŸ¦‹

this doc is a complement to [RFC7657], which covers how DSCP and real-time communications interact ✨. that RFC looks at what happens when you use various DSCP values, mostly focusing on Real-time Transport Protocol (RTP) [RFC3550] streams that get multiplexed onto a single transport-layer flow 🧚.

there are a bunch of guidelines in [RFC7657] that apply to marking traffic sent by WebRTC apps, since it's super common for multiple RTP streams to be multiplexed on the same transport-layer flow πŸ’…. usually, the RTP streams get marked with a value from Table 1 πŸ’–. a WebRTC app might also multiplex data channel [RFC8831] traffic over the same 5-tuple as the RTP streams, and that traffic gets marked per that table too 🌸. the guidance in [RFC7657] says all data channel traffic gets marked with a single value, which is typically different from the value(s) used for RTP streams multiplexed with it over the same 5-tuple, assuming the RTP streams are marked with something other than Default Forwarding (DF) πŸ‘‘. more on this in the next section πŸŽ€.

this spec doesn't change or override the advice in any other RFCs about setting packet markings. it just picks a subset of DSCP values that matter in the WebRTC context 🫢.

the DSCP value the endpoint sets is not trusted by the network πŸ’€. on top of that, the DSCP value can get remarked anywhere in the network, for all sorts of reasons, to any other DSCP value, including the DF value for basic best-effort service 😭. even so, marking traffic still helps, even if it only benefits the first few hops 🌈. the implications are discussed in Section 3.2 of [RFC7657] ✨. a mitigation for this is an authorization mechanism. but that mechanism is outside the scope of this doc πŸ”₯.

4. Inputs 🧚

this doc recommends DSCP values for two classes of WebRTC flows πŸ’–:

  • media flows that are RTP streams [RFC8834]
  • data flows that are data channels [RFC8831]

each RTP stream and each distinct data channel is made up of all the packets tied to one independent media entity. so an RTP stream or distinct data channel isn't always the same thing as a transport-layer flow defined by a 5-tuple (source address, destination address, source port, destination port, and protocol) πŸ¦‹. multiple RTP streams and data channels can be multiplexed over the same 5-tuple, and each one can matter to the app at a different level. so they could be marked with different DSCP values than another RTP stream or data channel in the same transport-layer flow πŸ‘‘. (note that there are restrictions on marking different data channels carried within the same Stream Control Transmission Protocol (SCTP) association, as outlined in Section 5 πŸ™ˆ.)

the WebRTC app gives the browser these inputs πŸŽ€:

  • Flow Type: The app provides this one because it knows whether the flow is audio, interactive video ([RFC4594] [G.1010]) with or without audio, or data 🌸.
  • Application Priority: This is the relative importance of an RTP stream or data channel. lots of apps have multiple flows of the same flow type, and some flows are often more important than others πŸ’…. for example, in a video conference with usually both audio and video flows, the audio flow may matter more than the video flow 🫢. JavaScript apps can tell the browser whether a particular flow is of High, Medium, Low, or Very Low importance to the app πŸ”₯.

[RFC8835] goes deeper on what an individual flow is within the WebRTC context, plus the priorities for media and data flows πŸ’œ.

right now in WebRTC, media sent over RTP is assumed to be interactive [RFC8835], and there are no browser APIs that let an app tell interactive video apart from non-interactive video 😭✨.

5. DSCP Mappings ✨

okay so this is the table bestie, the whole point πŸ’… Each flow type that matters for WebRTC gets a DSCP value based on its application priority. These values come from the framework and recommended values in [RFC4594] and a browser SHOULD use them to mark the right media packets πŸŽ€ If you want the deets on Expedited Forwarding (EF) and Assured Forwarding (AF), go check [RFC3246] and [RFC2597]. DF is Default Forwarding, the basic best-effort service from [RFC2474] πŸ¦‹

+=======================+==========+=====+============+============+
|       Flow Type       | Very Low | Low |   Medium   |    High    |
+=======================+==========+=====+============+============+
|         Audio         |  LE (1)  |  DF |  EF (46)   |  EF (46)   |
|                       |          | (0) |            |            |
+-----------------------+----------+-----+------------+------------+
+-----------------------+----------+-----+------------+------------+
|   Interactive Video   |  LE (1)  |  DF | AF42, AF43 | AF41, AF42 |
| with or without Audio |          | (0) |  (36, 38)  |  (34, 36)  |
+-----------------------+----------+-----+------------+------------+
+-----------------------+----------+-----+------------+------------+
| Non-Interactive Video |  LE (1)  |  DF | AF32, AF33 | AF31, AF32 |
| with or without Audio |          | (0) |  (28, 30)  |  (26, 28)  |
+-----------------------+----------+-----+------------+------------+
+-----------------------+----------+-----+------------+------------+
|          Data         |  LE (1)  |  DF |    AF11    |    AF21    |
|                       |          | (0) |            |            |
+-----------------------+----------+-----+------------+------------+

      Table 1: Recommended DSCP Values for WebRTC Applications

The columns "Very Low", "Low", "Medium", and "High" show how important a flow is within its application. The browser takes that priority as an input, and uses it to pick the DSCP value and tune how the network transport behaves 🧚

Now, the table assumes that LE-marked packets get treated as lower effort (aka "less than best effort"), like the LE behavior from [RFC8622]. BUT, how LE gets treated is up to each implementation πŸ™ˆ If an implementation treats LE as something other than "less than best effort", then the actual priority (or, more precisely, the per-hop behavior) of those packets can change from what was intended. Honestly it's super common for LE to get treated the same as DF, so apps and browsers using LE can't assume it'll be treated differently than DF [RFC7657] πŸ’€ Also, while this document was being written, CS1 DSCP was recommended for "very low" priority traffic. Implementations that followed that recommendation SHOULD be updated to use the LE DSCP instead of the CS1 DSCP 🌸

Implementers, heads up: excess EF traffic gets dropped 😭 That means a packet marked EF might not make it through, even though that same packet with a different DSCP value would have. This is not a flaw, it's just how excess EF traffic is supposed to be handled ✨

The browser SHOULD first pick the flow type. Then, within that flow type, the relative importance of the flow SHOULD be used to choose the right DSCP value πŸ‘‘

Right now, all WebRTC video is assumed to be interactive [RFC8835], so the interactive video DSCP values in Table 1 SHOULD be used for it. Browsers MUST NOT use the AF3x DSCP values (the non-interactive video row in Table 1) for WebRTC applications. Non-browser implementations of WebRTC MAY use the AF3x DSCP values for video that is known not to be interactive, like all the video in a WebRTC video playback app that isn't built into a browser 🎬

Flow type plus application priority gives you specificity, which helps pick the right DSCP value for a flow. All packets in a flow SHOULD have the same application priority. Sometimes a priority cell has more than one DSCP value, like AF41 and AF42. Those offer different drop precedences, which gives extra granularity for sorting packets within a flow. Say you're on a video call and the video flow has medium priority, so you could pick AF42 or AF43. The more important video packets (like a picture or frame encoded with no dependency on earlier pictures or frames) might get AF42, and the less important ones (a picture or frame encoded based on the content of one or more earlier pictures or frames) might get AF43. Why? Because getting the important packets lets a video renderer keep going even after one or more packets are lost πŸ™Œ

Fun fact: the application priority also gets used by the coupled congestion control mechanism for media flows per [RFC8699], and by the SCTP scheduler for data channel traffic per [RFC8831] πŸ”₯

For reasons covered in Section 6 of [RFC7657], if multiple flows get multiplexed over a reliable transport (like TCP), then ALL the packets for ALL those flows MUST be marked with the same DSCP value. Same goes for data channels: all WebRTC data channel packets sent over an SCTP association MUST be marked with the same DSCP value, no matter how many data channels (streams) exist or what kind of traffic rides on the various SCTP streams. If the browser wants to change the DSCP value used for an SCTP association, it MUST reset the SCTP congestion controller after changing it. BUT frequent changes to the DSCP value on an SCTP association are discouraged, because that would wreck any real attempt at managing congestion 😀 Also, any DSCP change that resets the congestion controller puts the SCTP association back into slow start, which can have undesirable effects on app performance.

For data channel traffic multiplexed over an SCTP association, it is RECOMMENDED that the DSCP value be the one tied to the highest priority requested by any data channel on that association. Likewise, when multiple flows get multiplexed over a TCP connection, the DSCP value selected SHOULD be the one tied to the highest priority requested among those flows πŸ’œ

Now, if a packet enters a network that doesn't support a flow-type and application priority combination from Table 1, the network node at the edge will remark the DSCP value based on its policies. That can mean the flow doesn't get the treatment it expected from its original DSCP value. And if the packet later enters a network that supports more of these combinations, there might not be enough info left in the packet to restore the original markings. Restoring the original DSCP is outside the scope of this document 🧳

TL;DR: DSCP marking gives you NO guarantees and NO promised levels of service. What it is expected to do is give a statistical improvement in real-time service overall. How a packet actually fares depends on the network design along its path and on the network conditions at every hop 🌈

6. Security Considerations πŸ”

Since the JavaScript application specifies the flow type and application priority that decide the media flow DSCP values the browser uses, the browser could consider an app using a large number of higher priority flows to be suspicious πŸ‘€ If the server hosting the JavaScript application gets compromised, many browsers within the network might simultaneously transmit flows with the same DSCP marking. The Diffserv architecture requires ingress traffic conditioning, for reasons that include protecting the network from this sort of attack. Scary, but it's handled 😱

Otherwise, this specification doesn't add any security implications beyond the ones addressed in the DSCP-related specs below. For security implications of using DSCP, please refer to Section 7 of [RFC7657] and Section 6 of [RFC4594]. Please also see [RFC8826] as an additional reference 🫢

7. IANA Considerations 🌷

This document has no IANA actions. Nothing to register here, bestie πŸ“

8. Downward References ⭐

This specification contains downward references to [RFC4594] and [RFC7657]. However, the parts of the former RFCs used by this specification are stable enough for these downward references. The guidance in the latter RFC is necessary to understand the Diffserv technology used in this document, and the motivation for the recommended DSCP values and procedures πŸ“š

9. References πŸ“–

9.1. Normative References

9.2. Informative References πŸ“š

okay so these are the extra reads πŸ€“ not required to implement the spec, but they're good background if you want the full picture πŸ’…

[G.1010]   ITU-T, "End-user multimedia QoS categories", ITU-T
           Recommendation G.1010, November 2001,
           <https://www.itu.int/rec/T-REC-G.1010-200111-I/en>.

[RFC2474]  Nichols, K., Blake, S., Baker, F., and D. Black,
           "Definition of the Differentiated Services Field (DS
           Field) in the IPv4 and IPv6 Headers", RFC 2474,
           DOI 10.17487/RFC2474, December 1998,
           <https://www.rfc-editor.org/info/rfc2474>.

[RFC2597]  Heinanen, J., Baker, F., Weiss, W., and J. Wroclawski,
           "Assured Forwarding PHB Group", RFC 2597,
           DOI 10.17487/RFC2597, June 1999,
           <https://www.rfc-editor.org/info/rfc2597>.

[RFC3246]  Davie, B., Charny, A., Bennet, J.C.R., Benson, K., Le
           Boudec, J.Y., Courtney, W., Davari, S., Firoiu, V., and D.
           Stiliadis, "An Expedited Forwarding PHB (Per-Hop
           Behavior)", RFC 3246, DOI 10.17487/RFC3246, March 2002,
           <https://www.rfc-editor.org/info/rfc3246>.

[RFC3550]  Schulzrinne, H., Casner, S., Frederick, R., and V.
           Jacobson, "RTP: A Transport Protocol for Real-Time
           Applications", STD 64, RFC 3550, DOI 10.17487/RFC3550,
           July 2003, <https://www.rfc-editor.org/info/rfc3550>.

[RFC8699]  Islam, S., Welzl, M., and S. Gjessing, "Coupled Congestion
           Control for RTP Media", RFC 8699, DOI 10.17487/RFC8699,
           January 2020, <https://www.rfc-editor.org/info/rfc8699>.

Acknowledgements 🫢

huge thank you to these legends for their invaluable input πŸ’–

David Black, Magnus Westerlund, Paolo Severini, Jim
Hasselbrook, Joe Marcus, Erik Nordmark, Michael TΓΌxen, and Brian
Carpenter

Dedication πŸ•ŠοΈ

this one is really special πŸ’œ the document is dedicated to the memory of James Polk, a long-time friend and colleague 🌷 James made important contributions to this specification, including serving initially as one of the primary authors ✨ the whole IETF community is mourning his loss, and he will be missed dearly πŸ₯Ή

Authors' Addresses πŸ’Œ

Paul E. Jones
Cisco Systems

Email: paulej@packetizer.com


Subha Dhesikan
Individual

Email: sdhesikan@gmail.com


Cullen Jennings
Cisco Systems

Email: fluffy@cisco.com


Dan Druta
AT&T

Email: dd5826@att.com

and that's the whole spec, bestie πŸŒˆπŸ¦‹

πŸ“¦ where this page comes from