<?xmlversion="1.0" encoding="windows-1252"?>version='1.0' encoding='utf-8'?> <!DOCTYPE rfc SYSTEM"rfc2629.dtd" [ <!ENTITY RFC0822 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"> <!ENTITY RFC0822 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml"> <!ENTITY RFC8445 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8445.xml"> ]> <?rfc toc="yes" ?> <?rfc compact="yes" ?> <?rfc subcompact="yes" ?> <?rfc sortrefs="no" ?> <?rfc strict="yes" ?>"rfc2629-xhtml.ent"> <rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" category="std" number="8863" docName="draft-ietf-ice-pac-06" obsoletes=""updates="8445"updates="8445, 8838" submissionType="IETF"xml:lang="en">consensus="true" xml:lang="en" tocInclude="true" sortRefs="false" version="3"> <!-- xml2rfc v2v3 conversion 2.45.2 --> <front> <title abbrev="ICE PAC"> Interactive Connectivity Establishment Patiently Awaiting Connectivity (ICE PAC) </title> <seriesInfo name="RFC" value="8863"/> <authorinitials="C.H."initials="C." surname="Holmberg" fullname="Christer Holmberg"> <organization>Ericsson</organization> <address> <postal> <street>Hirsalantie 11</street> <code>02420</code> <city>Jorvas</city> <country>Finland</country> </postal> <email>christer.holmberg@ericsson.com</email> </address> </author> <author initials="J." surname="Uberti" fullname="Justin Uberti"> <organization>Google</organization> <address> <postal> <street>747 6th St W</street> <code>98033</code> <city>Kirkland</city><country>USA</country><region>WA</region> <country>United States of America</country> </postal> <email>justin@uberti.name</email> </address> </author> <dateyear="2020"/> <area>Transport</area> <workgroup>ICE Working Group</workgroup>month="January" year="2021"/> <keyword>ICE</keyword> <keyword>PAC</keyword> <keyword>Candidate</keyword> <abstract> <t> During the process of establishing peer-to-peer connectivity,ICEInteractive Connectivity Establishment (ICE) agents can encounter situations where they have no candidate pairs to check, and, as a result, conclude that ICE processing has failed. However, because additional candidate pairs can be discovered during ICE processing, declaring failure at this point may be premature. This document discusses when these situations canoccur andoccur. </t> <t> This document updatesRFC8445RFCs 8445 andRFC XXXX8838 by requiring that an ICE agent wait a minimum amount of time before declaring ICE failure, even if there are no candidate pairs left to check. </t><t> [RFC EDITOR NOTE: Please replace RFC XXXX with the RFC number of draft-ietf-ice-trickle once it has been published. Please also indicate that this specification updates RFC XXXX.] </t></abstract> </front> <middle> <sectiontitle="Introduction" toc="default">toc="default" numbered="true"> <name>Introduction</name> <t> <xreftarget="RFC8445"></xref>target="RFC8445" format="default"/> describes a protocol, Interactive Connectivity Establishment (ICE), for Network Address Translator (NAT) traversal for UDP-based communication. </t> <t> When using ICE, endpoints will typically exchange ICE candidates, form a list of candidate pairs, and then test each candidate pair to see if connectivity can be established. If the test for a given pair fails, it is marked accordingly, and if all pairs have failed, the overall ICE process typically is considered to have failed. </t> <t> During the process of connectivity checks, additional candidates may be created as a result of successful inbound checks from the remote peer. Such candidates are referred to as peer-reflexivecandidates, andcandidates; once discovered, these candidates will be used to form new candidatepairspairs, which will be tested like any other. However, there is an inherent problem here; if, before learning about any peer-reflexive candidates, an endpoint runs out of candidate pairs to check, either because it hasnone,none or it considers them all to have failed, it will prematurely declare failure and terminate ICE processing. This problem can occur in many common situations. </t> <t> This specification updates <xreftarget="RFC8445"></xref>,target="RFC8445" format="default"/> and <xref target="RFC8838"/> by simply requiring that an ICE agent wait a minimum amount of time before declaring ICE failure, even if there are no candidate pairs tocheck,check orifall candidate pairs have failed. This delay provides enough time for the discovery of peer-reflexive candidates, which may eventually lead to ICE processing completing successfully. </t> </section> <sectiontitle="Conventions"> <t> Thenumbered="true" toc="default"> <name>Conventions</name> <t>The key words"MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY","<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and"OPTIONAL""<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described inBCP 14BCP 14 <xreftarget="RFC2119"></xref>target="RFC2119"/> <xreftarget="RFC8174"></xref>target="RFC8174"/> when, and only when, they appear in all capitals, as shownhere. </t>here.</t> </section> <sectiontitle="Relevant Scenarios">numbered="true" toc="default"> <name>Relevant Scenarios</name> <t> As noted above, the core problem this specification attempts to address is the situation where even after local gathering and remote candidate signalinghashave completed, the ICE agent immediately ends up with no valid pairs and no candidate pairs left to check, resulting in a premature ICE failure. This failure is premature because not enough time has elapsed to allow for discovery of peer-reflexive candidates from inbound connectivity checks; if discovered, these candidates are very likely to result in a valid pair. </t> <t> In most ICE scenarios, the lengthy timeouts for connectivity check transactions, typically tens of seconds, will prevent this problem from occurring. However, there are certain specific cases where this problem will frequently occur. </t> <sectiontitle="Nonumbered="true" toc="default"> <name>No CandidatesFrom Peer">from Peer</name> <t> PerRFC XXXX,<xref target="RFC8838"/>, an ICE agent can provide zero candidates of its own. If the agent somehow knows that the remote endpoint is directly reachable, gathering local candidates is unnecessary and will only cause delays; the peer agent can discover the appropriate local candidate via connectivity checks. </t> <t> However, following the procedures from <xreftarget="RFC8445"></xref>target="RFC8445" format="default"/> strictly will result in immediate ICE failure, since the checklist at the peer agent will be empty. </t> </section> <sectiontitle="Allnumbered="true" toc="default"> <name>All CandidatesDiscarded">Discarded</name> <t> Even if the ICE agent provides candidates, they may be discarded by the peer agent if it does not know what to do with them. For example, candidates may use an address family that the peer agent does notsupport,support (e.g., a host candidate with an IPv6 address in a NAT64scenario),scenario) or that may not be usable for some other reason. </t> <t> In these scenarios, when the candidates are discarded, the checklist at the peer agent will once again be empty, leading to immediate ICE failure. </t> </section> <sectiontitle="Immediatenumbered="true" toc="default"> <name>Immediate Candidate PairFailure">Failure</name> <t>Section 7.2.5.2 of<xreftarget="RFC8445"></xref>target="RFC8445" sectionFormat="of" section="7.2.5.2"/> describes several situations in which a candidate pair will be considered to have failed, well before the connectivity check transaction timeout. </t> <t> As a result, even if the ICE agent provides usable candidates, the pairs created by the peer agent may fail immediately when checked, e.g., a check to a non-routable address that receives an immediate ICMP error. </t> <t> In this situation, the checklist at the peer agent may contain only failed pairs, resulting in immediate ICE failure. </t> </section> </section> <sectiontitle="Updatenumbered="true" toc="default"> <name>Update to RFC8445">8445</name> <t> In order to avoid the problem raised by this document, the ICE agent needs to wait enough time to allow peer-reflexive candidates to be discovered. Accordingly, when a full ICE implementation begins its ICE processing, as described in <xref target="RFC8445"/>, Section 6.1,sectionFormat="comma" section="6.1"/>, itMUST<bcp14>MUST</bcp14> set a timer, henceforth known as thePAC timer,"PAC timer" (Patiently Awaiting Connectivity), to ensure that ICE will run for a minimum amount of time before determining failure. </t> <t> Specifically, the ICE agent will start its timer once it believes ICE connectivity checks are starting. This occurs when the agent has sent the values needed to perform connectivity checks (e.g., the Username Fragment and Password denoted in <xref target="RFC8445"/>, Section 5.3)sectionFormat="comma" section="5.3"/>) and has received some indication that the remote side is ready to start connectivity checks, typically via receipt of the values mentioned above. Note that the agent will start the timer even if it has not sent or received any ICE candidates. </t> <t> TheRECOMMENDED<bcp14>RECOMMENDED</bcp14> duration for the PAC timer is equal to the agent's connectivity check transaction timeout, including all retransmissions. When using default values forRTOretransmission timeout (RTO) and Rc, this amounts to 39.5 seconds, as explained in <xref target="RFC5389"/>, Section 7.2.1.sectionFormat="comma" section="7.2.1"/>. This timeout value is chosen to roughly coincide with the maximum possible duration of ICE connectivity checks from the remote peer, which, if successful, could create peer-reflexive candidates. Because the ICE agent doesn't know the exact number of candidate pairs and pacing interval in use by the remote side, this timeout value is simply a guess, albeit an educated one. Regardless, for this particular problem, the desired benefits will be realized as long as the agent waits some reasonable amount of time, and, as usual, the application is in the best position to determine what is reasonable for its scenario. </t> <t> While the timer is still running, the ICE agentMUST NOT<bcp14>MUST NOT</bcp14> update a checklist state from Running to Failed, even if there are no pairs left in the checklist to check. As a result, the ICE agent will not remove any data streams or set the state of the ICE session to Failed as long as the timer is running. </t> <t> When the timer period eventually elapses, the ICE agentMUST<bcp14>MUST</bcp14> resume typical ICE processing, including setting the state of any checklists to Failed if they have no pairs left tocheck,check and handling any consequences as indicated in <xref target="RFC8445"/>, Section 8.1.2.sectionFormat="comma" section="8.1.2"/>. Naturally, if there are no such checklists, no action is necessary. </t> <t> One consequence of this behavior is that in cases where ICE should fail, e.g., where both sides provide candidates with unsupported address families, ICE will no longer failimmediately, andimmediately -- it will only fail when the PAC timer expires. However, because most ICE scenarios require an extended period of time to determine failure, the fact that some specific scenarios no longer failfastquickly should have minimal application impact, if any. </t> <t> Note also that the PAC timer is potentially relevant to the ICE nomination procedure described in <xref target="RFC8445"/>, Section 8.1.1.sectionFormat="comma" section="8.1.1"/>. That specification does not define a minimum duration for ICE processing prior to nomination of a candidate pair, but in order to select the best candidate pair, ICE needs to run for enough time in order to allow peer-reflexive candidates to be discovered and checked, as noted above. Accordingly, the controlling ICE agentSHOULD<bcp14>SHOULD</bcp14> wait a sufficient amount of time before nominating candidate pairs, and itMAY<bcp14>MAY</bcp14> use the PAC timer to do so. As always, the controlling ICE agent retains fulldiscretion,discretion andMAY<bcp14>MAY</bcp14> decide, based on its own criteria, to nominate pairs prior to the PAC timer period elapsing. </t> </section> <sectiontitle="Updatenumbered="true" toc="default"> <name>Update to RFCXXXX"> <t> [RFC EDITOR NOTE: Please replace RFC XXXX with the RFC number of draft-ietf-ice-trickle once it has been published.] </t>8838</name> <t> Trickle ICE <xreftarget="I-D.ietf-ice-trickle" />target="RFC8838"/> considers a similar problem, namely whether an ICE agent should allow a checklist to enter the Failed state if more candidates might still be provided by the remote peer. The solution, specified in <xreftarget="I-D.ietf-ice-trickle" />, Section 8,target="RFC8838" sectionFormat="comma" section="8"/>, is to wait until an end-of-candidates indication has been received before determining ICE failure. </t> <t> However, for the same reasons described above, the ICE agent may discover peer-reflexive candidates after it has received the end-of-candidates indication, and so the solution proposed by this documentMUST<bcp14>MUST</bcp14> still be used even when the ICE agent is using Trickle ICE. </t> <t> Note also that sending an end-of-candidates indication is only aSHOULD-strength<bcp14>SHOULD</bcp14>-strength requirement, which means that ICE agents will need to implement a backup mechanism to decide when all candidates have been received, typically a timer. Accordingly, ICE agentsMAY<bcp14>MAY</bcp14> use the PAC timer to also serve as an end-of-candidates fallback. </t> </section> <section anchor="section.sec"title="Security Considerations">numbered="true" toc="default"> <name>Security Considerations</name> <t> The security considerations for ICE are defined in <xref target="RFC8445"pageno="false"format="default"/>. This specification only recommends that ICE agents wait for a certaintime ofperiod of time before they declare ICEfailure, andfailure; it does not introduce new security considerations. </t> </section> <section anchor="section.iana"title="IANA considerations">numbered="true" toc="default"> <name>IANA Considerations</name> <t> Thisspecification makesdocument has norequests to IANA.IANA actions. </t> </section> </middle> <back> <references> <name>Normative References</name> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5389.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8445.xml"/> <!-- draft-ietf-ice-trickle (RFC 8838) --> <reference anchor="RFC8838" target="https://www.rfc-editor.org/info/rfc8838"> <front> <title>Trickle ICE: Incremental Provisioning of Candidates for the Interactive Connectivity Establishment (ICE) Protocol</title> <author initials="E" surname="Ivov" fullname="Emil Ivov"> <organization /> </author> <author initials="J" surname="Uberti" fullname="Justin Uberti"> <organization /> </author> <author initials="P" surname="Saint-Andre" fullname="Peter Saint-Andre"> <organization /> </author> <date month="January" year="2021" /> </front> <seriesInfo name="RFC" value="8838" /> <seriesInfo name="DOI" value="10.17487/RFC8838"/> </reference> </references> <section anchor="sec-acks"title="Acknowledgements" toc="default"> <t> Roman Shpount, Nils Ohlmeier and Peter Thatchertoc="default" numbered="false"> <name>Acknowledgements</name> <t> <contact fullname="Roman Shpount"/>, <contact fullname="Nils Ohlmeier"/>, and <contact fullname="Peter Thatcher"/> provided lots of useful input and comments. </t> </section></middle> <back> <references title="Normative References"> <?rfc include="reference.RFC.2119"?> <?rfc include="reference.RFC.5389"?> <?rfc include="reference.RFC.8174"?> <?rfc include="reference.RFC.8445"?> <?rfc include='reference.I-D.ietf-ice-trickle'?> </references></back> </rfc>