idnits 2.17.1 draft-dhesikan-tsvwg-rtcweb-qos-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 : ---------------------------------------------------------------------------- == There are 2 instances of lines with non-RFC2606-compliant FQDNs in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (November 27, 2012) is 4167 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Downref: Normative reference to an Informational RFC: RFC 4594 Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group S. Dhesikan 3 Internet-Draft Cisco 4 Intended status: Standards Track D. Druta, Ed. 5 Expires: May 31, 2013 ATT 6 P. Jones 7 J. Polk 8 Cisco 9 November 27, 2012 11 DSCP and other packet markings for RTCWeb QoS 12 draft-dhesikan-tsvwg-rtcweb-qos-00 14 Abstract 16 Many networks, such as service provider and enterprise networks, can 17 provide per packet treatments based on Differentiated Services Code 18 Points (DSCP) on a per hop basis. This document provides the 19 recommended DSCP values for browsers to use for various classes of 20 traffic. 22 Status of this Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on May 31, 2013. 39 Copyright Notice 41 Copyright (c) 2012 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 1. Introduction 56 Differentiated Services Code Points (DSCP)[RFC2474] style packet 57 marking can help provide QoS in some environments. There are many 58 use cases where such marking does not help, but it seldom makes 59 things worse if packets are marked appropriately. In other words, 60 when attempting to avoid congestion by marking certain traffic flows, 61 say all audio or all audio and video, marking too many audio and/or 62 video flows for a given network's capacity can prevent desirable 63 results. Either too much other traffic will be starved, or there is 64 not enough capacity for the preferentially marked packets (i.e., 65 audio and/or video). 67 This draft proposes how a browser and other VoIP applications can 68 mark packets. This draft does not contradict or redefine any advice 69 from previous IETF RFCs but simply provides a simple set of 70 recommendations for implementors based on the previous RFCs. 72 There are some environments where priority markings frequently help. 73 These include: 75 1. If the congested link is the broadband uplink in a Cable or DSL 76 scenario, often residential routers/NAT support preferential 77 treatment based on DSCP. 79 2. If the congested link is a local WiFi network, marking may help. 81 3. In some cellular style deployments, markings may help in cases 82 where the network does not remove them. 84 Traditionally DSCP values have been thought of as being site 85 specific, with each site selecting its own code points for each QoS 86 level. However in the RTCWeb use cases, the browsers need to set 87 them to something when there is no site specific information. This 88 document describes a reasonable default set of DSCP code point values 89 drawn from existing RFCs and common usage. These code points are 90 solely defaults. Future drafts may define mechanisms for site 91 specific mappings to override the values provided in this draft. 93 This draft defines some inputs that the browser can look at to 94 determine how to set the various packet markings and defines the a 95 mapping from abstract QoS policies (media type, priority level) to 96 those packet markings. 98 2. Relation to Other Standards 100 This specification does not change or override the advice in any 101 other standards about setting packet markings. It simply provides a 102 non-normative summary of them and provides the context of how they 103 relate into the RTCWeb context. This document also specifies the 104 requirements for the W3C WebRTC API to understand what it needs to 105 control, and how the control splits between things the JavaScript 106 application running in the browser can control and things the browser 107 needs to control. In some cases, such as DSCP where the normative 108 RFC leaves open multiple options to choose from, this clarifies which 109 choice should be used in the RTCWeb context. 111 3. Terminology 113 The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" 114 in this document are to be interpreted as described in [RFC2119]. 116 4. Inputs 118 The first input is the type of the media. The browser provides this 119 input as it knows if the media is audio, video, or data. In this 120 specification, both interactive and streaming media is included. 121 They are treated in different categories as their QoS requirements 122 are slightly different. The second input is the relative treatment 123 of the stream within that session. Many applications have multiple 124 video streams and often some are more important than others. 125 JavaScript applications can tell the browser whether a particular 126 media stream is high, medium, or low importance to the application. 128 5. DSCP Mappings 130 Below is a table of DSCP markings for each media type RTCWeb is 131 interested in. These DSCPs for each media type listed are a 132 reasonable default set of code point values taken from [RFC4594]. A 133 web browser SHOULD use these values to mark the appropriate media 134 packets. More information on EF can be found in [RFC3246]. More 135 information on AF can be found in [RFC2597]. 137 +-----------------------+-----------+-----------+-----------+ 138 | Media Type | Low | Medium | High | 139 +-----------------------+-----------+-----------+-----------+ 140 | Audio | 46 (EF) | 46 (EF) | 46 (EF) | 141 | Interactive Video | 38 (AF43) | 36 (AF42) | 34 (AF41) | 142 | Non-Interactive Video | 26 (AF33) | 28 (AF32) | 30 (AF31) | 143 | Data | 8 (CS1) | 0 (BE) | 10 (AF11) | 144 +-----------------------+-----------+-----------+-----------+ 146 Table 1 148 6. QCI Mapping 150 +-----------------------+-----+--------+------+ 151 | Media Type | Low | Medium | High | 152 +-----------------------+-----+--------+------+ 153 | Audio | 1 | 1 | 1 | 154 | Interactive Video | 2 | 2 | 2 | 155 | Non-Interactive Video | 8 | 6 | 4 | 156 | Data | 9 | 9 | 3 | 157 +-----------------------+-----+--------+------+ 159 Table 2 161 This corresponds to the mapping provided in TODO REF which are: QCI 162 values (LTE) 164 +-------+--------+-----+--------------------------------------------+ 165 | Value | | | Use | 166 +-------+--------+-----+--------------------------------------------+ 167 | 1 | GBR | 2 | Interactive Voice | 168 | 2 | GBR | 4 | Interactive Video | 169 | 3 | GBR | 5 | Non-Interactive Video | 170 | 4 | GBR | 3 | Real Time Gaming | 171 | 5 | Non-BG | R 1 | IMS Signaling | 172 | 6 | Non-BG | R 7 | interactive Voice, video, games | 173 | 7-9 | Non-BG | R 6 | non interactive video / TCP web, email, / | 174 | | | | Platinum vs gold user | 175 +-------+--------+-----+--------------------------------------------+ 177 Table 3 179 7. WiFI Mapping 181 +-----------------------+-----+--------+------+ 182 | Media Type | Low | Medium | High | 183 +-----------------------+-----+--------+------+ 184 | Audio | 6 | 6 | 6 | 185 | Interactive Video | 5 | 5 | 5 | 186 | Non-Interactive Video | 4 | 4 | 4 | 187 | Data | 1 | 0 | 3 | 188 +-----------------------+-----+--------+------+ 190 Table 4 192 This corresponds to the mappings from TODO REF of 194 +-------+----+------------------+---------------------+-------------+ 195 | Value | | Traffic Type | Access Category | Designation | 196 | | | | (AC) | | 197 +-------+----+------------------+---------------------+-------------+ 198 | 1 | BK | Background | AC_BK | Background | 199 | 2 | - | (spare) | AC_BK | Background | 200 | 0 | BE | Best Effort | AC_BE | Best Effort | 201 | 3 | EE | Excellent Effort | AC_BE | Best Effort | 202 | 4 | CL | Controlled Load | AC_VI | Video | 203 | 5 | VI | Video | AC_VI | Video | 204 | 6 | VO | Voice | AC_VO | Voice | 205 | 7 | NC | Network Control | AC_VO | Voice | 206 +-------+----+------------------+---------------------+-------------+ 208 Table 5 210 8. W3C API Implications 212 To work with this proposal, the W3C specification SHOULD provide a 213 way to specify the importance of media and data streams. 215 The W3C API SHOULD also provide a way for the application to find out 216 the source and destination IP and ports of any flow as well as the 217 DSCP value or other markings in use for that flow. The JavaScript 218 application can then communicate this to a web service that may 219 install a particular policy for that flow. 221 The W3C API SHOULD NOT provide a way for the JavaScript to 222 arbitrarily set the marketing to any value of the JavaScript choosing 223 as this reduces the security provided by the browser knowing the 224 media type. 226 9. Security Considerations 228 TODO - discuss implications of what browser can set and what 229 JavaScript can set 231 10. IANA Considerations 233 This specification does not require any actions from IANA. 235 11. Downward References 237 This specification contains a downwards reference to [RFC4594] 238 however the parts of that RFC used by this specificaiton are 239 suffenteintly stable for this donward reference. 241 12. Acknowledgements 243 Cullen Jennings was one of the authors of this text in the original 244 individual submission but was unceremoniously kicked off by the 245 chairs when it became a WG version. Thanks for hints on code to do 246 this from Paolo Severini, Jim Hasselbrook, Joe Marcus, and Erik 247 Nordmark. 249 13. Document History 251 Note to RFC Editor: Please remove this section. 253 This document was originally an individual submission in RTCWeb WG. 254 The RTCWeb working group selected it to be become a WG document. 255 Later the transport ADs requested that this be moved to the TSVWG WG 256 as that seemed to be a better match. This document is now being 257 submitted as individual submission to the TSVWG with the hope that WG 258 will select it as a WG draft and move it forward to an RFC. 260 14. Appendix: Code Hints 262 On windows setting the source interface works but BSD, OSX, Linux use 263 weak end-system model and will route out different interface if that 264 looks like a better route. (TODO - Can someone verify this with 265 specific versions?) 267 In windows you might be able to tell something about priority of an 268 interface for ICE purposes with WlanQueryInterface or GetIfTable. 270 The specific mechanisms required to set DSCP code points depend on 271 the application platform. 273 In windows, setting the DSCP is not easy. See Knowledge Base Article 274 KB248611. TODO - add more information about what can be done for 275 windows. 277 For most unix variants, the following program can set DSCP. 279 TODO - make this work in V6. For v6 have a look at IPv6_TCLASS or 280 better the tclass part of sin6_flowid for IPv6 282 TODO - Can someone test and report back results of program in iOS, 283 Android, Linux, OSX, BSD. 285 Example test program: 287 #include 288 #include 289 #include 290 #include 291 #include 292 #include 293 #include 294 #include 295 #include 296 #include 298 #define MSG "Hello, World!" 300 int 301 main(void) { 302 int sock = -1; 303 struct sockaddr *local_addr = NULL; 304 struct sockaddr_in sockin, host; 305 int tos = 0x60; /* CS3 */ 306 socklen_t socksiz = 0; 307 char *buffer = NULL; 309 sock = socket(AF_INET, SOCK_DGRAM, 0); 310 if (sock < 0) { 311 fprintf(stderr,"Error: %s\n", strerror(errno)); 312 exit(-1); 313 } 315 memset(&sockin, 0, sizeof(sockin)); 316 sockin.sin_family = PF_INET; 317 sockin.sin_addr.s_addr = inet_addr("11.1.1.1"); 318 socksiz = sizeof(sockin); 320 local_addr = (struct sockaddr *) &sockin; 322 /* Set ToS/DSCP */ 323 if (setsockopt(sock, IPPROTO_IP, IP_TOS, &tos, 324 sizeof(tos)) < 0) { 325 fprintf(stderr,"Error setting TOS: %s\n", strerror(errno)); 326 } 328 /* Bind to a specific local address */ 329 if (bind(sock, local_addr, socksiz) < 0) { 330 fprintf(stderr,"Error binding to socket: %s\n", strerror(errno)); 331 close(sock); sock=-1; 332 exit(-1); 333 } 335 buffer = (char *) malloc(strlen(MSG) + 1); 336 if ( buffer == NULL ) { 337 fprintf(stderr,"Error allocating memory: %s\n", strerror(errno)); 338 close( sock ); sock=-1; 339 exit(-1); 340 } 341 strlcpy(buffer, MSG, strlen(MSG) + 1); 342 memset(&host, 0, sizeof(host)); 343 host.sin_family = PF_INET; 344 host.sin_addr.s_addr = inet_addr("10.1.1.1"); 345 host.sin_port = htons(12345); 347 if (sendto(sock, buffer, strlen(buffer), 0, 348 (struct sockaddr *) &host, sizeof(host)) < 0) { 349 fprintf(stderr,"Error sending message: %s\n", strerror(errno)); 350 close(sock); sock=-1; 351 free(buffer); buffer=NULL; 352 exit(-1); 353 } 355 free(buffer); buffer=NULL; 356 close(sock); sock=-1; 358 return 0; 359 } 361 15. References 363 15.1. Normative References 365 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 366 Requirement Levels", BCP 14, RFC 2119, March 1997. 368 [RFC4594] Babiarz, J., Chan, K., and F. Baker, "Configuration 369 Guidelines for DiffServ Service Classes", RFC 4594, 370 August 2006. 372 15.2. Informative References 374 [RFC2474] Nichols, K., Blake, S., Baker, F., and D. Black, 375 "Definition of the Differentiated Services Field (DS 376 Field) in the IPv4 and IPv6 Headers", RFC 2474, 377 December 1998. 379 [RFC2597] Heinanen, J., Baker, F., Weiss, W., and J. Wroclawski, 380 "Assured Forwarding PHB Group", RFC 2597, June 1999. 382 [RFC3246] Davie, B., Charny, A., Bennet, J., Benson, K., Le Boudec, 383 J., Courtney, W., Davari, S., Firoiu, V., and D. 384 Stiliadis, "An Expedited Forwarding PHB (Per-Hop 385 Behavior)", RFC 3246, March 2002. 387 Authors' Addresses 389 Subha Dhesikan 390 Cisco 392 Email: sdhesika@cisco.com 394 Dan Druta (editor) 395 ATT 397 Email: dd5826@att.com 399 Paul Jones 400 Cisco 402 Email: paulej@packetizer.com 404 James Polk 405 Cisco 407 Email: jmpolk@cisco.com