Obsoleted by: 8305 PROPOSED STANDARD

Errata Exist

Internet Engineering Task Force (IETF) D. Wing Request for Comments: 6555 A. Yourtchenko Category: Standards Track Cisco ISSN: 2070-1721 April 2012 Happy Eyeballs: Success with Dual-Stack Hosts Abstract When a server's IPv4 path and protocol are working, but the server's IPv6 path and protocol are not working, a dual-stack client application experiences significant connection delay compared to an IPv4-only client. This is undesirable because it causes the dual- stack client to have a worse user experience. This document specifies requirements for algorithms that reduce this user-visible delay and provides an algorithm. 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 5741. Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc6555. Copyright Notice Copyright (c) 2012 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 (http://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. Wing & Yourtchenko Standards Track [Page 1]

RFC 6555 Happy Eyeballs Dual Stack April 2012 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Additional Network and Host Traffic . . . . . . . . . . . 3 2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 3 3. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 4 3.1. Hostnames . . . . . . . . . . . . . . . . . . . . . . . . 4 3.2. Delay When IPv6 Is Not Accessible . . . . . . . . . . . . 5 4. Algorithm Requirements . . . . . . . . . . . . . . . . . . . . 6 4.1. Delay IPv4 . . . . . . . . . . . . . . . . . . . . . . . . 7 4.2. Stateful Behavior When IPv6 Fails . . . . . . . . . . . . 8 4.3. Reset on Network (Re-)Initialization . . . . . . . . . . . 9 4.4. Abandon Non-Winning Connections . . . . . . . . . . . . . 9 5. Additional Considerations . . . . . . . . . . . . . . . . . . 10 5.1. Determining Address Type . . . . . . . . . . . . . . . . . 10 5.2. Debugging and Troubleshooting . . . . . . . . . . . . . . 10 5.3. Three or More Interfaces . . . . . . . . . . . . . . . . . 10 5.4. A and AAAA Resource Records . . . . . . . . . . . . . . . 10 5.5. Connection Timeout . . . . . . . . . . . . . . . . . . . . 11 5.6. Interaction with Same-Origin Policy . . . . . . . . . . . 11 5.7. Implementation Strategies . . . . . . . . . . . . . . . . 12 6. Example Algorithm . . . . . . . . . . . . . . . . . . . . . . 12 7. Security Considerations . . . . . . . . . . . . . . . . . . . 12 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 13 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 13 9.1. Normative References . . . . . . . . . . . . . . . . . . . 13 9.2. Informative References . . . . . . . . . . . . . . . . . . 13 Wing & Yourtchenko Standards Track [Page 2]

RFC 6555 Happy Eyeballs Dual Stack April 2012 1 . Introduction Section 3). For IPv6, a content provider may ensure a positive user experience by using a DNS white list of IPv6 service providers who peer directly with them (e.g., [WHITELIST]). However, this does not scale well (to the number of DNS servers worldwide or the number of content providers worldwide) and does react to intermittent network path outages. Instead, applications reduce connection setup delays themselves, by more aggressively making connections on IPv6 and IPv4. There are a variety of algorithms that can be envisioned. This document specifies requirements for any such algorithm, with the goals that the network and servers not be inordinately harmed with a simple doubling of traffic on IPv6 and IPv4 and the host's address preference be honored (e.g., [RFC3484]). 1.1 . Additional Network and Host Traffic 2 . Notational Conventions RFC2119]. Wing & Yourtchenko Standards Track [Page 3]

RFC 6555 Happy Eyeballs Dual Stack April 2012 3 . Problem Statement RFC1671]: The dual-stack code may get two addresses back from DNS; which does it use? During the many years of transition the Internet will contain black holes. For example, somewhere on the way from IPng host A to IPng host B there will sometimes (unpredictably) be IPv4-only routers which discard IPng packets. Also, the state of the DNS does not necessarily correspond to reality. A host for which DNS claims to know an IPng address may in fact not be running IPng at a particular moment; thus an IPng packet to that host will be discarded on delivery. Knowing that a host has both IPv4 and IPng addresses gives no information about black holes. A solution to this must be proposed and it must not depend on manually maintained information. (If this is not solved, the dual-stack approach is no better than the packet translation approach.) As discussed in more detail in Section 3.1, it is important that the same hostname be used for IPv4 and IPv6. As discussed in more detail in Section 3.2, IPv6 connectivity is broken to specific prefixes or specific hosts or is slower than native IPv4 connectivity. The mechanism described in this document is directly applicable to connection-oriented transports (e.g., TCP, SCTP), which is the scope of this document. For connectionless transport protocols (e.g., UDP), a similar mechanism can be used if the application has request/ response semantics (e.g., as done by Interactive Connectivity Establishment (ICE) to select a working IPv6 or IPv4 media path [RFC6157]). 3.1 . Hostnames Wing & Yourtchenko Standards Track [Page 4]

RFC 6555 Happy Eyeballs Dual Stack April 2012 3.2 . Delay When IPv6 Is Not Accessible Experiences]. Wing & Yourtchenko Standards Track [Page 5]

RFC 6555 Happy Eyeballs Dual Stack April 2012 4 . Algorithm Requirements Wing & Yourtchenko Standards Track [Page 6]

RFC 6555 Happy Eyeballs Dual Stack April 2012 4.1 . Delay IPv4 Wing & Yourtchenko Standards Track [Page 7]

RFC 6555 Happy Eyeballs Dual Stack April 2012 RFC6269] and the lack of fate-sharing due to traversing a large translator. Thus, to avoid harming IPv4-only hosts, implementations MUST prefer the first IP address family returned by the host's address preference policy, unless implementing a stateful algorithm described in Section 4.2. This usually means giving preference to IPv6 over IPv4, although that preference can be overridden by user configuration or by network configuration [ADDR-SELECT]. If the host's policy is unknown or not attainable, implementations MUST prefer IPv6 over IPv4. 4.2 . Stateful Behavior When IPv6 Fails Wing & Yourtchenko Standards Track [Page 8]

RFC 6555 Happy Eyeballs Dual Stack April 2012 Section 5.5), a Happy Eyeballs implementation will decide to initiate a second connection attempt using the same address family or the other address family. Such an implementation MAY make subsequent connection attempts (to the same host or to other hosts) on the successful address family (e.g., IPv4). So long as new connections are being attempted by the host, such an implementation MUST occasionally make connection attempts using the host's preferred address family, as it may have become functional again, and it SHOULD do so every 10 minutes. The 10-minute delay before retrying a failed address family avoids the simple doubling of connection attempts on both IPv6 and IPv4. Implementation note: this can be achieved by flushing Happy Eyeballs state every 10 minutes, which does not significantly harm the application's subsequent connection setup time. If connections using the preferred address family are again successful, the preferred address family SHOULD be used for subsequent connections. Because this implementation is stateful, it MAY track connection success (or failure) based on IPv6 or IPv4 prefix (e.g., connections to the same prefix assigned to the interface are successful whereas connections to other prefixes are failing). 4.3 . Reset on Network (Re-)Initialization RFC4436], DNAv6 [RFC6059]). If the client application is a web browser, see also Section 5.6. 4.4 . Abandon Non-Winning Connections Wing & Yourtchenko Standards Track [Page 9]

RFC 6555 Happy Eyeballs Dual Stack April 2012 Section 5.5), the next address SHOULD be the IPv4 address. If that fails to connect after a certain time (see Section 5.5), a Happy Eyeballs implementation SHOULD try the other addresses returned; the order of these connection attempts is not important. On the Internet today, servers commonly have multiple A records to provide load-balancing across their servers. This same technique would be useful for AAAA records, as well. However, if multiple AAAA records are returned to a client that is not using Happy Eyeballs and that has broken IPv6 connectivity, it will further increase the delay to fall back to IPv4. Thus, web site operators with native IPv6 connectivity SHOULD NOT offer multiple AAAA records. If Happy Eyeballs is widely deployed in the future, this recommendation might be revisited. 5.5 . Connection Timeout 5.6 . Interaction with Same-Origin Policy RFC6454] that causes subsequent connections to the same hostname to go to the same IPv4 (or IPv6) address as the previous successful connection. This is done to prevent certain types of attacks. The same-origin policy harms user-visible responsiveness if a new connection fails (e.g., due to a transient event such as router failure or load-balancer failure). While it is tempting to use Happy Eyeballs to maintain responsiveness, web browsers MUST NOT change their same-origin policy because of Happy Eyeballs, as that would create an additional security exposure. Wing & Yourtchenko Standards Track [Page 11]

RFC 6555 Happy Eyeballs Dual Stack April 2012 5.7 . Implementation Strategies RFC3484] based on configuration received from the network, or observing connection failures to IPv6 and IPV4 destinations. 6 . Example Algorithm Perreault] and [Andrews]. 7 . Security Considerations 4.4 and 5.6. Wing & Yourtchenko Standards Track [Page 12]

RFC 6555 Happy Eyeballs Dual Stack April 2012 8 . Acknowledgements RFC5245], the current IPv4/IPv6 behavior of SMTP mail transfer agents, and the implementation of Happy Eyeballs in Google Chrome and Mozilla Firefox. Thanks to Fred Baker, Jeff Kinzli, Christian Kuhtz, and Iljitsch van Beijnum for fostering the creation of this document. Thanks to Scott Brim, Rick Jones, Stig Venaas, Erik Kline, Bjoern Zeeb, Matt Miller, Dave Thaler, Dmitry Anipko, Brian Carpenter, and David Crocker for their feedback. Thanks to Javier Ubillos, Simon Perreault, and Mark Andrews for the active feedback and the experimental work on the independent practical implementations that they created. Also the authors would like to thank the following individuals who participated in various email discussions on this topic: Mohacsi Janos, Pekka Savola, Ted Lemon, Carlos Martinez-Cagnazzo, Simon Perreault, Jack Bates, Jeroen Massar, Fred Baker, Javier Ubillos, Teemu Savolainen, Scott Brim, Erik Kline, Cameron Byrne, Daniel Roesen, Guillaume Leclanche, Mark Smith, Gert Doering, Martin Millnert, Tim Durack, and Matthew Palmer. 9 . References 9.1 . Normative References RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3484] Draves, R., "Default Address Selection for Internet Protocol version 6 (IPv6)", RFC 3484, February 2003. 9.2 . Informative References ADDR-SELECT] Matsumoto, A., Fujisaki, T., Kato, J., and T. Chown, "Distributing Address Selection Policy using DHCPv6", Work in Progress, February 2012. [Andrews] Andrews, M., "How to connect to a multi-homed server over TCP", January 2011, <http://www.isc.org/community/ blog/201101/how-to-connect-to-a-multi-homed-server- over-tcp>. Wing & Yourtchenko Standards Track [Page 13]

RFC 6555 Happy Eyeballs Dual Stack April 2012