idnits 2.17.1 draft-ietf-ice-trickle-21.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 15, 2018) is 2195 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 17, 2018 RTFM, Inc. 6 J. Uberti 7 Google 8 P. Saint-Andre 9 Mozilla 10 April 15, 2018 12 Trickle ICE: Incremental Provisioning of Candidates for the Interactive 13 Connectivity Establishment (ICE) Protocol 14 draft-ietf-ice-trickle-21 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 http://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 17, 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 (http://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-20 . . . . . . . . . 26 88 C.2. Changes from draft-ietf-ice-trickle-19 . . . . . . . . . 26 89 C.3. Changes from draft-ietf-ice-trickle-18 . . . . . . . . . 26 90 C.4. Changes from draft-ietf-ice-trickle-17 . . . . . . . . . 27 91 C.5. Changes from draft-ietf-ice-trickle-16 . . . . . . . . . 27 92 C.6. Changes from draft-ietf-ice-trickle-15 . . . . . . . . . 27 93 C.7. Changes from draft-ietf-ice-trickle-14 . . . . . . . . . 27 94 C.8. Changes from draft-ietf-ice-trickle-13 . . . . . . . . . 27 95 C.9. Changes from draft-ietf-ice-trickle-12 . . . . . . . . . 27 96 C.10. Changes from draft-ietf-ice-trickle-11 . . . . . . . . . 28 97 C.11. Changes from draft-ietf-ice-trickle-10 . . . . . . . . . 28 98 C.12. Changes from draft-ietf-ice-trickle-09 . . . . . . . . . 28 99 C.13. Changes from draft-ietf-ice-trickle-08 . . . . . . . . . 28 100 C.14. Changes from draft-ietf-ice-trickle-07 . . . . . . . . . 28 101 C.15. Changes from draft-ietf-ice-trickle-06 . . . . . . . . . 28 102 C.16. Changes from draft-ietf-ice-trickle-05 . . . . . . . . . 28 103 C.17. Changes from draft-ietf-ice-trickle-04 . . . . . . . . . 29 104 C.18. Changes from draft-ietf-ice-trickle-03 . . . . . . . . . 29 105 C.19. Changes from draft-ietf-ice-trickle-02 . . . . . . . . . 29 106 C.20. Changes from draft-ietf-ice-trickle-01 . . . . . . . . . 29 107 C.21. Changes from draft-ietf-ice-trickle-00 . . . . . . . . . 29 108 C.22. Changes from draft-mmusic-trickle-ice-02 . . . . . . . . 29 109 C.23. Changes from draft-ivov-01 and draft-mmusic-00 . . . . . 30 110 C.24. Changes from draft-ivov-00 . . . . . . . . . . . . . . . 30 111 C.25. Changes from draft-rescorla-01 . . . . . . . . . . . . . 31 112 C.26. Changes from draft-rescorla-00 . . . . . . . . . . . . . 32 113 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32 115 1. Introduction 117 The Interactive Connectivity Establishment (ICE) protocol 118 [rfc5245bis] describes how an ICE agent gathers candidates, exchanges 119 candidates with a peer ICE agent, and creates candidate pairs. Once 120 the pairs have been gathered, the ICE agent will perform connectivity 121 checks, and eventually nominate and select pairs that will be used 122 for sending and receiving data within a communication session. 124 Following the procedures in [rfc5245bis] can lead to somewhat lengthy 125 establishment times for communication sessions, because candidate 126 gathering often involves querying STUN servers [RFC5389] and 127 allocating relayed candidates using TURN servers [RFC5766]. Although 128 many ICE procedures can be completed in parallel, the pacing 129 requirements from [rfc5245bis] still need to be followed. 131 This document defines "Trickle ICE", a supplementary mode of ICE 132 operation in which candidates can be exchanged incrementally as soon 133 as they become available (and simultaneously with the gathering of 134 other candidates). Connectivity checks can also start as soon as 135 candidate pairs have been created. Because Trickle ICE enables 136 candidate gathering and connectivity checks to be done in parallel, 137 the method can considerably accelerate the process of establishing a 138 communication session. 140 This document also defines how to discover support for Trickle ICE, 141 how the procedures in [rfc5245bis] are modified or supplemented when 142 using Trickle ICE, and how a Trickle ICE agent can interoperate with 143 an ICE agent compliant to [rfc5245bis]. 145 This document does not define any protocol-specific usage of Trickle 146 ICE. Instead, protocol-specific details for Trickle ICE are defined 147 in separate usage documents. Examples of such documents are 148 [I-D.ietf-mmusic-trickle-ice-sip] (which defines usage with the 149 Session Initiation Protocol (SIP) [RFC3261] and the Session 150 Description Protocol [RFC3261]) and [XEP-0176] (which defines usage 151 with XMPP [RFC6120]). However, some of the examples in the document 152 use SDP and the offer/answer model [RFC3264] to explain the 153 underlying concepts. 155 The following diagram illustrates a successful Trickle ICE exchange 156 with a using protocol that follows the offer/answer model: 158 Alice Bob 159 | Offer | 160 |---------------------------------------------->| 161 | Additional Candidates | 162 |---------------------------------------------->| 163 | Answer | 164 |<----------------------------------------------| 165 | Additional Candidates | 166 |<----------------------------------------------| 167 | Additional Candidates and Connectivity Checks | 168 |<--------------------------------------------->| 169 |<========== CONNECTION ESTABLISHED ===========>| 171 Figure 1: Flow 173 The main body of this document is structured to describe the behavior 174 of Trickle ICE agents in roughly the order of operations and 175 interactions during an ICE session: 177 1. Determining support for trickle ICE 179 2. Generating the initial ICE description 181 3. Handling the initial ICE description and generating the initial 182 ICE response 184 4. Handling the initial ICE response 186 5. Forming check lists, pruning candidates, performing connectivity 187 checks, etc. 189 6. Gathering and conveying candidates after the initial ICE 190 description and response 192 7. Handling inbound trickled candidates 194 8. Generating and handling the end-of-candidates indication 196 9. Handling ICE restarts 198 There is quite a bit of operational experience with the technique 199 behind Trickle ICE, going back as far as 2005 (when the XMPP Jingle 200 extension defined a "dribble mode" as specified in [XEP-0176]); this 201 document incorporates feedback from those who have implemented and 202 deployed the technique over the years. 204 2. Terminology 206 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 207 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 208 document are to be interpreted as described in [RFC2119]. 210 This specification makes use of all terminology defined for 211 Interactive Connectivity Establishment in [rfc5245bis]. In addition, 212 it defines the following terms: 214 Full Trickle: The typical mode of operation for Trickle ICE agents, 215 in which the initial ICE description can include any number of 216 candidates (even zero candidates) and does not need to include a 217 full generation of candidates as in half trickle. 219 Generation: All of the candidates conveyed within an ICE session. 221 Half Trickle: A Trickle ICE mode of operation in which the initiator 222 gathers a full generation of candidates strictly before creating 223 and conveying the initial ICE description. Once conveyed, this 224 candidate information can be processed by regular ICE agents, 225 which do not require support for Trickle ICE. It also allows 226 Trickle ICE capable responders to still gather candidates and 227 perform connectivity checks in a non-blocking way, thus providing 228 roughly "half" the advantages of Trickle ICE. The half trickle 229 mechanism is mostly meant for use when the responder's support for 230 Trickle ICE cannot be confirmed prior to conveying the initial ICE 231 description. 233 ICE Description: Any attributes related to the ICE session (not 234 candidates) required to configure an ICE agent. These include but 235 are not limited to the username fragment, password, and other 236 attributes. 238 Trickled Candidates: Candidates that a Trickle ICE agent conveys 239 after conveying the initial ICE description or responding to the 240 initial ICE description, but within the same ICE session. 241 Trickled candidates can be conveyed in parallel with candidate 242 gathering and connectivity checks. 244 Trickling: The act of incrementally conveying trickled candidates. 246 Empty Check List: A check list that initially does not contain any 247 candidate pairs because they will be incrementally added as they 248 are trickled. (This scenario does not arise with a regular ICE 249 agent, because all candidate pairs are known when the agent 250 creates the check list set). 252 3. Determining Support for Trickle ICE 254 To fully support Trickle ICE, using protocols SHOULD incorporate one 255 of the following mechanisms so that implementations can determine 256 whether Trickle ICE is supported: 258 1. Provide a capabilities discovery method so that agents can verify 259 support of Trickle ICE prior to initiating a session (XMPP's 260 Service Discovery [XEP-0030] is one such mechanism). 262 2. Make support for Trickle ICE mandatory so that user agents can 263 assume support. 265 If a using protocol does not provide a method of determining ahead of 266 time whether Trickle ICE is supported, agents can make use of the 267 half trickle procedure described in Section 16. 269 Prior to conveying the initial ICE description, agents that implement 270 using protocols that support capabilities discovery can attempt to 271 verify whether or not the remote party supports Trickle ICE. If an 272 agent determines that the remote party does not support Trickle ICE, 273 it MUST fall back to using regular ICE or abandon the entire session. 275 Even if a using protocol does not include a capabilities discovery 276 method, a user agent can provide an indication within the ICE 277 description that it supports Trickle ICE by communicating an ICE 278 option of 'trickle'. This token MUST be provided either at the 279 session level or, if at the data stream level, for every data stream 280 (an agent MUST NOT specify Trickle ICE support for some data streams 281 but not others). Note: The encoding of the 'trickle' ICE option, and 282 the message(s) used to carry it to the peer, are protocol specific; 283 for instance, the encoding for the Session Description Protocol (SDP) 284 [RFC4566] is defined in [I-D.ietf-mmusic-trickle-ice-sip]. 286 Dedicated discovery semantics and half trickle are needed only prior 287 to initiation of an ICE session. After an ICE session is established 288 and Trickle ICE support is confirmed for both parties, either agent 289 can use full trickle for subsequent exchanges (see also Section 15). 291 4. Generating the Initial ICE Description 293 An ICE agent can start gathering candidates as soon as it has an 294 indication that communication is imminent (e.g., a user interface cue 295 or an explicit request to initiate a communication session). Unlike 296 in regular ICE, in Trickle ICE implementations do not need to gather 297 candidates in a blocking manner. Therefore, unless half trickle is 298 being used, the user experience is improved if the initiating agent 299 generates and transmits its initial ICE description as early as 300 possible (thus enabling the remote party to start gathering and 301 trickling candidates). 303 An initiator MAY include any mix of candidates when conveying the 304 initial ICE description. This includes the possibility of conveying 305 all the candidates the initiator plans to use (as in half trickle), 306 conveying only a publicly-reachable IP address (e.g., a candidate at 307 a data relay that is known to not be behind a firewall), or conveying 308 no candidates at all (in which case the initiator can obtain the 309 responder's initial candidate list sooner and the responder can begin 310 candidate gathering more quickly). 312 For candidates included in the initial ICE description, the methods 313 for calculating priorities and foundations, determining redundancy of 314 candidates, and the like work just as in regular ICE [rfc5245bis]. 316 5. Handling the Initial ICE Description and Generating the Initial ICE 317 Response 319 When a responder receives the initial ICE description, it will first 320 check if the ICE description or initiator indicates support for 321 Trickle ICE as explained in Section 3. If not, the responder MUST 322 process the initial ICE description according to regular ICE 323 procedures [rfc5245bis] (or, if no ICE support is detected at all, 324 according to relevant processing rules for the using protocol, such 325 as offer/answer processing rules [RFC3264]). However, if support for 326 Trickle ICE is confirmed, a responder will automatically assume 327 support for regular ICE as well. 329 If the initial ICE description indicates support for Trickle ICE, the 330 responder will determine its role and start gathering and 331 prioritizing candidates; while doing so, it will also respond by 332 conveying an initial ICE response, so that both the initiator and the 333 responder can form check lists and begin connectivity checks. 335 A responder can respond to the initial ICE description at any point 336 while gathering candidates. The initial ICE response MAY contain any 337 set of candidates, including all candidates or no candidates. (The 338 benefit of including no candidates is to convey the initial ICE 339 response as quickly as possible, so that both parties can consider 340 the ICE session to be under active negotiation as soon as possible.) 342 As noted in Section 3, in using protocols that use SDP the initial 343 ICE response can indicate support for Trickle ICE by including a 344 token of "trickle" in the ice-options attribute. 346 6. Handling the Initial ICE Response 348 When processing the initial ICE response, the initiator follows 349 regular ICE procedures to determine its role, after which it forms 350 check lists (Section 7) and performs connectivity checks (Section 8). 352 7. Forming Check Lists 354 According to regular ICE procedures [rfc5245bis], in order for 355 candidate pairing to be possible and for redundant candidates to be 356 pruned, the candidates would need to be provided in the initial ICE 357 description and initial ICE response. By contrast, under Trickle ICE 358 check lists can be empty until candidates are conveyed or received. 359 Therefore a Trickle ICE agent handles check list formation and 360 candidate pairing in a slightly different way than a regular ICE 361 agent: the agent still forms the check lists, but it populates a 362 given check list only after it actually has candidate pairs for that 363 check list. Every check list is initially placed in the Running 364 state, even if the check list is empty (this is consistent with 365 Section 6.1.2.1 of [rfc5245bis]). 367 8. Performing Connectivity Checks 369 As specified in [rfc5245bis], whenever timer Ta fires, only check 370 lists in the Running state will be picked when scheduling 371 connectivity checks for candidate pairs. Therefore, a Trickle ICE 372 agent MUST keep each check list in the Running state as long as it 373 expects candidate pairs to be incrementally added to the check list. 374 After that, the check list state is set according to the procedures 375 in [rfc5245bis]. 377 Whenever timer Ta fires and an empty check list is picked, no action 378 is performed for the list. Without waiting for timer Ta to expire 379 again, the agent selects the next check list in the Running state, in 380 accordance with Section 6.1.4.2 of [rfc5245bis]. 382 Section 7.2.5.3.3 of [rfc5245bis] requires that agents update check 383 lists and timer states upon completing a connectivity check 384 transaction. During such an update, regular ICE agents would set the 385 state of a check list to Failed if both of the following two 386 conditions are satisfied: 388 o all of the pairs in the check list are either in the Failed state 389 or Succeeded state; and 391 o there is not a pair in the valid list for each component of the 392 data stream. 394 With Trickle ICE, the above situation would often occur when 395 candidate gathering and trickling are still in progress, even though 396 it is quite possible that future checks will succeed. For this 397 reason, Trickle ICE agents add the following conditions to the above 398 list: 400 o all candidate gathering has completed and the agent is not 401 expecting to discover any new local candidates; and 403 o the remote agent has conveyed an end-of-candidates indication for 404 that check list as described in Section 13. 406 9. Gathering and Conveying Newly Gathered Local Candidates 408 After Trickle ICE agents have conveyed initial ICE descriptions and 409 initial ICE responses, they will most likely continue gathering new 410 local candidates as STUN, TURN, and other non-host candidate 411 gathering mechanisms begin to yield results. Whenever an agent 412 discovers such a new candidate it will compute its priority, type, 413 foundation, and component ID according to regular ICE procedures. 415 The new candidate is then checked for redundancy against the existing 416 list of local candidates. If its transport address and base match 417 those of an existing candidate, it will be considered redundant and 418 will be ignored. This would often happen for server reflexive 419 candidates that match the host addresses they were obtained from 420 (e.g., when the latter are public IPv4 addresses). Contrary to 421 regular ICE, Trickle ICE agents will consider the new candidate 422 redundant regardless of its priority. 424 Next the agent "trickles" the newly discovered candidate(s) to the 425 remote agent. The actual delivery of the new candidates is handled 426 by a using protocol such as SIP or XMPP. Trickle ICE imposes no 427 restrictions on the way this is done (e.g., some using protocols 428 might choose not to trickle updates for server reflexive candidates 429 and instead rely on the discovery of peer reflexive ones). 431 When candidates are trickled, the using protocol MUST deliver each 432 candidate (and any end-of-candidates indication as described in 433 Section 13) to the receiving Trickle ICE implementation exactly once 434 and in the same order it was conveyed. If the using protocol 435 provides any candidate retransmissions, they need to be hidden from 436 the ICE implementation. 438 Also, candidate trickling needs to be correlated to a specific ICE 439 session, so that if there is an ICE restart, any delayed updates for 440 a previous session can be recognized as such and ignored by the 441 receiving party. For example, using protocols that signal candidates 442 via SDP might include a Username Fragment value in the corresponding 443 a=candidate line, such as: 445 a=candidate:1 1 UDP 2130706431 2001:db8::1 5000 typ host ufrag 8hhY 447 Or, as another example, WebRTC implementations might include a 448 Username Fragment in the JavaScript objects that represent 449 candidates. 451 Note: The using protocol needs to provide a mechanism for both 452 parties to indicate and agree on the ICE session in force (as 453 identified by the Username Fragment and Password combination) so that 454 they have a consistent view of which candidates are to be paired. 455 This is especially important in the case of ICE restarts (see 456 Section 15). 458 Note: A using protocol might prefer not to trickle server reflexive 459 candidates to entities that are known to be publicly accessible and 460 where sending a direct STUN binding request is likely to reach the 461 destination faster than the trickle update that travels through the 462 signaling path. 464 10. Pairing Newly Gathered Local Candidates 466 As a Trickle ICE agent gathers local candidates, it needs to form 467 candidate pairs; this works as described in the ICE specification 468 [rfc5245bis], with the following provisos: 470 1. A Trickle ICE agent MUST NOT pair a local candidate until it has 471 been trickled to the remote party. 473 2. Once the agent has conveyed the local candidate to the remote 474 party, the agent checks if any remote candidates are currently 475 known for this same stream and component. If not, the agent 476 merely adds the new candidate to the list of local candidates 477 (without pairing it). 479 3. Otherwise, if the agent has already learned of one or more remote 480 candidates for this stream and component, it attempts to pair the 481 new local candidate as described in the ICE specification 482 [rfc5245bis]. 484 4. If a newly formed pair has a local candidate whose type is server 485 reflexive, the agent MUST replace the local candidate with its 486 base before completing the relevant redundancy tests. 488 5. The agent prunes redundant pairs by following the rules in 489 Section 6.1.2.4 of [rfc5245bis], but checks existing pairs only 490 if they have a state of Waiting or Frozen; this avoids removal of 491 pairs for which connectivity checks are in flight (a state of In- 492 Progress) or for which connectivity checks have already yielded a 493 definitive result (a state of Succeeded or Failed). 495 6. If after the relevant redundancy tests the check list where the 496 pair is to be added already contains the maximum number of 497 candidate pairs (100 by default as per [rfc5245bis]), the agent 498 SHOULD discard any pairs in the Failed state to make room for the 499 new pair. If there are no such pairs, the agent SHOULD discard a 500 pair with a lower priority than the new pair in order to make 501 room for the new pair, until the number of pairs is equal to the 502 maximum number of pairs. This processing is consistent with 503 Section 6.1.2.5 of [rfc5245bis]. 505 11. Receiving Trickled Candidates 507 At any time during an ICE session, a Trickle ICE agent might receive 508 new candidates from the remote agent, from which it will attempt to 509 form a candidate pair; this works as described in the ICE 510 specification [rfc5245bis], with the following provisos: 512 1. The agent checks if any local candidates are currently known for 513 this same stream and component. If not, the agent merely adds 514 the new candidate to the list of remote candidates (without 515 pairing it). 517 2. Otherwise, if the agent has already gathered one or more local 518 candidates for this stream and component, it attempts to pair the 519 new remote candidate as described in the ICE specification 520 [rfc5245bis]. 522 3. If a newly formed pair has a local candidate whose type is server 523 reflexive, the agent MUST replace the local candidate with its 524 base before completing the redundancy check in the next step. 526 4. The agent prunes redundant pairs as described below, but checks 527 existing pairs only if they have a state of Waiting or Frozen; 528 this avoids removal of pairs for which connectivity checks are in 529 flight (a state of In-Progress) or for which connectivity checks 530 have already yielded a definitive result (a state of Succeeded or 531 Failed). 533 A. If the agent finds a redundancy between two pairs and one of 534 those pairs contains a newly received remote candidate whose 535 type is peer reflexive, the agent SHOULD discard the pair 536 containing that candidate, set the priority of the existing 537 pair to the priority of the discarded pair, and re-sort the 538 check list. (This policy helps to eliminate problems with 539 remote peer reflexive candidates for which a STUN binding 540 request is received before signaling of the candidate is 541 trickled to the receiving agent, such as a different view of 542 pair priorities between the local agent and the remote agent, 543 since the same candidate could be perceived as peer reflexive 544 by one agent and as server reflexive by the other agent.) 546 B. The agent then applies the rules defined in Section 6.1.2.4 547 of [rfc5245bis]. 549 5. If after the relevant redundancy tests the check list where the 550 pair is to be added already contains the maximum number of 551 candidate pairs (100 by default as per [rfc5245bis]), the agent 552 SHOULD discard any pairs in the Failed state to make room for the 553 new pair. If there are no such pairs, the agent SHOULD discard a 554 pair with a lower priority than the new pair in order to make 555 room for the new pair, until the number of pairs is equal to the 556 maximum number of pairs. This processing is consistent with 557 Section 6.1.2.5 of [rfc5245bis]. 559 12. Inserting Trickled Candidate Pairs into a Check List 561 After a local agent has trickled a candidate and formed a candidate 562 pair from that local candidate (Section 9), or after a remote agent 563 has received a trickled candidate and formed a candidate pair from 564 that remote candidate (Section 11), a Trickle ICE agent adds the new 565 candidate pair to a check list as defined in this section. 567 As an aid to understanding the procedures defined in this section, 568 consider the following tabular representation of all check lists in 569 an agent (note that initially for one of the foundations, i.e., f5, 570 there are no candidate pairs): 572 +-----------------+------+------+------+------+------+ 573 | | f1 | f2 | f3 | f4 | f5 | 574 +-----------------+------+------+------+------+------+ 575 | s1 (Audio.RTP) | F | F | F | | | 576 +-----------------+------+------+------+------+------+ 577 | s2 (Audio.RTCP) | F | F | F | F | | 578 +-----------------+------+------+------+------+------+ 579 | s3 (Video.RTP) | F | | | | | 580 +-----------------+------+------+------+------+------+ 581 | s4 (Video.RTCP) | F | | | | | 582 +-----------------+------+------+------+------+------+ 584 Figure 2: Example of Check List State 586 Each row in the table represents a component for a given data stream 587 (e.g., s1 and s2 might be the RTP and RTCP components for audio) and 588 thus a single check list in the check list set. Each column 589 represents one foundation. Each cell represents one candidate pair. 590 In the tables shown in this section, "F" stands for "frozen", "W" 591 stands for "waiting", and "S" stands for "succeeded"; in addition, 592 "^^" is used to notate newly-added candidate pairs. 594 When an agent commences ICE processing, in accordance with 595 Section 6.1.2.6 of [rfc5245bis], for each foundation it will unfreeze 596 the pair with the lowest component ID and, if the component IDs are 597 equal, with the highest priority (this is the topmost candidate pair 598 in every column). This initial state is shown in the following 599 table. 601 +-----------------+------+------+------+------+------+ 602 | | f1 | f2 | f3 | f4 | f5 | 603 +-----------------+------+------+------+------+------+ 604 | s1 (Audio.RTP) | W | W | W | | | 605 +-----------------+------+------+------+------+------+ 606 | s2 (Audio.RTCP) | F | F | F | W | | 607 +-----------------+------+------+------+------+------+ 608 | s3 (Video.RTP) | F | | | | | 609 +-----------------+------+------+------+------+------+ 610 | s4 (Video.RTCP) | F | | | | | 611 +-----------------+------+------+------+------+------+ 613 Figure 3: Initial Check List State 615 Then, as the checks proceed (see Section 7.2.5.4 of [rfc5245bis]), 616 for each pair that enters the Succeeded state (denoted here by "S"), 617 the agent will unfreeze all pairs for all data streams with the same 618 foundation (e.g., if the pair in column 1, row 1 succeeds then the 619 agent will unfreeze the pair in column 1, rows 2, 3, and 4). 621 +-----------------+------+------+------+------+------+ 622 | | f1 | f2 | f3 | f4 | f5 | 623 +-----------------+------+------+------+------+------+ 624 | s1 (Audio.RTP) | S | W | W | | | 625 +-----------------+------+------+------+------+------+ 626 | s2 (Audio.RTCP) | W | F | F | W | | 627 +-----------------+------+------+------+------+------+ 628 | s3 (Video.RTP) | W | | | | | 629 +-----------------+------+------+------+------+------+ 630 | s4 (Video.RTCP) | W | | | | | 631 +-----------------+------+------+------+------+------+ 633 Figure 4: Check List State with Succeeded Candidate Pair 635 Trickle ICE preserves all of these rules as they apply to "static" 636 check list sets. This implies that if a Trickle ICE agent were to 637 begin connectivity checks with all of its pairs already present, the 638 way that pair states change is indistinguishable from that of a 639 regular ICE agent. 641 Of course, the major difference with Trickle ICE is that check list 642 sets can be dynamically updated because candidates can arrive after 643 connectivity checks have started. When this happens, an agent sets 644 the state of the newly formed pair as described below. 646 Rule 1: If the newly formed pair has the lowest component ID and, if 647 the component IDs are equal, the highest priority of any candidate 648 pair for this foundation (i.e., if it is the topmost pair in the 649 column), set the state to Waiting. For example, this would be the 650 case if the newly formed pair were placed in column 5, row 1. This 651 rule is consistent with Section 6.1.2.6 of [rfc5245bis]. 653 +-----------------+------+------+------+------+------+ 654 | | f1 | f2 | f3 | f4 | f5 | 655 +-----------------+------+------+------+------+------+ 656 | s1 (Audio.RTP) | S | W | W | | ^W^ | 657 +-----------------+------+------+------+------+------+ 658 | s2 (Audio.RTCP) | W | F | F | W | | 659 +-----------------+------+------+------+------+------+ 660 | s3 (Video.RTP) | W | | | | | 661 +-----------------+------+------+------+------+------+ 662 | s4 (Video.RTCP) | W | | | | | 663 +-----------------+------+------+------+------+------+ 665 Figure 5: Check List State with Newly Formed Pair, Rule 1 667 Rule 2: If there is at least one pair in the Succeeded state for this 668 foundation, set the state to Waiting. For example, this would be the 669 case if the pair in column 5, row 1 succeeded and the newly formed 670 pair were placed in column 5, row 2. This rule is consistent with 671 Section 7.2.5.3.3 of [rfc5245bis]. 673 +-----------------+------+------+------+------+------+ 674 | | f1 | f2 | f3 | f4 | f5 | 675 +-----------------+------+------+------+------+------+ 676 | s1 (Audio.RTP) | S | W | W | | S | 677 +-----------------+------+------+------+------+------+ 678 | s2 (Audio.RTCP) | W | F | F | W | ^W^ | 679 +-----------------+------+------+------+------+------+ 680 | s3 (Video.RTP) | W | | | | | 681 +-----------------+------+------+------+------+------+ 682 | s4 (Video.RTCP) | W | | | | | 683 +-----------------+------+------+------+------+------+ 685 Figure 6: Check List State with Newly Formed Pair, Rule 2 687 Rule 3: In all other cases, set the state to Frozen. For example, 688 this would be the case if the newly formed pair were placed in column 689 3, row 3. 691 +-----------------+------+------+------+------+------+ 692 | | f1 | f2 | f3 | f4 | f5 | 693 +-----------------+------+------+------+------+------+ 694 | s1 (Audio.RTP) | S | W | W | | S | 695 +-----------------+------+------+------+------+------+ 696 | s2 (Audio.RTCP) | W | F | F | W | W | 697 +-----------------+------+------+------+------+------+ 698 | s3 (Video.RTP) | W | | ^F^ | | | 699 +-----------------+------+------+------+------+------+ 700 | s4 (Video.RTCP) | W | | | | | 701 +-----------------+------+------+------+------+------+ 703 Figure 7: Check List State with Newly Formed Pair, Rule 3 705 13. Generating an End-of-Candidates Indication 707 Once all candidate gathering is completed or expires for an ICE 708 session associated with a specific data stream, the agent will 709 generate an "end-of-candidates" indication for that session and 710 convey it to the remote agent via the signaling channel. Although 711 the exact form of the indication depends on the using protocol, the 712 indication MUST specify the generation (Username Fragment and 713 Password combination) so that an agent can correlate the end-of- 714 candidates indication with a particular ICE session. The indication 715 can be conveyed in the following ways: 717 o As part of an initiation request (which would typically be the 718 case with the initial ICE description for half trickle) 720 o Along with the last candidate an agent can send for a stream 722 o As a standalone notification (e.g., after STUN Binding requests or 723 TURN Allocate requests to a server time out and the agent is no 724 longer actively gathering candidates) 726 Conveying an end-of-candidates indication in a timely manner is 727 important in order to avoid ambiguities and speed up the conclusion 728 of ICE processing. In particular: 730 o A controlled Trickle ICE agent SHOULD convey an end-of-candidates 731 indication after it has completed gathering for a data stream, 732 unless ICE processing terminates before the agent has had a chance 733 to complete gathering. 735 o A controlling agent MAY conclude ICE processing prior to conveying 736 end-of-candidates indications for all streams. However, it is 737 RECOMMENDED for a controlling agent to convey end-of-candidates 738 indications whenever possible for the sake of consistency and to 739 keep middleboxes and controlled agents up-to-date on the state of 740 ICE processing. 742 When conveying an end-of-candidates indication during trickling 743 (rather than as a part of the initial ICE description or a response 744 thereto), it is the responsibility of the using protocol to define 745 methods for associating the indication with one or more specific data 746 streams. 748 An agent MAY also choose to generate an end-of-candidates indication 749 before candidate gathering has actually completed, if the agent 750 determines that gathering has continued for more than an acceptable 751 period of time. However, an agent MUST NOT convey any more 752 candidates after it has conveyed an end-of-candidates indication. 754 When performing half trickle, an agent SHOULD convey an end-of- 755 candidates indication together with its initial ICE description 756 unless it is planning to potentially trickle additional candidates 757 (e.g., in case the remote party turns out to support Trickle ICE). 759 After an agent conveys the end-of-candidates indication, it will 760 update the state of the corresponding check list as explained in 761 Section 8. Past that point, an agent MUST NOT trickle any new 762 candidates within this ICE session. Therefore, adding new candidates 763 to the negotiation is possible only through an ICE restart (see 764 Section 15). 766 This specification does not override regular ICE semantics for 767 concluding ICE processing. Therefore, even if end-of-candidates 768 indications are conveyed, an agent will still need to go through pair 769 nomination. Also, if pairs have been nominated for components and 770 data streams, ICE processing MAY still conclude even if end-of- 771 candidates indications have not been received for all streams. In 772 all cases, an agent MUST NOT trickle any new candidates within an ICE 773 session after nomination of a candidate pair as described in 774 Section 8.1.1 of [rfc5245bis]. 776 14. Receiving an End-of-Candidates Indication 778 Receiving an end-of-candidates indication enables an agent to update 779 check list states and, in case valid pairs do not exist for every 780 component in every data stream, determine that ICE processing has 781 failed. It also enables an agent to speed up the conclusion of ICE 782 processing when a candidate pair has been validated but it involves 783 the use of lower-preference transports such as TURN. In such 784 situations, an implementation MAY choose to wait and see if higher- 785 priority candidates are received; in this case the end-of-candidates 786 indication provides a notification that such candidates are not 787 forthcoming. 789 When an agent receives an end-of-candidates indication for a specific 790 data stream, it will update the state of the relevant check list as 791 per Section 8 (which might lead to some check lists being marked as 792 Failed). If the check list is still in the Running state after the 793 update, the agent will persist the fact that an end-of-candidates 794 indication has been received and take it into account in future 795 updates to the check list. 797 After an agent has received an end-of-candidates indication, it MUST 798 ignore any newly received candidates for that data stream or data 799 session. 801 15. Subsequent Exchanges and ICE Restarts 803 Before conveying an end-of-candidates indication, either agent MAY 804 convey subsequent candidate information at any time allowed by the 805 using protocol. When this happens, agents will use [rfc5245bis] 806 semantics (e.g., checking of the Username Fragment and Password 807 combination) to determine whether or not the new candidate 808 information requires an ICE restart. 810 If an ICE restart occurs, the agents can assume that Trickle ICE is 811 still supported if support was determined previously, and thus can 812 engage in Trickle ICE behavior as they would in an initial exchange 813 of ICE descriptions where support was determined through a 814 capabilities discovery method. 816 16. Half Trickle 818 In half trickle, the initiator conveys the initial ICE description 819 with a usable but not necessarily full generation of candidates. 820 This ensures that the ICE description can be processed by a regular 821 ICE responder and is mostly meant for use in cases where support for 822 Trickle ICE cannot be confirmed prior to conveying the initial ICE 823 description. The initial ICE description indicates support for 824 Trickle ICE, so that the responder can respond with something less 825 than a full generation of candidates and then trickle the rest. The 826 initial ICE description for half trickle can contain an end-of- 827 candidates indication, although this is not mandatory because if 828 trickle support is confirmed then the initiator can choose to trickle 829 additional candidates before it conveys an end-of-candidates 830 indication. 832 The half trickle mechanism can be used in cases where there is no way 833 for an agent to verify in advance whether a remote party supports 834 Trickle ICE. Because the initial ICE description contain a full 835 generation of candidates, it can thus be handled by a regular ICE 836 agent, while still allowing a Trickle ICE agent to use the 837 optimization defined in this specification. This prevents 838 negotiation from failing in the former case while still giving 839 roughly half the Trickle ICE benefits in the latter. 841 Use of half trickle is only necessary during an initial exchange of 842 ICE descriptions. After both parties have received an ICE 843 description from their peer, they can each reliably determine Trickle 844 ICE support and use it for all subsequent exchanges (see Section 15). 846 In some instances, using half trickle might bring more than just half 847 the improvement in terms of user experience. This can happen when an 848 agent starts gathering candidates upon user interface cues that the 849 user will soon be initiating an interaction, such as activity on a 850 keypad or the phone going off hook. This would mean that some or all 851 of the candidate gathering could be completed before the agent 852 actually needs to convey the candidate information. Because the 853 responder will be able to trickle candidates, both agents will be 854 able to start connectivity checks and complete ICE processing earlier 855 than with regular ICE and potentially even as early as with full 856 trickle. 858 However, such anticipation is not always possible. For example, a 859 multipurpose user agent or a WebRTC web page where communication is a 860 non-central feature (e.g., calling a support line in case of a 861 problem with the main features) would not necessarily have a way of 862 distinguishing between call intentions and other user activity. In 863 such cases, using full trickle is most likely to result in an ideal 864 user experience. Even so, using half trickle would be an improvement 865 over regular ICE because it would result in a better experience for 866 responders. 868 17. Preserving Candidate Order while Trickling 870 One important aspect of regular ICE is that connectivity checks for a 871 specific foundation and component are attempted simultaneously by 872 both agents, so that any firewalls or NATs fronting the agents would 873 whitelist both endpoints and allow all except for the first 874 ("suicide") packets to go through. This is also important to 875 unfreezing candidates at the right time. While not crucial, 876 preserving this behavior in Trickle ICE is likely to improve ICE 877 performance. 879 To achieve this, when trickling candidates, agents SHOULD respect the 880 order of components as reflected by their component IDs; that is, 881 candidates for a given component SHOULD NOT be conveyed prior to 882 candidates for a component with a lower ID number within the same 883 foundation. In addition, candidates SHOULD be paired, following the 884 procedures in Section 12, in the same order they are conveyed. 886 For example, the following SDP description contains two components 887 (RTP and RTCP) and two foundations (host and server reflexive): 889 v=0 890 o=jdoe 2890844526 2890842807 IN IP4 10.0.1.1 891 s= 892 c=IN IP4 10.0.1.1 893 t=0 0 894 a=ice-pwd:asd88fgpdd777uzjYhagZg 895 a=ice-ufrag:8hhY 896 m=audio 5000 RTP/AVP 0 897 a=rtpmap:0 PCMU/8000 898 a=candidate:1 1 UDP 2130706431 10.0.1.1 5000 typ host 899 a=candidate:1 2 UDP 2130706431 10.0.1.1 5001 typ host 900 a=candidate:2 1 UDP 1694498815 192.0.2.3 5000 typ srflx 901 raddr 10.0.1.1 rport 8998 902 a=candidate:2 2 UDP 1694498815 192.0.2.3 5001 typ srflx 903 raddr 10.0.1.1 rport 8998 905 For this candidate information the RTCP host candidate would not be 906 conveyed prior to the RTP host candidate. Similarly the RTP server 907 reflexive candidate would be conveyed together with or prior to the 908 RTCP server reflexive candidate. 910 18. Requirements for Using Protocols 912 In order to fully enable the use of Trickle ICE, this specification 913 defines the following requirements for using protocols. 915 o A using protocol SHOULD provide a way for parties to advertise and 916 discover support for Trickle ICE before an ICE session begins (see 917 Section 3). 919 o A using protocol MUST provide methods for incrementally conveying 920 (i.e., "trickling") additional candidates after conveying the 921 initial ICE description (see Section 9). 923 o A using protocol MUST deliver each trickled candidate or end-of- 924 candidates indication exactly once and in the same order it was 925 conveyed (see Section 9). 927 o A using protocol MUST provide a mechanism for both parties to 928 indicate and agree on the ICE session in force (see Section 9). 930 o A using protocol MUST provide a way for parties to communicate the 931 end-of-candidates indication, which MUST specify the particular 932 ICE session to which the indication applies (see Section 13). 934 19. IANA Considerations 936 IANA is requested to register the following ICE option in the "ICE 937 Options" sub-registry of the "Interactive Connectivity Establishment 938 (ICE) registry", following the procedures defined in [RFC6336]. 940 ICE Option: trickle 942 Contact: IESG, iesg@ietf.org 944 Change control: IESG 946 Description: An ICE option of "trickle" indicates support for 947 incremental communication of ICE candidates. 949 Reference: RFC XXXX 951 20. Security Considerations 953 This specification inherits most of its semantics from [rfc5245bis] 954 and as a result all security considerations described there apply to 955 Trickle ICE. 957 If the privacy implications of revealing host addresses on an 958 endpoint device are a concern (see for example the discussion in 959 [I-D.ietf-rtcweb-ip-handling] and in Section 19 of [rfc5245bis]), 960 agents can generate ICE descriptions that contain no candidates and 961 then only trickle candidates that do not reveal host addresses (e.g., 962 relayed candidates). 964 21. Acknowledgements 966 The authors would like to thank Bernard Aboba, Flemming Andreasen, 967 Rajmohan Banavi, Taylor Brandstetter, Philipp Hancke, Christer 968 Holmberg, Ari Keranen, Paul Kyzivat, Jonathan Lennox, Enrico Marocco, 969 Pal Martinsen, Nils Ohlmeier, Thomas Stach, Peter Thatcher, Martin 970 Thomson, Brandon Williams, and Dale Worley for their reviews and 971 suggestions on improving this document. Sarah Banks, Roni Even, and 972 David Mandelberg completed opsdir, genart, and security reviews, 973 respectively. Thanks also to Ari Keranen and Peter Thatcher in their 974 role as chairs, and Ben Campbell in his role as responsible Area 975 Director. 977 22. References 979 22.1. Normative References 981 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 982 Requirement Levels", BCP 14, RFC 2119, 983 DOI 10.17487/RFC2119, March 1997, . 986 [rfc5245bis] 987 Keranen, A., Holmberg, C., and J. Rosenberg, "Interactive 988 Connectivity Establishment (ICE): A Protocol for Network 989 Address Translator (NAT) Traversal", draft-ietf-ice- 990 rfc5245bis-20 (work in progress), March 2018. 992 22.2. Informative References 994 [I-D.ietf-mmusic-trickle-ice-sip] 995 Ivov, E., Stach, T., Marocco, E., and C. Holmberg, "A 996 Session Initiation Protocol (SIP) usage for Trickle ICE", 997 draft-ietf-mmusic-trickle-ice-sip-14 (work in progress), 998 February 2018. 1000 [I-D.ietf-rtcweb-ip-handling] 1001 Uberti, J. and G. Shieh, "WebRTC IP Address Handling 1002 Requirements", draft-ietf-rtcweb-ip-handling-06 (work in 1003 progress), March 2018. 1005 [RFC1918] Rekhter, Y., Moskowitz, B., Karrenberg, D., de Groot, G., 1006 and E. Lear, "Address Allocation for Private Internets", 1007 BCP 5, RFC 1918, DOI 10.17487/RFC1918, February 1996, 1008 . 1010 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 1011 A., Peterson, J., Sparks, R., Handley, M., and E. 1012 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1013 DOI 10.17487/RFC3261, June 2002, . 1016 [RFC3264] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model 1017 with Session Description Protocol (SDP)", RFC 3264, 1018 DOI 10.17487/RFC3264, June 2002, . 1021 [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session 1022 Description Protocol", RFC 4566, DOI 10.17487/RFC4566, 1023 July 2006, . 1025 [RFC4787] Audet, F., Ed. and C. Jennings, "Network Address 1026 Translation (NAT) Behavioral Requirements for Unicast 1027 UDP", BCP 127, RFC 4787, DOI 10.17487/RFC4787, January 1028 2007, . 1030 [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, 1031 "Session Traversal Utilities for NAT (STUN)", RFC 5389, 1032 DOI 10.17487/RFC5389, October 2008, . 1035 [RFC5766] Mahy, R., Matthews, P., and J. Rosenberg, "Traversal Using 1036 Relays around NAT (TURN): Relay Extensions to Session 1037 Traversal Utilities for NAT (STUN)", RFC 5766, 1038 DOI 10.17487/RFC5766, April 2010, . 1041 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 1042 Protocol (XMPP): Core", RFC 6120, DOI 10.17487/RFC6120, 1043 March 2011, . 1045 [RFC6336] Westerlund, M. and C. Perkins, "IANA Registry for 1046 Interactive Connectivity Establishment (ICE) Options", 1047 RFC 6336, DOI 10.17487/RFC6336, July 2011, 1048 . 1050 [XEP-0030] 1051 Hildebrand, J., Millard, P., Eatmon, R., and P. Saint- 1052 Andre, "XEP-0030: Service Discovery", XEP XEP-0030, June 1053 2008. 1055 [XEP-0176] 1056 Beda, J., Ludwig, S., Saint-Andre, P., Hildebrand, J., 1057 Egan, S., and R. McQueen, "XEP-0176: Jingle ICE-UDP 1058 Transport Method", XEP XEP-0176, June 2009. 1060 Appendix A. Interaction with Regular ICE 1062 The ICE protocol was designed to be flexible enough to work in and 1063 adapt to as many network environments as possible. Despite that 1064 flexibility, ICE as specified in [rfc5245bis] does not by itself 1065 support trickle ICE. This section describes how trickling of 1066 candidates interacts with ICE. 1068 [rfc5245bis] describes the conditions required to update check lists 1069 and timer states while an ICE agent is in the Running state. These 1070 conditions are verified upon transaction completion and one of them 1071 stipulates that: 1073 If there is not a pair in the valid list for each component of the 1074 data stream, the state of the check list is set to Failed. 1076 This could be a problem and cause ICE processing to fail prematurely 1077 in a number of scenarios. Consider the following case: 1079 1. Alice and Bob are both located in different networks with Network 1080 Address Translation (NAT). Alice and Bob themselves have 1081 different address but both networks use the same private internet 1082 block (e.g., the "20-bit block" 172.16/12 specified in 1083 [RFC1918]). 1085 2. Alice conveys to Bob the candidate 172.16.0.1 which also happens 1086 to correspond to an existing host on Bob's network. 1088 3. Bob creates a check list consisting solely of 172.16.0.1 and 1089 starts checks. 1091 4. These checks reach the host at 172.16.0.1 in Bob's network, which 1092 responds with an ICMP "port unreachable" error; per [rfc5245bis] 1093 Bob marks the transaction as Failed. 1095 At this point the check list only contains Failed candidates and the 1096 valid list is empty. This causes the data stream and potentially all 1097 ICE processing to fail, even though if Trickle ICE agents could 1098 subsequently convey candidates that would cause previously empty 1099 check lists to become non-empty. 1101 A similar race condition would occur if the initial ICE description 1102 from Alice contain only candidates that can be determined as 1103 unreachable from any of the candidates that Bob has gathered (e.g., 1104 this would be the case if Bob's candidates only contain IPv4 1105 addresses and the first candidate that he receives from Alice is an 1106 IPv6 one). 1108 Another potential problem could arise when a non-trickle ICE 1109 implementation initiates an interaction with a Trickle ICE 1110 implementation. Consider the following case: 1112 1. Alice's client has a non-Trickle ICE implementation. 1114 2. Bob's client has support for Trickle ICE. 1116 3. Alice and Bob are behind NATs with address-dependent filtering 1117 [RFC4787]. 1119 4. Bob has two STUN servers but one of them is currently 1120 unreachable. 1122 After Bob's agent receives Alice's initial ICE description it would 1123 immediately start connectivity checks. It would also start gathering 1124 candidates, which would take a long time because of the unreachable 1125 STUN server. By the time Bob's answer is ready and conveyed to 1126 Alice, Bob's connectivity checks might have failed: until Alice gets 1127 Bob's answer, she won't be able to start connectivity checks and 1128 punch holes in her NAT. The NAT would hence be filtering Bob's 1129 checks as originating from an unknown endpoint. 1131 Appendix B. Interaction with ICE Lite 1133 The behavior of ICE lite agents that are capable of Trickle ICE does 1134 not require any particular rules other than those already defined in 1135 this specification and [rfc5245bis]. This section is hence provided 1136 only for informational purposes. 1138 An ICE lite agent would generate candidate information as per 1139 [rfc5245bis] and would indicate support for Trickle ICE. Given that 1140 the candidate information will contain a full generation of 1141 candidates, it would also be accompanied by an end-of-candidates 1142 indication. 1144 When performing full trickle, a full ICE implementation could convey 1145 the initial ICE description or response thereto with no candidates. 1146 After receiving a response that identifies the remote agent as an ICE 1147 lite implementation, the initiator can choose to not trickle any 1148 additional candidates. The same is also true in the case when the 1149 ICE lite agent initiates the interaction and the full ICE agent is 1150 the responder. In these cases the connectivity checks would be 1151 enough for the ICE lite implementation to discover all potentially 1152 useful candidates as peer reflexive. The following example 1153 illustrates one such ICE session using SDP syntax: 1155 ICE Lite Bob 1156 Agent 1157 | Offer (a=ice-lite a=ice-options:trickle) | 1158 |---------------------------------------------->| 1159 | |no cand 1160 | Answer (a=ice-options:trickle) |trickling 1161 |<----------------------------------------------| 1162 | Connectivity Checks | 1163 |<--------------------------------------------->| 1164 peer rflx| | 1165 cand disco| | 1166 |<========== CONNECTION ESTABLISHED ===========>| 1168 Figure 8: Example 1170 In addition to reducing signaling traffic this approach also removes 1171 the need to discover STUN bindings or make TURN allocations, which 1172 can considerably lighten ICE processing. 1174 Appendix C. Changes from Earlier Versions 1176 Note to the RFC Editor: please remove this section prior to 1177 publication as an RFC. 1179 C.1. Changes from draft-ietf-ice-trickle-20 1181 o Slight corrections to hanlding of peer reflexive candidates. 1183 o Wordsmithing in a few sections. 1185 C.2. Changes from draft-ietf-ice-trickle-19 1187 o Further clarified handling of remote peer reflexive candidates. 1189 o To improve readibility, renamed and restructured some sections and 1190 subsections, and modified some wording. 1192 C.3. Changes from draft-ietf-ice-trickle-18 1194 o Cleaned up pairing and redundancy checking rules for newly 1195 discovered candidates per IESG feedback and WG discussion. 1197 o Improved wording in half trickle section. 1199 o Changed "not more than once" to "exactly once". 1201 o Changed NAT examples back to IPv4. 1203 C.4. Changes from draft-ietf-ice-trickle-17 1205 o Simplified the rules for inserting a new pair in a check list. 1207 o Clarified it is not allowed to nominate a candidate pair after a 1208 pair has already been nominated (a.k.a. renomination or 1209 continuous nomination). 1211 o Removed some text that referenced older versions of rfc5245bis. 1213 o Removed some text that duplicated concepts and procedures 1214 specified in rfc5245bis. 1216 o Removed the ill-defined concept of stream order. 1218 o Shortened the introduction. 1220 C.5. Changes from draft-ietf-ice-trickle-16 1222 o Made "ufrag" terminology consistent with 5245bis. 1224 o Applied in-order delivery rule to end-of-candidates indication. 1226 C.6. Changes from draft-ietf-ice-trickle-15 1228 o Adjustments to address AD review feedback. 1230 C.7. Changes from draft-ietf-ice-trickle-14 1232 o Minor modifications to track changes to ICE core. 1234 C.8. Changes from draft-ietf-ice-trickle-13 1236 o Removed independent monitoring of check list "states" of frozen or 1237 active, since this is handled by placing a check list in the 1238 Running state defined in ICE core. 1240 C.9. Changes from draft-ietf-ice-trickle-12 1242 o Specified that the end-of-candidates indication must include the 1243 generation (ufrag/pwd) to enable association with a particular ICE 1244 session. 1246 o Further editorial fixes to address WGLC feedback. 1248 C.10. Changes from draft-ietf-ice-trickle-11 1250 o Editorial and terminological fixes to address WGLC feedback. 1252 C.11. Changes from draft-ietf-ice-trickle-10 1254 o Minor editorial fixes. 1256 C.12. Changes from draft-ietf-ice-trickle-09 1258 o Removed immediate unfreeze upon Fail. 1260 o Specified MUST NOT regarding ice-options. 1262 o Changed terminology regarding initial ICE parameters to avoid 1263 implementer confusion. 1265 C.13. Changes from draft-ietf-ice-trickle-08 1267 o Reinstated text about in-order processing of messages as a 1268 requirement for signaling protocols. 1270 o Added IANA registration template for ICE option. 1272 o Corrected Case 3 rule in Section 8.1.1 to ensure consistency with 1273 regular ICE rules. 1275 o Added tabular representations to Section 8.1.1 in order to 1276 illustrate the new pair rules. 1278 C.14. Changes from draft-ietf-ice-trickle-07 1280 o Changed "ICE description" to "candidate information" for 1281 consistency with 5245bis. 1283 C.15. Changes from draft-ietf-ice-trickle-06 1285 o Addressed editorial feedback from chairs' review. 1287 o Clarified terminology regarding generations. 1289 C.16. Changes from draft-ietf-ice-trickle-05 1291 o Rewrote the text on inserting a new pair into a check list. 1293 C.17. Changes from draft-ietf-ice-trickle-04 1295 o Removed dependency on SDP and offer/answer model. 1297 o Removed mentions of aggressive nomination, since it is deprecated 1298 in 5245bis. 1300 o Added section on requirements for signaling protocols. 1302 o Clarified terminology. 1304 o Addressed various WG feedback. 1306 C.18. Changes from draft-ietf-ice-trickle-03 1308 o Provided more detailed description of unfreezing behavior, 1309 specifically how to replace pre-existing peer-reflexive candidates 1310 with higher-priority ones received via trickling. 1312 C.19. Changes from draft-ietf-ice-trickle-02 1314 o Adjusted unfreezing behavior when there are disparate foundations. 1316 C.20. Changes from draft-ietf-ice-trickle-01 1318 o Changed examples to use IPv6. 1320 C.21. Changes from draft-ietf-ice-trickle-00 1322 o Removed dependency on SDP (which is to be provided in a separate 1323 specification). 1325 o Clarified text about the fact that a check list can be empty if no 1326 candidates have been sent or received yet. 1328 o Clarified wording about check list states so as not to define new 1329 states for "Active" and "Frozen" because those states are not 1330 defined for check lists (only for candidate pairs) in ICE core. 1332 o Removed open issues list because it was out of date. 1334 o Completed a thorough copy edit. 1336 C.22. Changes from draft-mmusic-trickle-ice-02 1338 o Addressed feedback from Rajmohan Banavi and Brandon Williams. 1340 o Clarified text about determining support and about how to proceed 1341 if it can be determined that the answering agent does not support 1342 Trickle ICE. 1344 o Clarified text about check list and timer updates. 1346 o Clarified when it is appropriate to use half trickle or to send no 1347 candidates in an offer or answer. 1349 o Updated the list of open issues. 1351 C.23. Changes from draft-ivov-01 and draft-mmusic-00 1353 o Added a requirement to trickle candidates by order of components 1354 to avoid deadlocks in the unfreezing algorithm. 1356 o Added an informative note on peer-reflexive candidates explaining 1357 that nothing changes for them semantically but they do become a 1358 more likely occurrence for Trickle ICE. 1360 o Limit the number of pairs to 100 to comply with 5245. 1362 o Added clarifications on the non-importance of how newly discovered 1363 candidates are trickled/sent to the remote party or if this is 1364 done at all. 1366 o Added transport expectations for trickled candidates as per Dale 1367 Worley's recommendation. 1369 C.24. Changes from draft-ivov-00 1371 o Specified that end-of-candidates is a media level attribute which 1372 can of course appear as session level, which is equivalent to 1373 having it appear in all m-lines. Also made end-of-candidates 1374 optional for cases such as aggressive nomination for controlled 1375 agents. 1377 o Added an example for ICE lite and Trickle ICE to illustrate how, 1378 when talking to an ICE lite agent doesn't need to send or even 1379 discover any candidates. 1381 o Added an example for ICE lite and Trickle ICE to illustrate how, 1382 when talking to an ICE lite agent doesn't need to send or even 1383 discover any candidates. 1385 o Added wording that explicitly states ICE lite agents have to be 1386 prepared to receive no candidates over signaling and that they 1387 should not freak out if this happens. (Closed the corresponding 1388 open issue). 1390 o It is now mandatory to use MID when trickling candidates and using 1391 m-line indexes is no longer allowed. 1393 o Replaced use of 0.0.0.0 to IP6 :: in order to avoid potential 1394 issues with RFC2543 SDP libraries that interpret 0.0.0.0 as an on- 1395 hold operation. Also changed the port number here from 1 to 9 1396 since it already has a more appropriate meaning. (Port change 1397 suggested by Jonathan Lennox). 1399 o Closed the Open Issue about use about what to do with cands 1400 received after end-of-cands. Solution: ignore, do an ICE restart 1401 if you want to add something. 1403 o Added more terminology, including trickling, trickled candidates, 1404 half trickle, full trickle, 1406 o Added a reference to the SIP usage for Trickle ICE as requested at 1407 the Boston interim. 1409 C.25. Changes from draft-rescorla-01 1411 o Brought back explicit use of Offer/Answer. There are no more 1412 attempts to try to do this in an O/A independent way. Also 1413 removed the use of ICE Descriptions. 1415 o Added SDP specification for trickled candidates, the trickle 1416 option and 0.0.0.0 addresses in m-lines, and end-of-candidates. 1418 o Support and Discovery. Changed that section to be less abstract. 1419 As discussed in IETF85, the draft now says implementations and 1420 usages need to either determine support in advance and directly 1421 use trickle, or do half trickle. Removed suggestion about use of 1422 discovery in SIP or about letting implementing protocols do what 1423 they want. 1425 o Defined Half Trickle. Added a section that says how it works. 1426 Mentioned that it only needs to happen in the first o/a (not 1427 necessary in updates), and added Jonathan's comment about how it 1428 could, in some cases, offer more than half the improvement if you 1429 can pre-gather part or all of your candidates before the user 1430 actually presses the call button. 1432 o Added a short section about subsequent offer/answer exchanges. 1434 o Added a short section about interactions with ICE Lite 1435 implementations. 1437 o Added two new entries to the open issues section. 1439 C.26. Changes from draft-rescorla-00 1441 o Relaxed requirements about verifying support following a 1442 discussion on MMUSIC. 1444 o Introduced ICE descriptions in order to remove ambiguous use of 1445 3264 language and inappropriate references to offers and answers. 1447 o Removed inappropriate assumption of adoption by RTCWEB pointed out 1448 by Martin Thomson. 1450 Authors' Addresses 1452 Emil Ivov 1453 Atlassian 1454 303 Colorado Street, #1600 1455 Austin, TX 78701 1456 USA 1458 Phone: +1-512-640-3000 1459 Email: eivov@atlassian.com 1461 Eric Rescorla 1462 RTFM, Inc. 1463 2064 Edgewood Drive 1464 Palo Alto, CA 94303 1465 USA 1467 Phone: +1 650 678 2350 1468 Email: ekr@rtfm.com 1470 Justin Uberti 1471 Google 1472 747 6th St S 1473 Kirkland, WA 98033 1474 USA 1476 Phone: +1 857 288 8888 1477 Email: justin@uberti.name 1478 Peter Saint-Andre 1479 Mozilla 1480 P.O. Box 787 1481 Parker, CO 80134 1482 USA 1484 Phone: +1 720 256 6756 1485 Email: stpeter@mozilla.com 1486 URI: https://www.mozilla.com/