IPv6 Socket API for Source Address Selection
RFC 5014

Document Type RFC - Informational (September 2007; No errata)
Was draft-chakrabarti-ipv6-addrselect-api (individual in int area)
Last updated 2013-03-02
Stream IETF
Formats plain text pdf html
Stream WG state (None)
Consensus Unknown
Document shepherd No shepherd assigned
IESG IESG state RFC 5014 (Informational)
Telechat date
Responsible AD Jari Arkko
Send notices to erik.nordmark@sun.com,ipv6-chairs@ietf.org,samitac2@gmail.com,julien.IETF@laposte.net
Network Working Group                                        E. Nordmark
Request for Comments: 5014                        Sun Microsystems, Inc.
Category: Informational                                   S. Chakrabarti
                                                         Azaire Networks
                                                             J. Laganier
                                                        DoCoMo Euro-Labs
                                                          September 2007

              IPv6 Socket API for Source Address Selection

Status of This Memo

   This memo provides information for the Internet community.  It does
   not specify an Internet standard of any kind.  Distribution of this
   memo is unlimited.

Abstract

   The IPv6 default address selection document (RFC 3484) describes the
   rules for selecting source and destination IPv6 addresses, and
   indicates that applications should be able to reverse the sense of
   some of the address selection rules through some unspecified API.
   However, no such socket API exists in the basic (RFC 3493) or
   advanced (RFC 3542) IPv6 socket API documents.  This document fills
   that gap partially by specifying new socket-level options for source
   address selection and flags for the getaddrinfo() API to specify
   address selection based on the source address preference in
   accordance with the socket-level options that modify the default
   source address selection algorithm.  The socket API described in this
   document will be particularly useful for IPv6 applications that want
   to choose between temporary and public addresses, and for Mobile IPv6
   aware applications that want to use the care-of address for
   communication.  It also specifies socket options and flags for
   selecting Cryptographically Generated Address (CGA) or non-CGA source
   addresses.

Nordmark, et al.             Informational                      [Page 1]
RFC 5014        Socket API for Source Address Selection   September 2007

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  2
   2.  Definition Of Terms  . . . . . . . . . . . . . . . . . . . . .  5
   3.  Usage Scenario . . . . . . . . . . . . . . . . . . . . . . . .  6
   4.  Design Alternatives  . . . . . . . . . . . . . . . . . . . . .  6
   5.  Address Preference Flags . . . . . . . . . . . . . . . . . . .  7
   6.  Additions to the Socket Interface  . . . . . . . . . . . . . .  9
   7.  Additions to the Protocol-Independent Nodename Translation . . 10
   8.  Application Requirements . . . . . . . . . . . . . . . . . . . 11
   9.  Usage Example  . . . . . . . . . . . . . . . . . . . . . . . . 13
   10. Implementation Notes . . . . . . . . . . . . . . . . . . . . . 13
   11. Mapping to Default Address Selection Rules . . . . . . . . . . 14
   12. IPv4-Mapped IPv6 Addresses . . . . . . . . . . . . . . . . . . 16
   13. Validating Source Address Preferences  . . . . . . . . . . . . 16
   14. Summary of New Definitions . . . . . . . . . . . . . . . . . . 19
   15. Security Considerations  . . . . . . . . . . . . . . . . . . . 19
   16. Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 19
   17. References . . . . . . . . . . . . . . . . . . . . . . . . . . 20
     17.1.  Normative References  . . . . . . . . . . . . . . . . . . 20
     17.2.  Informative References  . . . . . . . . . . . . . . . . . 20
   Appendix A.  Per-Packet Address Selection Preference . . . . . . . 21
   Appendix B.  Intellectual Property Statement . . . . . . . . . . . 22

1.  Introduction

   [RFC3484] specifies the default address selection rules for IPv6
   [RFC2460].  This document defines socket API extensions that allow
   applications to override the default choice of source address
   selection.  It therefore indirectly affects the destination address
   selection through getaddrinfo().  Privacy considerations [RFC3041]
   have introduced "public" and "temporary" addresses.  IPv6 Mobility
   [RFC3775] introduces "home address" and "care-of address" definitions
   in the mobile systems.

   The default address selection rules in [RFC3484], in summary, are
   that a public address is preferred over a temporary address, that a
   mobile IPv6 home address is preferred over a care-of address, and
   that a larger scope address is preferred over a smaller scope
   address.  Although it is desirable to have default rules for address
   selection, an application may want to reverse certain address
   selection rules for efficiency and other application-specific
   reasons.

   Currently, IPv6 socket API extensions provide mechanisms to choose a
   specific source address through simple bind() operation or
   IPV6_PKTINFO socket option [RFC3542].  However, in order to use
Show full document text