idnits 2.17.1 draft-ietf-ice-trickle-20.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 9 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 (April 9, 2018) is 2210 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-14 == Outdated reference: A later version (-12) exists of draft-ietf-rtcweb-ip-handling-06 -- 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 (~~), 4 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: October 11, 2018 RTFM, Inc. 6 J. Uberti 7 Google 8 P. Saint-Andre 9 Mozilla 10 April 9, 2018 12 Trickle ICE: Incremental Provisioning of Candidates for the Interactive 13 Connectivity Establishment (ICE) Protocol 14 draft-ietf-ice-trickle-20 16 Abstract 18 This document describes "Trickle ICE", an extension to the 19 Interactive Connectivity Establishment (ICE) protocol that enables 20 ICE agents to begin connectivity checks while they are still 21 gathering candidates, by incrementally exchanging candidates over 22 time instead of all at once. This method can considerably accelerate 23 the process of establishing a communication session. 25 Status of This Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at https://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on October 11, 2018. 42 Copyright Notice 44 Copyright (c) 2018 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (https://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 60 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 61 3. Determining Support for Trickle ICE . . . . . . . . . . . . . 6 62 4. Generating the Initial ICE Description . . . . . . . . . . . 7 63 5. Handling the Initial ICE Description and Generating the 64 Initial ICE Response . . . . . . . . . . . . . . . . . . . . 7 65 6. Handling the Initial ICE Response . . . . . . . . . . . . . . 8 66 7. Forming Check Lists . . . . . . . . . . . . . . . . . . . . . 8 67 8. Performing Connectivity Checks . . . . . . . . . . . . . . . 8 68 9. Gathering and Conveying Newly Gathered Local Candidates . . . 9 69 10. Pairing Newly Gathered Local Candidates . . . . . . . . . . . 10 70 11. Receiving Trickled Candidates . . . . . . . . . . . . . . . . 11 71 12. Inserting Trickled Candidate Pairs into a Check List . . . . 12 72 13. Generating an End-of-Candidates Indication . . . . . . . . . 16 73 14. Receiving an End-of-Candidates Indication . . . . . . . . . . 17 74 15. Subsequent Exchanges and ICE Restarts . . . . . . . . . . . . 18 75 16. Half Trickle . . . . . . . . . . . . . . . . . . . . . . . . 18 76 17. Preserving Candidate Order while Trickling . . . . . . . . . 19 77 18. Requirements for Using Protocols . . . . . . . . . . . . . . 20 78 19. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21 79 20. Security Considerations . . . . . . . . . . . . . . . . . . . 21 80 21. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 21 81 22. References . . . . . . . . . . . . . . . . . . . . . . . . . 22 82 22.1. Normative References . . . . . . . . . . . . . . . . . . 22 83 22.2. Informative References . . . . . . . . . . . . . . . . . 22 84 Appendix A. Interaction with Regular ICE . . . . . . . . . . . . 23 85 Appendix B. Interaction with ICE Lite . . . . . . . . . . . . . 25 86 Appendix C. Changes from Earlier Versions . . . . . . . . . . . 26 87 C.1. Changes from draft-ietf-ice-trickle-19 . . . . . . . . . 26 88 C.2. Changes from draft-ietf-ice-trickle-18 . . . . . . . . . 26 89 C.3. Changes from draft-ietf-ice-trickle-17 . . . . . . . . . 27 90 C.4. Changes from draft-ietf-ice-trickle-16 . . . . . . . . . 27 91 C.5. Changes from draft-ietf-ice-trickle-15 . . . . . . . . . 27 92 C.6. Changes from draft-ietf-ice-trickle-14 . . . . . . . . . 27 93 C.7. Changes from draft-ietf-ice-trickle-13 . . . . . . . . . 27 94 C.8. Changes from draft-ietf-ice-trickle-12 . . . . . . . . . 27 95 C.9. Changes from draft-ietf-ice-trickle-11 . . . . . . . . . 28 96 C.10. Changes from draft-ietf-ice-trickle-10 . . . . . . . . . 28 97 C.11. Changes from draft-ietf-ice-trickle-09 . . . . . . . . . 28 98 C.12. Changes from draft-ietf-ice-trickle-08 . . . . . . . . . 28 99 C.13. Changes from draft-ietf-ice-trickle-07 . . . . . . . . . 28 100 C.14. Changes from draft-ietf-ice-trickle-06 . . . . . . . . . 28 101 C.15. Changes from draft-ietf-ice-trickle-05 . . . . . . . . . 28 102 C.16. Changes from draft-ietf-ice-trickle-04 . . . . . . . . . 29 103 C.17. Changes from draft-ietf-ice-trickle-03 . . . . . . . . . 29 104 C.18. Changes from draft-ietf-ice-trickle-02 . . . . . . . . . 29 105 C.19. Changes from draft-ietf-ice-trickle-01 . . . . . . . . . 29 106 C.20. Changes from draft-ietf-ice-trickle-00 . . . . . . . . . 29 107 C.21. Changes from draft-mmusic-trickle-ice-02 . . . . . . . . 29 108 C.22. Changes from draft-ivov-01 and draft-mmusic-00 . . . . . 30 109 C.23. Changes from draft-ivov-00 . . . . . . . . . . . . . . . 30 110 C.24. Changes from draft-rescorla-01 . . . . . . . . . . . . . 31 111 C.25. Changes from draft-rescorla-00 . . . . . . . . . . . . . 32 112 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32 114 1. Introduction 116 The Interactive Connectivity Establishment (ICE) protocol 117 [rfc5245bis] describes how an ICE agent gathers candidates, exchanges 118 candidates with a peer ICE agent, and creates candidate pairs. Once 119 the pairs have been gathered, the ICE agent will perform connectivity 120 checks, and eventually nominate and select pairs that will be used 121 for sending and receiving data within a communication session. 123 Following the procedures in [rfc5245bis] can lead to somewhat lengthy 124 establishment times for communication sessions, because candidate 125 gathering often involves querying STUN servers [RFC5389] and 126 allocating relayed candidates using TURN servers [RFC5766]. Although 127 many ICE procedures can be completed in parallel, the pacing 128 requirements from [rfc5245bis] still need to be followed. 130 This document defines "Trickle ICE", a supplementary mode of ICE 131 operation in which candidates can be exchanged incrementally as soon 132 as they become available (and simultaneously with the gathering of 133 other candidates). Connectivity checks can also start as soon as 134 candidate pairs have been created. Because Trickle ICE enables 135 candidate gathering and connectivity checks to be done in parallel, 136 the method can considerably accelerate the process of establishing a 137 communication session. 139 This document also defines how to discover support for Trickle ICE, 140 how the procedures in [rfc5245bis] are modified or supplemented when 141 using Trickle ICE, and how a Trickle ICE agent can interoperate with 142 an ICE agent compliant to [rfc5245bis]. 144 This document does not define any protocol-specific usage of Trickle 145 ICE. Instead, protocol-specific details for Trickle ICE are defined 146 in separate usage documents. Examples of such documents are 147 [I-D.ietf-mmusic-trickle-ice-sip] (which defines usage with the 148 Session Initiation Protocol (SIP) [RFC3261] and the Session 149 Description Protocol [RFC3261]) and [XEP-0176] (which defines usage 150 with XMPP [RFC6120]). However, some of the examples in the document 151 use SDP and the offer/answer model [RFC3264] to explain the 152 underlying concepts. 154 The following diagram illustrates a successful Trickle ICE exchange 155 with a using protocol that follows the offer/answer model: 157 Alice Bob 158 | Offer | 159 |---------------------------------------------->| 160 | Additional Candidates | 161 |---------------------------------------------->| 162 | Answer | 163 |<----------------------------------------------| 164 | Additional Candidates | 165 |<----------------------------------------------| 166 | Additional Candidates and Connectivity Checks | 167 |<--------------------------------------------->| 168 |<========== CONNECTION ESTABLISHED ===========>| 170 Figure 1: Flow 172 The main body of this document is structured to describe the behavior 173 of Trickle ICE agents in roughly the order of operations and 174 interactions during an ICE session: 176 1. Determining support for trickle ICE 178 2. Generating the initial ICE description 180 3. Handling the initial ICE description and generating the initial 181 ICE response 183 4. Handling the initial ICE response 185 5. Forming check lists, pruning candidates, performing connectivity 186 checks, etc. 188 6. Gathering and conveying candidates after the initial ICE 189 description and response 191 7. Handling inbound trickled candidates 193 8. Generating and handling the end-of-candidates indication 195 9. Handling ICE restarts 197 There is quite a bit of operational experience with the technique 198 behind Trickle ICE, going back as far as 2005 (when the XMPP Jingle 199 extension defined a "dribble mode" as specified in [XEP-0176]); this 200 document incorporates feedback from those who have implemented and 201 deployed the technique over the years. 203 2. Terminology 205 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 206 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 207 document are to be interpreted as described in [RFC2119]. 209 This specification makes use of all terminology defined for 210 Interactive Connectivity Establishment in [rfc5245bis]. In addition, 211 it defines the following terms: 213 Full Trickle: The typical mode of operation for Trickle ICE agents, 214 in which the initial ICE description can include any number of 215 candidates (even zero candidates) and does not need to include a 216 full generation of candidates as in half trickle. 218 Generation: All of the candidates conveyed within an ICE session. 220 Half Trickle: A Trickle ICE mode of operation in which the initiator 221 gathers a full generation of candidates strictly before creating 222 and conveying the initial ICE description. Once conveyed, this 223 candidate information can be processed by regular ICE agents, 224 which do not require support for Trickle ICE. It also allows 225 Trickle ICE capable responders to still gather candidates and 226 perform connectivity checks in a non-blocking way, thus providing 227 roughly "half" the advantages of Trickle ICE. The half trickle 228 mechanism is mostly meant for use when the responder's support for 229 Trickle ICE cannot be confirmed prior to conveying the initial ICE 230 description. 232 ICE Description: Any attributes related to the ICE session (not 233 candidates) required to configure an ICE agent. These include but 234 are not limited to the username fragment, password, and other 235 attributes. 237 Trickled Candidates: Candidates that a Trickle ICE agent conveys 238 after conveying the initial ICE description or responding to the 239 initial ICE description, but within the same ICE session. 240 Trickled candidates can be conveyed in parallel with candidate 241 gathering and connectivity checks. 243 Trickling: The act of incrementally conveying trickled candidates. 245 Empty Check List: A check list that initially does not contain any 246 candidate pairs because they will be incrementally added as they 247 are trickled. (This scenario does not arise with a regular ICE 248 agent, because all candidate pairs are known when the agent 249 creates the check list set). 251 3. Determining Support for Trickle ICE 253 To fully support Trickle ICE, using protocols SHOULD incorporate one 254 of the following mechanisms so that implementations can determine 255 whether Trickle ICE is supported: 257 1. Provide a capabilities discovery method so that agents can verify 258 support of Trickle ICE prior to initiating a session (XMPP's 259 Service Discovery [XEP-0030] is one such mechanism). 261 2. Make support for Trickle ICE mandatory so that user agents can 262 assume support. 264 If a using protocol does not provide a method of determining ahead of 265 time whether Trickle ICE is supported, agents can make use of the 266 half trickle procedure described in Section 16. 268 Prior to conveying the initial ICE description, agents that implement 269 using protocols that support capabilities discovery can attempt to 270 verify whether or not the remote party supports Trickle ICE. If an 271 agent determines that the remote party does not support Trickle ICE, 272 it MUST fall back to using regular ICE or abandon the entire session. 274 Even if a using protocol does not include a capabilities discovery 275 method, a user agent can provide an indication within the ICE 276 description that it supports Trickle ICE by communicating an ICE 277 option of 'trickle'. This token MUST be provided either at the 278 session level or, if at the data stream level, for every data stream 279 (an agent MUST NOT specify Trickle ICE support for some data streams 280 but not others). Note: The encoding of the 'trickle' ICE option, and 281 the message(s) used to carry it to the peer, are protocol specific; 282 for instance, the encoding for the Session Description Protocol (SDP) 283 [RFC4566] is defined in [I-D.ietf-mmusic-trickle-ice-sip]. 285 Dedicated discovery semantics and half trickle are needed only prior 286 to initiation of an ICE session. After an ICE session is established 287 and Trickle ICE support is confirmed for both parties, either agent 288 can use full trickle for subsequent exchanges (see also Section 15). 290 4. Generating the Initial ICE Description 292 An ICE agent can start gathering candidates as soon as it has an 293 indication that communication is imminent (e.g., a user interface cue 294 or an explicit request to initiate a communication session). Unlike 295 in regular ICE, in Trickle ICE implementations do not need to gather 296 candidates in a blocking manner. Therefore, unless half trickle is 297 being used, the user experience is improved if the initiating agent 298 generates and transmits its initial ICE description as early as 299 possible (thus enabling the remote party to start gathering and 300 trickling candidates). 302 An initiator MAY include any mix of candidates when conveying the 303 initial ICE description. This includes the possibility of conveying 304 all the candidates the initiator plans to use (as in half trickle), 305 conveying only a publicly-reachable IP address (e.g., a candidate at 306 a data relay that is known to not be behind a firewall), or conveying 307 no candidates at all (in which case the initiator can obtain the 308 responder's initial candidate list sooner and the responder can begin 309 candidate gathering more quickly). 311 For candidates included in the initial ICE description, the methods 312 for calculating priorities and foundations, determining redundancy of 313 candidates, and the like work just as in regular ICE [rfc5245bis]. 315 5. Handling the Initial ICE Description and Generating the Initial ICE 316 Response 318 When a responder receives the initial ICE description, it will first 319 check if the ICE description or initiator indicates support for 320 Trickle ICE as explained in Section 3. If not, the responder MUST 321 process the initial ICE description according to regular ICE 322 procedures [rfc5245bis] (or, if no ICE support is detected at all, 323 according to relevant processing rules for the using protocol, such 324 as offer/answer processing rules [RFC3264]). However, if support for 325 Trickle ICE is confirmed, a responder will automatically assume 326 support for regular ICE as well. 328 If the initial ICE description indicates support for Trickle ICE, the 329 responder will determine its role and start gathering and 330 prioritizing candidates; while doing so, it will also respond by 331 conveying an initial ICE response, so that both the initiator and the 332 responder can form check lists and begin connectivity checks. 334 A responder can respond to the initial ICE description at any point 335 while gathering candidates. The initial ICE response MAY contain any 336 set of candidates, including all candidates or no candidates. (The 337 benefit of including no candidates is to convey the initial ICE 338 response as quickly as possible, so that both parties can consider 339 the ICE session to be under active negotiation as soon as possible.) 341 As noted in Section 3, in using protocols that use SDP the initial 342 ICE response can indicate support for Trickle ICE by including a 343 token of "trickle" in the ice-options attribute. 345 6. Handling the Initial ICE Response 347 When processing the initial ICE response, the initiator follows 348 regular ICE procedures to determine its role, after which it forms 349 check lists (Section 7) and performs connectivity checks (Section 8). 351 7. Forming Check Lists 353 According to regular ICE procedures [rfc5245bis], in order for 354 candidate pairing to be possible and for duplicate candidates to be 355 pruned, the candidates would need to be provided in the initial ICE 356 description and initial ICE response. By contrast, under Trickle ICE 357 check lists can be empty until candidates are conveyed or received. 358 Therefore a Trickle ICE agent handles check list formation and 359 candidate pairing in a slightly different way than a regular ICE 360 agent: the agent still forms the check lists, but it populates a 361 given check list only after it actually has candidate pairs for that 362 check list. Every check list is initially placed in the Running 363 state, even if the check list is empty (this is consistent with 364 Section 6.1.2.1 of [rfc5245bis]). 366 8. Performing Connectivity Checks 368 As specified in [rfc5245bis], whenever timer Ta fires, only check 369 lists in the Running state will be picked when scheduling 370 connectivity checks for candidate pairs. Therefore, a Trickle ICE 371 agent MUST keep each check list in the Running state as long as it 372 expects candidate pairs to be incrementally added to the check list. 373 After that, the check list state is set according to the procedures 374 in [rfc5245bis]. 376 Whenever timer Ta fires and an empty check list is picked, no action 377 is performed for the list. Without waiting for timer Ta to expire 378 again, the agent selects the next check list in the Running state, in 379 accordance with Section 6.1.4.2 of [rfc5245bis]. 381 Section 7.2.5.3.3 of [rfc5245bis] requires that agents update check 382 lists and timer states upon completing a connectivity check 383 transaction. During such an update, regular ICE agents would set the 384 state of a check list to Failed if both of the following two 385 conditions are satisfied: 387 o all of the pairs in the check list are either in the Failed state 388 or Succeeded state; and 390 o there is not a pair in the valid list for each component of the 391 data stream. 393 With Trickle ICE, the above situation would often occur when 394 candidate gathering and trickling are still in progress, even though 395 it is quite possible that future checks will succeed. For this 396 reason, Trickle ICE agents add the following conditions to the above 397 list: 399 o all candidate gathering has completed and the agent is not 400 expecting to discover any new local candidates; and 402 o the remote agent has conveyed an end-of-candidates indication for 403 that check list as described in Section 13. 405 9. Gathering and Conveying Newly Gathered Local Candidates 407 After Trickle ICE agents have conveyed initial ICE descriptions and 408 initial ICE responses, they will most likely continue gathering new 409 local candidates as STUN, TURN, and other non-host candidate 410 gathering mechanisms begin to yield results. Whenever an agent 411 discovers such a new candidate it will compute its priority, type, 412 foundation, and component ID according to regular ICE procedures. 414 The new candidate is then checked for redundancy against the existing 415 list of local candidates. If its transport address and base match 416 those of an existing candidate, it will be considered redundant and 417 will be ignored. This would often happen for server reflexive 418 candidates that match the host addresses they were obtained from 419 (e.g., when the latter are public IPv4 addresses). Contrary to 420 regular ICE, Trickle ICE agents will consider the new candidate 421 redundant regardless of its priority. 423 Next the agent "trickles" the newly discovered candidate(s) to the 424 remote agent. The actual delivery of the new candidates is handled 425 by a using protocol such as SIP or XMPP. Trickle ICE imposes no 426 restrictions on the way this is done (e.g., some using protocols 427 might choose not to trickle updates for server reflexive candidates 428 and instead rely on the discovery of peer reflexive ones). 430 When candidates are trickled, the using protocol MUST deliver each 431 candidate (and any end-of-candidates indication as described in 432 Section 13) to the receiving Trickle ICE implementation exactly once 433 and in the same order it was conveyed. If the using protocol 434 provides any candidate retransmissions, they need to be hidden from 435 the ICE implementation. 437 Also, candidate trickling needs to be correlated to a specific ICE 438 session, so that if there is an ICE restart, any delayed updates for 439 a previous session can be recognized as such and ignored by the 440 receiving party. For example, using protocols that signal candidates 441 via SDP might include a Username Fragment value in the corresponding 442 a=candidate line, such as: 444 a=candidate:1 1 UDP 2130706431 2001:db8::1 5000 typ host ufrag 8hhY 446 Or, as another example, WebRTC implementations might include a 447 Username Fragment in the JavaScript objects that represent 448 candidates. 450 Note: The using protocol needs to provide a mechanism for both 451 parties to indicate and agree on the ICE session in force (as 452 identified by the Username Fragment and Password combination) so that 453 they have a consistent view of which candidates are to be paired. 454 This is especially important in the case of ICE restarts (see 455 Section 15). 457 Note: A using protocol might prefer not to trickle server reflexive 458 candidates to entities that are known to be publicly accessible and 459 where sending a direct STUN binding request is likely to reach the 460 destination faster than the trickle update that travels through the 461 signaling path. 463 10. Pairing Newly Gathered Local Candidates 465 As a Trickle ICE agent gathers local candidates, it needs to form 466 candidate pairs; this works as described in the ICE specification 467 [rfc5245bis], with the following provisos: 469 1. A Trickle ICE agent MUST NOT pair a local candidate until it has 470 been trickled to the remote party. 472 2. Once the agent has conveyed the local candidate to the remote 473 party, the agent checks if any remote candidates are currently 474 known for this same stream and component. If not, the agent 475 merely adds the new candidate to the list of local candidates 476 (without pairing it). 478 3. Otherwise, if the agent has already learned of one or more remote 479 candidates for this stream and component, it attempts to pair the 480 new local candidate as described in the ICE specification 481 [rfc5245bis]. 483 4. If a newly formed pair has a local candidate whose type is server 484 reflexive, the agent MUST replace the local candidate with its 485 base before completing the relevant redundancy tests. 487 5. The agent eliminates redundant pairs by following the rules in 488 Section 5.1.3 of [rfc5245bis], but only checks existing pairs if 489 they have a state of Waiting or Frozen (thus avoiding removal of 490 pairs for which connectivity checks are in flight or for which 491 connectivity checks have already yielded a definitive result). 493 6. If after the relevant redundancy tests the check list where the 494 pair is to be added already contains the maximum number of 495 candidate pairs (100 by default as per [rfc5245bis]), the agent 496 SHOULD discard any pairs in the Failed state to make room for the 497 new pair. If there are no such pairs, the agent SHOULD discard 498 the new pair. 500 11. Receiving Trickled Candidates 502 At any time during an ICE session, a Trickle ICE agent might receive 503 new candidates from the remote agent, from which it will attempt to 504 form a candidate pair; this works as described in the ICE 505 specification [rfc5245bis], with the following provisos: 507 1. The agent checks if any local candidates are currently known for 508 this same stream and component. If not, the agent merely adds 509 the new candidate to the list of remote candidates (without 510 pairing it). 512 2. Otherwise, if the agent has already gathered one or more local 513 candidates for this stream and component, it attempts to pair the 514 new remote candidate as described in the ICE specification 515 [rfc5245bis]. 517 3. If a newly formed pair has a local candidate whose type is server 518 reflexive, the agent MUST replace the local candidate with its 519 base before completing the redundancy check in the next step. 521 4. The agent eliminates redundant pairs by following the rules in 522 Section 5.1.3 of [rfc5245bis], but only checks existing pairs if 523 they have a state of Waiting or Frozen (thus avoiding removal of 524 pairs for which connectivity checks are in flight or for which 525 connectivity checks have already yielded a definitive result). 527 5. If a redundancy is found between two pairs and one of those pairs 528 contains a newly received remote candidate whose type is peer 529 reflexive, the Trickle ICE agent SHOULD discard the pair 530 containing that candidate, set the priority of the existing pair 531 to the priority of the discarded pair, and re-sort the check 532 list. (This policy helps to eliminate problems with remote peer 533 reflexive candidates for which a STUN binding request is received 534 before signaling of the candidate is trickled to the receiving 535 agent, such as a different view of pair priorities between the 536 local agent and the remote agent, since the same candidate could 537 be perceived as peer reflexive by one agent and as server 538 reflexive by the other agent.) 540 6. If after the relevant redundancy tests the check list where the 541 pair is to be added already contains the maximum number of 542 candidate pairs (100 by default as per [rfc5245bis]), the agent 543 SHOULD discard any pairs in the Failed state to make room for the 544 new pair. If there are no such pairs, the agent SHOULD discard 545 the new pair. 547 12. Inserting Trickled Candidate Pairs into a Check List 549 After a local agent has trickled a candidate and formed a candidate 550 pair from that local candidate (Section 9), or after a remote agent 551 has received a trickled candidate and formed a candidate pair from 552 the remote candidate (Section 11), a Trickle ICE agent adds the new 553 candidate pair to a check list as defined in this section. 555 As an aid to understanding the procedures defined in this section, 556 consider the following tabular representation of all check lists in 557 an agent (note that initially for one of the foundations, i.e., f5, 558 there are no candidate pairs): 560 +-----------------+------+------+------+------+------+ 561 | | f1 | f2 | f3 | f4 | f5 | 562 +-----------------+------+------+------+------+------+ 563 | s1 (Audio.RTP) | F | F | F | | | 564 +-----------------+------+------+------+------+------+ 565 | s2 (Audio.RTCP) | F | F | F | F | | 566 +-----------------+------+------+------+------+------+ 567 | s3 (Video.RTP) | F | | | | | 568 +-----------------+------+------+------+------+------+ 569 | s4 (Video.RTCP) | F | | | | | 570 +-----------------+------+------+------+------+------+ 572 Figure 2: Example of Check List State 574 Each row in the table represents a component for a given data stream 575 (e.g., s1 and s2 might be the RTP and RTCP components for audio) and 576 thus a single check list in the check list set. Each column 577 represents one foundation. Each cell represents one candidate pair. 578 In the tables shown in this section, "F" stands for "frozen", "W" 579 stands for "waiting", and "S" stands for "succeeded"; in addition, 580 "^^" is used to notate newly-added candidate pairs. 582 When an agent commences ICE processing, in accordance with 583 Section 6.1.2.6 of [rfc5245bis], for each foundation it will unfreeze 584 the pair with the lowest component ID and, if the component IDs are 585 equal, with the highest priority (this is the topmost candidate pair 586 in every column). This initial state is shown in the following 587 table. 589 +-----------------+------+------+------+------+------+ 590 | | f1 | f2 | f3 | f4 | f5 | 591 +-----------------+------+------+------+------+------+ 592 | s1 (Audio.RTP) | W | W | W | | | 593 +-----------------+------+------+------+------+------+ 594 | s2 (Audio.RTCP) | F | F | F | W | | 595 +-----------------+------+------+------+------+------+ 596 | s3 (Video.RTP) | F | | | | | 597 +-----------------+------+------+------+------+------+ 598 | s4 (Video.RTCP) | F | | | | | 599 +-----------------+------+------+------+------+------+ 601 Figure 3: Initial Check List State 603 Then, as the checks proceed (see Section 7.2.5.4 of [rfc5245bis]), 604 for each pair that enters the Succeeded state (denoted here by "S"), 605 the agent will unfreeze all pairs for all data streams with the same 606 foundation (e.g., if the pair in column 1, row 1 succeeds then the 607 agent will unfreeze the pair in column 1, rows 2, 3, and 4). 609 +-----------------+------+------+------+------+------+ 610 | | f1 | f2 | f3 | f4 | f5 | 611 +-----------------+------+------+------+------+------+ 612 | s1 (Audio.RTP) | S | W | W | | | 613 +-----------------+------+------+------+------+------+ 614 | s2 (Audio.RTCP) | W | F | F | W | | 615 +-----------------+------+------+------+------+------+ 616 | s3 (Video.RTP) | W | | | | | 617 +-----------------+------+------+------+------+------+ 618 | s4 (Video.RTCP) | W | | | | | 619 +-----------------+------+------+------+------+------+ 621 Figure 4: Check List State with Succeeded Candidate Pair 623 Trickle ICE preserves all of these rules as they apply to "static" 624 check list sets. This implies that if a Trickle ICE agent were to 625 begin connectivity checks with all of its pairs already present, the 626 way that pair states change is indistinguishable from that of a 627 regular ICE agent. 629 Of course, the major difference with Trickle ICE is that check list 630 sets can be dynamically updated because candidates can arrive after 631 connectivity checks have started. When this happens, an agent sets 632 the state of the newly formed pair as described below. 634 Rule 1: If the newly formed pair has the lowest component ID and, if 635 the component IDs are equal, the highest priority of any candidate 636 pair for this foundation (i.e., if it is the topmost pair in the 637 column), set the state to Waiting. For example, this would be the 638 case if the newly formed pair were placed in column 5, row 1. This 639 rule is consistent with Section 6.1.2.6 of [rfc5245bis]. 641 +-----------------+------+------+------+------+------+ 642 | | f1 | f2 | f3 | f4 | f5 | 643 +-----------------+------+------+------+------+------+ 644 | s1 (Audio.RTP) | S | W | W | | ^W^ | 645 +-----------------+------+------+------+------+------+ 646 | s2 (Audio.RTCP) | W | F | F | W | | 647 +-----------------+------+------+------+------+------+ 648 | s3 (Video.RTP) | W | | | | | 649 +-----------------+------+------+------+------+------+ 650 | s4 (Video.RTCP) | W | | | | | 651 +-----------------+------+------+------+------+------+ 653 Figure 5: Check List State with Newly Formed Pair, Rule 1 655 Rule 2: If there is at least one pair in the Succeeded state for this 656 foundation, set the state to Waiting. For example, this would be the 657 case if the pair in column 5, row 1 succeeded and the newly formed 658 pair were placed in column 5, row 2. This rule is consistent with 659 Section 7.2.5.3.3 of [rfc5245bis]. 661 +-----------------+------+------+------+------+------+ 662 | | f1 | f2 | f3 | f4 | f5 | 663 +-----------------+------+------+------+------+------+ 664 | s1 (Audio.RTP) | S | W | W | | S | 665 +-----------------+------+------+------+------+------+ 666 | s2 (Audio.RTCP) | W | F | F | W | ^W^ | 667 +-----------------+------+------+------+------+------+ 668 | s3 (Video.RTP) | W | | | | | 669 +-----------------+------+------+------+------+------+ 670 | s4 (Video.RTCP) | W | | | | | 671 +-----------------+------+------+------+------+------+ 673 Figure 6: Check List State with Newly Formed Pair, Rule 2 675 Rule 3: In all other cases, set the state to Frozen. For example, 676 this would be the case if the newly formed pair were placed in column 677 3, row 3. 679 +-----------------+------+------+------+------+------+ 680 | | f1 | f2 | f3 | f4 | f5 | 681 +-----------------+------+------+------+------+------+ 682 | s1 (Audio.RTP) | S | W | W | | S | 683 +-----------------+------+------+------+------+------+ 684 | s2 (Audio.RTCP) | W | F | F | W | W | 685 +-----------------+------+------+------+------+------+ 686 | s3 (Video.RTP) | W | | ^F^ | | | 687 +-----------------+------+------+------+------+------+ 688 | s4 (Video.RTCP) | W | | | | | 689 +-----------------+------+------+------+------+------+ 691 Figure 7: Check List State with Newly Formed Pair, Rule 3 693 13. Generating an End-of-Candidates Indication 695 Once all candidate gathering is completed or expires for an ICE 696 session associated with a specific data stream, the agent will 697 generate an "end-of-candidates" indication for that session and 698 convey it to the remote agent via the signaling channel. Although 699 the exact form of the indication depends on the using protocol, the 700 indication MUST specify the generation (Username Fragment and 701 Password combination) so that an agent can correlate the end-of- 702 candidates indication with a particular ICE session. The indication 703 can be conveyed in the following ways: 705 o As part of an initiation request (which would typically be the 706 case with the initial ICE description for half trickle) 708 o Along with the last candidate an agent can send for a stream 710 o As a standalone notification (e.g., after STUN Binding requests or 711 TURN Allocate requests to a server time out and the agent is no 712 longer actively gathering candidates) 714 Conveying an end-of-candidates indication in a timely manner is 715 important in order to avoid ambiguities and speed up the conclusion 716 of ICE processing. In particular: 718 o A controlled Trickle ICE agent SHOULD convey an end-of-candidates 719 indication after it has completed gathering for a data stream, 720 unless ICE processing terminates before the agent has had a chance 721 to complete gathering. 723 o A controlling agent MAY conclude ICE processing prior to conveying 724 end-of-candidates indications for all streams. However, it is 725 RECOMMENDED for a controlling agent to convey end-of-candidates 726 indications whenever possible for the sake of consistency and to 727 keep middleboxes and controlled agents up-to-date on the state of 728 ICE processing. 730 When conveying an end-of-candidates indication during trickling 731 (rather than as a part of the initial ICE description or a response 732 thereto), it is the responsibility of the using protocol to define 733 methods for associating the indication with one or more specific data 734 streams. 736 An agent MAY also choose to generate an end-of-candidates indication 737 before candidate gathering has actually completed, if the agent 738 determines that gathering has continued for more than an acceptable 739 period of time. However, an agent MUST NOT convey any more 740 candidates after it has conveyed an end-of-candidates indication. 742 When performing half trickle, an agent SHOULD convey an end-of- 743 candidates indication together with its initial ICE description 744 unless it is planning to potentially trickle additional candidates 745 (e.g., in case the remote party turns out to support Trickle ICE). 747 After an agent conveys the end-of-candidates indication, it will 748 update the state of the corresponding check list as explained in 749 Section 8. Past that point, an agent MUST NOT trickle any new 750 candidates within this ICE session. Therefore, adding new candidates 751 to the negotiation is possible only through an ICE restart (see 752 Section 15). 754 This specification does not override regular ICE semantics for 755 concluding ICE processing. Therefore, even if end-of-candidates 756 indications are conveyed, an agent will still need to go through pair 757 nomination. Also, if pairs have been nominated for components and 758 data streams, ICE processing MAY still conclude even if end-of- 759 candidates indications have not been received for all streams. In 760 all cases, an agent MUST NOT trickle any new candidates within an ICE 761 session after nomination of a candidate pair as described in 762 Section 8.1.1 of [rfc5245bis]. 764 14. Receiving an End-of-Candidates Indication 766 Receiving an end-of-candidates indication enables an agent to update 767 check list states and, in case valid pairs do not exist for every 768 component in every data stream, determine that ICE processing has 769 failed. It also enables an agent to speed up the conclusion of ICE 770 processing when a candidate pair has been validated but it involves 771 the use of lower-preference transports such as TURN. In such 772 situations, an implementation MAY choose to wait and see if higher- 773 priority candidates are received; in this case the end-of-candidates 774 indication provides a notification that such candidates are not 775 forthcoming. 777 When an agent receives an end-of-candidates indication for a specific 778 data stream, it will update the state of the relevant check list as 779 per Section 8 (which might lead to some check lists being marked as 780 Failed). If the check list is still in the Running state after the 781 update, the agent will persist the fact that an end-of-candidates 782 indication has been received and take it into account in future 783 updates to the check list. 785 After an agent has received an end-of-candidates indication, it MUST 786 ignore any newly received candidates for that data stream or data 787 session. 789 15. Subsequent Exchanges and ICE Restarts 791 Before conveying an end-of-candidates indication, either agent MAY 792 convey subsequent candidate information at any time allowed by the 793 using protocol. When this happens, agents will use [rfc5245bis] 794 semantics (e.g., checking of the Username Fragment and Password 795 combination) to determine whether or not the new candidate 796 information requires an ICE restart. 798 If an ICE restart occurs, the agents can assume that Trickle ICE is 799 still supported if support was determined previously, and thus can 800 engage in Trickle ICE behavior as they would in an initial exchange 801 of ICE descriptions where support was determined through a 802 capabilities discovery method. 804 16. Half Trickle 806 In half trickle, the initiator conveys the initial ICE description 807 with a usable but not necessarily full generation of candidates. 808 This ensures that the ICE description can be processed by a regular 809 ICE responder and is mostly meant for use in cases where support for 810 Trickle ICE cannot be confirmed prior to conveying the initial ICE 811 description. The initial ICE description indicates support for 812 Trickle ICE, so that the responder can respond with something less 813 than a full generation of candidates and then trickle the rest. The 814 initial ICE description for half trickle can contain an end-of- 815 candidates indication, although this is not mandatory because if 816 trickle support is confirmed then the initiator can choose to trickle 817 additional candidates before it conveys an end-of-candidates 818 indication. 820 The half trickle mechanism can be used in cases where there is no way 821 for an agent to verify in advance whether a remote party supports 822 Trickle ICE. Because the initial ICE description contain a full 823 generation of candidates, it can thus be handled by a regular ICE 824 agent, while still allowing a Trickle ICE agent to use the 825 optimization defined in this specification. This prevents 826 negotiation from failing in the former case while still giving 827 roughly half the Trickle ICE benefits in the latter. 829 Use of half trickle is only necessary during an initial exchange of 830 ICE descriptions. After both parties have received an ICE 831 description from their peer, they can each reliably determine Trickle 832 ICE support and use it for all subsequent exchanges (see Section 15). 834 In some instances, using half trickle might bring more than just half 835 the improvement in terms of user experience. This can happen when an 836 agent starts gathering candidates upon user interface cues that the 837 user will soon be initiating an interaction, such as activity on a 838 keypad or the phone going off hook. This would mean that some or all 839 of the candidate gathering could be completed before the agent 840 actually needs to convey the candidate information. Because the 841 responder will be able to trickle candidates, both agents will be 842 able to start connectivity checks and complete ICE processing earlier 843 than with regular ICE and potentially even as early as with full 844 trickle. 846 However, such anticipation is not always possible. For example, a 847 multipurpose user agent or a WebRTC web page where communication is a 848 non-central feature (e.g., calling a support line in case of a 849 problem with the main features) would not necessarily have a way of 850 distinguishing between call intentions and other user activity. In 851 such cases, using full trickle is most likely to result in an ideal 852 user experience. Even so, using half trickle would be an improvement 853 over regular ICE because it would result in a better experience for 854 responders. 856 17. Preserving Candidate Order while Trickling 858 One important aspect of regular ICE is that connectivity checks for a 859 specific foundation and component are attempted simultaneously by 860 both agents, so that any firewalls or NATs fronting the agents would 861 whitelist both endpoints and allow all except for the first 862 ("suicide") packets to go through. This is also important to 863 unfreezing candidates at the right time. While not crucial, 864 preserving this behavior in Trickle ICE is likely to improve ICE 865 performance. 867 To achieve this, when trickling candidates, agents SHOULD respect the 868 order of components as reflected by their component IDs; that is, 869 candidates for a given component SHOULD NOT be conveyed prior to 870 candidates for a component with a lower ID number within the same 871 foundation. In addition, candidates SHOULD be paired, following the 872 procedures in Section 12, in the same order they are conveyed. 874 For example, the following SDP description contains two components 875 (RTP and RTCP) and two foundations (host and server reflexive): 877 v=0 878 o=jdoe 2890844526 2890842807 IN IP4 10.0.1.1 879 s= 880 c=IN IP4 10.0.1.1 881 t=0 0 882 a=ice-pwd:asd88fgpdd777uzjYhagZg 883 a=ice-ufrag:8hhY 884 m=audio 5000 RTP/AVP 0 885 a=rtpmap:0 PCMU/8000 886 a=candidate:1 1 UDP 2130706431 10.0.1.1 5000 typ host 887 a=candidate:1 2 UDP 2130706431 10.0.1.1 5001 typ host 888 a=candidate:2 1 UDP 1694498815 192.0.2.3 5000 typ srflx 889 raddr 10.0.1.1 rport 8998 890 a=candidate:2 2 UDP 1694498815 192.0.2.3 5001 typ srflx 891 raddr 10.0.1.1 rport 8998 893 For this candidate information the RTCP host candidate would not be 894 conveyed prior to the RTP host candidate. Similarly the RTP server 895 reflexive candidate would be conveyed together with or prior to the 896 RTCP server reflexive candidate. 898 18. Requirements for Using Protocols 900 In order to fully enable the use of Trickle ICE, this specification 901 defines the following requirements for using protocols. 903 o A using protocol SHOULD provide a way for parties to advertise and 904 discover support for Trickle ICE before an ICE session begins (see 905 Section 3). 907 o A using protocol MUST provide methods for incrementally conveying 908 (i.e., "trickling") additional candidates after conveying the 909 initial ICE description (see Section 9). 911 o A using protocol MUST deliver each trickled candidate or end-of- 912 candidates indication exactly once and in the same order it was 913 conveyed (see Section 9). 915 o A using protocol MUST provide a mechanism for both parties to 916 indicate and agree on the ICE session in force (see Section 9). 918 o A using protocol MUST provide a way for parties to communicate the 919 end-of-candidates indication, which MUST specify the particular 920 ICE session to which the indication applies (see Section 13). 922 19. IANA Considerations 924 IANA is requested to register the following ICE option in the "ICE 925 Options" sub-registry of the "Interactive Connectivity Establishment 926 (ICE) registry", following the procedures defined in [RFC6336]. 928 ICE Option: trickle 930 Contact: IESG, iesg@ietf.org 932 Change control: IESG 934 Description: An ICE option of "trickle" indicates support for 935 incremental communication of ICE candidates. 937 Reference: RFC XXXX 939 20. Security Considerations 941 This specification inherits most of its semantics from [rfc5245bis] 942 and as a result all security considerations described there apply to 943 Trickle ICE. 945 If the privacy implications of revealing host addresses on an 946 endpoint device are a concern (see for example the discussion in 947 [I-D.ietf-rtcweb-ip-handling] and in Section 19 of [rfc5245bis]), 948 agents can generate ICE descriptions that contain no candidates and 949 then only trickle candidates that do not reveal host addresses (e.g., 950 relayed candidates). 952 21. Acknowledgements 954 The authors would like to thank Bernard Aboba, Flemming Andreasen, 955 Rajmohan Banavi, Taylor Brandstetter, Philipp Hancke, Christer 956 Holmberg, Ari Keranen, Paul Kyzivat, Jonathan Lennox, Enrico Marocco, 957 Pal Martinsen, Nils Ohlmeier, Thomas Stach, Peter Thatcher, Martin 958 Thomson, Brandon Williams, and Dale Worley for their reviews and 959 suggestions on improving this document. Sarah Banks, Roni Even, and 960 David Mandelberg completed opsdir, genart, and security reviews, 961 respectively. Thanks also to Ari Keranen and Peter Thatcher in their 962 role as chairs, and Ben Campbell in his role as responsible Area 963 Director. 965 22. References 967 22.1. Normative References 969 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 970 Requirement Levels", BCP 14, RFC 2119, 971 DOI 10.17487/RFC2119, March 1997, 972 . 974 [rfc5245bis] 975 Keranen, A., Holmberg, C., and J. Rosenberg, "Interactive 976 Connectivity Establishment (ICE): A Protocol for Network 977 Address Translator (NAT) Traversal", draft-ietf-ice- 978 rfc5245bis-20 (work in progress), March 2018. 980 22.2. Informative References 982 [I-D.ietf-mmusic-trickle-ice-sip] 983 Ivov, E., Stach, T., Marocco, E., and C. Holmberg, "A 984 Session Initiation Protocol (SIP) usage for Trickle ICE", 985 draft-ietf-mmusic-trickle-ice-sip-14 (work in progress), 986 February 2018. 988 [I-D.ietf-rtcweb-ip-handling] 989 Uberti, J. and G. Shieh, "WebRTC IP Address Handling 990 Requirements", draft-ietf-rtcweb-ip-handling-06 (work in 991 progress), March 2018. 993 [RFC1918] Rekhter, Y., Moskowitz, B., Karrenberg, D., de Groot, G., 994 and E. Lear, "Address Allocation for Private Internets", 995 BCP 5, RFC 1918, DOI 10.17487/RFC1918, February 1996, 996 . 998 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 999 A., Peterson, J., Sparks, R., Handley, M., and E. 1000 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1001 DOI 10.17487/RFC3261, June 2002, 1002 . 1004 [RFC3264] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model 1005 with Session Description Protocol (SDP)", RFC 3264, 1006 DOI 10.17487/RFC3264, June 2002, 1007 . 1009 [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session 1010 Description Protocol", RFC 4566, DOI 10.17487/RFC4566, 1011 July 2006, . 1013 [RFC4787] Audet, F., Ed. and C. Jennings, "Network Address 1014 Translation (NAT) Behavioral Requirements for Unicast 1015 UDP", BCP 127, RFC 4787, DOI 10.17487/RFC4787, January 1016 2007, . 1018 [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, 1019 "Session Traversal Utilities for NAT (STUN)", RFC 5389, 1020 DOI 10.17487/RFC5389, October 2008, 1021 . 1023 [RFC5766] Mahy, R., Matthews, P., and J. Rosenberg, "Traversal Using 1024 Relays around NAT (TURN): Relay Extensions to Session 1025 Traversal Utilities for NAT (STUN)", RFC 5766, 1026 DOI 10.17487/RFC5766, April 2010, 1027 . 1029 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 1030 Protocol (XMPP): Core", RFC 6120, DOI 10.17487/RFC6120, 1031 March 2011, . 1033 [RFC6336] Westerlund, M. and C. Perkins, "IANA Registry for 1034 Interactive Connectivity Establishment (ICE) Options", 1035 RFC 6336, DOI 10.17487/RFC6336, July 2011, 1036 . 1038 [XEP-0030] 1039 Hildebrand, J., Millard, P., Eatmon, R., and P. Saint- 1040 Andre, "XEP-0030: Service Discovery", XEP XEP-0030, June 1041 2008. 1043 [XEP-0176] 1044 Beda, J., Ludwig, S., Saint-Andre, P., Hildebrand, J., 1045 Egan, S., and R. McQueen, "XEP-0176: Jingle ICE-UDP 1046 Transport Method", XEP XEP-0176, June 2009. 1048 Appendix A. Interaction with Regular ICE 1050 The ICE protocol was designed to be flexible enough to work in and 1051 adapt to as many network environments as possible. Despite that 1052 flexibility, ICE as specified in [rfc5245bis] does not by itself 1053 support trickle ICE. This section describes how trickling of 1054 candidates interacts with ICE. 1056 [rfc5245bis] describes the conditions required to update check lists 1057 and timer states while an ICE agent is in the Running state. These 1058 conditions are verified upon transaction completion and one of them 1059 stipulates that: 1061 If there is not a pair in the valid list for each component of the 1062 data stream, the state of the check list is set to Failed. 1064 This could be a problem and cause ICE processing to fail prematurely 1065 in a number of scenarios. Consider the following case: 1067 1. Alice and Bob are both located in different networks with Network 1068 Address Translation (NAT). Alice and Bob themselves have 1069 different address but both networks use the same private internet 1070 block (e.g., the "20-bit block" 172.16/12 specified in 1071 [RFC1918]). 1073 2. Alice conveys to Bob the candidate 172.16.0.1 which also happens 1074 to correspond to an existing host on Bob's network. 1076 3. Bob creates a check list consisting solely of 172.16.0.1 and 1077 starts checks. 1079 4. These checks reach the host at 172.16.0.1 in Bob's network, which 1080 responds with an ICMP "port unreachable" error; per [rfc5245bis] 1081 Bob marks the transaction as Failed. 1083 At this point the check list only contains Failed candidates and the 1084 valid list is empty. This causes the data stream and potentially all 1085 ICE processing to fail, even though if Trickle ICE agents could 1086 subsequently convey candidates that would cause previously empty 1087 check lists to become non-empty. 1089 A similar race condition would occur if the initial ICE description 1090 from Alice contain only candidates that can be determined as 1091 unreachable from any of the candidates that Bob has gathered (e.g., 1092 this would be the case if Bob's candidates only contain IPv4 1093 addresses and the first candidate that he receives from Alice is an 1094 IPv6 one). 1096 Another potential problem could arise when a non-trickle ICE 1097 implementation initiates an interaction with a Trickle ICE 1098 implementation. Consider the following case: 1100 1. Alice's client has a non-Trickle ICE implementation. 1102 2. Bob's client has support for Trickle ICE. 1104 3. Alice and Bob are behind NATs with address-dependent filtering 1105 [RFC4787]. 1107 4. Bob has two STUN servers but one of them is currently 1108 unreachable. 1110 After Bob's agent receives Alice's initial ICE description it would 1111 immediately start connectivity checks. It would also start gathering 1112 candidates, which would take a long time because of the unreachable 1113 STUN server. By the time Bob's answer is ready and conveyed to 1114 Alice, Bob's connectivity checks might have failed: until Alice gets 1115 Bob's answer, she won't be able to start connectivity checks and 1116 punch holes in her NAT. The NAT would hence be filtering Bob's 1117 checks as originating from an unknown endpoint. 1119 Appendix B. Interaction with ICE Lite 1121 The behavior of ICE lite agents that are capable of Trickle ICE does 1122 not require any particular rules other than those already defined in 1123 this specification and [rfc5245bis]. This section is hence provided 1124 only for informational purposes. 1126 An ICE lite agent would generate candidate information as per 1127 [rfc5245bis] and would indicate support for Trickle ICE. Given that 1128 the candidate information will contain a full generation of 1129 candidates, it would also be accompanied by an end-of-candidates 1130 indication. 1132 When performing full trickle, a full ICE implementation could convey 1133 the initial ICE description or response thereto with no candidates. 1134 After receiving a response that identifies the remote agent as an ICE 1135 lite implementation, the initiator can choose to not trickle any 1136 additional candidates. The same is also true in the case when the 1137 ICE lite agent initiates the interaction and the full ICE agent is 1138 the responder. In these cases the connectivity checks would be 1139 enough for the ICE lite implementation to discover all potentially 1140 useful candidates as peer reflexive. The following example 1141 illustrates one such ICE session using SDP syntax: 1143 ICE Lite Bob 1144 Agent 1145 | Offer (a=ice-lite a=ice-options:trickle) | 1146 |---------------------------------------------->| 1147 | |no cand 1148 | Answer (a=ice-options:trickle) |trickling 1149 |<----------------------------------------------| 1150 | Connectivity Checks | 1151 |<--------------------------------------------->| 1152 peer rflx| | 1153 cand disco| | 1154 |<========== CONNECTION ESTABLISHED ===========>| 1156 Figure 8: Example 1158 In addition to reducing signaling traffic this approach also removes 1159 the need to discover STUN bindings or make TURN allocations, which 1160 can considerably lighten ICE processing. 1162 Appendix C. Changes from Earlier Versions 1164 Note to the RFC Editor: please remove this section prior to 1165 publication as an RFC. 1167 C.1. Changes from draft-ietf-ice-trickle-19 1169 o Further clarified handling of remote peer reflexive candidates. 1171 o To improve readibility, renamed and restructured some sections and 1172 subsections, and modified some wording. 1174 C.2. Changes from draft-ietf-ice-trickle-18 1176 o Cleaned up pairing and redundancy checking rules for newly 1177 discovered candidates per IESG feedback and WG discussion. 1179 o Improved wording in half trickle section. 1181 o Changed "not more than once" to "exactly once". 1183 o Changed NAT examples back to IPv4. 1185 C.3. Changes from draft-ietf-ice-trickle-17 1187 o Simplified the rules for inserting a new pair in a check list. 1189 o Clarified it is not allowed to nominate a candidate pair after a 1190 pair has already been nominated (a.k.a. renomination or 1191 continuous nomination). 1193 o Removed some text that referenced older versions of rfc5245bis. 1195 o Removed some text that duplicated concepts and procedures 1196 specified in rfc5245bis. 1198 o Removed the ill-defined concept of stream order. 1200 o Shortened the introduction. 1202 C.4. Changes from draft-ietf-ice-trickle-16 1204 o Made "ufrag" terminology consistent with 5245bis. 1206 o Applied in-order delivery rule to end-of-candidates indication. 1208 C.5. Changes from draft-ietf-ice-trickle-15 1210 o Adjustments to address AD review feedback. 1212 C.6. Changes from draft-ietf-ice-trickle-14 1214 o Minor modifications to track changes to ICE core. 1216 C.7. Changes from draft-ietf-ice-trickle-13 1218 o Removed independent monitoring of check list "states" of frozen or 1219 active, since this is handled by placing a check list in the 1220 Running state defined in ICE core. 1222 C.8. Changes from draft-ietf-ice-trickle-12 1224 o Specified that the end-of-candidates indication must include the 1225 generation (ufrag/pwd) to enable association with a particular ICE 1226 session. 1228 o Further editorial fixes to address WGLC feedback. 1230 C.9. Changes from draft-ietf-ice-trickle-11 1232 o Editorial and terminological fixes to address WGLC feedback. 1234 C.10. Changes from draft-ietf-ice-trickle-10 1236 o Minor editorial fixes. 1238 C.11. Changes from draft-ietf-ice-trickle-09 1240 o Removed immediate unfreeze upon Fail. 1242 o Specified MUST NOT regarding ice-options. 1244 o Changed terminology regarding initial ICE parameters to avoid 1245 implementer confusion. 1247 C.12. Changes from draft-ietf-ice-trickle-08 1249 o Reinstated text about in-order processing of messages as a 1250 requirement for signaling protocols. 1252 o Added IANA registration template for ICE option. 1254 o Corrected Case 3 rule in Section 8.1.1 to ensure consistency with 1255 regular ICE rules. 1257 o Added tabular representations to Section 8.1.1 in order to 1258 illustrate the new pair rules. 1260 C.13. Changes from draft-ietf-ice-trickle-07 1262 o Changed "ICE description" to "candidate information" for 1263 consistency with 5245bis. 1265 C.14. Changes from draft-ietf-ice-trickle-06 1267 o Addressed editorial feedback from chairs' review. 1269 o Clarified terminology regarding generations. 1271 C.15. Changes from draft-ietf-ice-trickle-05 1273 o Rewrote the text on inserting a new pair into a check list. 1275 C.16. Changes from draft-ietf-ice-trickle-04 1277 o Removed dependency on SDP and offer/answer model. 1279 o Removed mentions of aggressive nomination, since it is deprecated 1280 in 5245bis. 1282 o Added section on requirements for signaling protocols. 1284 o Clarified terminology. 1286 o Addressed various WG feedback. 1288 C.17. Changes from draft-ietf-ice-trickle-03 1290 o Provided more detailed description of unfreezing behavior, 1291 specifically how to replace pre-existing peer-reflexive candidates 1292 with higher-priority ones received via trickling. 1294 C.18. Changes from draft-ietf-ice-trickle-02 1296 o Adjusted unfreezing behavior when there are disparate foundations. 1298 C.19. Changes from draft-ietf-ice-trickle-01 1300 o Changed examples to use IPv6. 1302 C.20. Changes from draft-ietf-ice-trickle-00 1304 o Removed dependency on SDP (which is to be provided in a separate 1305 specification). 1307 o Clarified text about the fact that a check list can be empty if no 1308 candidates have been sent or received yet. 1310 o Clarified wording about check list states so as not to define new 1311 states for "Active" and "Frozen" because those states are not 1312 defined for check lists (only for candidate pairs) in ICE core. 1314 o Removed open issues list because it was out of date. 1316 o Completed a thorough copy edit. 1318 C.21. Changes from draft-mmusic-trickle-ice-02 1320 o Addressed feedback from Rajmohan Banavi and Brandon Williams. 1322 o Clarified text about determining support and about how to proceed 1323 if it can be determined that the answering agent does not support 1324 Trickle ICE. 1326 o Clarified text about check list and timer updates. 1328 o Clarified when it is appropriate to use half trickle or to send no 1329 candidates in an offer or answer. 1331 o Updated the list of open issues. 1333 C.22. Changes from draft-ivov-01 and draft-mmusic-00 1335 o Added a requirement to trickle candidates by order of components 1336 to avoid deadlocks in the unfreezing algorithm. 1338 o Added an informative note on peer-reflexive candidates explaining 1339 that nothing changes for them semantically but they do become a 1340 more likely occurrence for Trickle ICE. 1342 o Limit the number of pairs to 100 to comply with 5245. 1344 o Added clarifications on the non-importance of how newly discovered 1345 candidates are trickled/sent to the remote party or if this is 1346 done at all. 1348 o Added transport expectations for trickled candidates as per Dale 1349 Worley's recommendation. 1351 C.23. Changes from draft-ivov-00 1353 o Specified that end-of-candidates is a media level attribute which 1354 can of course appear as session level, which is equivalent to 1355 having it appear in all m-lines. Also made end-of-candidates 1356 optional for cases such as aggressive nomination for controlled 1357 agents. 1359 o Added an example for ICE lite and Trickle ICE to illustrate how, 1360 when talking to an ICE lite agent doesn't need to send or even 1361 discover any candidates. 1363 o Added an example for ICE lite and Trickle ICE to illustrate how, 1364 when talking to an ICE lite agent doesn't need to send or even 1365 discover any candidates. 1367 o Added wording that explicitly states ICE lite agents have to be 1368 prepared to receive no candidates over signaling and that they 1369 should not freak out if this happens. (Closed the corresponding 1370 open issue). 1372 o It is now mandatory to use MID when trickling candidates and using 1373 m-line indexes is no longer allowed. 1375 o Replaced use of 0.0.0.0 to IP6 :: in order to avoid potential 1376 issues with RFC2543 SDP libraries that interpret 0.0.0.0 as an on- 1377 hold operation. Also changed the port number here from 1 to 9 1378 since it already has a more appropriate meaning. (Port change 1379 suggested by Jonathan Lennox). 1381 o Closed the Open Issue about use about what to do with cands 1382 received after end-of-cands. Solution: ignore, do an ICE restart 1383 if you want to add something. 1385 o Added more terminology, including trickling, trickled candidates, 1386 half trickle, full trickle, 1388 o Added a reference to the SIP usage for Trickle ICE as requested at 1389 the Boston interim. 1391 C.24. Changes from draft-rescorla-01 1393 o Brought back explicit use of Offer/Answer. There are no more 1394 attempts to try to do this in an O/A independent way. Also 1395 removed the use of ICE Descriptions. 1397 o Added SDP specification for trickled candidates, the trickle 1398 option and 0.0.0.0 addresses in m-lines, and end-of-candidates. 1400 o Support and Discovery. Changed that section to be less abstract. 1401 As discussed in IETF85, the draft now says implementations and 1402 usages need to either determine support in advance and directly 1403 use trickle, or do half trickle. Removed suggestion about use of 1404 discovery in SIP or about letting implementing protocols do what 1405 they want. 1407 o Defined Half Trickle. Added a section that says how it works. 1408 Mentioned that it only needs to happen in the first o/a (not 1409 necessary in updates), and added Jonathan's comment about how it 1410 could, in some cases, offer more than half the improvement if you 1411 can pre-gather part or all of your candidates before the user 1412 actually presses the call button. 1414 o Added a short section about subsequent offer/answer exchanges. 1416 o Added a short section about interactions with ICE Lite 1417 implementations. 1419 o Added two new entries to the open issues section. 1421 C.25. Changes from draft-rescorla-00 1423 o Relaxed requirements about verifying support following a 1424 discussion on MMUSIC. 1426 o Introduced ICE descriptions in order to remove ambiguous use of 1427 3264 language and inappropriate references to offers and answers. 1429 o Removed inappropriate assumption of adoption by RTCWEB pointed out 1430 by Martin Thomson. 1432 Authors' Addresses 1434 Emil Ivov 1435 Atlassian 1436 303 Colorado Street, #1600 1437 Austin, TX 78701 1438 USA 1440 Phone: +1-512-640-3000 1441 Email: eivov@atlassian.com 1443 Eric Rescorla 1444 RTFM, Inc. 1445 2064 Edgewood Drive 1446 Palo Alto, CA 94303 1447 USA 1449 Phone: +1 650 678 2350 1450 Email: ekr@rtfm.com 1452 Justin Uberti 1453 Google 1454 747 6th St S 1455 Kirkland, WA 98033 1456 USA 1458 Phone: +1 857 288 8888 1459 Email: justin@uberti.name 1460 Peter Saint-Andre 1461 Mozilla 1462 P.O. Box 787 1463 Parker, CO 80134 1464 USA 1466 Phone: +1 720 256 6756 1467 Email: stpeter@mozilla.com 1468 URI: https://www.mozilla.com/