<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- try to enforce the ID-nits conventions and DTD validity -->
<?rfc strict="yes" ?>
<!-- items used when reviewing the document -->
<?rfc comments="no" ?>
<!-- controls display of <cref> elements -->
<?rfc inline="no" ?>
<!-- when no, put comments at end in comments section,
                                otherwise, put inline -->
<?rfc editing="no" ?>
<!-- when yes, insert editing marks -->
<!-- create table of contents (set it options).
           Note the table of contents may be omitted
         for very short documents -->
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<!-- choose the options for the references. Some like
         symbolic tags in the references (and citations)
         and others prefer numbers. -->
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<!-- these two save paper: start new paragraphs from the same page etc. -->
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<!-- end of list of processing instructions -->
<!-- Information about the document.
         categories values: std, bcp, info, exp, and historic
         For Internet-Drafts, specify attribute "ipr".
         (ipr values are: full3667, noModification3667, noDerivatives3667),
         Also for Internet-Drafts, can specify values for
         attributes "iprExtract", and "docName".  Note
         that the value for iprExtract is the anchor attribute
         value of a section that can be extracted, and is only
         useful when the value of "ipr" is not "full3667". -->
<!-- TODO: verify which attributes are specified only
            by the RFC editor.  It appears that attributes
            "number", "obsoletes", "updates", and "seriesNo"
            are specified by the RFC editor (and not by
            the document author). -->
<rfc category="std" docName="draft-ietf-sipcore-dns-dual-stack-00"
     ipr="trust200902" updates="">
  <front>
    <title abbrev="Locating SIP Servers in IPv4/IPv6">Locating Session
    Initiation Protocol (SIP) Servers in a Dual-Stack IP
    Network</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <author fullname="Olle E. Johansson" initials="O. E"
            surname="Johansson">
      <organization>Edvina AB</organization>

      <address>
        <postal>
          <street>Runbov&auml;gen 10</street>

          <city>Sollentuna</city>

          <code>SE-192 48</code>

          <country>SE</country>
        </postal>

        <email>oej@edvina.net</email>
      </address>
    </author>

    <author fullname="Gonzalo Salgueiro" initials="G"
            surname="Salgueiro">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street>7200-12 Kit Creek Road</street>

          <city>Research Triangle Park</city>

          <region>NC</region>

          <code>27709</code>

          <country>US</country>
        </postal>

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

    <date year="2014"/>

    <!-- month="May" is no longer necessary note also, day="30" is optional -->

    <area>Real Time Applications and Infrastructure (RAI)</area>

    <!-- WG name at the upperleft corner of the doc, IETF fine for individual submissions -->

    <workgroup>SIPCORE</workgroup>

    <keyword>I-D</keyword>

    <keyword>Internet-Draft</keyword>

    <abstract>
      <t>RFC 3263 defines how a Session Initiation Protocol (SIP)
      implementation, given a SIP Uniform Resource Identifier (URI),
      should locate the next hop SIP server using Domain Name System
      (DNS) procedures. As SIP networks increasingly transition from
      IPv4-only to dual-stack, a quality user experience must be
      ensured for dual-stack SIP implementations. This document
      supplements the DNS procedures described in RFC 3263 for
      dual-stack SIP implementations and ensures that they properly
      align to the optimizations detailed by Happy Eyeballs.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="Introduction" title="Introduction">
      <t>The core SIP <xref target="RFC3261"/> RFCs were written with
      support for both IPv4 and IPv6 in mind, but they were not fully
      equipped to handle highly hybridized environments during this
      transitional phase of migration from IPv4 to IPv6 networks,
      where many server and client implementations run on dual-stack
      hosts. In such environments, a dual-stack host will likely
      suffer greater connection delay, and by extension an inferior
      user experience, than an IPv4-only host. The need to remedy this
      diminished performance of dual-stack hosts led to the
      development of the Happy Eyeballs <xref target="RFC6555"/>
      algorithm, which has since been implemented in many
      applications.</t>

      <t>RFC 6157<xref target="RFC6157"/> focuses on handling media in
      a dual-stack network path between two SIP user agents (UAs).
      This doesn't solve the signalling issues that can occur when
      trying to find the best network path to the next hop SIP
      server.</t>

      <t>[[TODO: Sync with Vijay Gurbani on impacts of this draft to
      RFC 6157, especially relative to the additional requirement that
      DNS be populated such that a certain address family is
      preferred.]]</t>

      <t>This document aims to provide a more holistic design solution
      by clarifying the DNS lookup procedures of RFC 3263<xref
      target="RFC3263"/> to ensure enhanced performance, and
      consequently user experience, in highly hybridized dual-stack
      SIP networks. The procedures described herein are such that a
      dual-stack client SHOULD look up both A and AAAA records in DNS
      and then select the best way to set up a network flow. The
      details of how the latter is done is considered out of scope for
      this document. See the Happy Eyeballs algorithm and
      implementation and design considerations in RFC 6555 <xref
      target="RFC6555"/> for more information about issues with
      setting up dual-stack network flows.</t>
    </section>

    <section anchor="Conventions" 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 RFC 2119 <xref target="RFC2119"/>.</t>
    </section>

    <section title="Terminology">
      <t>RFC 3261 <xref target="RFC3261"/> defines additional terms
      used in this document that are specific to the SIP domain such
      as "proxy"; "registrar"; "redirect server"; "user agent server"
      or "UAS"; "user agent client" or "UAC"; "back-to-back user
      agent" or "B2BUA"; "dialog"; "transaction"; "server
      transaction".</t>

      <t>This document uses the term "SIP Server" that is defined to
      include the following SIP entities: user agent server,
      registrar, redirect server, a SIP proxy in the role of user
      agent server, and a B2BUA in the role of a user agent
      server.</t>

      <t>This document also uses the following terminology to make
      clear distinction between SIP entities supporting only IPv4,
      only IPv6 or supporting both IPv4 and IPv6.</t>

      <t><list style="hanging">
          <t hangText="IPv4-only UA/UAC/UAS:">An IPv4-only UA/UAC/UAS
          supports SIP signaling and media only on the IPv4 network.
          It does not understand IPv6 addresses.</t>

          <t hangText="IPv6-only UA/UAC/UAS:">An IPv6-only UA/UAC/UAS
          supports SIP signaling and media only on the IPv6 network.
          It does not understand IPv4 addresses.</t>

          <t hangText="IPv4/IPv6 UA/UAC/UAS:">A UA/UAC/UAS that
          supports SIP signaling and media on both IPv4 and IPv6
          networks; such a UA/UAC/UAS is known (and will be referred
          to in this document) as a "dual-stack" <xref
          target="RFC4213"/> UA/UAC/UAS.</t>
        </list></t>
    </section>

    <section anchor="Updates"
             title="DNS Procedures in a Dual-Stack Network">
      <t>This specification introduces two normative DNS lookup
      procedures. These are designed to improve the performace of
      dual-stack clients in IPv4/IPv6 networks.</t>

      <section anchor="AandAAAA"
               title="Dual-Stack SIP UA DNS Record Lookup Procedure">
        <t>Once the transport protocol has been determined, the
        procedure for discovering an ip address if the TARGET is not a
        numeric IP address but the port is explicitly stated in the
        URI, is detailed in Section 4.2 of RFC 3263<xref
        target="RFC3263"/>. The piece relevant to to this discussion
        is: <list style="empty">
            <t>"If the TARGET was not a numeric IP address, but a port
            is present in the URI, the client performs an A or AAAA
            record lookup of the domain name. The result will be a
            list of IP addresses, each of which can be contacted at
            the specific port from the URI and transport protocol
            determined previously."</t>
          </list></t>

        <t>Section 4.2 of RFC 3263 <xref target="RFC3263"/> also goes
        on to describe the complete procedure for discovering an ip
        address if the TARGET is not a numeric IP address, and no port
        is present in the URI. The piece relevant to to this
        discussion is:</t>

        <t><list style="empty">
            <t>"If no SRV records were found, the client performs an A
            or AAAA record lookup of the domain name. The result will
            be a list of IP addresses, each of which can be contacted
            using the transport protocol determined previously, at the
            default port for that transport. Processing then proceeds
            as described above for an explicit port once the A or AAAA
            records have been looked up."</t>
          </list></t>

        <t>Happy Eyeballs <xref target="RFC6555"/> has proven that
        looking up the "A or AAAA record" is not an effective practice
        for dual-stack clients and that it can add significant
        connection delay and greatly degrade user experience.
        Therefore, this document makes the following normative
        addendum to the DNS lookup procedures of Section 4.2 of RFC
        3263 <xref target="RFC3263"/> for IPv4/IPv6 hybrid SIP
        networks and recommends it as a best practice for such
        dual-stack networks:</t>

        <t><list style="empty">
            <t>The dual-stack client SHOULD perform an A and AAAA
            record lookup of the domain name and add the respective
            IPv4/IPv6 addresses to the list of IP addresses to be
            contacted.</t>
          </list></t>
      </section>

      <section anchor="SrvPreference"
               title="Indicating Address Family Preference in DNS SRV Records">
        <t>The Happy Eyeballs algorithm <xref target="RFC6555"/> is
        particularly effective when dual-stack client applications
        have significant performance differences in their IPv4 or IPv6
        network paths. In this common scenario it is often necessary
        for a dual-stack client to indicate a preference for either
        IPv4 or IPv6. A service may use DNS SRV records to indicate
        such a preference for an address family. This way, a server
        with a high-latency and/or low-capacity IPv4 tunnel may
        indicate a preference for being contacted using IPv6. A server
        that wishes to do this can use the lowest SRV priority to
        publish hostnames that only resolve in IPv6 and the next
        priority with host names that resolve in both address
        families.</t>

        <t>When indicating address family preference through SRV,
        IPv4-only and/or IPv6-only clients should be prepared to
        handle SRV record sets that don't resolve into an ip address
        in the address family used by that client. In such a case, the
        client should simply proceed to the next priority and try the
        hostnames in the alternate address family.</t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document introduces two new normative procedures to the
      existing DNS procedures used to locate SIP servers. While both
      of these procedures are optimizations designed to improve the
      performance of dual-stack clients, neither introduces any new
      security considerations.</t>

      <t>The specific security vulnerabilities, attacks and threat
      models of the various protocols discussed in this document (SIP,
      DNS, SRV records, Happy Eyeballs requirements and algorithm,
      etc.) are well documented in their respective
      specifications.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document does not require any actions by IANA.</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgments">
      <t>The author would like to acknowledge the support and
      contribution of the SIP Forum IPv6 Working Group. This document
      is based on a lot of tests and discussions at SIPit events,
      organized by the SIP Forum.</t>

      <t>This document has benefited from the expertise and review
      feedback of many participants of the IETF DISPATCH and SIPCORE
      WG mailing lists as well as those on the SIP Forum IPv6 Task
      Group mailing list. The authors wish to specifically call out
      the efforts and express their gratitude for the detailed and
      thoughtful comments and corrections of Dan Wing, Brett Tate,
      Rifaat Shekh-Yusef, Carl Klatsky, Dale Worley, Mary Barnes,
      Keith Drage, Vijay Gurbani and Cullen Jennings.</t>

      <t>The authors also thank the SIPCORE WG chairs, Paul Kyzivat
      and Adam Roach, and assigned Area Director, Richard Barnes, for
      their support and thorough evaluation of this work.</t>
    </section>
  </middle>

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

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

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

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

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

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