idnits 2.17.1 draft-ietf-ice-pac-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC8445, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (July 24, 2019) is 1735 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) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 ICE Working Group C. Holmberg 3 Internet-Draft Ericsson 4 Updates: 8445 (if approved) J. Uberti 5 Intended status: Standards Track Google 6 Expires: January 25, 2020 July 24, 2019 8 Interactive Connectivity Establishment Patiently Awaiting Connectivity 9 (ICE PAC) 10 draft-ietf-ice-pac-02 12 Abstract 14 During the process of establishing peer-to-peer connectivity, ICE 15 agents can encounter situations where they have no candidate pairs to 16 check, and, as a result, conclude that ICE processing has failed. 17 However, because additional candidate pairs can be discovered during 18 ICE processing, declaring failure at this point may be premature. 19 This document discusses when these situations can occur and proposes 20 a way to avoid premature failure. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on January 25, 2020. 39 Copyright Notice 41 Copyright (c) 2019 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 57 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 3 58 3. Relevant Scenarios . . . . . . . . . . . . . . . . . . . . . 3 59 3.1. No Candidates From Peer . . . . . . . . . . . . . . . . . 3 60 3.2. All Candidates Discarded . . . . . . . . . . . . . . . . 3 61 3.3. Immediate Candidate Pair Failure . . . . . . . . . . . . 4 62 4. Update to RFC 8445 . . . . . . . . . . . . . . . . . . . . . 4 63 5. Update to RFC XXXX . . . . . . . . . . . . . . . . . . . . . 5 64 6. Security Considerations . . . . . . . . . . . . . . . . . . . 6 65 7. IANA considerations . . . . . . . . . . . . . . . . . . . . . 6 66 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 67 9. Normative References . . . . . . . . . . . . . . . . . . . . 6 68 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6 70 1. Introduction 72 [RFC8445] describes a protocol, Interactive Connectivity 73 Establishment (ICE), for Network Address Translator (NAT) traversal 74 for UDP-based communication. 76 When using ICE, endpoints will typically exchange ICE candidates, 77 form a list of candidate pairs, and then test each candidate pair to 78 see if connectivity can be established. If the test for a given pair 79 fails, it is marked accordingly, and if all pairs have failed, the 80 overall ICE process typically is considered to have failed. 82 During the process of connectivity checks, additional candidates may 83 be created as a result of successful inbound checks from the remote 84 peer. Such candidates are referred to as peer-reflexive candidates, 85 and once discovered, will be used to form new candidate pairs which 86 will be tested like any other. However, there is an inherent race 87 condition here; if, before learning about any peer-reflexive 88 candidates, an endpoint runs out of candidate pairs to check, either 89 because it has none, or it considers them all to have failed, it will 90 prematurely declare failure and terminate ICE processing. This race 91 condition can occur in many common situations. 93 This specification updates [RFC8445], by simply requiring that an ICE 94 agent wait a minimum amount of time before declaring ICE failure, 95 even if there are no candidate pairs to check, or if all candidate 96 pairs have failed. This delay provides enough time for the discovery 97 of peer-reflexive candidates, which may eventually lead to ICE 98 processing completing successfully. 100 2. Conventions 102 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 103 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 104 "OPTIONAL" in this document are to be interpreted as described in BCP 105 14 [RFC2119] [RFC8174] when, and only when, they appear in all 106 capitals, as shown here. 108 3. Relevant Scenarios 110 As noted above, the core problem this specification attempts to 111 address is the situation where even after local gathering and remote 112 candidate signaling has completed, the ICE agent immediately ends up 113 with no valid pairs and no candidate pairs left to check, resulting 114 in a premature ICE failure. This failure is premature because not 115 enough time has elapsed to allow for discovery of peer-reflexive 116 candidates from inbound connectivity checks; if discovered, these 117 candidates are very likely to result in a valid pair. 119 In most ICE scenarios, the lengthy timeouts for connectivity check 120 transactions, typically tens of seconds, will prevent this problem 121 from occurring. However, there are certain specific cases where this 122 problem will frequently occur. 124 3.1. No Candidates From Peer 126 It is entirely legal for an ICE agent to provide zero candidates of 127 its own. If the agent somehow knows that the remote endpoint is 128 directly reachable, gathering local candidates is unnecessary and 129 will only cause delays; the peer agent can discover the appropriate 130 local candidate via connectivity checks. 132 However, following the procedures from [RFC8445] strictly will result 133 in immediate ICE failure, since the checklist at the peer agent will 134 be empty. 136 3.2. All Candidates Discarded 138 Even if the ICE agent provides candidates, they may be discarded by 139 the peer agent if it does not know what to do with them. For 140 example, candidates may use an address family that the peer agent 141 does not support, (e.g., a host candidate with an IPv6 address in a 142 NAT64 scenario), or may not be usable for some other reason. 144 In these scenarios, when the candidates are discarded, the checklist 145 at the peer agent will once again be empty, leading to immediate ICE 146 failure. 148 3.3. Immediate Candidate Pair Failure 150 Section 7.2.5.2 of [RFC8445] describes several situations in which a 151 candidate pair will be considered to have failed, well before the 152 connectivity check transaction timeout. 154 As a result, even if the ICE agent provides usable candidates, the 155 pairs created by the peer agent may fail immediately when checked, 156 e.g., a check to a non-routable address that receives an immediate 157 ICMP error. 159 In this situation, the checklist at the peer agent may contain only 160 failed pairs, resulting in immediate ICE failure. 162 4. Update to RFC 8445 164 In order to avoid the problem raised by this document, the ICE agent 165 needs to wait enough time to allow peer-reflexive candidates to be 166 discovered. Accordingly, when a full ICE implementation begins its 167 ICE processing, as described in [RFC8445], Section 6.1, it MUST set a 168 timer, henceforth known as the PAC timer, to ensure ICE will run for 169 a minimum amount of time before determining failure. 171 Specifically, the ICE agent will start its timer once it believes ICE 172 connectivity checks are starting. This occurs when the agent has 173 sent the values needed to perform connectivity checks (e.g., the 174 Username Fragment and Password denoted in [RFC8445], Section 5.3) and 175 has received some indication that the remote side is ready to start 176 connectivity checks, typically via receipt of the values mentioned 177 above. Note that the agent will start the timer even if it has not 178 sent or received any ICE candidates. 180 The RECOMMENDED duration for the timer is equal to the agent's 181 connectivity check transaction timeout, including all 182 retransmissions. This timeout value is chosen to roughly coincide 183 with the maximum possible duration of ICE connectivity checks from 184 the remote peer, which, if successful, could create peer-reflexive 185 candidates. Because the ICE agent doesn't know the exact number of 186 candidate pairs and pacing interval in use by the remote side, this 187 timeout value is simply a guess, albeit an educated one. Regardless, 188 for this particular problem, the desired benefits will be realized as 189 long as the agent waits some reasonable amount of time, and, as 190 usual, the application is in the best position to determine what is 191 reasonable for its scenario. 193 While the timer is running, the ICE agent MUST NOT set the state of a 194 checklist to Failed, even if the checklist has no pairs left to 195 check. As a result, the ICE agent will not remove any data streams 196 or set the state of the ICE session to Failed as long as the timer is 197 running. 199 When the timer eventually elapses, the ICE agent MUST resume typical 200 ICE processing, including setting any checklists containing only 201 Failed pairs to the Failed state, as usual, and handling any 202 consequences as indicated in [RFC8445], Section 8.1.2. Naturally, if 203 there are no such checklists, no action is necessary. 205 One consequence of this behavior is that in cases where ICE should 206 fail, e.g., where both sides provide candidates with unsupported 207 address families, ICE will no longer fail immediately, and only fail 208 when the PAC timer expires. However, because most ICE scenarios 209 require an extended period of time to determine failure, the fact 210 that some specific scenarios no longer fail fast should have minimal 211 application impact, if any. 213 Note also that the PAC timer is potentially relevant to the ICE 214 nomination procedure described in [RFC8445], Section 8.1.1. That 215 specification does not define a minimum duration for ICE processing 216 prior to nomination of a candidate pair, but in order to select the 217 best candidate pair, ICE needs to run for enough time in order to 218 allow peer-reflexive candidates to be discovered and checked, as 219 noted above. Accordingly, the controlling ICE agent SHOULD wait a 220 sufficient amount of time before nominating candidate pairs, and it 221 MAY use the PAC timer to do so. As always, the controlling ICE agent 222 retains full discretion, and MAY decide, based on its own criteria, 223 to nominate pairs prior to the timer elapsing. 225 5. Update to RFC XXXX 227 [RFC EDITOR NOTE: Please replace RFC XXXX with the RFC number of 228 draft-ietf-ice-trickle once it has been published.] 230 Trickle ICE [I-D.ietf-ice-trickle] considers a similar problem, 231 namely whether an ICE agent should allow a checklist to enter the 232 Failed state if more candidates might still be provided by the remote 233 peer. The solution, specified in [I-D.ietf-ice-trickle], Section 8, 234 is to wait until an end-of-candidates indication has been received 235 before determining ICE failure. 237 However, for the same reasons described above, the ICE agent may 238 discover peer-reflexive candidates after it has received the end-of- 239 candidates indication, and so the solution proposed by this document 240 MUST still be used even when the ICE agent is using Trickle ICE. 242 Note also that sending an end-of-candidates indication is only a 243 SHOULD-strength requirement, which means that ICE agents will need to 244 implement an backup mechanism to decide when all candidates have been 245 received, typically a timer. Accordingly, ICE agents MAY use the PAC 246 timer to also serve as an end-of-candidates fallback. 248 6. Security Considerations 250 The security considerations for ICE are defined in [RFC8445]. This 251 specification only recommends that ICE agents wait for a certain time 252 of period before they declare ICE failure, and does not introduce new 253 security considerations. 255 7. IANA considerations 257 This specification makes no requests to IANA. 259 8. Acknowledgements 261 9. Normative References 263 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 264 Requirement Levels", BCP 14, RFC 2119, 265 DOI 10.17487/RFC2119, March 1997, . 268 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 269 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 270 May 2017, . 272 [RFC8445] Keranen, A., Holmberg, C., and J. Rosenberg, "Interactive 273 Connectivity Establishment (ICE): A Protocol for Network 274 Address Translator (NAT) Traversal", RFC 8445, 275 DOI 10.17487/RFC8445, July 2018, . 278 [I-D.ietf-ice-trickle] 279 Ivov, E., Rescorla, E., Uberti, J., and P. Saint-Andre, 280 "Trickle ICE: Incremental Provisioning of Candidates for 281 the Interactive Connectivity Establishment (ICE) 282 Protocol", draft-ietf-ice-trickle-21 (work in progress), 283 April 2018. 285 Authors' Addresses 286 Christer Holmberg 287 Ericsson 288 Hirsalantie 11 289 Jorvas 02420 290 Finland 292 Email: christer.holmberg@ericsson.com 294 Justin Uberti 295 Google 296 747 6th St W 297 Kirkland 98033 298 USA 300 Email: justin@uberti.name