RFC 8863
Interactive Connectivity Establishment Patiently Awaiting Connectivity (ICE PAC)
RFC 8863 π is the one titled Interactive Connectivity Establishment Patiently Awaiting Connectivity (ICE PAC), and it's giving main character energy β¨. Written by C. Holmberg (Ericsson) and J. Uberti (Google), it's a Standards Track doc, ISSN 2070-1721, dated January 2021. It updates [RFC8445] and [RFC8838] π
Abstract π«Ά
okay so, while peers are setting up peer-to-peer connectivity, ICE agents can hit a moment where they have no candidate pairs left to check, and they conclude that ICE processing failed π. But more candidate pairs can show up during ICE processing, so calling it a failure right then might be way too early. This doc talks about when those situations can happen π¦.
This document updates [RFC8445] and [RFC8838] 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 β³.
Status of This Memo πΈ
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc8863.
Copyright Notice π
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
Table of Contents π§
1. Introduction
2. Conventions
3. Relevant Scenarios
3.1. No Candidates from Peer
3.2. All Candidates Discarded
3.3. Immediate Candidate Pair Failure
4. Update to RFC 8445
5. Update to RFC 8838
6. Security Considerations
7. IANA Considerations
8. Normative References
Acknowledgements
Authors' Addresses
1. Introduction β¨
[RFC8445] describes a protocol, Interactive Connectivity Establishment (ICE), for Network Address Translator (NAT) traversal for UDP-based communication π.
When using ICE, endpoints usually 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 gets marked accordingly. And if all pairs have failed, the overall ICE process is typically considered to have failed π.
During the connectivity checks, extra candidates may be created as a result of successful inbound checks from the remote peer. These are called peer-reflexive candidates. Once they're discovered, they get used to form new candidate pairs, which get tested like any other π¦. But here's the tea β: if an endpoint runs out of candidate pairs to check before it learns about any peer-reflexive candidates (either because it has none, or because it considers them all to have failed), it will prematurely declare failure and terminate ICE processing π€. This problem can happen in lots of common situations.
This specification updates [RFC8445] and [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 to check or all candidate pairs have failed. That delay gives enough time to discover peer-reflexive candidates, which may eventually lead to ICE processing completing successfully π.
2. Conventions π
Okay, the BCP 14 key words are a big deal, so here's the rule. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here π .
3. Relevant Scenarios π·
Here's the core problem this specification is trying to fix. Even after local gathering and remote candidate signaling have completed, the ICE agent can immediately end up with no valid pairs and no candidate pairs left to check, which leads to a premature ICE failure π. It's premature because not enough time has passed to discover peer-reflexive candidates from inbound connectivity checks. If those candidates get discovered, they are very likely to result in a valid pair β¨.
In most ICE scenarios, the lengthy timeouts for connectivity check transactions (typically tens of seconds) stop this problem from happening. However, there are certain specific cases where this problem will frequently occur π.
3.1. No Candidates from Peer π
Per [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 right local candidate through connectivity checks instead π§ .
But following the procedures from [RFC8445] strictly will result in immediate ICE failure, since the checklist at the peer agent will be empty π« .
3.2. All Candidates Discarded π
Even if the ICE agent provides candidates, the peer agent may discard them if it doesn't know what to do with them. For example, candidates may use an address family that the peer agent doesn't support (e.g., a host candidate with an IPv6 address in a NAT64 scenario), or they may not be usable for some other reason π€·ββοΈ.
In these scenarios, when the candidates are discarded, the checklist at the peer agent will once again be empty, which leads to immediate ICE failure π.
3.3. Immediate Candidate Pair Failure β‘
Section 7.2.5.2 of [RFC8445] describes several situations in which a candidate pair will be considered to have failed, well before the connectivity check transaction timeout β±οΈ.
So, even if the ICE agent provides usable candidates, the pairs created by the peer agent may fail immediately when checked. For example, a check to a non-routable address that receives an immediate ICMP error π«.
In this situation, the checklist at the peer agent may contain only failed pairs, which results in immediate ICE failure π©.
4. Update to RFC 8445 π
To avoid the problem raised by this document, the ICE agent needs to wait long enough to let peer-reflexive candidates be discovered. So, when a full ICE implementation begins its ICE processing, as described in [RFC8445], Section 6.1, it MUST set a timer, henceforth known as the "PAC timer" (Patiently Awaiting Connectivity), to make sure that ICE runs for a minimum amount of time before determining failure β³π¦.
Specifically, the ICE agent starts its timer once it believes ICE connectivity checks are starting. This happens when the agent has sent the values needed to perform connectivity checks (e.g., the Username Fragment and Password denoted in [RFC8445], Section 5.3) and has received some indication that the remote side is ready to start connectivity checks, typically by receiving the values mentioned above. Note that the agent starts the timer even if it has not sent or received any ICE candidates π«Ά.
The RECOMMENDED duration for the PAC timer is equal to the agent's connectivity check transaction timeout, including all retransmissions. When using default values for retransmission timeout (RTO) and Rc, this comes out to 39.5 seconds, as explained in [RFC5389], Section 7.2.1 β²οΈ. This timeout value is picked to roughly line up 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 the remote side is using, this timeout value is simply a guess, albeit an educated one π€. Either way, for this particular problem, the desired benefits show up as long as the agent waits some reasonable amount of time. And, as usual, the application is in the best position to decide what's reasonable for its scenario π.
While the timer is still running, the ICE agent MUST NOT 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 won't remove any data streams or set the state of the ICE session to Failed for as long as the timer is running π.
When the timer period eventually elapses, the ICE agent MUST resume typical ICE processing. That includes setting the state of any checklists to Failed if they have no pairs left to check, and handling any consequences as indicated in [RFC8445], Section 8.1.2. Naturally, if there are no such checklists, no action is necessary π§Ή.
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 fail immediately. It will only fail when the PAC timer expires π’. But because most ICE scenarios need an extended period of time to determine failure, the fact that some specific scenarios no longer fail quickly should have minimal application impact, if any β¨.
Also, the PAC timer might be relevant to the ICE nomination procedure described in [RFC8445], Section 8.1.1. That specification doesn't define a minimum duration for ICE processing before nomination of a candidate pair. But to select the best candidate pair, ICE needs to run long enough to allow peer-reflexive candidates to be discovered and checked, as noted above π₯. So the controlling ICE agent SHOULD wait a sufficient amount of time before nominating candidate pairs, and it MAY use the PAC timer to do so π§. As always, the controlling ICE agent keeps full discretion and MAY decide, based on its own criteria, to nominate pairs before the PAC timer period elapses ππ .
5. Update to RFC 8838 β¨
okay so Trickle ICE [RFC8838] is dealing with a very similar problem π. The question is whether an ICE agent should let a checklist go into the Failed state when the remote peer might still have more candidates coming π€. The fix in [RFC8838], Section 8, is to wait for an end-of-candidates indication before deciding that ICE has failed π«Ά.
BUT (this is the tea π΅) for the same reasons we covered above, the ICE agent can still discover peer-reflexive candidates after it has already gotten the end-of-candidates indication. So the solution in this document MUST still be used even when the agent is using Trickle ICE. no skipping it, bestie π
Also, sending an end-of-candidates indication is only a SHOULD-strength requirement π. That means ICE agents need a backup plan for deciding when all the candidates have arrived, and that's typically a timer β°. So ICE agents MAY use the PAC timer to also serve as the end-of-candidates fallback β¨.
6. Security Considerations π
okay the security considerations for ICE are all defined in [RFC8445] π‘οΈ. This specification only recommends that ICE agents wait a certain period of time before they declare ICE failure π°οΈ. It does not introduce any new security considerations, so we're good π.
7. IANA Considerations π§
This document has no IANA actions π.
8. Normative References π
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing,
"Session Traversal Utilities for NAT (STUN)", RFC 5389,
DOI 10.17487/RFC5389, October 2008,
<https://www.rfc-editor.org/info/rfc5389>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8445] Keranen, A., Holmberg, C., and J. Rosenberg, "Interactive
Connectivity Establishment (ICE): A Protocol for Network
Address Translator (NAT) Traversal", RFC 8445,
DOI 10.17487/RFC8445, July 2018,
<https://www.rfc-editor.org/info/rfc8445>.
[RFC8838] Ivov, E., Uberti, J., and P. Saint-Andre, "Trickle ICE:
Incremental Provisioning of Candidates for the Interactive
Connectivity Establishment (ICE) Protocol", RFC 8838,
DOI 10.17487/RFC8838, January 2021,
<https://www.rfc-editor.org/info/rfc8838>.
Acknowledgements π
Roman Shpount, Nils Ohlmeier, and Peter Thatcher gave us so much helpful input and comments π«Ά.
Authors' Addresses π
Christer Holmberg
Ericsson
Hirsalantie 11
FI-02420 Jorvas
Finland
Email: christer.holmberg@ericsson.com
Justin Uberti
Google
747 6th St W
Kirkland, WA 98033
United States of America
Email: justin@uberti.name
π¦ where this page comes from
- ietf: rfc8863 2021-01
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms