idnits 2.17.1 draft-ietf-ice-trickle-13.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 3 instances of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (July 16, 2017) is 2475 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) == Outdated reference: A later version (-18) exists of draft-ietf-mmusic-trickle-ice-sip-07 -- Obsolete informational reference (is this intentional?): RFC 4566 (Obsoleted by RFC 8866) -- Obsolete informational reference (is this intentional?): RFC 5389 (Obsoleted by RFC 8489) -- Obsolete informational reference (is this intentional?): RFC 5766 (Obsoleted by RFC 8656) -- Obsolete informational reference (is this intentional?): RFC 6336 (Obsoleted by RFC 8839) Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group E. Ivov 3 Internet-Draft Atlassian 4 Intended status: Standards Track E. Rescorla 5 Expires: January 17, 2018 RTFM, Inc. 6 J. Uberti 7 Google 8 P. Saint-Andre 9 Filament 10 July 16, 2017 12 Trickle ICE: Incremental Provisioning of Candidates for the Interactive 13 Connectivity Establishment (ICE) Protocol 14 draft-ietf-ice-trickle-13 16 Abstract 18 This document describes "Trickle ICE", an extension to the 19 Interactive Connectivity Establishment (ICE) protocol that enables 20 ICE agents to send and receive candidates incrementally rather than 21 exchanging complete lists. With such incremental provisioning, ICE 22 agents can begin connectivity checks while they are still gathering 23 candidates and considerably shorten the time necessary for ICE 24 processing to complete. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on January 17, 2018. 43 Copyright Notice 45 Copyright (c) 2017 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 61 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 62 3. Determining Support for Trickle ICE . . . . . . . . . . . . . 5 63 4. Conveying the Initial ICE Description . . . . . . . . . . . . 6 64 5. Responder Procedures . . . . . . . . . . . . . . . . . . . . 7 65 5.1. Conveying the Initial Response . . . . . . . . . . . . . 7 66 5.2. Forming Check Lists and Beginning Connectivity 67 Checks . . . . . . . . . . . . . . . . . . . . . . . . . 7 68 6. Initiator Procedures . . . . . . . . . . . . . . . . . . . . 8 69 7. Performing Connectivity Checks . . . . . . . . . . . . . . . 8 70 7.1. Scheduling Checks . . . . . . . . . . . . . . . . . . . . 8 71 7.2. Check List and Timer State Updates . . . . . . . . . . . 9 72 8. Discovering and Conveying Additional Local Candidates . . . . 10 73 8.1. Pairing Newly Learned Candidates and Updating 74 Check Lists . . . . . . . . . . . . . . . . . . . . . . . 11 75 8.1.1. Inserting a New Pair in a Check List . . . . . . . . 12 76 8.2. Announcing End of Candidates . . . . . . . . . . . . . . 15 77 9. Receiving Additional Remote Candidates . . . . . . . . . . . 17 78 10. Receiving an End-Of-Candidates Indication . . . . . . . . . . 17 79 11. Trickle ICE and Peer Reflexive Candidates . . . . . . . . . . 17 80 12. Concluding ICE Processing . . . . . . . . . . . . . . . . . . 18 81 13. Subsequent Exchanges . . . . . . . . . . . . . . . . . . . . 18 82 14. Unilateral Use of Trickle ICE (Half Trickle) . . . . . . . . 18 83 15. Requirements for Signaling Protocols . . . . . . . . . . . . 19 84 16. Preserving Candidate Order while Trickling . . . . . . . . . 20 85 17. Example Flow . . . . . . . . . . . . . . . . . . . . . . . . 21 86 18. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21 87 19. Security Considerations . . . . . . . . . . . . . . . . . . . 22 88 20. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 22 89 21. References . . . . . . . . . . . . . . . . . . . . . . . . . 22 90 21.1. Normative References . . . . . . . . . . . . . . . . . . 22 91 21.2. Informative References . . . . . . . . . . . . . . . . . 22 92 Appendix A. Interaction with Regular ICE . . . . . . . . . . . . 24 93 Appendix B. Interaction with ICE Lite . . . . . . . . . . . . . 25 94 Appendix C. Changes from Earlier Versions . . . . . . . . . . . 26 95 C.1. Changes from draft-ietf-ice-trickle-12 . . . . . . . . . 26 96 C.2. Changes from draft-ietf-ice-trickle-11 . . . . . . . . . 26 97 C.3. Changes from draft-ietf-ice-trickle-10 . . . . . . . . . 27 98 C.4. Changes from draft-ietf-ice-trickle-09 . . . . . . . . . 27 99 C.5. Changes from draft-ietf-ice-trickle-08 . . . . . . . . . 27 100 C.6. Changes from draft-ietf-ice-trickle-07 . . . . . . . . . 27 101 C.7. Changes from draft-ietf-ice-trickle-06 . . . . . . . . . 27 102 C.8. Changes from draft-ietf-ice-trickle-05 . . . . . . . . . 27 103 C.9. Changes from draft-ietf-ice-trickle-04 . . . . . . . . . 27 104 C.10. Changes from draft-ietf-ice-trickle-03 . . . . . . . . . 28 105 C.11. Changes from draft-ietf-ice-trickle-02 . . . . . . . . . 28 106 C.12. Changes from draft-ietf-ice-trickle-01 . . . . . . . . . 28 107 C.13. Changes from draft-ietf-ice-trickle-00 . . . . . . . . . 28 108 C.14. Changes from draft-mmusic-trickle-ice-02 . . . . . . . . 28 109 C.15. Changes from draft-ivov-01 and draft-mmusic-00 . . . . . 29 110 C.16. Changes from draft-ivov-00 . . . . . . . . . . . . . . . 29 111 C.17. Changes from draft-rescorla-01 . . . . . . . . . . . . . 30 112 C.18. Changes from draft-rescorla-00 . . . . . . . . . . . . . 30 113 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 31 115 1. Introduction 117 The Interactive Connectivity Establishment (ICE) protocol 118 [rfc5245bis] describes mechanisms for gathering candidates, 119 prioritizing them, choosing default ones, exchanging them with a 120 remote party, pairing them, and ordering them into check lists. Once 121 all of these actions have been completed (and only then), the parties 122 can begin a phase of connectivity checks and eventually select the 123 pair of candidates that will be used in a media session or for a 124 given media stream. 126 Although the sequence described above has the advantage of being 127 relatively straightforward to implement and debug once deployed, it 128 can also be rather lengthy. Candidate gathering often involves 129 things like querying STUN [RFC5389] servers and allocating relayed 130 candidates at TURN [RFC5766] servers. All of these actions can be 131 delayed for a noticeable amount of time; although they can be run in 132 parallel, they still need to respect the pacing requirements from 133 [rfc5245bis], which is likely to delay them even further. Some or 134 all of these actions also need be completed by the responder. Both 135 agents would next perform connectivity checks and only then would 136 they be ready to begin streaming media. 138 These factors can lead to relatively lengthy session establishment 139 times and thus to a degraded user experience. 141 This document defines a supplementary mode of operation for ICE 142 implementations, known as "Trickle ICE", in which candidates can be 143 exchanged incrementally. This enables ICE agents to exchange 144 candidates as soon as an ICE session has been initiated and a 145 candidate has become available. Connectivity checks for a media 146 stream can also start as soon as the first candidates for that stream 147 become available. 149 Trickle ICE can reduce session establishment times in cases where 150 connectivity is confirmed for the first exchanged candidates (e.g., 151 where candidates for one of the agents are directly reachable from 152 the second agent, such as candidates at a media relay). Even when 153 this is not the case, performing candidate gathering for both agents 154 and connectivity checks in parallel can considerably shorten ICE 155 processing times. 157 It is worth noting that there is quite a bit of operational 158 experience with the Trickle ICE technique, going back as far as 2005 159 (when the XMPP Jingle extension defined a "dribble mode" as specified 160 in [XEP-0176]); this document incorporates feedback from those who 161 have implemented and deployed the technique. 163 In addition to the basics of Trickle ICE, this document also 164 describes how to discover support for Trickle ICE, how regular ICE 165 processing needs to be modified when building and updating check 166 lists, and how Trickle ICE implementations interoperate with agents 167 that only implement regular ICE processing as defined in 168 [rfc5245bis]. 170 This specification does not define the usage of Trickle ICE with any 171 specific signaling protocol (however, see 172 [I-D.ietf-mmusic-trickle-ice-sip] for usage with SIP [RFC3261] and 173 [XEP-0176] for usage with XMPP [RFC6120]). Similarly, it does not 174 define Trickle ICE in terms of the Session Description Protocol (SDP) 175 [RFC4566] or the offer/answer model [RFC3264] because the technique 176 can be and already is used in application protocols that are not tied 177 to SDP or to offer/answer semantics. However, because SDP and the 178 offer/answer model are familiar to most readers of this 179 specification, some examples in this document use those particulars 180 in order to explain the underlying concepts. 182 2. Terminology 184 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 185 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 186 document are to be interpreted as described in [RFC2119]. 188 This specification makes use of all terminology defined for 189 Interactive Connectivity Establishment in [rfc5245bis]. In addition, 190 it defines the following terms: 192 Generation: All of the candidates conveyed within an ICE session; 193 these are the candidates that are associated with a specific 194 local/remote ufrag pair (which will change on ICE restart, if any 195 occurs). 197 ICE Description: Any session-related (as opposed to candidate- 198 related) attributes required to configure an ICE agent. These 199 include but are not limited to the username fragment, password, 200 and other attributes. 202 Trickled Candidates: Candidates that a Trickle ICE agent conveys 203 after conveying the initial ICE description or responding to the 204 initial ICE description, but within the same ICE session. 205 Trickled candidates can be conveyed in parallel with candidate 206 gathering and connectivity checks. 208 Trickling: The act of conveying trickled candidates. 210 Half Trickle: A Trickle ICE mode of operation where the initiator 211 gathers a full generation of candidates strictly before creating 212 and conveying the initial ICE description. Once conveyed, this 213 candidate information can be processed by regular ICE agents, 214 which do not require support for this specification. It also 215 allows Trickle ICE capable responders to still gather candidates 216 and perform connectivity checks in a non-blocking way, thus 217 roughly providing "half" the advantages of Trickle ICE. The 218 mechanism is mostly meant for use in cases where the responder's 219 support for Trickle ICE cannot be confirmed prior to conveying the 220 initial ICE description. 222 Full Trickle: The typical mode of operation for Trickle ICE agents, 223 in which the initial ICE description can include any number of 224 candidates (even zero candidates) and does not need to include a 225 full generation of candidates as in half trickle. 227 3. Determining Support for Trickle ICE 229 To fully support Trickle ICE, applications SHOULD incorporate one of 230 the following mechanisms to enable implementations to determine 231 whether Trickle ICE is supported: 233 1. Provide a capabilities discovery method so that agents can verify 234 support of Trickle ICE prior to initiating a session (XMPP's 235 Service Discovery [XEP-0030] is one such mechanism). 237 2. Make support for Trickle ICE mandatory so that user agents can 238 assume support. 240 If an application protocol does not provide a method of determining 241 ahead of time whether Trickle ICE is supported, agents can make use 242 of the half trickle procedure described in Section 14. 244 Prior to conveying the initial ICE description, agents using 245 signaling protocols that support capabilities discovery can attempt 246 to verify whether or not the remote party supports Trickle ICE. If 247 an agent determines that the remote party does not support Trickle 248 ICE, it MUST fall back to using regular ICE or abandon the entire 249 session. 251 Even if a signaling protocol does not include a capabilities 252 discovery method, a user agent can provide an indication within the 253 ICE description that it supports Trickle ICE using a token of 254 "trickle" in the ice-options attribute. This token MUST be provided 255 either at the session level or, if at the media stream level, for 256 every media stream (an agent MUST NOT specify Trickle ICE support for 257 some media streams but not others). 259 Dedicated discovery semantics and half trickle are needed only prior 260 to session initiation. After a session is established and Trickle 261 ICE support is confirmed for both parties, either agent can use full 262 trickle for subsequent exchanges. 264 4. Conveying the Initial ICE Description 266 An initiator can start gathering candidates as soon as it has an 267 indication that communication is imminent (e.g., a user interface cue 268 or an explicit request to initiate a session). Unlike in regular 269 ICE, in Trickle ICE implementations do not need to gather candidates 270 in a blocking manner. Therefore, unless half trickle is being used, 271 the initiator SHOULD generate and transmit their initial ICE 272 description as early as possible, so that the remote party can start 273 gathering and trickling candidates. 275 An initiator MAY include any mix of candidates when conveying the 276 initial ICE description. This includes the possibility of conveying 277 all the candidates the initiator plans to use (as in half trickle 278 mode), conveying only a publicly-reachable IP address (e.g., a 279 candidate at a media relay that is known to not be behind a 280 firewall), or conveying no candidates at all (in which case the 281 initiator can obtain the responder's initial candidate list sooner 282 and the responder can begin candidate gathering more quickly). 284 Methods for calculating priorities and foundations, as well as 285 determining redundancy of candidates, work just as with regular ICE 286 (with the exception of pruning of duplicate peer reflexive candidates 287 as described under Section 5.2). 289 5. Responder Procedures 291 When a responder receives the initial ICE description, it will first 292 check if the ICE description or initiator indicates support for 293 Trickle ICE as explained in Section 3. If this is not the case, the 294 responder MUST process the initial ICE description according to 295 regular ICE procedures [rfc5245bis] (or, if no ICE support is 296 detected at all, according to relevant processing rules for the 297 underlying signaling protocol, such as offer/answer processing rules 298 [RFC3264]). 300 If support for Trickle ICE is confirmed, a responder will 301 automatically assume support for regular ICE as well. Specifically, 302 the rules from [rfc5245bis] would imply that ICE itself is not 303 supported if the initial ICE description includes no candidates; 304 however, such a conclusion is not warranted if the responder can 305 confirm that the initiator supports Trickle ICE; in this case, 306 fallback to [RFC3264] is not necessary. 308 If the initial ICE description indicates support for Trickle ICE, the 309 responder will determine its role and start gathering and 310 prioritizing candidates; while doing so, it will also respond by 311 conveying its own ICE description, so that both the initiator and the 312 responder can start forming check lists and begin connectivity 313 checks. 315 5.1. Conveying the Initial Response 317 A responder can respond to the initial ICE description at any point 318 while gathering candidates. Here again the ICE description MAY 319 contain any set of candidates, including all candidates or no 320 candidates. (The benefit of including no candidates is to convey the 321 ICE description as quickly as possible, so that both parties can 322 consider the overall session to be under active negotiation as soon 323 as possible.) 325 As noted in Section 3, in application protocols that use SDP the 326 responder's ICE description can indicate support for Trickle ICE by 327 including a token of "trickle" in the ice-options attribute. 329 5.2. Forming Check Lists and Beginning Connectivity Checks 331 As soon as the agents have obtained local and remote candidates, both 332 agents begin forming candidate pairs, computing candidate pair 333 priorities, ordering candidate pairs, pruning duplicate pairs, and 334 creating check lists according to regular ICE procedures 335 [rfc5245bis]. 337 According to those procedures, in order for candidate pairing to be 338 possible and for duplicate candidates to be pruned, the candidates 339 would need to be provided in the relevant ICE descriptions. Under 340 Trickle ICE, check lists can be empty until candidates are conveyed 341 or received. Therefore Trickle ICE agents handle check lists and 342 candidate pairing in a slightly different way than regular ICE 343 agents: the agents still create the check lists, but they populate 344 the check lists only after they actually have the candidate pairs. 346 A Trickle ICE agent initially considers all check lists to be frozen. 347 It then inspects the first check list and attempts to unfreeze all 348 candidate pairs it has received so far that belong to the first 349 component on the first media stream (i.e., the first media stream 350 that was reported to the ICE implementation from the using 351 application). If that first component of the first media stream does 352 not contain candidates for one or more of the currently known pair 353 foundations, and if candidate pairs already exist for that foundation 354 in one of the following components or media streams, then the agent 355 unfreezes the first of those candidate pairs. 357 With regard to pruning of duplicate candidate pairs, a Trickle ICE 358 agent SHOULD follow a policy of keeping the higher priority candidate 359 unless it is peer reflexive. 361 6. Initiator Procedures 363 When processing the initial ICE description from a responder, the 364 initiator follows regular ICE procedures to determine its role, after 365 which it forms check lists (as described in Section 5.2) and begins 366 connectivity checks. 368 7. Performing Connectivity Checks 370 For the most part, Trickle ICE agents perform connectivity checks 371 following regular ICE procedures. However, the fact that gathering 372 and communicating candidates is asynchronous in Trickle ICE imposes a 373 number of changes as described in the following sections. 375 7.1. Scheduling Checks 377 The ICE specification [rfc5245bis], Section 5.1.4, requires that an 378 agent will terminate the timer for a triggered check in relation to 379 an active check list once the agent has exhausted all frozen pairs in 380 the check list. This will not work with Trickle ICE, because more 381 pairs will be added to the check list incrementally. 383 Therefore, a Trickle ICE agent SHOULD NOT terminate the timer until 384 the state of the check list is Completed or Failed as specified 385 herein (see Section 8.2). 387 7.2. Check List and Timer State Updates 389 The ICE specification [rfc5245bis], Section 6.2.5.3.3, requires that 390 agents update check lists and timer states upon completing a 391 connectivity check transaction. During such an update, regular ICE 392 agents would set the state of a check list to Failed if both of the 393 following two conditions are satisfied: 395 o all of the pairs in the check list are either in the Failed state 396 or Succeeded state; and 398 o there is not a pair in the valid list for each component of the 399 media stream. 401 With Trickle ICE, the above situation would often occur when 402 candidate gathering and trickling are still in progress, even though 403 it is quite possible that future checks will succeed. For this 404 reason, Trickle ICE agents add the following conditions to the above 405 list: 407 o all candidate gathering has completed and the agent is not 408 expecting to discover any new local candidates; 410 o the remote agent has conveyed an end-of-candidates indication for 411 that check list as described in Section 8.2. 413 When a check list is set to Failed as described above, regular ICE 414 requires the agent to update all other check lists, placing one pair 415 from each check list into the Waiting state - effectively unfreezing 416 all remaining check lists. However, under Trickle ICE other check 417 lists might still be empty at this point (because candidates have not 418 yet been received), and following only the rules from regular ICE 419 would prevent the agent from unfreezing those check lists (because 420 the state of a check list depends on the state of the candidate pairs 421 in that check list, but there are none yet). Therefore a Trickle ICE 422 agent needs to monitor whether a check list is active or frozen 423 independently of the state of the candidate pairs in the check list 424 (since there might not be any pairs yet). With regard to empty check 425 lists, by default a Trickle ICE agent MAY consider an empty check 426 list to be either active or frozen. When a Trickle ICE agent 427 considers an empty check list to be frozen, during the candidate 428 checking process it SHOULD change the check list to active if 429 checking of another check list is completely finished (i.e., if every 430 pair in the other check list is either Successful or Failed), if 431 another check list has a valid candidate pair for all components, or 432 if it adds a candidate pair to the check list (because, in accordance 433 with Section 8.1.1, when inserting a new candidate pair into an empty 434 check list, the agent sets the pair to a state of Waiting). 436 8. Discovering and Conveying Additional Local Candidates 438 After candidate information has been conveyed, agents will most 439 likely continue discovering new local candidates as STUN, TURN, and 440 other non-host candidate gathering mechanisms begin to yield results. 441 Whenever an agent discovers such a new candidate it will compute its 442 priority, type, foundation and component ID according to regular ICE 443 procedures. 445 The new candidate is then checked for redundancy against the existing 446 list of local candidates. If its transport address and base match 447 those of an existing candidate, it will be considered redundant and 448 will be ignored. This would often happen for server reflexive 449 candidates that match the host addresses they were obtained from 450 (e.g., when the latter are public IPv4 addresses). Contrary to 451 regular ICE, Trickle ICE agents will consider the new candidate 452 redundant regardless of its priority. 454 Next the agent "trickles" the newly discovered candidate(s) to the 455 remote agent. The actual delivery of the new candidates is handled 456 by a signaling protocol such as SIP or XMPP. Trickle ICE imposes no 457 restrictions on the way this is done (e.g., some applications may 458 choose not to trickle updates for server reflexive candidates and 459 instead rely on the discovery of peer reflexive ones). 461 When candidates are trickled, the signaling protocol MUST deliver 462 each candidate to the receiving Trickle ICE implementation not more 463 than once and in the same order it was conveyed. If the signaling 464 protocol provides any candidate retransmissions, they need to be 465 hidden from the ICE implementation. 467 Also, candidate trickling needs to be correlated to a specific ICE 468 session, so that if there is an ICE restart, any delayed updates for 469 a previous session can be recognized as such and ignored by the 470 receiving party. For example, applications that choose to signal 471 candidates via SDP may include a ufrag value in the corresponding 472 a=candidate line such as: 474 a=candidate:1 1 UDP 2130706431 2001:db8::1 5000 typ host ufrag 8hhY 476 Or as another example, WebRTC implementations may include a ufrag in 477 the JavaScript objects that represent candidates. 479 Note: The signaling protocol needs to provide a mechanism for both 480 parties to indicate and agree on the ICE session in force (as 481 identified by the ufrag) so that they have a consistent view of which 482 candidates are to be paired. This is especially important in the 483 case of ICE restarts (see Section 13). 485 Once the candidate has been conveyed to the remote party, the agent 486 checks if any remote candidates are currently known for this same 487 stream and component. If not, the new candidate will simply be added 488 to the list of local candidates. 490 Otherwise, if the agent has already learned of one or more remote 491 candidates for this stream and component, it will begin pairing the 492 new local candidates with them and adding the pairs to the existing 493 check lists according to their priority. 495 Note: A Trickle ICE agent MUST NOT pair a local candidate until it 496 has been trickled to the remote agent. 498 8.1. Pairing Newly Learned Candidates and Updating Check Lists 500 Forming candidate pairs works as described in the ICE specification 501 [rfc5245bis]. However, actually adding the new pair to a check list 502 happens according to the rules described below. 504 If the check list where the pair is to be added already contains the 505 maximum number of candidate pairs (100 by default as per 506 [rfc5245bis]), the new pair is discarded. 508 If the new pair's local candidate is server reflexive, the server 509 reflexive candidate MUST be replaced by its base before adding the 510 pair to the list. 512 Once this is done, the agent examines the check list looking for 513 another pair that would be redundant with the new one. If such a 514 pair exists and the type of its remote candidate is not peer 515 reflexive, the pair with the higher priority is kept and the one with 516 the lower priority is discarded. If, on the other hand, the type of 517 the remote candidate in the pre-existing pair is peer reflexive, the 518 agent MUST replace it with the newly formed pair (regardless of their 519 respective priorities); this is done by setting the priority of the 520 new candidate to the priority of the pre-existing candidate and then 521 re-sorting the check list. 523 For all other pairs, including those with a server reflexive local 524 candidate that were not found to be redundant, the rules specified in 525 the following section apply. 527 8.1.1. Inserting a New Pair in a Check List 529 Consider the following tabular representation of all check lists in 530 an agent (note that initially for one of the foundations, i.e., f5, 531 there are no candidate pairs): 533 +-----------------+------+------+------+------+------+ 534 | | f1 | f2 | f3 | f4 | f5 | 535 +-----------------+------+------+------+------+------+ 536 | m1 (Audio.RTP) | F | F | F | | | 537 +-----------------+------+------+------+------+------+ 538 | m2 (Audio.RTCP) | F | F | F | F | | 539 +-----------------+------+------+------+------+------+ 540 | m3 (Video.RTP) | F | | | | | 541 +-----------------+------+------+------+------+------+ 542 | m4 (Video.RTCP) | F | | | | | 543 +-----------------+------+------+------+------+------+ 545 Figure 1: Example of Check List State 547 Each row in the table represents a component for a given media stream 548 (e.g., m1 and m2 might be the RTP and RTCP components for audio). 549 Each column represents one foundation. Each cell represents one 550 candidate pair. In the foregoing table, "F" stands for "frozen"; in 551 the tables below, "W" stands for "waiting" and "S" stands for 552 "succeeded". 554 When an agent commences ICE processing, in accordance with 555 Section 5.1.2.6 of [rfc5245bis] it will unfreeze (i.e., place in the 556 Waiting state) the topmost candidate pair in every column (i.e., the 557 pair with the lowest component ID). This state is shown in the 558 following table, with candidate pairs in the Waiting state marked by 559 "W". 561 +-----------------+------+------+------+------+------+ 562 | | f1 | f2 | f3 | f4 | f5 | 563 +-----------------+------+------+------+------+------+ 564 | m1 (Audio.RTP) | W | W | W | | | 565 +-----------------+------+------+------+------+------+ 566 | m2 (Audio.RTCP) | F | F | F | W | | 567 +-----------------+------+------+------+------+------+ 568 | m3 (Video.RTP) | F | | | | | 569 +-----------------+------+------+------+------+------+ 570 | m4 (Video.RTCP) | F | | | | | 571 +-----------------+------+------+------+------+------+ 573 Figure 2: Initial Check List State 575 Then, as the checks proceed (see Section 6.2.5.4 of [rfc5245bis]), 576 for each pair that enters the Succeeded state (denoted here by "S"), 577 the agent will unfreeze all pairs for all media streams with the same 578 foundation (e.g., if the pair in column 1, row 1 succeeds then the 579 agent will unfreeze the pair in column 1, rows 2, 3, and 4). 581 +-----------------+------+------+------+------+------+ 582 | | f1 | f2 | f3 | f4 | f5 | 583 +-----------------+------+------+------+------+------+ 584 | m1 (Audio.RTP) | S | W | W | | | 585 +-----------------+------+------+------+------+------+ 586 | m2 (Audio.RTCP) | W | F | F | W | | 587 +-----------------+------+------+------+------+------+ 588 | m3 (Video.RTP) | W | | | | W | 589 +-----------------+------+------+------+------+------+ 590 | m4 (Video.RTCP) | W | | | | F | 591 +-----------------+------+------+------+------+------+ 593 Figure 3: Check List State with Unfrozen Media Stream 595 Trickle ICE preserves all of these rules as they apply to what we 596 might call "static" check list sets. This implies that if, for some 597 reason, a Trickle agent were to begin connectivity checks with all of 598 its pairs already present, the way that pair states change is 599 indistinguishable from that of a regular ICE agent. 601 Of course, the major difference with Trickle ICE is that check list 602 sets can be dynamically updated because candidates can arrive after 603 connectivity checks have started. When this happens, an agent sets 604 the state of the newly formed pair as described below. 606 Case 1: If the newly formed pair is the topmost pair in its column 607 (i.e. the topmost pair among all the check lists for this 608 foundation), set the state to Waiting (e.g., this would be the case 609 if the newly formed pair were placed in column 5, row 1). 611 +-----------------+------+------+------+------+------+ 612 | | f1 | f2 | f3 | f4 | f5 | 613 +-----------------+------+------+------+------+------+ 614 | m1 (Audio.RTP) | S | W | W | | W | 615 +-----------------+------+------+------+------+------+ 616 | m2 (Audio.RTCP) | W | F | F | W | | 617 +-----------------+------+------+------+------+------+ 618 | m3 (Video.RTP) | W | | | | | 619 +-----------------+------+------+------+------+------+ 620 | m4 (Video.RTCP) | W | | | | | 621 +-----------------+------+------+------+------+------+ 623 Figure 4: Check List State with Newly Formed Pair, Case 1 625 Case 2: If the pair immediately above the newly formed pair in its 626 column is in the Succeeded state, set the state to Waiting (e.g., 627 this would be the case if the pair in column 5, row 1 succeeded and 628 the newly formed pair were placed in column 5, row 2); 630 +-----------------+------+------+------+------+------+ 631 | | f1 | f2 | f3 | f4 | f5 | 632 +-----------------+------+------+------+------+------+ 633 | m1 (Audio.RTP) | S | W | W | | S | 634 +-----------------+------+------+------+------+------+ 635 | m2 (Audio.RTCP) | W | F | F | W | W | 636 +-----------------+------+------+------+------+------+ 637 | m3 (Video.RTP) | W | | | | | 638 +-----------------+------+------+------+------+------+ 639 | m4 (Video.RTCP) | W | | | | | 640 +-----------------+------+------+------+------+------+ 642 Figure 5: Check List State with Newly Formed Pair, Case 2 644 Case 3: If there is at least one Succeeded pair in its column above 645 the row of the newly formed pair, set the state to Waiting (e.g., 646 this would be the case if the pair in column 5, row 1 succeeded and 647 two newly formed pairs were placed in column 5, rows 3 and 4). 649 +-----------------+------+------+------+------+------+ 650 | | f1 | f2 | f3 | f4 | f5 | 651 +-----------------+------+------+------+------+------+ 652 | m1 (Audio.RTP) | S | W | W | | S | 653 +-----------------+------+------+------+------+------+ 654 | m2 (Audio.RTCP) | W | F | F | W | W | 655 +-----------------+------+------+------+------+------+ 656 | m3 (Video.RTP) | W | | | | W | 657 +-----------------+------+------+------+------+------+ 658 | m4 (Video.RTCP) | W | | | | W | 659 +-----------------+------+------+------+------+------+ 661 Figure 6: Check List State with Newly Formed Pair, Case 3 663 Case 4: In all other cases, set the state to Frozen. 665 8.2. Announcing End of Candidates 667 Once all candidate gathering is completed or expires for an ICE 668 session associated with a specific media stream, the agent will 669 generate an "end-of-candidates" indication for that session and 670 convey it to the remote agent via the signaling channel. Although 671 the exact form of the indication depends on the application protocol, 672 the indication MUST specify the generation (ufrag/pwd combination) so 673 that an agent can correlate the end-of-candidates indication with a 674 particular ICE session. The indication can be conveyed in the 675 following ways: 677 o As part of an initiation request (which would typically be the 678 case with the initial ICE description for half trickle) 680 o Along with the last candidate an agent can send for a stream 682 o As a standalone notification (e.g., after STUN Binding requests or 683 TURN Allocate requests to a server time out and the agent has is 684 not actively gathering candidates) 686 Conveying an end-of-candidates indication in a timely manner is 687 important in order to avoid ambiguities and speed up the conclusion 688 of ICE processing. In particular: 690 o A controlled Trickle ICE agent SHOULD convey an end-of-candidates 691 indication after it has completed gathering for a media stream, 692 unless ICE processing terminates before the agent has had a chance 693 to complete gathering. 695 o A controlling agent MAY conclude ICE processing prior to conveying 696 end-of-candidates indications for all streams. However, it is 697 RECOMMENDED for a controlling agent to convey end-of-candidates 698 indications whenever possible for the sake of consistency and to 699 keep middleboxes and controlled agents up-to-date on the state of 700 ICE processing. 702 When conveying an end-of-candidates indication during trickling 703 (rather than as a part of the initial ICE description or a response 704 thereto), it is the responsibility of the using protocol to define 705 methods for relating the indication to one or more specific media 706 streams. 708 Receiving an end-of-candidates indication enables an agent to update 709 check list states and, in case valid pairs do not exist for every 710 component in every media stream, determine that ICE processing has 711 failed. It also enables an agent to speed up the conclusion of ICE 712 processing when a candidate pair has been validated but it involves 713 the use of lower-preference transports such as TURN. In such 714 situations, an implementation MAY choose to wait and see if higher- 715 priority candidates are received; in this case the end-of-candidates 716 indication provides a notification that such candidates are not 717 forthcoming. 719 An agent MAY also choose to generate an end-of-candidates indication 720 before candidate gathering has actually completed, if the agent 721 determines that gathering has continued for more than an acceptable 722 period of time. However, an agent MUST NOT convey any more 723 candidates after it has conveyed an end-of-candidates indication. 725 When performing half trickle, an agent SHOULD convey an end-of- 726 candidates indication together with its initial ICE description 727 unless it is planning to potentially trickle additional candidates 728 (e.g., in case the remote party turns out to support Trickle ICE). 730 After an agent conveys the end-of-candidates indication, it will 731 update the state of the corresponding check list as explained in 732 Section 7.2. Past that point, an agent MUST NOT trickle any new 733 candidates within this ICE session. After an agent has received an 734 end-of-candidates indication, it MUST also ignore any newly received 735 candidates for that media stream or media session. Therefore, adding 736 new candidates to the negotiation is possible only through an ICE 737 restart (see Section 13). 739 This specification does not override regular ICE semantics for 740 concluding ICE processing. Therefore, even if end-of-candidates 741 indications are conveyed, an agent will still need to go through pair 742 nomination. Also, if pairs have been nominated for components and 743 media streams, ICE processing MAY still conclude even if end-of- 744 candidates indications have not been received for all streams. 746 9. Receiving Additional Remote Candidates 748 At any time during ICE processing, a Trickle ICE agent might receive 749 new candidates from the remote agent. When this happens and no local 750 candidates are currently known for this same stream, the new remote 751 candidates are added to the list of remote candidates. 753 Otherwise, the new candidates are used for forming candidate pairs 754 with the pool of local candidates and they are added to the local 755 check lists as described in Section 8.1. 757 Once the remote agent has completed candidate gathering, it will 758 convey an end-of-candidates indication. Upon receiving such an 759 indication, the local agent MUST update check list states as per 760 Section 7.2. This might lead to some check lists being marked as 761 Failed. 763 10. Receiving an End-Of-Candidates Indication 765 When an agent receives an end-of-candidates indication for a specific 766 media stream, it will update the state of the relevant check list as 767 per Section 7.2. If the check list is still in the Active state 768 after the update, the agent will persist the fact that an end-of- 769 candidates indication has been received and take it into account in 770 future updates to the check list. 772 11. Trickle ICE and Peer Reflexive Candidates 774 Even though Trickle ICE does not explicitly modify the procedures for 775 handling peer-reflexive candidates, use of Trickle ICE can have an 776 impact on how they are processed. With Trickle ICE, it is possible 777 that server reflexive candidates can be discovered as peer reflexive 778 in cases where incoming connectivity checks are received from these 779 candidates before the trickle updates that carry them. 781 While this would certainly increase the number of cases where ICE 782 processing nominates and selects candidates discovered as peer- 783 reflexive, it does not require any change in processing. 785 It is also likely that some applications would prefer not to trickle 786 server reflexive candidates to entities that are known to be publicly 787 accessible and where sending a direct STUN binding request is likely 788 to reach the destination faster than the trickle update that travels 789 through the signaling path. 791 12. Concluding ICE Processing 793 This specification does not directly modify the procedures for ending 794 ICE processing described in Section 7 of [rfc5245bis], and Trickle 795 ICE implementations follow the same rules. 797 13. Subsequent Exchanges 799 Either agent MAY convey subsequent candidate information at any time 800 allowed by the signaling protocol in use. When this happens, agents 801 will use [rfc5245bis] semantics to determine whether or not the new 802 candidate information require an ICE restart. If an ICE restart 803 occurs, the agents can assume that Trickle ICE is still supported if 804 support was determined previously, and thus can engage in Trickle ICE 805 behavior as they would in an initial exchange of ICE descriptions 806 where support was determined through a capabilities discovery method. 808 14. Unilateral Use of Trickle ICE (Half Trickle) 810 In half trickle mode, the initiator conveys the initial ICE 811 description with a full generation of candidates. This ensures that 812 the ICE description can be processed by a regular ICE responder and 813 is mostly meant for use in cases where support for Trickle ICE cannot 814 be confirmed prior to conveying the initial ICE description. The 815 initial ICE description indicate support for Trickle ICE, which means 816 the responder can respond with something less than a full generation 817 of candidates and then trickle the rest. The initial ICE description 818 for half trickle would typically contain an end-of-candidates 819 indication, although this is not mandatory because if trickle support 820 is confirmed then the initiator can choose to trickle additional 821 candidates before it conveys an end-of-candidates indication. 823 The half trickle mechanism can be used in cases where there is no way 824 for an agent to verify in advance whether a remote party supports 825 Trickle ICE. Because the initial ICE description contain a full 826 generation of candidates, it can thus be handled by a regular ICE 827 agent, while still allowing a Trickle ICE agent to use the 828 optimization defined in this specification. This prevents 829 negotiation from failing in the former case while still giving 830 roughly half the Trickle ICE benefits in the latter (hence the name 831 of the mechanism). 833 Use of half trickle is only necessary during an initial exchange of 834 ICE descriptions. After both parties have received an ICE 835 description from their peer, they can each reliably determine Trickle 836 ICE support and use it for all subsequent exchanges. 838 In some instances, using half trickle might bring more than just half 839 the improvement in terms of user experience. This can happen when an 840 agent starts gathering candidates upon user interface cues that the 841 user will soon be initiating an interaction, such as activity on a 842 keypad or the phone going off hook. This would mean that some or all 843 of the candidate gathering could be completed before the agent 844 actually needs to convey the candidate information. Because the 845 responder will be able to trickle candidates, both agents will be 846 able to start connectivity checks and complete ICE processing earlier 847 than with regular ICE and potentially even as early as with full 848 trickle. 850 However, such anticipation is not always possible. For example, a 851 multipurpose user agent or a WebRTC web page where communication is a 852 non-central feature (e.g., calling a support line in case of a 853 problem with the main features) would not necessarily have a way of 854 distinguishing between call intentions and other user activity. In 855 such cases, using full trickle is most likely to result in an ideal 856 user experience. Even so, using half trickle would be an improvement 857 over regular ICE because it would result in a better experience for 858 responders. 860 15. Requirements for Signaling Protocols 862 In order to fully enable the use of Trickle ICE, this specification 863 defines the following requirements for signaling protocols. 865 o A signaling protocol SHOULD provide a way for parties to advertise 866 and discover support for Trickle ICE before an ICE session begins 867 (see Section 3). 869 o A signaling protocol MUST provide methods for incrementally 870 conveying (i.e., "trickling") additional candidates after 871 conveying the initial ICE description (see Section 8). 873 o A signaling protocol MUST deliver each trickled candidate not more 874 than once and in the same order it was conveyed (see Section 8). 876 o A signaling protocol MUST provide a mechanism for both parties to 877 indicate and agree on the ICE session in force (see Section 8). 879 o A signaling protocol MUST provide a way for parties to communicate 880 the end-of-candidates indication, which MUST specify the 881 particular ICE session to which the indication applies (see 882 Section 8.2). 884 16. Preserving Candidate Order while Trickling 886 One important aspect of regular ICE is that connectivity checks for a 887 specific foundation and component are attempted simultaneously by 888 both agents, so that any firewalls or NATs fronting the agents would 889 whitelist both endpoints and allow all except for the first 890 ("suicide") packets to go through. This is also important to 891 unfreezing candidates at the right time. While not crucial, 892 preserving this behavior in Trickle ICE is likely to improve ICE 893 performance. 895 To achieve this, when trickling candidates, agents MUST respect the 896 order in which the components and streams appear (implicitly or 897 explicitly) as they have been negotiated by means of the relevant 898 candidate information. Therefore a candidate for a specific 899 component MUST NOT be conveyed prior to candidates for other 900 components within the same foundation. In addition, candidates MUST 901 be paired, following the procedures in Section 8.1.1, in the same 902 order they are conveyed. 904 For example, the following SDP description contains two components 905 (RTP and RTCP) and two foundations (host and server reflexive): 907 v=0 908 o=jdoe 2890844526 2890842807 IN IP6 2001:db8:a0b:12f0::1 909 s= 910 c=IN IP6 2001:db8:a0b:12f0::1 911 t=0 0 912 a=ice-pwd:asd88fgpdd777uzjYhagZg 913 a=ice-ufrag:8hhY 914 m=audio 5000 RTP/AVP 0 915 a=rtpmap:0 PCMU/8000 916 a=candidate:1 1 UDP 2130706431 2001:db8:a0b:12f0::1 5000 typ host 917 a=candidate:1 2 UDP 2130706431 2001:db8:a0b:12f0::1 5001 typ host 918 a=candidate:2 1 UDP 1694498815 2001:db8:a0b:12f0::3 5000 typ srflx 919 raddr 2001:db8:a0b:12f0::1 rport 8998 920 a=candidate:2 2 UDP 1694498815 2001:db8:a0b:12f0::3 5001 typ srflx 921 raddr 2001:db8:a0b:12f0::1 rport 8998 923 For this candidate information the RTCP host candidate MUST NOT be 924 conveyed prior to the RTP host candidate. Similarly the RTP server 925 reflexive candidate MUST be conveyed together with or prior to the 926 RTCP server reflexive candidate. 928 Similar considerations apply at the level of media streams in 929 addition to foundations; this is covered by the requirement to always 930 start unfreezing candidates starting from the first media stream as 931 described under Section 5.2. 933 17. Example Flow 935 As an example, a typical successful Trickle ICE exchange with a 936 signaling protocol that follows the offer/answer model would look 937 this way: 939 Alice Bob 940 | Offer | 941 |---------------------------------------------->| 942 | Additional Candidates | 943 |---------------------------------------------->| 944 | | 945 | Answer | 946 |<----------------------------------------------| 947 | Additional Candidates | 948 |<----------------------------------------------| 949 | | 950 | Additional Candidates and Connectivity Checks | 951 |<--------------------------------------------->| 952 | | 953 |<=============== MEDIA FLOWS =================>| 955 Figure 7: Example 957 18. IANA Considerations 959 IANA is requested to register the following ICE option in the "ICE 960 Options" sub-registry of the "Interactive Connectivity Establishment 961 (ICE) registry", following the procedures defined in [RFC6336]. 963 ICE Option: trickle 965 Contact: Emil Ivov, eivov@atlassian.com 967 Change control: IESG 969 Description: An ICE option of "trickle" indicates support for 970 incremental communication of ICE candidates. 972 Reference: RFC XXXX 974 19. Security Considerations 976 This specification inherits most of its semantics from [rfc5245bis] 977 and as a result all security considerations described there apply to 978 Trickle ICE. 980 If the privacy implications of revealing host addresses on an 981 endpoint device are a concern, agents can generate ICE descriptions 982 that contain no candidates and then only trickle candidates that do 983 not reveal host addresses (e.g., relayed candidates). 985 20. Acknowledgements 987 The authors would like to thank Bernard Aboba, Flemming Andreasen, 988 Rajmohan Banavi, Taylor Brandstetter, Philipp Hancke, Christer 989 Holmberg, Ari Keranen, Paul Kyzivat, Jonathan Lennox, Enrico Marocco, 990 Pal Martinsen, Nils Ohlmeier, Thomas Stach, Peter Thatcher, Martin 991 Thomson, Dale R. Worley, and Brandon Williams for their reviews and 992 suggestions on improving this document. Thanks also to Ari Keranen 993 and Peter Thatcher for chairing the ICE Working Group. 995 21. References 997 21.1. Normative References 999 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1000 Requirement Levels", BCP 14, RFC 2119, 1001 DOI 10.17487/RFC2119, March 1997, 1002 . 1004 [rfc5245bis] 1005 Keranen, A., Holmberg, C., and J. Rosenberg, "Interactive 1006 Connectivity Establishment (ICE): A Protocol for Network 1007 Address Translator (NAT) Traversal", draft-ietf-ice- 1008 rfc5245bis-10 (work in progress), May 2017. 1010 21.2. Informative References 1012 [I-D.ietf-mmusic-trickle-ice-sip] 1013 Ivov, E., Thomas, T., Marocco, E., and C. Holmberg, "A 1014 Session Initiation Protocol (SIP) usage for Trickle ICE", 1015 draft-ietf-mmusic-trickle-ice-sip-07 (work in progress), 1016 March 2017. 1018 [RFC1918] Rekhter, Y., Moskowitz, B., Karrenberg, D., de Groot, G., 1019 and E. Lear, "Address Allocation for Private Internets", 1020 BCP 5, RFC 1918, DOI 10.17487/RFC1918, February 1996, 1021 . 1023 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 1024 A., Peterson, J., Sparks, R., Handley, M., and E. 1025 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1026 DOI 10.17487/RFC3261, June 2002, 1027 . 1029 [RFC3264] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model 1030 with Session Description Protocol (SDP)", RFC 3264, 1031 DOI 10.17487/RFC3264, June 2002, 1032 . 1034 [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session 1035 Description Protocol", RFC 4566, DOI 10.17487/RFC4566, 1036 July 2006, . 1038 [RFC4787] Audet, F., Ed. and C. Jennings, "Network Address 1039 Translation (NAT) Behavioral Requirements for Unicast 1040 UDP", BCP 127, RFC 4787, DOI 10.17487/RFC4787, January 1041 2007, . 1043 [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, 1044 "Session Traversal Utilities for NAT (STUN)", RFC 5389, 1045 DOI 10.17487/RFC5389, October 2008, 1046 . 1048 [RFC5766] Mahy, R., Matthews, P., and J. Rosenberg, "Traversal Using 1049 Relays around NAT (TURN): Relay Extensions to Session 1050 Traversal Utilities for NAT (STUN)", RFC 5766, 1051 DOI 10.17487/RFC5766, April 2010, 1052 . 1054 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 1055 Protocol (XMPP): Core", RFC 6120, DOI 10.17487/RFC6120, 1056 March 2011, . 1058 [RFC6336] Westerlund, M. and C. Perkins, "IANA Registry for 1059 Interactive Connectivity Establishment (ICE) Options", 1060 RFC 6336, DOI 10.17487/RFC6336, July 2011, 1061 . 1063 [XEP-0030] 1064 Hildebrand, J., Millard, P., Eatmon, R., and P. Saint- 1065 Andre, "XEP-0030: Service Discovery", XEP XEP-0030, June 1066 2008. 1068 [XEP-0176] 1069 Beda, J., Ludwig, S., Saint-Andre, P., Hildebrand, J., 1070 Egan, S., and R. McQueen, "XEP-0176: Jingle ICE-UDP 1071 Transport Method", XEP XEP-0176, June 2009. 1073 Appendix A. Interaction with Regular ICE 1075 The ICE protocol was designed to be flexible enough to work in and 1076 adapt to as many network environments as possible. Despite that 1077 flexibility, ICE as specified in [rfc5245bis] does not by itself 1078 support trickle ICE. This section describes how trickling of 1079 candidates interacts with ICE. 1081 [rfc5245bis] describes the conditions required to update check lists 1082 and timer states while an ICE agent is in the Running state. These 1083 conditions are verified upon transaction completion and one of them 1084 stipulates that: 1086 If there is not a pair in the valid list for each component of the 1087 media stream, the state of the check list is set to Failed. 1089 This could be a problem and cause ICE processing to fail prematurely 1090 in a number of scenarios. Consider the following case: 1092 1. Alice and Bob are both located in different networks with Network 1093 Address Translation (NAT). Alice and Bob themselves have 1094 different address but both networks use the same private internet 1095 block (e.g., the "20-bit block" 172.16/12 specified in 1096 [RFC1918]). 1098 2. Alice conveys to Bob the candidate 172.16.0.1 which also happens 1099 to correspond to an existing host on Bob's network. 1101 3. Bob creates a check list consisting solely of 172.16.0.1 and 1102 starts checks. 1104 4. These checks reach the host at 172.16.0.1 in Bob's network, which 1105 responds with an ICMP "port unreachable" error; per [rfc5245bis] 1106 Bob marks the transaction as Failed. 1108 At this point the check list only contains Failed candidates and the 1109 valid list is empty. This causes the media stream and potentially 1110 all ICE processing to fail, even though if trickle agents could 1111 subsequently convey candidates that would cause previously empty 1112 check lists to become non-empty. 1114 A similar race condition would occur if the initial ICE description 1115 from Alice contain only candidates that can be determined as 1116 unreachable from any of the candidates that Bob has gathered (e.g., 1117 this would be the case if Bob's candidates only contain IPv4 1118 addresses and the first candidate that he receives from Alice is an 1119 IPv6 one). 1121 Another potential problem could arise when a non-trickle ICE 1122 implementation initiates an interaction with a Trickle ICE 1123 implementation. Consider the following case: 1125 1. Alice's client has a non-Trickle ICE implementation. 1127 2. Bob's client has support for Trickle ICE. 1129 3. Alice and Bob are behind NATs with address-dependent filtering 1130 [RFC4787]. 1132 4. Bob has two STUN servers but one of them is currently 1133 unreachable. 1135 After Bob's agent receives Alice's initial ICE description it would 1136 immediately start connectivity checks. It would also start gathering 1137 candidates, which would take a long time because of the unreachable 1138 STUN server. By the time Bob's answer is ready and conveyed to 1139 Alice, Bob's connectivity checks may well have failed: until Alice 1140 gets Bob's answer, she won't be able to start connectivity checks and 1141 punch holes in her NAT. The NAT would hence be filtering Bob's 1142 checks as originating from an unknown endpoint. 1144 Appendix B. Interaction with ICE Lite 1146 The behavior of ICE lite agents that are capable of Trickle ICE does 1147 not require any particular rules other than those already defined in 1148 this specification and [rfc5245bis]. This section is hence provided 1149 only for informational purposes. 1151 An ICE lite agent would generate candidate information as per 1152 [rfc5245bis] and would indicate support for Trickle ICE. Given that 1153 the candidate information will contain a full generation of 1154 candidates, it would also be accompanied by an end-of-candidates 1155 indication. 1157 When performing full trickle, a full ICE implementation could 1158 conveying the initial ICE description or response thereto with no 1159 candidates. After receiving a response that identifies the remote 1160 agent as an ICE lite implementation, the initiator can choose to not 1161 trickle any additional candidates. The same is also true in the case 1162 when the ICE lite agent initiates the interaction and the full ICE 1163 agent is the responder. In these cases the connectivity checks would 1164 be enough for the ICE lite implementation to discover all potentially 1165 useful candidates as peer reflexive. The following example 1166 illustrates one such ICE session using SDP syntax: 1168 ICE Lite Bob 1169 Agent 1170 | Offer (a=ice-lite a=ice-options:trickle) | 1171 |---------------------------------------------->| 1172 | |no cand 1173 | Answer (a=ice-options:trickle) |trickling 1174 |<----------------------------------------------| 1175 | Connectivity Checks | 1176 |<--------------------------------------------->| 1177 peer rflx| | 1178 cand disco| | 1179 | | 1180 |<=============== MEDIA FLOWS =================>| 1182 Figure 8: Example 1184 In addition to reducing signaling traffic this approach also removes 1185 the need to discover STUN bindings or make TURN allocations, which 1186 may considerably lighten ICE processing. 1188 Appendix C. Changes from Earlier Versions 1190 Note to the RFC-Editor: please remove this section prior to 1191 publication as an RFC. 1193 C.1. Changes from draft-ietf-ice-trickle-12 1195 o Specified that the end-of-candidates indication must include the 1196 generation (ufrag/pwd) to enable association with a particular ICE 1197 session. 1199 o Further editorial fixes to address WGLC feedback. 1201 C.2. Changes from draft-ietf-ice-trickle-11 1203 o Editorial and terminological fixes to address WGLC feedback. 1205 C.3. Changes from draft-ietf-ice-trickle-10 1207 o Minor editorial fixes. 1209 C.4. Changes from draft-ietf-ice-trickle-09 1211 o Removed immediate unfreeze upon Fail. 1213 o Specified MUST NOT regarding ice-options. 1215 o Changed terminology regarding initial ICE parameters to avoid 1216 implementer confusion. 1218 C.5. Changes from draft-ietf-ice-trickle-08 1220 o Reinstated text about in-order processing of messages as a 1221 requirement for signaling protocols. 1223 o Added IANA registration template for ICE option. 1225 o Corrected Case 3 rule in Section 8.1.1 to ensure consistency with 1226 regular ICE rules. 1228 o Added tabular representations to Section 8.1.1 in order to 1229 illustrate the new pair rules. 1231 C.6. Changes from draft-ietf-ice-trickle-07 1233 o Changed "ICE description" to "candidate information" for 1234 consistency with 5245bis. 1236 C.7. Changes from draft-ietf-ice-trickle-06 1238 o Addressed editorial feedback from chairs' review. 1240 o Clarified terminology regarding generations. 1242 C.8. Changes from draft-ietf-ice-trickle-05 1244 o Rewrote the text on inserting a new pair into a check list. 1246 C.9. Changes from draft-ietf-ice-trickle-04 1248 o Removed dependency on SDP and offer/answer model. 1250 o Removed mentions of aggressive nomination, since it is deprecated 1251 in 5245bis. 1253 o Added section on requirements for signaling protocols. 1255 o Clarified terminology. 1257 o Addressed various WG feedback. 1259 C.10. Changes from draft-ietf-ice-trickle-03 1261 o Provided more detailed description of unfreezing behavior, 1262 specifically how to replace pre-existing peer-reflexive candidates 1263 with higher-priority ones received via trickling. 1265 C.11. Changes from draft-ietf-ice-trickle-02 1267 o Adjusted unfreezing behavior when there are disparate foundations. 1269 C.12. Changes from draft-ietf-ice-trickle-01 1271 o Changed examples to use IPv6. 1273 C.13. Changes from draft-ietf-ice-trickle-00 1275 o Removed dependency on SDP (which is to be provided in a separate 1276 specification). 1278 o Clarified text about the fact that a check list can be empty if no 1279 candidates have been sent or received yet. 1281 o Clarified wording about check list states so as not to define new 1282 states for "Active" and "Frozen" because those states are not 1283 defined for check lists (only for candidate pairs) in ICE core. 1285 o Removed open issues list because it was out of date. 1287 o Completed a thorough copy edit. 1289 C.14. Changes from draft-mmusic-trickle-ice-02 1291 o Addressed feedback from Rajmohan Banavi and Brandon Williams. 1293 o Clarified text about determining support and about how to proceed 1294 if it can be determined that the answering agent does not support 1295 Trickle ICE. 1297 o Clarified text about check list and timer updates. 1299 o Clarified when it is appropriate to use half trickle or to send no 1300 candidates in an offer or answer. 1302 o Updated the list of open issues. 1304 C.15. Changes from draft-ivov-01 and draft-mmusic-00 1306 o Added a requirement to trickle candidates by order of components 1307 to avoid deadlocks in the unfreezing algorithm. 1309 o Added an informative note on peer-reflexive candidates explaining 1310 that nothing changes for them semantically but they do become a 1311 more likely occurrence for Trickle ICE. 1313 o Limit the number of pairs to 100 to comply with 5245. 1315 o Added clarifications on the non-importance of how newly discovered 1316 candidates are trickled/sent to the remote party or if this is 1317 done at all. 1319 o Added transport expectations for trickled candidates as per Dale 1320 Worley's recommendation. 1322 C.16. Changes from draft-ivov-00 1324 o Specified that end-of-candidates is a media level attribute which 1325 can of course appear as session level, which is equivalent to 1326 having it appear in all m-lines. Also made end-of-candidates 1327 optional for cases such as aggressive nomination for controlled 1328 agents. 1330 o Added an example for ICE lite and Trickle ICE to illustrate how, 1331 when talking to an ICE lite agent doesn't need to send or even 1332 discover any candidates. 1334 o Added an example for ICE lite and Trickle ICE to illustrate how, 1335 when talking to an ICE lite agent doesn't need to send or even 1336 discover any candidates. 1338 o Added wording that explicitly states ICE lite agents have to be 1339 prepared to receive no candidates over signaling and that they 1340 should not freak out if this happens. (Closed the corresponding 1341 open issue). 1343 o It is now mandatory to use MID when trickling candidates and using 1344 m-line indexes is no longer allowed. 1346 o Replaced use of 0.0.0.0 to IP6 :: in order to avoid potential 1347 issues with RFC2543 SDP libraries that interpret 0.0.0.0 as an on- 1348 hold operation. Also changed the port number here from 1 to 9 1349 since it already has a more appropriate meaning. (Port change 1350 suggested by Jonathan Lennox). 1352 o Closed the Open Issue about use about what to do with cands 1353 received after end-of-cands. Solution: ignore, do an ICE restart 1354 if you want to add something. 1356 o Added more terminology, including trickling, trickled candidates, 1357 half trickle, full trickle, 1359 o Added a reference to the SIP usage for Trickle ICE as requested at 1360 the Boston interim. 1362 C.17. Changes from draft-rescorla-01 1364 o Brought back explicit use of Offer/Answer. There are no more 1365 attempts to try to do this in an O/A independent way. Also 1366 removed the use of ICE Descriptions. 1368 o Added SDP specification for trickled candidates, the trickle 1369 option and 0.0.0.0 addresses in m-lines, and end-of-candidates. 1371 o Support and Discovery. Changed that section to be less abstract. 1372 As discussed in IETF85, the draft now says implementations and 1373 usages need to either determine support in advance and directly 1374 use trickle, or do half trickle. Removed suggestion about use of 1375 discovery in SIP or about letting implementing protocols do what 1376 they want. 1378 o Defined Half Trickle. Added a section that says how it works. 1379 Mentioned that it only needs to happen in the first o/a (not 1380 necessary in updates), and added Jonathan's comment about how it 1381 could, in some cases, offer more than half the improvement if you 1382 can pre-gather part or all of your candidates before the user 1383 actually presses the call button. 1385 o Added a short section about subsequent offer/answer exchanges. 1387 o Added a short section about interactions with ICE Lite 1388 implementations. 1390 o Added two new entries to the open issues section. 1392 C.18. Changes from draft-rescorla-00 1394 o Relaxed requirements about verifying support following a 1395 discussion on MMUSIC. 1397 o Introduced ICE descriptions in order to remove ambiguous use of 1398 3264 language and inappropriate references to offers and answers. 1400 o Removed inappropriate assumption of adoption by RTCWEB pointed out 1401 by Martin Thomson. 1403 Authors' Addresses 1405 Emil Ivov 1406 Atlassian 1407 303 Colorado Street, #1600 1408 Austin, TX 78701 1409 USA 1411 Phone: +1-512-640-3000 1412 Email: eivov@atlassian.com 1414 Eric Rescorla 1415 RTFM, Inc. 1416 2064 Edgewood Drive 1417 Palo Alto, CA 94303 1418 USA 1420 Phone: +1 650 678 2350 1421 Email: ekr@rtfm.com 1423 Justin Uberti 1424 Google 1425 747 6th St S 1426 Kirkland, WA 98033 1427 USA 1429 Phone: +1 857 288 8888 1430 Email: justin@uberti.name 1432 Peter Saint-Andre 1433 Filament 1434 P.O. Box 787 1435 Parker, CO 80134 1436 USA 1438 Phone: +1 720 256 6756 1439 Email: peter@filament.com 1440 URI: https://filament.com/