[Search] [txt|pdf|bibtex] [Tracker] [Email] [Diff1] [Diff2] [Nits]

Versions: 00 01                                                         
IPng Working Group                                            R. Draves
Internet Draft                                       Microsoft Research
Document: draft-draves-ipngwg-simple-srcaddr-01.txt       June 25, 1999
Category: Standards Track

                Simple Source Address Selection for IPv6

Status of this Memo

   This document is an Internet-Draft and is in full conformance with
   all provisions of Section 10 of RFC 2026 [1].

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups. Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six
   months and may be updated, replaced, or obsoleted by other documents
   at any time. It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

1. Abstract

   This document describes a simple algorithm by which IPv6
   implementations can choose an appropriate source address to use for
   communication with a specified destination address.

2. Conventions used in this document

   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 [2].

3. Introduction

   The IPv6 addressing architecture [3] allows multiple unicast
   addresses to be assigned to interfaces. These addresses may have
   different reachability scopes (link-local, site-local, or global).
   Furthermore, these addresses may be "preferred" or "deprecated" [4.

Draves          Standards Track - Expires January 2000               1

               Simple Source Address Selection for IPv6 April 28, 1999

   On occasion, an IPv6 implementation must choose from a set of
   available addresses an appropriate source address to use for a given
   destination address. This document specifies a simple set of rules
   for choosing a source address of appropriate scope and configuration
   status (preferred or deprecated). Furthermore, this document
   suggests a preferred method, longest matching prefix, for choosing
   among otherwise equivalent source addresses in the absence of better
   information.

   This document does not address the more general problem of choosing
   the "best" destination address / source address pair for
   communication with another node, given a set of possible destination
   addresses and a set of possible source addresses.

   The rules specified in this document MUST NOT be construed to
   override an application or upper-layer's explicit choice of source
   address.

4. Source Address Selection

   This document specifies source address selection in two steps.
   First, it specifies a set of candidate source addresses for a given
   destination address. Second, it specifies a pair-wise source address
   selection algorithm. Given a destination address and a pair of
   possible source addresses SA and SB (SA not equal to SB), it chooses
   a source address. Obviously, the pair-wise algorithm may be extended
   to select an address from the set of candidate source addresses.

4.1 Multicast Scopes

   Multicast destination addresses have a 4-bit scope field that
   controls the propagation of the multicast packet. The IPv6
   addressing architecture defines scope field values for node-local
   (0x1), link-local (0x2), site-local (0x5), organization-local (0x8),
   and global (0xE) scopes.

   Application of the source address selection algorithm to a multicast
   destination address requires the comparison of a unicast source
   address scope with a multicast destination address scope. We map
   unicast link-local to multicast link-local, unicast site-local to
   multicast site-local, and unicast global scope to multicast global
   scope. For example, unicast site-local is equal to multicast site-
   local, which is smaller than multicast organization-local, which is
   smaller than unicast global, which is equal to multicast global.

   This mapping implicitly conflates unicast site boundaries and
   multicast site boundaries.

4.2 Candidate Source Addresses

Draves          Standards Track - Expires January 2000               2

               Simple Source Address Selection for IPv6 April 28, 1999

   It is RECOMMENDED that the candidate source addresses be the set of
   unicast addresses assigned to the interface that will be used to
   send to the destination. (The "outgoing" interface.)

   For multicast and link-local destination addresses, the set of
   candidate source addresses MUST only include addresses assigned to
   the outgoing interface.

   For site-local destination addresses, the set of candidate source
   addresses MUST only include addresses assigned to interfaces
   belonging to the same site as the outgoing interface.

   In any case, anycast and multicast addresses MUST NOT be included in
   the candidate set.

4.3 Pair-Wise Source Address Selection

   The algorithm consists of four rules, which MUST be applied in
   order. If a rule chooses a source address, then the remaining rules
   are not relevant and MUST be ignored. Subsequent rules act as tie-
   breakers for earlier rules. If the four rules fail to choose a
   source address, some unspecified tie-breaker MUST be used.

   Rule 1: If one of the source addresses is equal to the destination
   address, an implementation MUST choose that source address.

   Rule 2: If the source addresses SA and SB have different scope, then
   an implementation MUST choose the source address as follows. Without
   loss of generality, assume that SA has smaller scope than SB. If
   SA's scope is smaller than the destination address scope, then
   choose SB. Otherwise, if one of the source addresses is "preferred"
   and one of them is "deprecated", then choose the "preferred"
   address. Otherwise, choose SA.

   Rule 3: The two source addresses have the same scope. If one of the
   source addresses is "preferred" and one of them is "deprecated", an
   implementation MUST choose the one that is preferred.

   Rule 4: The two source addresses have the same scope and the same
   configuration status (both preferred or both deprecated). If one of
   the source addresses has a longer prefix matching the destination
   address, an implementation SHOULD choose the source address with the
   longer matching prefix.

   The fourth rule MAY be superceded if the implementation has other
   means of choosing among source addresses. For example, if the
   implementation somehow knows which source address will result in the
   "best" communications performance.

5. IPv4-Compatible Addresses and Other Format Prefixes

Draves          Standards Track - Expires January 2000               3

               Simple Source Address Selection for IPv6 April 28, 1999

   For the purposes of this document, IPv4-compatible addresses have
   global scope and "preferred" configuration status.

   Similarly, NSAP addresses, IPX addresses, or addresses with as-yet-
   undefined format prefixes should be treated as having global scope
   and "preferred" configuration status. Later standards may supercede
   this treatment.

   The loopback address should be treated as having node-local scope
   and "preferred" configuration status.

6. Security Considerations

   This document has no direct impact on Internet infrastructure
   security.

7. References

   1  S. Bradner, "The Internet Standards Process -- Revision 3", BCP
      9, RFC 2026, October 1996.

   2  S. Bradner, "Key words for use in RFCs to Indicate Requirement
      Levels", BCP 14, RFC 2119, March 1997.

   3  R. Hinden, S. Deering, "IP Version 6 Addressing Architecture",
      RFC 2373, July 1998.

   4  S. Thompson, T. Narten, "IPv6 Stateless Address
      Autoconfiguration", RFC 2462 , December 1998.

8. Acknowledgments

   The author would like to acknowledge the contributions of the IPng
   Working Group.

9. Author's Address

   Richard Draves
   Microsoft Research
   One Microsoft Way
   Redmond, WA 98052
   Email: richdr@microsoft.com

10. Changes from 00 to 01

   Minor wording changes because DHCPv6 also supports "preferred" and
   "deprecated" addresses.

Draves          Standards Track - Expires January 2000               4

               Simple Source Address Selection for IPv6 April 28, 1999

   Specified treatment of other format prefixes; now they are
   considered global scope, "preferred" addresses.

   Reiterated that anycast and multicast addresses are not allowed as
   source addresses.

   Recommended that source addresses be taken from the outgoing
   interface. Required this for multicast destinations. Added analogous
   requirements for link-local and site-local destinations.

   Specified treatment of the loopback address.

   Changed the second selection rule so that if both candidate source
   addresses have scope greater or equal than the destination address
   and only of them is preferred, the preferred address is chosen.

Draves          Standards Track - Expires January 2000               5

               Simple Source Address Selection for IPv6 April 28, 1999

Full Copyright Statement

   Copyright (C) The Internet Society (1999).  All Rights Reserved.
   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph
   are included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Draves          Standards Track - Expires January 2000               6