One document matched: draft-reddy-mmusic-ice-happy-eyeballs-00.xml


<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-reddy-mmusic-ice-happy-eyeballs-00"
     ipr="trust200902">
  <front>
    <title abbrev="Happy Eyeballs for ICE ">Happy Eyeballs Extension for
    ICE</title>

    <author fullname="Tirumaleswar Reddy" initials="T." surname="Reddy">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street>Cessna Business Park, Varthur Hobli</street>

          <street>Sarjapur Marathalli Outer Ring Road</street>

          <city>Bangalore</city>

          <region>Karnataka</region>

          <code>560103</code>

          <country>India</country>
        </postal>

        <email>tireddy@cisco.com</email>
      </address>
    </author>

    <author fullname="Prashanth Patil" initials="P." surname="Patil">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street>Cessna Business Park, Varthur Hobli</street>

          <street>Sarjapur Marthalli Outer Ring Road</street>

          <city>Bangalore</city>

          <region>Karnataka</region>

          <code>560103</code>

          <country>India</country>
        </postal>

        <email>praspati@cisco.com</email>
      </address>
    </author>

    <author fullname="Dan Wing" initials="D." surname="Wing">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street>170 West Tasman Drive</street>

          <city>San Jose</city>

          <region>California</region>

          <code>95134</code>

          <country>USA</country>
        </postal>

        <email>dwing@cisco.com</email>
      </address>
    </author>

    <date />

    <workgroup>MMUSIC</workgroup>

    <abstract>
      <t>This document specifies requirements for algorithms that make ICE
      connectivity checks more aggressive to reduce delays in dual stack host
      connectivity checks when there is a path failure for the address family
      preferred by the application or by the operating system. As IPv6 is
      usually preferred, the procedures in this document helps avoid
      user-noticable delays wheen the IPv6 path is broken or excessively
      slow.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction" title="Introduction">
      <t>In situations where there are many IPv6 addresses, <xref
      target="RFC5245">ICE</xref> will prefer IPv6 <xref
      target="RFC6724"></xref> and will attempt connectivity checks on all the
      IPv6 candidates before trying an IPv4 candidate. If the IPv6 path is
      broken, this fallback to IPv4 can consume a lot of time, harming user
      satisfaction of dual stack devices.</t>

      <t>This document describes an algorithm that makes ICE connectivity
      checks more responsive to failures of an address family by performing
      connectivity checks with both IPv6 and IPv4 candidates in parallel if
      IPv6 connectivity checks have not yet succeeded. This document specifies
      requirements for any such algorithm, with the goals that the ICE agent
      need not be inordinately harmed with a simple parallelisation of IPv6
      and IPv4 connectivity checks and ensuring that the priority of
      precedence defined in <xref target="RFC6724"></xref> be honored.</t>

      <t>For either of the address families, there is also a very realistic
      chance that connectivity checks for relayed candidates will always work.
      There are scenarios where firewalls block connectivity checks for
      Host/Server Reflexive candidates or for IPv4 or for IPv6. This document
      also proposes an optimization where connectivity checks with relayed
      checks are performed earlier than usual if connectivity checks using
      other candidates do not succeed.</t>
    </section>

    <section anchor="notation" title="Notational Conventions">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119"></xref>.</t>

      <t>This note uses terminology defined in <xref
      target="RFC5245"></xref>.</t>
    </section>

    <section anchor="problem_stmt" title="Candidates Priority">
      <t>A prioritization formula is used by ICE <xref
      target="RFC5245"></xref> so that most preferred address pairs are tested
      first, and if a sufficiently good pair is discovered, the tests can be
      stopped. With IPv6, addresses obtained from local network interfaces,
      called host candidates, are recommended as high-priority ones to be
      tested first since if they work, they provide usually the best path
      between the two hosts. The ICE specification recommends to use the rules
      defined in <xref target="RFC6724"> </xref> as part of the prioritization
      formula for IPv6 host candidates and <xref
      target="I-D.keranen-mmusic-ice-address-selection"></xref> updates the
      ICE rules on how IPv6 host candidates are selected.</t>

      <t>For dual stack hosts the preference for IPv6 host candidates is
      higher than IPv4 host candidates based on precedence value of IP
      addresses described in <xref target="RFC6724"></xref>. IPv6 server
      reflexive candidates have higher precedence than IPv4 server reflexive
      candidate since NPTv6 is stateless and transport-agnostic.</t>

      <t><figure anchor="Figure1"
          title="Candidate Preferences in decreasing order">
          <artwork align="center"><![CDATA[ (highest)  IPv6 Host Candidate 
            IPv4 Host Candidate 
            IPv6 Server Reflexive Candidate  
            IPv4 Server Reflexive Candidate 
            IPv6 Relayed Transport Candidate 
 (lowest)   IPv4 Relayed Transport Candidate           ]]></artwork>
        </figure></t>

      <t>By using the technique in <xref target="alg_overview"></xref> IPv6
      candidate pairs will be tested first as usual, but if connectivity
      checks are not successful after a certain period of time, the algorithm
      will become more aggressive and connectivity checks using IPv6/IPv4
      host/server-reflexive candidates will be performed simultaneously. If
      connectivity checks with IPv6 candidate pairs do not yield any
      successful result then ICE endpoints can immediately start sending media
      using IPv4 host/server-reflexive candidates.</t>

      <t>Note: <xref target="RFC6724"> </xref> permits administrator to change
      the policy table to prefer IPv4 addresses over IPv6 addresses in which
      case the algorithm described in the next section is reversed.</t>
    </section>

    <section anchor="alg_overview" title="Algorithm overview">
      <t>The Happy Eyeballs Extension for ICE is governed by a timer (Te) that
      is started just before carrying out the ICE connectivity checks for each
      check list under the following conditions:</t>

      <t><list style="numbers">
          <t>when the candidates pairs include IPv6 and IPv4 addresses</t>

          <t>list of IPv6 candidate pairs is higher than a configured
          threshold (MAX_PAIRS_HAPPYEYE_STAGE_I). <xref
          target="RFC5245"></xref> recommends a limit of 100 for the candidate
          pairs.</t>
        </list></t>

      <t>When the timer (Te) fires, if the connectivity check using IPv6
      candidate pairs are not yet successful and if the number of IPv6
      candidate pairs with remote candidates of type host in the check list
      that are in Waiting and Frozen state are non-zero, the ICE agent
      performs the following Happy Eyeball steps in parallel with the regular
      ICE Ordinary checks: <list style="symbols">
          <t>Find the highest priority pair in the checklist that is in the
          Waiting state with candidate address family being IPv4 and remote
          candidate of type host. If there are no remote IPv6 candidates of
          type server-reflexive then IPv4 remote candidates of type
          server-reflexive will be added to the search. <list style="numbers">
              <t>If there is such a pair then perform ICE connectivity check
              on this pair and set the state of the candidate pair to
              In-Progress.</t>

              <t>If there is no such pair find the highest priority pair in
              the checklist that is in the Frozen state with candidate address
              family being IPv4 and remote candidate of type host candidate.
              If there are no remote IPv6 candidates of type server-reflexive
              then IPv4 remote candidates of type server-reflexive will be
              added to the search. If there is such pair in Frozen state then
              unfreeze the pair, perform connectivity check on this pair and
              set the state of the candidate pair to In-Progress.</t>
            </list></t>

          <t>The above mentioned steps will be followed every Ta milliseconds
          and stopped when any of the below conditions are met:<list
              style="numbers">
              <t>All IPv6 candidate pairs with remote candidates of type host
              in the check list are in any of the following states Succeeded,
              In-Progress or Failed states. The parallel activity is not
              required beyond this point because the regular ICE algorithm
              will itself pick up IPv4 candidate pairs not yet tested.</t>

              <t>All IPv4 candidate pairs with remote candidates of type
              host/server reflexive are in any of the following states
              Succeeded, In-Progress or Failed states.</t>
            </list></t>
        </list></t>

      <section anchor="result" title="Processing the Results">
        <t>If ICE connectivity checks using an IPv4 candidate is successful
        then ICE Agent will performs as usual "Discovering Peer Reflexive
        Candidates" (Section 7.1.3.2.1 of <xref target="RFC5245"></xref>),
        "Constructing a Valid Pair" (Section 7.1.3.2.2 of <xref
        target="RFC5245"></xref>), "Updating Pair States" (Section 7.1.3.2.3
        of <xref target="RFC5245"></xref>), "Updating the Nominated Flag"
        (Section 7.1.3.2.4 of <xref target="RFC5245"></xref>).</t>

        <t>If ICE connectivity checks using an IPv4 candidate is successful
        for each component of the media stream and connectivity checks using
        IPv6 candidates is not yet successful, the ICE endpoint will declare
        victory, conclude ICE for the media stream and start sending media
        using IPv4. However, it is also possible that ICE endpoint continues
        to perform ICE connectivity checks with IPv6 candidate pairs and if
        checks using higher-priority IPv6 candidate pair is successful then
        media stream can be moved to the IPv6 candidate pair. Continuing to
        perform connectivity checks can be useful for subsequent connections,
        to optimize which connectivity checks are tried first. Such
        optimization is out of scope of this document.</t>

        <t>The following diagram shows the behaviour during the connectivity
        check when Alice calls Bob and Agent Alice is the controlling agent
        and uses the aggressive nomination algorithm. "USE-CAND" implies the
        presence of the USE-CANDIDATE attribute.</t>

        <figure anchor="Figure2" title="Happy Eyeballs Extension for ICE">
          <artwork align="left"><![CDATA[ Alice                                                         Bob            
  |                                                             |
  |  Bind Req USE-CAND                     Bind Req             |
  |  using IPv6                            using IPv6           |  
  |------------------>X                X<-----------------------|
  |  Bind Req USE-CAND                     Bind Req             |  
  |  using IPv6 after Ta                   using IPv6           | 
  |------------------>X                X<-----------------------|
  |  Bind Req USE-CAND                                          |  
  |  using IPv6 after Ta                 Bind Req               |  
  |------------------>X                 using IPv6              |  
  |                                    X<-----------------------|             
  |                                                             |
[Timer Te fires, try IPv4 in parallel]                          |
  |                                                             | 
  |  Bind Req USE-CAND                                          | 
  |  using IPv4                                                 | 
  |------------------------------------------------------------>|                      
  |  Bind Req USE-CAND                                          |  
  |  using IPv6 after Ta                                        |
  |------------------> X                                        |  
  |                                        Bind Resp            |  
  |                                        using IPv4           |
  |<----------------------------------------------------------- |
  |          RTP                                                | 
  |============================================================>|
  |                                       Bind Req              |  
  |                                       using IPv4            |
  |<------------------------------------------------------------|
  |  Bind Response                                              |  
  |  using IPv4                                                 |
  |------------------------------------------------------------>|
  |          RTP                                                | 
  |<===========================================================>|
                  ]]></artwork>
        </figure>
      </section>
    </section>

    <!--
    <section anchor="nptv6" title="NPTv6">
      <t>The Timer (Te) is started again just before carrying further ICE
      connectivity checks for each check list under the following conditions:
      <list style="numbers">
          <t>when the candidates pairs yet to be tested in the check list
          include remote IPv6/IPv4 server-reflexive candidates</t>

          <t>If there are no successful connectivity checks till that
          time.</t>

          <t>If the number of remaining IPv6 candidate pairs yet to be tested
          is higher than a configured threshold
          (MAX_PAIRS_HAPPYEYE_STAGE_II).</t>
        </list></t>

      <t>When the timer (Te) fires and if connectivity check using IPv6 candidate
      pairs are not yet successful and if the number of IPv6 candidate pairs with
      remote candidates of type server reflexive in the check list that in
      Waiting and Frozen state are non-zero, the ICE agent performs the following Happy Eyeball steps
      in parallel with the regular ICE Ordinary checks :</t>

      <t>o Find the highest priority pair in the checklist that is in the
      Waiting state with candidate address family being IPv4 and remote
      candidate of type server-reflexive.</t>

      <t><list style="numbers">
          <t>If there is such a pair then perform ICE connectivity check on
          this pair and set the state of the candidate pair to
          In-Progress.</t>

          <t>If there is no such pair find the highest priority pair in the
          checklist that is in the Frozen state with candidate address family
          being IPv4 and remote candidate of type server-reflexive candidate.
          If there is such pair in Frozen state then unfreeze the pair,
          perform connectivity check on this pair and set the state of the
          candidate pair to In-Progress.</t>
        </list></t>

      <t>The above mentioned steps will be followed every Ta milliseconds and
      stopped when any of the below conditions are met:</t>

      <t><list style="numbers">
          <t>All IPv6 candidate pairs with remote candidates of type
          server-reflexive are in are in any of the following states
          Succeeded, In-Progress or Failed states. The parallel activity is
          not required beyond this point because the regular ICE algorithm
          will itself pick up IPv4 candidate pairs not yet tested.</t>

          <t>All IPv4 candidate pairs with remote candidates of type server
          reflexive are in are in any of the following states Succeeded,
          In-Progress or Failed states.</t>
        </list></t>

      <t>The ICE agent will perform the steps in <xref
      target="result"></xref>.</t>
    </section>
-->

    <section anchor="relayed" title="Relayed Candidates">
      <t>The optimization proposes doing connectivity checks with relayed
      candidates in parallel with other candidates. The algorithm does not
      make a distinction between IPv6/IPv4 relayed candidates and will choose
      the existing order among relayed candidate pair defined by ICE. If ICE
      connectivity check is successful using a relayed candidate from either
      of the IP address families, the ICE agent can stop connectivity checks
      for other relayed candidates.</t>

      <t>This part of the Happy Eyeballs Extension for ICE is governed by a
      timer (Tr) that is started just before carrying out the ICE connectivity
      checks for each check list under the following conditions:</t>

      <t><list style="numbers">
          <t>when the candidates pairs include IPv6 and IPv4 relayed
          addresses</t>

          <t>list of candidate pairs is higher than a configured threshold
          (MAX_PAIRS_HAPPYEYE_STAGE_I).</t>
        </list></t>

      <t>When the timer (Tr) fires, If no ICE connectivity checks are
      successful as yet and if ICE Connectivity checks using IPv6 and IPv4
      local relayed candidates have not yet been attempted then the following
      steps will be started by the ICE agent in parallel with other
      connectivity checks:</t>

      <t>o Find the highest priority pair in the checklist that is in the
      Waiting state with local candidate of type relayed.</t>

      <t><list style="numbers">
          <t>If there is such a pair then perform ICE connectivity check on
          this pair and set the state of the candidate pair to
          In-Progress.</t>

          <t>If there is no such pair find the highest priority pair in the
          checklist that is in the Frozen state with local candidate of type
          relayed. If there is such pair in Frozen state then unfreeze the
          pair, perform connectivity check on this pair and set the state of
          the candidate pair to In-Progress.</t>
        </list></t>

      <t>If ICE connectivity checks using relayed candidate is successful then
      ICE Agent will performs as usual "Constructing a Valid Pair" (Section
      7.1.3.2.2 of <xref target="RFC5245"></xref>), "Updating Pair States"
      (Section 7.1.3.2.3 of <xref target="RFC5245"></xref>), "Updating the
      Nominated Flag" (Section 7.1.3.2.4 of <xref target="RFC5245"></xref>).
      If ICE connectivity checks using local relayed candidates is successful
      for each component of the media stream and connectivity checks using
      higher priority candidate pairs has not yet succeeded then conclude ICE
      for the media stream and proceed to send media using local relayed
      candidate.</t>

      <t>However ICE connectivity checks MUST be continued and if the check
      succeeds for a pair whose priority is higher than the previously
      selected candidate pair then media session will be moved to this pair.
      Hence media will only be sent briefly on TURN relays. Additional TURN
      server load is created due to this recommendations, especially when
      connectivity check using IPv6/IPv4 host/server-reflexive candidates are
      not completing quickly and the side affect could be that RTP receivers
      will receive packets out of order during switchover.</t>
    </section>

    <section anchor="values"
             title="Setting Te, Tr and MAX_PAIRS_HAPPYEYE_STAGE">
      <t>The value of Ta, Tr, MAX_PAIRS_HAPPYEYE_STAGE_I,
      MAX_PAIRS_HAPPYEYE_STAGE_II and SHOULD be configurable, and SHOULD have
      a default of:</t>

      <figure anchor="Figure3" title="Default Values">
        <artwork align="center"><![CDATA[
Te : 150ms
Tr : 500ms
MAX_PAIRS_HAPPYEYE_STAGE_I  : 12
MAX_PAIRS_HAPPYEYE_STAGE_II :  6       ]]></artwork>
      </figure>
    </section>

    <section title="IANA Considerations">
      <t>None.</t>
    </section>

    <section anchor="security" title="Security Considerations">
      <t>STUN connectivity check using MAC computed during key exchanged in
      the signaling channel provides message integrity and data origin
      authentication as described in section 2.5 of <xref
      target="RFC5245"></xref> apply to this use.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include="reference.RFC.5245"?>

      <?rfc include="reference.RFC.4566"?>

      <?rfc include='reference.I-D.keranen-mmusic-ice-address-selection'?>

      <?rfc include="reference.RFC.6724"?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.2663'?>

      <!---->
    </references>
  </back>
</rfc>

PAFTECH AB 2003-20262026-04-24 13:07:00