idnits 2.17.1 draft-ietf-ice-dualstack-fairness-07.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. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 231: '...local preference MUST be unique for ea...' Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (November 14, 2016) is 2720 days in the past. Is this intentional? Checking references for intended status: Best Current Practice ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-20) exists of draft-ietf-ice-rfc5245bis-05 ** Obsolete normative reference: RFC 5245 (Obsoleted by RFC 8445, RFC 8839) ** Obsolete normative reference: RFC 6555 (Obsoleted by RFC 8305) ** Obsolete normative reference: RFC 6982 (Obsoleted by RFC 7942) Summary: 4 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 ICE P. Martinsen 3 Internet-Draft T. Reddy 4 Intended status: Best Current Practice P. Patil 5 Expires: May 18, 2017 Cisco 6 November 14, 2016 8 ICE Multihomed and IPv4/IPv6 Dual Stack Guidelines 9 draft-ietf-ice-dualstack-fairness-07 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 May 18, 2017. 36 Copyright Notice 38 Copyright (c) 2016 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. ICE Multihomed Recomendations . . . . . . . . . . . . . . . . 3 56 4. ICE Dual Stack Recomendations . . . . . . . . . . . . . . . . 4 57 5. Compatibility . . . . . . . . . . . . . . . . . . . . . . . . 5 58 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 59 7. Implementation Status . . . . . . . . . . . . . . . . . . . . 7 60 7.1. ICE-Dual Stack Fairness Test code . . . . . . . . . . . . 8 61 7.2. ICE-Dual Stack Fairness Test code . . . . . . . . . . . . 8 62 8. Security Considerations . . . . . . . . . . . . . . . . . . . 9 63 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 64 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 65 10.1. Normative References . . . . . . . . . . . . . . . . . . 9 66 10.2. Informative References . . . . . . . . . . . . . . . . . 10 67 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 69 1. Introduction 71 In multihomed and IPv4/IPv6 dual-stack environments ICE 72 [I-D.ietf-ice-rfc5245bis] would benefit by a fair distribution of its 73 connectivity checks across available interfaces or IP address types. 74 With a fair distribution of the connectivity checks, excessive delays 75 are avoided if a particular network path is broken or slow. It would 76 arguably be better to put the interfaces or address types known to 77 the application last in the checklist. However, the main motivation 78 by ICE is to make no assumptions regarding network topology, hence a 79 fair distribution of the connectivity checks is more appropriate. If 80 an application operates in a well-known environment is can safely 81 override the recommendation given in this document. 83 Applications should take special care to deprioritize network 84 interfaces known to provide unreliable connectivity when operating in 85 a multihomed environment. For example, certain tunnel services might 86 provide unreliable connectivity. Doing so will ensure a more fair 87 distribution of the connectivity checks across available network 88 interfaces on the device. The simple guidelines presented here 89 describe how to deprioritize interfaces known by the application to 90 provide unreliable connectivity. 92 There is also a need to introduce better handling of connectivity 93 checks for different IP address families in dual-stack IPv4/IPv6 ICE 94 scenarios. Following the recommendations from RFC6724 [RFC6724] will 95 lead to prioritization of IPv6 over IPv4 for the same candidate type. 97 Due to this, connectivity checks for candidates of the same type 98 (host, reflexive or relay) are sent such that an IP address family is 99 completely depleted before checks from the other address family are 100 started. This results in user noticeable setup delays if the path 101 for the prioritized address family is broken. 103 To avoid user noticeable delays when either IPv6 or IPv4 path is 104 broken or excessively slow, this specification encourages 105 intermingling the different address families when connectivity checks 106 are performed. This will lead to more sustained dual-stack IPv4/IPv6 107 deployment as users will no longer have an incentive to disable IPv6. 108 The cost is a small penalty to the address type that otherwise would 109 have been prioritized. Further this document recommends to keep 110 track of previous known connectivity problem and assign a lower 111 priority to those addresses. Specific mechanisms and rules for 112 tracking connectivity issues are out of scope for this document. 114 This document describes what parameters an agent can safely alter to 115 fairly order the checklist candidate pairs in multihomed and dual- 116 stack environments, thus affecting the sending order of the 117 connectivity checks. Actual values of those parameters is an 118 implementation detail. Dependant on the nomination method in use, 119 this might have an effect on what candidate pair ends up as the 120 active one. Ultimately it should be up to the agent to decide what 121 candidate pair is best suited for transporting media. 123 The guidelines outlined in this specification are backward compatible 124 with a standard ICE implementation. This specification only alters 125 the values used to create the resulting checklists in such a way that 126 the core mechanisms from ICE [RFC5245] and ICEbis 127 [I-D.ietf-ice-rfc5245bis] are still in effect. 129 2. Notational Conventions 131 This document uses terminology defined in [I-D.ietf-ice-rfc5245bis]. 133 3. ICE Multihomed Recomendations 135 A multihomed ICE agent can potentially send and receive connectivity 136 checks on all available interfaces and IP addresses. It is possible 137 for an interface to have several IP addresses associated with it. To 138 avoid unnecessary delay when performing connectivity checks it would 139 be beneficial to prioritize interfaces and IP addresses known by the 140 agent to provide stable connectivity. 142 The application knowledge regarding the reliability of an interface 143 can also be based on simple metrics like previous connection success/ 144 failure rates or a more static model based on interface types like 145 wired, wireless, cellular, virtual, tunneled in conjunction with 146 other operational metrics. This would require the application to 147 have the right permissions to obtain such operational metrics. 149 Candidates from an interface known to the application to provide 150 unreliable connectivity should get a low candidate priority. When to 151 consider connectivity as unreliable is implementation specific. 152 Usage of ICE is not limited to VoIP applications. What an 153 application sees as unreliability might be determined by a mix of how 154 long lived the connection is, how often setup is required and others, 155 for now unknown, requirements. This is purely an optimization to 156 speed up the ICE connectivity check phase. 158 If the application is unable to get any interface information 159 regarding type or unable to store any relevant metrics, it should 160 treat all interfaces as if they have reliable connectivity. This 161 ensures all interfaces gets their fair chance to perform their 162 connectivity checks. 164 4. ICE Dual Stack Recomendations 166 Candidates should be prioritized such that a sequence of candidates 167 belonging to the same address family will be intermingled with 168 candidates from an alternate IP family. For example, promoting IPv4 169 candidates in the presence of many IPv6 candidates such that an IPv4 170 address candidate is always present after a small sequence of IPv6 171 candidates, i.e., reordering candidates such that both IPv6 and IPv4 172 candidates get a fair chance during the connectivity check phase. 173 This makes ICE connectivity checks more responsive to broken path 174 failures of an address family. 176 An ICE agent can choose an algorithm or a technique of its choice to 177 ensure that the resulting check lists have a fair intermingled mix of 178 IPv4 and IPv6 address families. However, modifying the check list 179 directly can lead to uncoordinated local and remote check lists that 180 result in ICE taking longer to complete or in the worst case scenario 181 fail. The best approach is to set the appropriate value for local 182 preference in the formula for calculating the candidate priority 183 value described in ICE [I-D.ietf-ice-rfc5245bis] section "4.1.2.1 184 Recommended Formula". 186 Implementations should prioritize IPv6 candidates by putting some of 187 them first in the intermingled checklist. This increases the chance 188 of IPv6 connectivity checks to complete first and be ready for 189 nomination or usage. This enables implementations to follow the 190 intent of [RFC6555] "Happy Eyeballs: Success with Dual-Stack Hosts". 191 It is worth noting that the timing recommendations in [RFC6555] will 192 be overruled by how ICE paces out its connectivity checks. 194 A simple formula to calculate how many IPv6 addresses to put before 195 any IPv4 addresses could look like: 197 Hi = (N_4 + N_6) / N_4 199 Where Hi = Head start before intermingling starts 200 N_4 = Number of IPv4 addresses 201 N_6 = Number of IPv6 addresses 203 If a host have 2 IPv4 addresses and 6 IPv6 addresses, it will insert 204 an IP4 address after 4 IPv6 addresses by choosing the appropriate 205 local preference values when calculating the pair priorities. 207 5. Compatibility 209 ICE [I-D.ietf-ice-rfc5245bis] section "4.1.2 Prioritizing Candidates" 210 states that the formula in section "4.1.2.1 Recommended Formula" 211 should be used to calculate the candidate priority. The formula is 212 as follows: 214 priority = (2^24)*(type 215 preference) + (2^8)*(local preference) + (2^0)*(256 - 216 component ID) 218 ICE [I-D.ietf-ice-rfc5245bis] section "4.1.2.2 Guidelines for 219 Choosing Type and Local Preferences" has guidelines for how the type 220 preference and local preference value should be chosen. Instead of 221 having a static local preference value for IPv4 and IPv6 addresses, 222 it is possible to choose this value dynamically in such a way that 223 IPv4 and IPv6 address candidate priorities end up intermingled within 224 the same candidate type. It is also possible to assign lower 225 priorities to IP addresses derived from unreliable interfaces using 226 the local preference value. 228 It is worth mentioning that [I-D.ietf-ice-rfc5245bis] section 229 "4.1.2.1 Recommended Formula" says that; "if there are multiple 230 candidates for a particular component for a particular media stream 231 that has the same type, the local preference MUST be unique for each 232 one". 234 The local type preference can be dynamically changed in such a way 235 that IPv4 and IPv6 address candidates end up intermingled regardless 236 of candidate type. This is useful if there are a lot of IPv6 host 237 candidates effectively blocking connectivity checks for IPv4 server 238 reflexive candidates. 240 Candidates with IP addresses from an unreliable interface should be 241 ordered at the end of the checklist, i.e., not intermingled as the 242 dual-stack candidates. 244 The list below shows a sorted local candidate list where the priority 245 is calculated in such a way that the IPv4 and IPv6 candidates are 246 intermingled (No multihomed candidates). To allow for earlier 247 connectivity checks for the IPv4 server reflexive candidates, some of 248 the IPv6 host candidates are demoted. This is just an example of how 249 a candidate priorities can be calculated to provide better fairness 250 between IPv4 and IPv6 candidates without breaking any of the ICE 251 connectivity checks. 253 Candidate Address Component 254 Type Type ID Priority 255 ------------------------------------------- 256 (1) HOST IPv6 (1) 2129289471 257 (2) HOST IPv6 (2) 2129289470 258 (3) HOST IPv4 (1) 2129033471 259 (4) HOST IPv4 (2) 2129033470 260 (5) HOST IPv6 (1) 2128777471 261 (6) HOST IPv6 (2) 2128777470 262 (7) HOST IPv4 (1) 2128521471 263 (8) HOST IPv4 (2) 2128521470 264 (9) HOST IPv6 (1) 2127753471 265 (10) HOST IPv6 (2) 2127753470 266 (11) SRFLX IPv6 (1) 1693081855 267 (12) SRFLX IPv6 (2) 1693081854 268 (13) SRFLX IPv4 (1) 1692825855 269 (14) SRFLX IPv4 (2) 1692825854 270 (15) HOST IPv6 (1) 1692057855 271 (16) HOST IPv6 (2) 1692057854 272 (17) RELAY IPv6 (1) 15360255 273 (18) RELAY IPv6 (2) 15360254 274 (19) RELAY IPv4 (1) 15104255 275 (20) RELAY IPv4 (2) 15104254 277 SRFLX = server reflexive 279 Note that the list does not alter the component ID part of the 280 formula. This keeps the different components (RTP and RTCP) close in 281 the list. What matters is the ordering of the candidates with 282 component ID 1. Once the checklist is formed for a media stream the 283 candidate pair with component ID 1 will be tested first. If ICE 284 connectivity check is successful then other candidate pairs with the 285 same foundation will be unfrozen ([I-D.ietf-ice-rfc5245bis] section 286 5.1.3.4. Computing States). 288 The local and remote agent can have different algorithms for choosing 289 the local preference and type preference values without impacting the 290 synchronization between the local and remote check lists. 292 The check list is made up of candidate pairs. A candidate pair is 293 two candidates paired up and given a candidate pair priority as 294 described in [I-D.ietf-ice-rfc5245bis] section 5.1.3.2. Using the 295 pair priority formula: 297 pair priority = 2^32*MIN(G,D) + 2*MAX(G,D) + (G>D?1:0) 299 Where G is the candidate priority provided by the controlling agent 300 and D the candidate priority provided by the controlled agent. This 301 ensures that the local and remote check lists are coordinated. 303 Even if the two agents have different algorithms for choosing the 304 candidate priority value to get an intermingled set of IPv4 and IPv6 305 candidates, the resulting checklist, that is a list sorted by the 306 pair priority value, will be identical on the two agents. 308 The agent that has promoted IPv4 cautiously i.e. lower IPv4 candidate 309 priority values compared to the other agent, will influence the check 310 list the most due to (2^32*MIN(G,D)) in the formula. 312 These recommendations are backward compatible with a standard ICE 313 implementation. The resulting local and remote checklist will still 314 be synchronized. 316 Dependant of the nomination method in use the procedures described in 317 this document might change what candidate pair ends up as the active 318 one. 320 A test implementation of an example algorithm is available at 321 [ICE_dualstack_imp]. 323 6. IANA Considerations 325 None. 327 7. Implementation Status 329 [Note to RFC Editor: Please remove this section and reference to 330 [RFC6982] prior to publication.] 331 This section records the status of known implementations of the 332 protocol defined by this specification at the time of posting of this 333 Internet-Draft, and is based on a proposal described in [RFC6982]. 334 The description of implementations in this section is intended to 335 assist the IETF in its decision processes in progressing drafts to 336 RFCs. Please note that the listing of any individual implementation 337 here does not imply endorsement by the IETF. Furthermore, no effort 338 has been spent to verify the information presented here that was 339 supplied by IETF contributors. This is not intended as, and must not 340 be construed to be, a catalog of available implementations or their 341 features. Readers are advised to note that other implementations may 342 exist. 344 According to [RFC6982], "this will allow reviewers and working groups 345 to assign due consideration to documents that have the benefit of 346 running code, which may serve as evidence of valuable experimentation 347 and feedback that have made the implemented protocols more mature. 348 It is up to the individual working groups to use this information as 349 they see fit". 351 7.1. ICE-Dual Stack Fairness Test code 353 Organization: Cisco 355 Description: Open-Source ICE, TURN and STUN implementation. 357 Implementation: https://github.com/palerikm/ICE-DualStackFairness 359 Level of maturity: Code is stable. 361 Coverage: Follows the recommendations in this document 363 Licensing: BSD 365 Implementation experience: Straightforward as there are no 366 compatibility issues. 368 Contact: Paal-Erik Martinsen palmarti@cisco.com 370 7.2. ICE-Dual Stack Fairness Test code 372 Organization: Others 374 Description: Major ICE implementations, browser based and stand- 375 alone ICE, TURN and STUN implementations. 377 Implementation: Product specific. 379 Level of maturity: Code is stable and available in the wild. 381 Coverage: Implements the recommendations in this document. 383 Licensing: Some open source, some close source 385 Implementation experience: Already implemented in some of the 386 implementations. This document describes what needs to be done to 387 achieve the desired fairness. 389 8. Security Considerations 391 The security considerations described in [I-D.ietf-ice-rfc5245bis] 392 are still valid. It changes recommended values and describes how an 393 agent could choose those values in a safe way. In section Section 3 394 the agent can prioritize the network interface based on previous 395 network knowledge. This can potentially be unwanted information 396 leakage towards the remote agent. 398 9. Acknowledgements 400 Authors would like to thank Dan Wing, Ari Keranen, Bernard Aboba, 401 Martin Thomson, Jonathan Lennox, Balint Menyhart, Ole Troan, Simon 402 Perreault, Ben Cambell and Mirja Kuehlewind for their comments and 403 review. 405 10. References 407 10.1. Normative References 409 [I-D.ietf-ice-rfc5245bis] 410 Keranen, A., Holmberg, C., and J. Rosenberg, "Interactive 411 Connectivity Establishment (ICE): A Protocol for Network 412 Address Translator (NAT) Traversal", draft-ietf-ice- 413 rfc5245bis-05 (work in progress), October 2016. 415 [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment 416 (ICE): A Protocol for Network Address Translator (NAT) 417 Traversal for Offer/Answer Protocols", RFC 5245, DOI 418 10.17487/RFC5245, April 2010, 419 . 421 [RFC6555] Wing, D. and A. Yourtchenko, "Happy Eyeballs: Success with 422 Dual-Stack Hosts", RFC 6555, DOI 10.17487/RFC6555, April 423 2012, . 425 [RFC6724] Thaler, D., Ed., Draves, R., Matsumoto, A., and T. Chown, 426 "Default Address Selection for Internet Protocol Version 6 427 (IPv6)", RFC 6724, DOI 10.17487/RFC6724, September 2012, 428 . 430 [RFC6982] Sheffer, Y. and A. Farrel, "Improving Awareness of Running 431 Code: The Implementation Status Section", RFC 6982, DOI 432 10.17487/RFC6982, July 2013, 433 . 435 10.2. Informative References 437 [ICE_dualstack_imp] 438 Martinsen, P., "ICE DualStack Test Implementation github 439 repo", . 442 Authors' Addresses 444 Paal-Erik Martinsen 445 Cisco Systems, Inc. 446 Philip Pedersens Vei 22 447 Lysaker, Akershus 1325 448 Norway 450 Email: palmarti@cisco.com 452 Tirumaleswar Reddy 453 Cisco Systems, Inc. 454 Cessna Business Park, Varthur Hobli 455 Sarjapur Marathalli Outer Ring Road 456 Bangalore, Karnataka 560103 457 India 459 Email: tireddy@cisco.com 461 Prashanth Patil 462 Cisco Systems, Inc. 463 Bangalore 464 India 466 Email: praspati@cisco.com