RFC 8837
Differentiated Services Code Point (DSCP) Packet Markings for WebRTC QoS
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 Notice
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 π¦:
- Private, wide-area networks. Network admins control how packets get remarked and how they get treated π.
- 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 πΈ.
- 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 π:
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
[RFC2119]Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI10.17487/RFC2119, March 1997,<https://www.rfc-editor.org/info/rfc2119>.[RFC4594]Babiarz, J., Chan, K., and F. Baker, "Configuration Guidelines for DiffServ Service Classes", RFC 4594, DOI10.17487/RFC4594, August 2006,<https://www.rfc-editor.org/info/rfc4594>.[RFC7657]Black, D., Ed. and P. Jones, "Differentiated Services (Diffserv) and Real-Time Communication", RFC 7657, DOI10.17487/RFC7657, November 2015,<https://www.rfc-editor.org/info/rfc7657>.[RFC7742]Roach, A.B., "WebRTC Video Processing and Codec Requirements", RFC 7742, DOI10.17487/RFC7742, March 2016,<https://www.rfc-editor.org/info/rfc7742>.[RFC8174]Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI10.17487/RFC8174, May 2017,<https://www.rfc-editor.org/info/rfc8174>.[RFC8622]Bless, R., "A Lower-Effort Per-Hop Behavior (LE PHB) for Differentiated Services", RFC 8622, DOI10.17487/RFC8622, June 2019,<https://www.rfc-editor.org/info/rfc8622>.[RFC8826]Rescorla, E., "Security Considerations for WebRTC", RFC 8826, DOI10.17487/RFC8826, January 2021,<https://www.rfc-editor.org/info/rfc8826>.[RFC8831]Jesup, R., Loreto, S., and M. TΓΌxen, "WebRTC Data Channels", RFC 8831, DOI10.17487/RFC8831, January 2021,<https://www.rfc-editor.org/info/rfc8831>.[RFC8834]Perkins, C., Westerlund, M., and J. Ott, "Media Transport and Use of RTP in WebRTC", RFC 8834, DOI10.17487/RFC8834, January 2021,<https://www.rfc-editor.org/info/rfc8834>.[RFC8835]Alvestrand, H., "Transports for WebRTC", RFC 8835, DOI10.17487/RFC8835, January 2021,<https://www.rfc-editor.org/info/rfc8835>.
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
- ietf: rfc8837 2021-01
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms