idnits 2.17.1 draft-martinsen-mmusic-ice-dualstack-fairness-02.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 1 instance of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (February 9, 2015) is 3357 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) == Unused Reference: 'RFC6555' is defined on line 365, but no explicit reference was found in the text ** Obsolete normative reference: RFC 3484 (Obsoleted by RFC 6724) ** Obsolete normative reference: RFC 5245 (Obsoleted by RFC 8445, RFC 8839) ** Obsolete normative reference: RFC 6555 (Obsoleted by RFC 8305) Summary: 3 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 MMUSIC P. Martinsen 3 Internet-Draft T. Reddy 4 Intended status: Standards Track P. Patil 5 Expires: August 13, 2015 Cisco 6 February 9, 2015 8 ICE IPv4/IPv6 Dual Stack Fairness 9 draft-martinsen-mmusic-ice-dualstack-fairness-02 11 Abstract 13 This document provides guidelines on how to make Interactive 14 Connectivity Establishment (ICE) conclude faster in multihomed and 15 IPv4/IPv6 dual-stack scenarios where broken paths exist. The 16 provided guidelines are backwards compatible with the original ICE 17 specification. 19 Status of This Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at http://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on August 13, 2015. 36 Copyright Notice 38 Copyright (c) 2015 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (http://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. Code Components extracted from this document must 47 include Simplified BSD License text as described in Section 4.e of 48 the Trust Legal Provisions and are provided without warranty as 49 described in the Simplified BSD License. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 54 2. Notational Conventions . . . . . . . . . . . . . . . . . . . 3 55 3. Improving ICE Multihomed Fairness . . . . . . . . . . . . . . 3 56 4. Improving ICE Dual Stack Fairness . . . . . . . . . . . . . . 3 57 5. Compatibility . . . . . . . . . . . . . . . . . . . . . . . . 4 58 6. Example Algorithm for Choosing the Local Preference . . . . . 6 59 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 60 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 61 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 62 10. Normative References . . . . . . . . . . . . . . . . . . . . 8 63 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 65 1. Introduction 67 Applications should take special care to deprioritize network 68 interfaces known to provide unreliable connectivity. For example 69 certain tunnel services might provide unreliable connectivity. The 70 simple guidelines presented here describes how to deprioritize 71 interfaces known by the application to provide unreliable 72 connectivity. This application knowledge can be based on simple 73 metrics like previous connection success/failure rates or a more 74 static model based on interface types like wired, wireless, cellular, 75 virtual, tunnelled and so on. 77 There is a also need to introduce more fairness in the handling of 78 connectivity checks for different IP address families in dual-stack 79 IPv4/IPv6 ICE scenarios. Section 4.1.2.1 of ICE [RFC5245] points to 80 [RFC3484] for prioritizing among the different IP families. 81 [RFC3484] is obsoleted by [RFC6724] but following the recommendations 82 from the updated RFC will lead to prioritization of IPv6 over IPv4 83 for the same candidate type. Due to this, connectivity checks for 84 candidates of the same type (host, reflexive or relay) are sent such 85 that an IP address family is completely depleted before checks from 86 the other address family are started. This results in user 87 noticeable setup delays if the path for the prioritized address 88 family is broken. 90 To avoid such user noticeable delays when either IPv6 or IPv4 path is 91 broken or excessive slow, this specification encourages intermingling 92 the different address families when connectivity checks are 93 performed. Introducing IP address family fairness into ICE 94 connectivity checks will lead to more sustained dual-stack IPv4/IPv6 95 deployment as users will no longer have an incentive to disable IPv6. 97 The cost is a small penalty to the address type that otherwise would 98 have been prioritized. 100 The guidelines outlined in this specification are backward compatible 101 with a standard ICE implementation. This specification only alters 102 the values used to create the resulting checklists in such a way that 103 the core mechanisms from ICE [RFC5245] are still in effect. The 104 introduced fairness might be better, but not worse than what exists 105 today. 107 2. Notational Conventions 109 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 110 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 111 document are to be interpreted as described in [RFC2119]. 113 This document uses terminology defined in [RFC5245]. 115 3. Improving ICE Multihomed Fairness 117 A multihomed ICE agent can potentially send and receive connectivity 118 checks on all available interfaces. To avoid unnecessary delay when 119 performing connectivity checks it would be beneficial to prioritize 120 interfaces known by the agent to provide connectivity. 122 Candidates from a interface known to the application to provide 123 unreliable connectivity SHOULD get a low candidate priority. This 124 ensures they appear near the end of the candidate list, and would be 125 the last to be tested during the connectivity check phase. This 126 allows candidate pairs more likely to succeed to be tested first. 128 If the application is unable to get any interface information 129 regarding type or unable to store any relevant metrics, it SHOULD 130 treat all interfaces as if they have reliable connectivity. This 131 ensures all interfaces gets their fair chance to perform their 132 connectivity checks. 134 4. Improving ICE Dual Stack Fairness 136 Candidates SHOULD be prioritized such that a long sequence of 137 candidates belonging to the same address family will be intermingled 138 with candidates from an alternate IP family. For example, promoting 139 IPv4 candidates in the presence of many IPv6 candidates such that an 140 IPv4 address candidate is always present after a small sequence of 141 IPv6 candidates, i.e., reordering candidates such that both IPv6 and 142 IPv4 candidates get a fair chance during the connectivity check 143 phase. This makes ICE connectivity checks more responsive to broken 144 path failures of an address family. 146 An ICE agent can choose an algorithm or a technique of its choice to 147 ensure that the resulting check lists have a fair intermingled mix of 148 IPv4 and IPv6 address families. However, modifying the check list 149 directly can lead to uncoordinated local and remote check lists that 150 result in ICE taking longer to complete or in the worst case scenario 151 fail. The best approach is to modify the formula for calculating the 152 candidate priority value described in ICE [RFC5245] section 4.1.2.1. 154 Implementations SHOULD prioritize IPv6 candidates by putting some of 155 them first in the the intermingled checklist. This increases the 156 chance of a IPv6 connectivity checks to complete first and be ready 157 for nomination or usage. This enables implementations to follow the 158 intent of [RFC6555]Happy Eyeballs: Success with Dual-Stack Hosts. 160 5. Compatibility 162 ICE [RFC5245] section 4.1.2 states that the formula in section 163 4.1.2.1 SHOULD be used to calculate the candidate priority. The 164 formula is as follows: 166 priority = (2^24)*(type preference) + 167 (2^8)*(local preference) + 168 (2^0)*(256 - component ID) 170 ICE [RFC5245] section 4.1.2.2 has guidelines for how the type 171 preference and local preference value should be chosen. Instead of 172 having a static local preference value for IPv4 and IPv6 addresses, 173 it is possible to choose this value dynamically in such a way that 174 IPv4 and IPv6 address candidate priorities ends up intermingled 175 within the same candidate type. 177 It is also possible to dynamically change the type preference in such 178 a way that IPv4 and IPv6 address candidates end up intermingled 179 regardless of candidate type. This is useful if there are a lot of 180 IPv6 host candidates effectively blocking connectivity checks for 181 IPv4 server reflexive candidates. 183 The list below shows a sorted local candidate list where the priority 184 is calculated in such a way that the IPv4 and IPv6 candidates are 185 intermingled. To allow for earlier connectivity checks for the IPv4 186 server reflexive candidates, some of the IPv6 host candidates are 187 demoted. This is just an example of how a candidate priorities can 188 be calculated to provide better fairness between IPv4 and IPv6 189 candidates without breaking any of the ICE connectivity checks. 191 Candidate Address Component 192 Type Type ID Priority 193 ------------------------------------------- 194 (1) HOST IPv6 (1) 2129289471 195 (2) HOST IPv6 (2) 2129289470 196 (3) HOST IPv4 (1) 2129033471 197 (4) HOST IPv4 (2) 2129033470 198 (5) HOST IPv6 (1) 2128777471 199 (6) HOST IPv6 (2) 2128777470 200 (7) HOST IPv4 (1) 2128521471 201 (8) HOST IPv4 (2) 2128521470 202 (9) HOST IPv6 (1) 2127753471 203 (10) HOST IPv6 (2) 2127753470 204 (11) SRFLX IPv6 (1) 1693081855 205 (12) SRFLX IPv6 (2) 1693081854 206 (13) SRFLX IPv4 (1) 1692825855 207 (14) SRFLX IPv4 (2) 1692825854 208 (15) HOST IPv6 (1) 1692057855 209 (16) HOST IPv6 (2) 1692057854 210 (17) RELAY IPv6 (1) 15360255 211 (18) RELAY IPv6 (2) 15360254 212 (19) RELAY IPv4 (1) 15104255 213 (20) RELAY IPv4 (2) 15104254 215 SRFLX = server reflexive 217 Note that the list does not alter the component ID part of the 218 formula. This keeps the different components (RTP and RTCP) close in 219 the list. What matters is the ordering of the candidates with 220 component ID 1. Once the checklist is formed for a media stream the 221 candidate pair with component ID 1 will be tested first. If ICE 222 connectivity check is successful then other candidate pairs with the 223 same foundation will be unfrozen ([RFC5245] section 5.7.4. Computing 224 States). 226 The local and remote agent can have different algorithms for choosing 227 the local preference and type preference values without impacting the 228 synchronization between the local and remote check lists. 230 The check list is made up by candidate pairs. A candidate pair is 231 two candidates paired up and given a candidate pair priority as 232 described in [RFC5245] section 5.7.2. Using the pair priority 233 formula: 235 pair priority = 2^32*MIN(G,D) + 2*MAX(G,D) + (G>D?1:0) 237 Where G is the candidate priority provided by the controlling agent 238 and D the candidate priority provided by the controlled agent. This 239 ensures that the local and remote check lists are coordinated. 241 Even if the two agents have different algorithms for choosing the 242 candidate priority value to get an intermingled set of IPv4 and IPv6 243 candidates, the resulting checklist, that is a list sorted by the 244 pair priority value, will be identical on the two agents. 246 The agent that has promoted IPv4 cautiously i.e. lower IPv4 candidate 247 priority values compared to the other agent, will influence the check 248 list the most due to (2^32*MIN(G,D)) in the formula. 250 These recommendations are backward compatible with a standard ICE 251 implementation. The resulting local and remote checklist will still 252 be synchronized. The introduced fairness might be better, but not 253 worse than what exists today 255 6. Example Algorithm for Choosing the Local Preference 257 The algorithm described in this section can be used by an 258 implementation to introduce IPv4/IPv6 dual stack and multihomed 259 fairness. Implementations implementing their own algorithm must take 260 care not to break any ICE compatibility. See Section Section 5 for 261 details. 263 The value space for the local preference is from 0 to 65535 264 inclusive. This value space can be divided up in chunks for each IP 265 address family. 267 An IPv6 and IPv4 start priority must be given. In this example IPv6 268 starts at 60000 and IPv4 at 59000. IPv6 should be given the highest 269 start priority. 271 Interfaces known to the application to provide unreliable 272 connectivity will be given a low local_preference value. This will 273 place candidates from those interface near the end in a sorted 274 candidate list. 276 IPv6 IPv4 277 Start Start 278 65535 60k 59k 58k 57k 56k 55k 0 279 +--------+------+------+------+------+------+---------------------+ 280 | | IPv6 | IPv4 | IPv6 | IPv4 | IPv6 | | 281 | | (1) | (1) | (2) | (2) | (3) | | 282 +--------+------+------+------+------+------+---------------------+ 283 <- N-> 285 The local preference can be calculated by the given formula: 287 local_preference = ((S - N*2*(Cn/Cmax))* Ri) + I 289 S: Address type specific start value (IPv4 or IPv6 Start) 291 N: Absolute value of IPv6_start-IPv4_start. This ensures a positive 292 number even if IPv4 is the highest priority. 294 Cn: Number of current candidates of a specific IP address type and 295 candidate type (host, server reflexive or relay). 297 Cmax: Number of allowed consecutive candidates of the same IP 298 address type. 300 Ri: Reliable interface. A reliable interface known by the 301 application to provide reliable connectivity should set this value 302 to 1. Interfaces known to provide unreliable connectivity should 303 set this to 0. (Allowed values are 0 and 1) 305 I: Interface priority. Unreliable interfaces can set this value to 306 get a priority among the unreliable interfaces. Max value is 307 recommended to be N. Reliable interfaces should set this to 0. 309 Using the values N=abs(60000-59000) and Cmax = 2 yields the following 310 sorted local candidate list with only reliable interfaces: 312 (1) HOST IPv6 (1) Priority: 2129289471 313 (2) HOST IPv6 (2) Priority: 2129289470 314 (3) HOST IPv4 (1) Priority: 2129033471 315 (4) HOST IPv4 (2) Priority: 2129033470 316 (5) HOST IPv6 (1) Priority: 2128777471 317 (6) HOST IPv6 (2) Priority: 2128777470 318 (7) HOST IPv4 (1) Priority: 2128521471 319 (8) HOST IPv4 (2) Priority: 2128521470 320 (9) HOST IPv6 (1) Priority: 2128265471 321 (10) HOST IPv6 (2) Priority: 2128265470 322 (11) SRFLX IPv6 (1) Priority: 1693081855 323 (12) SRFLX IPv6 (2) Priority: 1693081854 324 (13) SRFLX IPv4 (1) Priority: 1692825855 325 (14) SRFLX IPv4 (2) Priority: 1692825854 326 (15) RELAY IPv6 (1) Priority: 15360255 327 (16) RELAY IPv6 (2) Priority: 15360254 328 (17) RELAY IPv4 (1) Priority: 15104255 329 (18) RELAY IPv4 (2) Priority: 15104254 331 The result is an even spread of IPv6 and IPv4 candidates among the 332 different candidate types (host, server reflexive, relay). The local 333 preference value is calculated separately for each candidate type. 335 7. IANA Considerations 337 None. 339 8. Security Considerations 341 STUN connectivity check using MAC computed during key exchanged in 342 the signaling channel provides message integrity and data origin 343 authentication as described in section 2.5 of [RFC5245] apply to this 344 use. 346 9. Acknowledgements 348 Authors would like to thank Dan Wing, Ari Keranen, Bernard Aboba, 349 Martin Thomson, Jonathan Lennox, Balint Menyhart and Simon Perreault 350 for their comments and review. 352 10. Normative References 354 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 355 Requirement Levels", BCP 14, RFC 2119, March 1997. 357 [RFC3484] Draves, R., "Default Address Selection for Internet 358 Protocol version 6 (IPv6)", RFC 3484, February 2003. 360 [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment 361 (ICE): A Protocol for Network Address Translator (NAT) 362 Traversal for Offer/Answer Protocols", RFC 5245, April 363 2010. 365 [RFC6555] Wing, D. and A. Yourtchenko, "Happy Eyeballs: Success with 366 Dual-Stack Hosts", RFC 6555, April 2012. 368 [RFC6724] Thaler, D., Draves, R., Matsumoto, A., and T. Chown, 369 "Default Address Selection for Internet Protocol Version 6 370 (IPv6)", RFC 6724, September 2012. 372 Authors' Addresses 373 Paal-Erik Martinsen 374 Cisco Systems, Inc. 375 Philip Pedersens Vei 22 376 Lysaker, Akershus 1325 377 Norway 379 Email: palmarti@cisco.com 381 Tirumaleswar Reddy 382 Cisco Systems, Inc. 383 Cessna Business Park, Varthur Hobli 384 Sarjapur Marathalli Outer Ring Road 385 Bangalore, Karnataka 560103 386 India 388 Email: tireddy@cisco.com 390 Prashanth Patil 391 Cisco Systems, Inc. 392 Bangalore 393 India 395 Email: praspati@cisco.com