ICE
Multihomed and IPv4/IPv6 Dual Stack FairnessCisco Systems, Inc.Philip Pedersens Vei 22LysakerAkershus1325Norwaypalmarti@cisco.comCisco Systems, Inc.Cessna Business Park, Varthur HobliSarjapur Marathalli Outer Ring RoadBangaloreKarnataka560103Indiatireddy@cisco.comCisco Systems, Inc.BangaloreIndiapraspati@cisco.comICE
This document provides guidelines on how to make Interactive
Connectivity Establishment (ICE) conclude faster in multihomed
and IPv4/IPv6 dual-stack scenarios where broken paths
exist. The provided guidelines are backwards compatible with
the original ICE specification.
In multihomed and IPv4/IPv6 dual-stack environments ICE would benefit by a fair
distribution of its connectivity checks across available
interfaces or IP address types. With a fair distribution of
the connectivity checks, excessive delays are avoided if a
particular network path is broken or slow. It would arguably
be better to put the interfaces or address types known to the
application last in the checklist. However, the main
motivation by ICE is to make no assumptions regarding network
topology, hence a fair distribution of the connectivity checks
is more appropriate. If an application operates in a
well-known environment is can safely override the
recommendation given in this document.
Applications should take special care to deprioritize network
interfaces known to provide unreliable connectivity when
operating in a multihomed environment. For example, certain
tunnel services might provide unreliable connectivity. Doing
so will ensure a more fair distribution of the connectivity
checks across available network interfaces on the device. The
simple guidelines presented here describe how to deprioritize
interfaces known by the application to provide unreliable
connectivity.
There is also a need to introduce more fairness when handling
connectivity checks for different IP address families in
dual-stack IPv4/IPv6 ICE scenarios. Following the
recommendations from RFC6724 will
lead to prioritization of IPv6 over IPv4 for the same
candidate type. Due to this, connectivity checks for
candidates of the same type (host, reflexive or relay) are
sent such that an IP address family is completely depleted
before checks from the other address family are started. This
results in user noticeable setup delays if the path for the
prioritized address family is broken.
To avoid such user noticeable delays when either IPv6 or IPv4
path is broken or excessively slow, this specification
encourages intermingling the different address families when
connectivity checks are performed. Introducing IP address
family fairness into ICE connectivity checks will lead to more
sustained dual-stack IPv4/IPv6 deployment as users will no
longer have an incentive to disable IPv6. The cost is a small
penalty to the address type that otherwise would have been
prioritized.
This document describes what parameters an agent can safely
alter to fairly order the checklist candidate pairs in
multihomed and dual-stack environments, thus affecting the
sending order of the connectivity checks. Actual values of
those parameters is an implementation detail. Dependant on the
nomination method in use, this might have an effect on what
candidate pair ends up as the active one. Ultimately it should
be up to the agent to decide what candidate pair is best
suited for transporting media.
The guidelines outlined in this specification are backward
compatible with a standard ICE implementation. This
specification only alters the values used to create the
resulting checklists in such a way that the core mechanisms
from ICE and ICEbis are still in effect. If an
agent supporting the guidelines in this specification talks to
an "old" ICE agent, the introduced fairness might be better,
but not worse than what exists today.
This document uses terminology defined in .
A multihomed ICE agent can potentially send and receive
connectivity checks on all available interfaces and IP
addresses. It is possible for an interface to have several IP
addresses associated with it. To avoid unnecessary delay when
performing connectivity checks it would be beneficial to
prioritize interfaces and IP addresses known by the agent to
provide stable connectivity. If the agent has
access to information about the physical network it is
connected to (Like SSID in a WiFi Network) this can be used as
information regarding how that network interface should be
prioritized at this point in time.
The application knowledge regarding the reliability of an
interface can also be based on simple metrics like previous
connection success/failure rates or a more static model based
on interface types like wired, wireless, cellular, virtual,
tunneled in conjunction with other operational metrics. This
would require the application to have the right permissions to
obtain such operational metrics.
Candidates from an interface known to the application to
provide unreliable connectivity should get a low candidate
priority. This ensures they appear near the end of the
candidate list, and would be the last to be tested during the
connectivity check phase. This allows candidate pairs more
likely to succeed to be tested first.
If the application is unable to get any interface information
regarding type or unable to store any relevant metrics, it
should treat all interfaces as if they have reliable
connectivity. This ensures all interfaces gets their fair
chance to perform their connectivity checks.
Candidates should be prioritized such that a sequence of
candidates belonging to the same address family will be
intermingled with candidates from an alternate IP family. For
example, promoting IPv4 candidates in the presence of many
IPv6 candidates such that an IPv4 address candidate is always
present after a small sequence of IPv6 candidates, i.e.,
reordering candidates such that both IPv6 and IPv4 candidates
get a fair chance during the connectivity check phase. This
makes ICE connectivity checks more responsive to broken path
failures of an address family.
An ICE agent can choose an algorithm or a technique of its
choice to ensure that the resulting check lists have a fair
intermingled mix of IPv4 and IPv6 address families. However,
modifying the check list directly can lead to uncoordinated
local and remote check lists that result in ICE taking longer
to complete or in the worst case scenario fail. The best
approach is to modify the formula for calculating the
candidate priority value described in ICE section "4.1.2.1 Recommended
Formula".
Implementations should prioritize IPv6 candidates by putting
some of them first in the intermingled checklist. This
increases the chance of IPv6 connectivity checks to complete
first and be ready for nomination or usage. This enables
implementations to follow the intent of "Happy Eyeballs: Success with Dual-Stack
Hosts". It is worth noting that the timing recommendations in
are not optimal for ICE usage.
ICE section "4.1.2
Prioritizing Candidates" states that the formula in section
"4.1.2.1 Recommended Formula" should be used to calculate the
candidate priority. The formula is as follows:
ICE section "4.1.2.2
Guidelines for Choosing Type and Local Preferences" has
guidelines for how the type preference and local preference
value should be chosen. Instead of having a static local
preference value for IPv4 and IPv6 addresses, it is possible
to choose this value dynamically in such a way that IPv4 and
IPv6 address candidate priorities end up intermingled within
the same candidate type. It is also possible to assign lower
priorities to IP addresses derived from unreliable interfaces
using the local preference value.
It is worth mentioning that section "4.1.2.1
Recommended Formula" says that; "if there are multiple
candidates for a particular component for a particular media
stream that has the same type, the local preference MUST be
unique for each one".
The local type preference can be dynamically changed in such a
way that IPv4 and IPv6 address candidates end up intermingled
regardless of candidate type. This is useful if there are a
lot of IPv6 host candidates effectively blocking connectivity
checks for IPv4 server reflexive candidates.
Candidates with IP addresses from an unreliable interface
should be ordered at the end of the checklist, i.e., not
intermingled as the dual-stack candidates.
The list below shows a sorted local candidate list where the
priority is calculated in such a way that the IPv4 and IPv6
candidates are intermingled (No multihomed candidates). To
allow for earlier connectivity checks for the IPv4 server
reflexive candidates, some of the IPv6 host candidates are
demoted. This is just an example of how a candidate priorities
can be calculated to provide better fairness between IPv4 and
IPv6 candidates without breaking any of the ICE connectivity
checks.
Note that the list does not alter the component ID part of the
formula. This keeps the different components (RTP and RTCP)
close in the list. What matters is the ordering of the
candidates with component ID 1. Once the checklist is formed
for a media stream the candidate pair with component ID 1 will
be tested first. If ICE connectivity check is successful then
other candidate pairs with the same foundation will be
unfrozen ( section
5.1.3.4. Computing States).
The local and remote agent can have different algorithms for
choosing the local preference and type preference values
without impacting the synchronization between the local and
remote check lists.
The check list is made up of candidate pairs. A candidate pair
is two candidates paired up and given a candidate pair
priority as described in section 5.1.3.2. Using the
pair priority formula:
Where G is the candidate priority provided by the controlling
agent and D the candidate priority provided by the controlled
agent. This ensures that the local and remote check lists are
coordinated.
Even if the two agents have different algorithms for choosing
the candidate priority value to get an intermingled set of
IPv4 and IPv6 candidates, the resulting checklist, that is a
list sorted by the pair priority value, will be identical on
the two agents.
The agent that has promoted IPv4 cautiously i.e. lower IPv4
candidate priority values compared to the other agent, will
influence the check list the most due to (2^32*MIN(G,D)) in
the formula.
These recommendations are backward compatible with a standard
ICE implementation. The resulting local and remote checklist
will still be synchronized. The introduced fairness might be
better, but not worse than what exists today
Dependant of the nomination method in use the procedures
described in this document might change what candidate pair
ends up as the active one.
A test implementation of an example algorithm is available at
.
None.
[Note to RFC Editor: Please remove this section and reference to
prior to publication.]
This section records the status of known implementations of
the protocol defined by this specification at the time of
posting of this Internet-Draft, and is based on a proposal
described in . The description
of implementations in this section is intended to assist the
IETF in its decision processes in progressing drafts to
RFCs. Please note that the listing of any individual
implementation here does not imply endorsement by the IETF.
Furthermore, no effort has been spent to verify the
information presented here that was supplied by IETF
contributors. This is not intended as, and must not be
construed to be, a catalog of available implementations or
their features. Readers are advised to note that other
implementations may exist.
According to , "this will allow
reviewers and working groups to assign due consideration to
documents that have the benefit of running code, which may
serve as evidence of valuable experimentation and feedback
that have made the implemented protocols more mature. It is up
to the individual working groups to use this information as
they see fit".
Cisco
Open-Source ICE, TURN and STUN implementation.
https://github.com/palerikm/ICE-DualStackFairness
Code is stable.
Follows the recommendations in this document
BSD
Straightforward as there are no compatibility issues.
Paal-Erik Martinsen
palmarti@cisco.com
Others
Major ICE implementations, browser based and stand-alone
ICE, TURN and STUN implementations.
Product specific.
Code is stable and available in the wild.
Implements the recommendations in this document.
Some open source, some close source
Already implemented in some of the implementations. This
document describes what needs to be done to achieve the
desired fairness.
The security considerations described in are still valid. This
specification does not add or remove any security
considerations. It changes recommended values and describes how
an agent could choose those values in a safe way.
Authors would like to thank Dan Wing, Ari Keranen, Bernard
Aboba, Martin Thomson, Jonathan Lennox, Balint Menyhart, Ole
Troan and Simon Perreault for their comments and review.
ICE DualStack Test Implementation github repoCisco Systems, Inc.Philip Pedersens Vei 22LysakerAkershus1325Norwaypalmarti@cisco.com