home *** CD-ROM | disk | FTP | other *** search
/ Internet Core Protocols / Oreilly-InternetCoreProtocols.iso / RFCs / rfc2462.txt < prev    next >
Encoding:
Text File  |  1999-10-14  |  61.1 KB  |  1,404 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                         S. Thomson
  8. Request for Comments: 2462                                      Bellcore
  9. Obsoletes: 1971                                                T. Narten
  10. Category: Standards Track                                            IBM
  11.                                                            December 1998
  12.  
  13.  
  14.                 IPv6 Stateless Address Autoconfiguration
  15.  
  16. Status of this Memo
  17.  
  18.    This document specifies an Internet standards track protocol for the
  19.    Internet community, and requests discussion and suggestions for
  20.    improvements.  Please refer to the current edition of the "Internet
  21.    Official Protocol Standards" (STD 1) for the standardization state
  22.    and status of this protocol.  Distribution of this memo is unlimited.
  23.  
  24. Copyright Notice
  25.  
  26.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  27.  
  28. Abstract
  29.  
  30.    This document specifies the steps a host takes in deciding how to
  31.    autoconfigure its interfaces in IP version 6. The autoconfiguration
  32.    process includes creating a link-local address and verifying its
  33.    uniqueness on a link, determining what information should be
  34.    autoconfigured (addresses, other information, or both), and in the
  35.    case of addresses, whether they should be obtained through the
  36.    stateless mechanism, the stateful mechanism, or both.  This document
  37.    defines the process for generating a link-local address, the process
  38.    for generating site-local and global addresses via stateless address
  39.    autoconfiguration, and the Duplicate Address Detection procedure. The
  40.    details of autoconfiguration using the stateful protocol are
  41.    specified elsewhere.
  42.  
  43. Table of Contents
  44.  
  45.    1.  INTRODUCTION.............................................    2
  46.    2.  TERMINOLOGY..............................................    4
  47.       2.1.  Requirements........................................    6
  48.    3.  DESIGN GOALS.............................................    7
  49.    4.  PROTOCOL OVERVIEW........................................    8
  50.       4.1.  Site Renumbering....................................   10
  51.    5.  PROTOCOL SPECIFICATION...................................   10
  52.       5.1.  Node Configuration Variables........................   11
  53.       5.2.  Autoconfiguration-Related Variables.................   11
  54.       5.3.  Creation of Link-Local Addresses....................   12
  55.  
  56.  
  57.  
  58. Thomson & Narten            Standards Track                     [Page 1]
  59.  
  60. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  61.  
  62.  
  63.       5.4.  Duplicate Address Detection.........................   13
  64.          5.4.1.  Message Validation.............................   14
  65.          5.4.2.  Sending Neighbor Solicitation Messages.........   14
  66.          5.4.3.  Receiving Neighbor Solicitation Messages.......   15
  67.          5.4.4.  Receiving Neighbor Advertisement Messages......   16
  68.          5.4.5.  When Duplicate Address Detection Fails.........   16
  69.       5.5.  Creation of Global and Site-Local Addresses.........   16
  70.          5.5.1.  Soliciting Router Advertisements...............   16
  71.          5.5.2.  Absence of Router Advertisements...............   17
  72.          5.5.3.  Router Advertisement Processing................   17
  73.          5.5.4.  Address Lifetime Expiry........................   19
  74.       5.6.  Configuration Consistency...........................   19
  75.    6.  SECURITY CONSIDERATIONS..................................   20
  76.    7.  References...............................................   20
  77.    8.  Acknowledgements and Authors' Addresses..................   21
  78.    9.  APPENDIX A: LOOPBACK SUPPRESSION & DUPLICATE ADDRESS
  79.          DETECTION..............................................   22
  80.    10. APPENDIX B: CHANGES SINCE RFC 1971.......................   24
  81.    11. Full Copyright Statement.................................   25
  82.  
  83. 1.  INTRODUCTION
  84.  
  85.    This document specifies the steps a host takes in deciding how to
  86.    autoconfigure its interfaces in IP version 6. The autoconfiguration
  87.    process includes creating a link-local address and verifying its
  88.    uniqueness on a link, determining what information should be
  89.    autoconfigured (addresses, other information, or both), and in the
  90.    case of addresses, whether they should be obtained through the
  91.    stateless mechanism, the stateful mechanism, or both.  This document
  92.    defines the process for generating a link-local address, the process
  93.    for generating site-local and global addresses via stateless address
  94.    autoconfiguration, and the Duplicate Address Detection procedure. The
  95.    details of autoconfiguration using the stateful protocol are
  96.    specified elsewhere.
  97.  
  98.    IPv6 defines both a stateful and stateless address autoconfiguration
  99.    mechanism. Stateless autoconfiguration requires no manual
  100.    configuration of hosts, minimal (if any) configuration of routers,
  101.    and no additional servers.  The stateless mechanism allows a host to
  102.    generate its own addresses using a combination of locally available
  103.    information and information advertised by routers. Routers advertise
  104.    prefixes that identify the subnet(s) associated with a link, while
  105.    hosts generate an "interface identifier" that uniquely identifies an
  106.    interface on a subnet. An address is formed by combining the two. In
  107.    the absence of routers, a host can only generate link-local
  108.    addresses. However, link-local addresses are sufficient for allowing
  109.    communication among nodes attached to the same link.
  110.  
  111.  
  112.  
  113.  
  114. Thomson & Narten            Standards Track                     [Page 2]
  115.  
  116. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  117.  
  118.  
  119.    In the stateful autoconfiguration model, hosts obtain interface
  120.    addresses and/or configuration information and parameters from a
  121.    server.  Servers maintain a database that keeps track of which
  122.    addresses have been assigned to which hosts. The stateful
  123.    autoconfiguration protocol allows hosts to obtain addresses, other
  124.    configuration information or both from a server.  Stateless and
  125.    stateful autoconfiguration complement each other. For example, a host
  126.    can use stateless autoconfiguration to configure its own addresses,
  127.    but use stateful autoconfiguration to obtain other information.
  128.    Stateful autoconfiguration for IPv6 is the subject of future work
  129.    [DHCPv6].
  130.  
  131.    The stateless approach is used when a site is not particularly
  132.    concerned with the exact addresses hosts use, so long as they are
  133.    unique and properly routable. The stateful approach is used when a
  134.    site requires tighter control over exact address assignments.  Both
  135.    stateful and stateless address autoconfiguration may be used
  136.    simultaneously.  The site administrator specifies which type of
  137.    autoconfiguration to use through the setting of appropriate fields in
  138.    Router Advertisement messages [DISCOVERY].
  139.  
  140.    IPv6 addresses are leased to an interface for a fixed (possibly
  141.    infinite) length of time. Each address has an associated lifetime
  142.    that indicates how long the address is bound to an interface. When a
  143.    lifetime expires, the binding (and address) become invalid and the
  144.    address may be reassigned to another interface elsewhere in the
  145.    Internet. To handle the expiration of address bindings gracefully, an
  146.    address goes through two distinct phases while assigned to an
  147.    interface. Initially, an address is "preferred", meaning that its use
  148.    in arbitrary communication is unrestricted. Later, an address becomes
  149.    "deprecated" in anticipation that its current interface binding will
  150.    become invalid. While in a deprecated state, the use of an address is
  151.    discouraged, but not strictly forbidden.  New communication (e.g.,
  152.    the opening of a new TCP connection) should use a preferred address
  153.    when possible.  A deprecated address should be used only by
  154.    applications that have been using it and would have difficulty
  155.    switching to another address without a service disruption.
  156.  
  157.    To insure that all configured addresses are likely to be unique on a
  158.    given link, nodes run a "duplicate address detection" algorithm on
  159.    addresses before assigning them to an interface.  The Duplicate
  160.    Address Detection algorithm is performed on all addresses,
  161.    independent of whether they are obtained via stateless or stateful
  162.    autoconfiguration. This document defines the Duplicate Address
  163.    Detection algorithm.
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Thomson & Narten            Standards Track                     [Page 3]
  171.  
  172. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  173.  
  174.  
  175.    The autoconfiguration process specified in this document applies only
  176.    to hosts and not routers. Since host autoconfiguration uses
  177.    information advertised by routers, routers will need to be configured
  178.    by some other means. However, it is expected that routers will
  179.    generate link-local addresses using the mechanism described in this
  180.    document. In addition, routers are expected to successfully pass the
  181.    Duplicate Address Detection procedure described in this document on
  182.    all addresses prior to assigning them to an interface.
  183.  
  184.    Section 2 provides definitions for terminology used throughout this
  185.    document. Section 3 describes the design goals that lead to the
  186.    current autoconfiguration procedure. Section 4 provides an overview
  187.    of the protocol, while Section 5 describes the protocol in detail.
  188.  
  189. 2.  TERMINOLOGY
  190.  
  191.    IP - Internet Protocol Version 6.  The terms IPv4 and are used
  192.         only in contexts where necessary to avoid ambiguity.
  193.  
  194.    node - a device that implements IP.
  195.  
  196.    router - a node that forwards IP packets not explicitly addressed to
  197.         itself.
  198.  
  199.    host - any node that is not a router.
  200.  
  201.    upper layer - a protocol layer immediately above IP.  Examples are
  202.         transport protocols such as TCP and UDP, control protocols such
  203.         as ICMP, routing protocols such as OSPF, and internet or lower-
  204.         layer protocols being "tunneled" over (i.e., encapsulated in) IP
  205.         such as IPX, AppleTalk, or IP itself.
  206.  
  207.    link - a communication facility or medium over which nodes can
  208.         communicate at the link layer, i.e., the layer immediately below
  209.         IP.  Examples are Ethernets (simple or bridged); PPP links;
  210.         X.25, Frame Relay, or ATM networks; and internet (or higher)
  211.         layer "tunnels", such as tunnels over IPv4 or IPv6 itself.
  212.  
  213.    interface - a node's attachment to a link.
  214.  
  215.    packet - an IP header plus payload.
  216.  
  217.    address - an IP-layer identifier for an interface or a set of
  218.         interfaces.
  219.  
  220.    unicast address - an identifier for a single interface. A packet sent
  221.         to a unicast address is delivered to the interface identified by
  222.         that address.
  223.  
  224.  
  225.  
  226. Thomson & Narten            Standards Track                     [Page 4]
  227.  
  228. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  229.  
  230.  
  231.  
  232.    multicast address - an identifier for a set of interfaces (typically
  233.         belonging to different nodes). A packet sent to a multicast
  234.         address is delivered to all interfaces identified by that
  235.         address.
  236.  
  237.    anycast address - an identifier for a set of interfaces (typically
  238.         belonging to different nodes).  A packet sent to an anycast
  239.         address is delivered to one of the interfaces identified by that
  240.         address (the "nearest" one, according to the routing protocol's
  241.         measure of distance).  See [ADDR-ARCH].
  242.  
  243.    solicited-node multicast address - a multicast address to which
  244.         Neighbor Solicitation messages are sent. The algorithm for
  245.         computing the address is given in [DISCOVERY].
  246.  
  247.    link-layer address - a link-layer identifier for an interface.
  248.         Examples include IEEE 802 addresses for Ethernet links and E.164
  249.         addresses for ISDN links.
  250.  
  251.    link-local address - an address having link-only scope that can be
  252.         used to reach neighboring nodes attached to the same link.  All
  253.         interfaces have a link-local unicast address.
  254.  
  255.    site-local address - an address having scope that is limited to the
  256.         local site.
  257.  
  258.    global address - an address with unlimited scope.
  259.  
  260.    communication - any packet exchange among nodes that requires that
  261.         the address of each node used in the exchange remain the same
  262.         for the duration of the packet exchange.  Examples are a TCP
  263.         connection or a UDP request- response.
  264.  
  265.    tentative address - an address whose uniqueness on a link is being
  266.         verified, prior to its assignment to an interface.  A tentative
  267.         address is not considered assigned to an interface in the usual
  268.         sense. An interface discards received packets addressed to a
  269.         tentative address, but accepts Neighbor Discovery packets
  270.         related to Duplicate Address Detection for the tentative
  271.         address.
  272.  
  273.    preferred address - an address assigned to an interface whose use by
  274.         upper layer protocols is unrestricted. Preferred addresses may
  275.         be used as the source (or destination) address of packets sent
  276.         from (or to) the interface.
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Thomson & Narten            Standards Track                     [Page 5]
  283.  
  284. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  285.  
  286.  
  287.    deprecated address - An address assigned to an interface whose use is
  288.         discouraged, but not forbidden.  A deprecated address should no
  289.         longer be used as a source address in new communications, but
  290.         packets sent from or to deprecated addresses are delivered as
  291.         expected.  A deprecated address may continue to be used as a
  292.         source address in communications where switching to a preferred
  293.         address causes hardship to a specific upper-layer activity
  294.         (e.g., an existing TCP connection).
  295.  
  296.    valid address - a preferred or deprecated address. A valid address
  297.         may appear as the source or destination address of a packet, and
  298.         the internet routing system is expected to deliver packets sent
  299.         to a valid address to their intended recipients.
  300.  
  301.    invalid address - an address that is not assigned to any interface. A
  302.         valid address becomes invalid when its valid lifetime expires.
  303.         Invalid addresses should not appear as the destination or source
  304.         address of a packet. In the former case, the internet routing
  305.         system will be unable to deliver the packet, in the later case
  306.         the recipient of the packet will be unable to respond to it.
  307.  
  308.    preferred lifetime - the length of time that a valid address is
  309.         preferred (i.e., the time until deprecation). When the preferred
  310.         lifetime expires, the address becomes deprecated.
  311.  
  312.    valid lifetime - the length of time an address remains in the valid
  313.         state (i.e., the time until invalidation). The valid lifetime
  314.         must be greater then or equal to the preferred lifetime.  When
  315.         the valid lifetime expires, the address becomes invalid.
  316.  
  317.    interface identifier - a link-dependent identifier for an interface
  318.         that is (at least) unique per link [ADDR-ARCH]. Stateless
  319.         address autoconfiguration combines an interface identifier with
  320.         a prefix to form an address. From address autoconfiguration's
  321.         perspective, an interface identifier is a bit string of known
  322.         length.  The exact length of an interface identifier and the way
  323.         it is created is defined in a separate link-type specific
  324.         document that covers issues related to the transmission of IP
  325.         over a particular link type (e.g., [IPv6-ETHER]).  In many
  326.         cases, the identifier will be the same as the interface's link-
  327.         layer address.
  328.  
  329. 2.1.  Requirements
  330.  
  331.    The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
  332.    SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this
  333.    document, are to be interpreted as described in [KEYWORDS].
  334.  
  335.  
  336.  
  337.  
  338. Thomson & Narten            Standards Track                     [Page 6]
  339.  
  340. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  341.  
  342.  
  343. 3.  DESIGN GOALS
  344.  
  345.    Stateless autoconfiguration is designed with the following goals in
  346.    mind:
  347.  
  348.       o Manual configuration of individual machines before connecting
  349.         them to the network should not be required. Consequently, a
  350.         mechanism is needed that allows a host to obtain or create
  351.         unique addresses for each of its interfaces. Address
  352.         autoconfiguration assumes that each interface can provide a
  353.         unique identifier for that interface (i.e., an "interface
  354.         identifier").  In the simplest case, an interface identifier
  355.         consists of the interface's link-layer address. An interface
  356.         identifier can be combined with a prefix to form an address.
  357.  
  358.       o Small sites consisting of a set of machines attached to a single
  359.         link should not require the presence of a stateful server or
  360.         router as a prerequisite for communicating.  Plug-and-play
  361.         communication is achieved through the use of link-local
  362.         addresses.  Link-local addresses have a well-known prefix that
  363.         identifies the (single) shared link to which a set of nodes
  364.         attach. A host forms a link-local address by appending its
  365.         interface identifier to the link-local prefix.
  366.  
  367.       o A large site with multiple networks and routers should not
  368.         require the presence of a stateful address configuration server.
  369.         In order to generate site-local or global addresses, hosts must
  370.         determine the prefixes that identify the subnets to which they
  371.         attach.  Routers generate periodic Router Advertisements that
  372.         include options listing the set of active prefixes on a link.
  373.  
  374.       o Address configuration should facilitate the graceful renumbering
  375.         of a site's machines. For example, a site may wish to renumber
  376.         all of its nodes when it switches to a new network service
  377.         provider.  Renumbering is achieved through the leasing of
  378.         addresses to interfaces and the assignment of multiple addresses
  379.         to the same interface.  Lease lifetimes provide the mechanism
  380.         through which a site phases out old prefixes.  The assignment of
  381.         multiple addresses to an interface provides for a transition
  382.         period during which both a new address and the one being phased
  383.         out work simultaneously.
  384.  
  385.       o System administrators need the ability to specify whether
  386.         stateless autoconfiguration, stateful autoconfiguration, or both
  387.         should be used.  Router Advertisements include flags specifying
  388.         which mechanisms a host should use.
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Thomson & Narten            Standards Track                     [Page 7]
  395.  
  396. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  397.  
  398.  
  399. 4.  PROTOCOL OVERVIEW
  400.  
  401.    This section provides an overview of the typical steps that take
  402.    place when an interface autoconfigures itself.  Autoconfiguration is
  403.    performed only on multicast-capable links and begins when a
  404.    multicast-capable interface is enabled, e.g., during system startup.
  405.    Nodes (both hosts and routers) begin the autoconfiguration process by
  406.    generating a link-local address for the interface. A link-local
  407.    address is formed by appending the interface's identifier to the
  408.    well-known link-local prefix.
  409.  
  410.    Before the link-local address can be assigned to an interface and
  411.    used, however, a node must attempt to verify that this "tentative"
  412.    address is not already in use by another node on the link.
  413.    Specifically, it sends a Neighbor Solicitation message containing the
  414.    tentative address as the target. If another node is already using
  415.    that address, it will return a Neighbor Advertisement saying so. If
  416.    another node is also attempting to use the same address, it will send
  417.    a Neighbor Solicitation for the target as well. The exact number of
  418.    times the Neighbor Solicitation is (re)transmitted and the delay time
  419.    between consecutive solicitations is link-specific and may be set by
  420.    system management.
  421.  
  422.    If a node determines that its tentative link-local address is not
  423.    unique, autoconfiguration stops and manual configuration of the
  424.    interface is required.  To simplify recovery in this case, it should
  425.    be possible for an administrator to supply an alternate interface
  426.    identifier that overrides the default identifier in such a way that
  427.    the autoconfiguration mechanism can then be applied using the new
  428.    (presumably unique) interface identifier.  Alternatively, link-local
  429.    and other addresses will need to be configured manually.
  430.  
  431.    Once a node ascertains that its tentative link-local address is
  432.    unique, it assigns it to the interface. At this point, the node has
  433.    IP-level connectivity with neighboring nodes.  The remaining
  434.    autoconfiguration steps are performed only by hosts; the
  435.    (auto)configuration of routers is beyond the scope of this document.
  436.  
  437.    The next phase of autoconfiguration involves obtaining a Router
  438.    Advertisement or determining that no routers are present. If routers
  439.    are present, they will send Router Advertisements that specify what
  440.    sort of autoconfiguration a host should do.  If no routers are
  441.    present, stateful autoconfiguration should be invoked.
  442.  
  443.    Routers send Router Advertisements periodically, but the delay
  444.    between successive advertisements will generally be longer than a
  445.    host performing autoconfiguration will want to wait [DISCOVERY].  To
  446.    obtain an advertisement quickly, a host sends one or more Router
  447.  
  448.  
  449.  
  450. Thomson & Narten            Standards Track                     [Page 8]
  451.  
  452. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  453.  
  454.  
  455.    Solicitations to the all-routers multicast group.  Router
  456.    Advertisements contain two flags indicating what type of stateful
  457.    autoconfiguration (if any) should be performed. A "managed address
  458.    configuration" flag indicates whether hosts should use stateful
  459.    autoconfiguration to obtain addresses. An "other stateful
  460.    configuration" flag indicates whether hosts should use stateful
  461.    autoconfiguration to obtain additional information (excluding
  462.    addresses).
  463.  
  464.    Router Advertisements also contain zero or more Prefix Information
  465.    options that contain information used by stateless address
  466.    autoconfiguration to generate site-local and global addresses.  It
  467.    should be noted that the stateless and stateful address
  468.    autoconfiguration fields in Router Advertisements are processed
  469.    independently of one another, and a host may use both stateful and
  470.    stateless address autoconfiguration simultaneously.  One Prefix
  471.    Information option field, the "autonomous address-configuration
  472.    flag", indicates whether or not the option even applies to stateless
  473.    autoconfiguration.  If it does, additional option fields contain a
  474.    subnet prefix together with lifetime values indicating how long
  475.    addresses created from the prefix remain preferred and valid.
  476.  
  477.    Because routers generate Router Advertisements periodically, hosts
  478.    will continually receive new advertisements. Hosts process the
  479.    information contained in each advertisement as described above,
  480.    adding to and refreshing information received in previous
  481.    advertisements.
  482.  
  483.    For safety, all addresses must be tested for uniqueness prior to
  484.    their assignment to an interface.  In the case of addresses created
  485.    through stateless autoconfig, however, the uniqueness of an address
  486.    is determined primarily by the portion of the address formed from an
  487.    interface identifier.  Thus, if a node has already verified the
  488.    uniqueness of a link-local address, additional addresses created from
  489.    the same interface identifier need not be tested individually. In
  490.    contrast, all addresses obtained manually or via stateful address
  491.    autoconfiguration should be tested for uniqueness individually. To
  492.    accommodate sites that believe the overhead of performing Duplicate
  493.    Address Detection outweighs its benefits, the use of Duplicate
  494.    Address Detection can be disabled through the administrative setting
  495.    of a per-interface configuration flag.
  496.  
  497.    To speed the autoconfiguration process, a host may generate its
  498.    link-local address (and verify its uniqueness) in parallel with
  499.    waiting for a Router Advertisement. Because a router may delay
  500.    responding to a Router Solicitation for a few seconds, the total time
  501.    needed to complete autoconfiguration can be significantly longer if
  502.    the two steps are done serially.
  503.  
  504.  
  505.  
  506. Thomson & Narten            Standards Track                     [Page 9]
  507.  
  508. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  509.  
  510.  
  511.  
  512. 4.1.  Site Renumbering
  513.  
  514.    Address leasing facilitates site renumbering by providing a mechanism
  515.    to time-out addresses assigned to interfaces in hosts.  At present,
  516.    upper layer protocols such as TCP provide no support for changing
  517.    end-point addresses while a connection is open. If an end-point
  518.    address becomes invalid, existing connections break and all
  519.    communication to the invalid address fails.  Even when applications
  520.    use UDP as a transport protocol, addresses must generally remain the
  521.    same during a packet exchange.
  522.  
  523.    Dividing valid addresses into preferred and deprecated categories
  524.    provides a way of indicating to upper layers that a valid address may
  525.    become invalid shortly and that future communication using the
  526.    address will fail, should the address's valid lifetime expire before
  527.    communication ends.  To avoid this scenario, higher layers should use
  528.    a preferred address (assuming one of sufficient scope exists) to
  529.    increase the likelihood that an address will remain valid for the
  530.    duration of the communication.  It is up to system administrators to
  531.    set appropriate prefix lifetimes in order to minimize the impact of
  532.    failed communication when renumbering takes place.  The deprecation
  533.    period should be long enough that most, if not all, communications
  534.    are using the new address at the time an address becomes invalid.
  535.  
  536.    The IP layer is expected to provide a means for upper layers
  537.    (including applications) to select the most appropriate source
  538.    address given a particular destination and possibly other
  539.    constraints.  An application may choose to select the source address
  540.    itself before starting a new communication or may leave the address
  541.    unspecified, in which case the upper networking layers will use the
  542.    mechanism provided by the IP layer to choose a suitable address on
  543.    the application's behalf.
  544.  
  545.    Detailed address selection rules are beyond the scope of this
  546.    document.
  547.  
  548. 5.  PROTOCOL SPECIFICATION
  549.  
  550.    Autoconfiguration is performed on a per-interface basis on
  551.    multicast-capable interfaces.  For multihomed hosts,
  552.    autoconfiguration is performed independently on each interface.
  553.    Autoconfiguration applies primarily to hosts, with two exceptions.
  554.    Routers are expected to generate a link-local address using the
  555.    procedure outlined below. In addition, routers perform Duplicate
  556.    Address Detection on all addresses prior to assigning them to an
  557.    interface.
  558.  
  559.  
  560.  
  561.  
  562. Thomson & Narten            Standards Track                    [Page 10]
  563.  
  564. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  565.  
  566.  
  567. 5.1.  Node Configuration Variables
  568.  
  569.    A node MUST allow the following autoconfiguration-related variable to
  570.    be configured by system management for each multicast interface:
  571.  
  572.       DupAddrDetectTransmits
  573.  
  574.                      The number of consecutive Neighbor Solicitation
  575.                      messages sent while performing Duplicate Address
  576.                      Detection on a tentative address. A value of zero
  577.                      indicates that Duplicate Address Detection is not
  578.                      performed on tentative addresses. A value of one
  579.                      indicates a single transmission with no follow up
  580.                      retransmissions.
  581.  
  582.                      Default: 1, but may be overridden by a link-type
  583.                      specific value in the document that covers issues
  584.                      related to the transmission of IP over a particular
  585.                      link type (e.g., [IPv6-ETHER]).
  586.  
  587.                      Autoconfiguration also assumes the presence of the
  588.                      variable RetransTimer as defined in [DISCOVERY].
  589.                      For autoconfiguration purposes, RetransTimer
  590.                      specifies the delay between consecutive Neighbor
  591.                      Solicitation transmissions performed during
  592.                      Duplicate Address Detection (if
  593.                      DupAddrDetectTransmits is greater than 1), as well
  594.                      as the time a node waits after sending the last
  595.                      Neighbor Solicitation before ending the Duplicate
  596.                      Address Detection process.
  597.  
  598. 5.2.  Autoconfiguration-Related Variables
  599.  
  600.    A host maintains a number of data structures and flags related to
  601.    autoconfiguration. In the following, we present conceptual variables
  602.    and show how they are used to perform autoconfiguration. The specific
  603.    variables are used for demonstration purposes only, and an
  604.    implementation is not required to have them, so long as its external
  605.    behavior is consistent with that described in this document.
  606.  
  607.    Beyond the formation of a link-local address and using Duplicate
  608.    Address Detection, how routers (auto)configure their interfaces is
  609.    beyond the scope of this document.
  610.  
  611.    Hosts maintain the following variables on a per-interface basis:
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618. Thomson & Narten            Standards Track                    [Page 11]
  619.  
  620. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  621.  
  622.  
  623.       ManagedFlag      Copied from the M flag field (i.e., the
  624.                        "managed address configuration" flag) of the most
  625.                        recently received Router Advertisement message.
  626.                        The flag indicates whether or not addresses are
  627.                        to be configured using the stateful
  628.                        autoconfiguration mechanism. It starts out in a
  629.                        FALSE state.
  630.  
  631.       OtherConfigFlag  Copied from the O flag field (i.e., the "other
  632.                        stateful configuration" flag) of the most
  633.                        recently received Router Advertisement message.
  634.                        The flag indicates whether or not information
  635.                        other than addresses is to be obtained using the
  636.                        stateful autoconfiguration mechanism. It starts
  637.                        out in a FALSE state.
  638.  
  639.                        In addition, when the value of the ManagedFlag is
  640.                        TRUE, the value of OtherConfigFlag is implicitely
  641.                        TRUE as well. It is not a valid configuration for
  642.                        a host to use stateful address autoconfiguration
  643.                        to request addresses only, without also accepting
  644.                        other configuration
  645.                        information.
  646.  
  647.    A host also maintains a list of addresses together with their
  648.    corresponding lifetimes. The address list contains both
  649.    autoconfigured addresses and those configured manually.
  650.  
  651. 5.3.  Creation of Link-Local Addresses
  652.  
  653.    A node forms a link-local address whenever an interface becomes
  654.    enabled.  An interface may become enabled after any of the
  655.    following
  656.    events:
  657.  
  658.       - The interface is initialized at system startup time.
  659.  
  660.       - The interface is reinitialized after a temporary interface
  661.         failure or after being temporarily disabled by system
  662.         management.
  663.  
  664.       - The interface attaches to a link for the first time.
  665.  
  666.       - The interface becomes enabled by system management after
  667.         having been administratively
  668.         disabled.
  669.  
  670.  
  671.  
  672.  
  673.  
  674. Thomson & Narten            Standards Track                    [Page 12]
  675.  
  676. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  677.  
  678.  
  679.    A link-local address is formed by prepending the well-known link-
  680.    local prefix FE80::0 [ADDR-ARCH] (of appropriate length) to the
  681.    interface identifier. If the interface identifier has a length of N
  682.    bits, the interface identifier replaces the right-most N zero bits of
  683.    the link-local prefix.  If the interface identifier is more than 118
  684.    bits in length, autoconfiguration fails and manual configuration is
  685.    required. Note that interface identifiers will typically be 64-bits
  686.    long and based on EUI-64 identifiers as described in [ADDR-ARCH].
  687.  
  688.    A link-local address has an infinite preferred and valid lifetime; it
  689.    is never timed
  690.    out.
  691.  
  692. 5.4.  Duplicate Address Detection
  693.  
  694.    Duplicate Address Detection is performed on unicast addresses prior
  695.    to assigning them to an interface whose DupAddrDetectTransmits
  696.    variable is greater than zero. Duplicate Address Detection MUST take
  697.    place on all unicast addresses, regardless of whether they are
  698.    obtained through stateful, stateless or manual configuration, with
  699.    the exception of the following cases:
  700.  
  701.       - Duplicate Address Detection MUST NOT be performed on anycast
  702.         addresses.
  703.  
  704.       - Each individual unicast address SHOULD be tested for uniqueness.
  705.         However, when stateless address autoconfiguration is used,
  706.         address uniqueness is determined solely by the interface
  707.         identifier, assuming that subnet prefixes are assigned correctly
  708.         (i.e., if all of an interface's addresses are generated from the
  709.         same identifier, either all addresses or none of them will be
  710.         duplicates). Thus, for a set of addresses formed from the same
  711.         interface identifier, it is sufficient to check that the link-
  712.         local address generated from the identifier is unique on the
  713.         link. In such cases, the link-local address MUST be tested for
  714.         uniqueness, and if no duplicate address is detected, an
  715.         implementation MAY choose to skip Duplicate Address Detection
  716.         for additional addresses derived from the same interface
  717.         identifier.
  718.  
  719.    The procedure for detecting duplicate addresses uses Neighbor
  720.    Solicitation and Advertisement messages as described below. If a
  721.    duplicate address is discovered during the procedure, the address
  722.    cannot be assigned to the interface. If the address is derived from
  723.    an interface identifier, a new identifier will need to be assigned to
  724.    the interface, or all IP addresses for the interface will need to be
  725.    manually configured.  Note that the method for detecting duplicates
  726.    is not completely reliable, and it is possible that duplicate
  727.  
  728.  
  729.  
  730. Thomson & Narten            Standards Track                    [Page 13]
  731.  
  732. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  733.  
  734.  
  735.    addresses will still exist (e.g., if the link was partitioned while
  736.    Duplicate Address Detection was performed).
  737.  
  738.    An address on which the duplicate Address Detection Procedure is
  739.    applied is said to be tentative until the procedure has completed
  740.    successfully.  A tentative address is not considered "assigned to an
  741.    interface" in the traditional sense. That is, the interface must
  742.    accept Neighbor Solicitation and Advertisement messages containing
  743.    the tentative address in the Target Address field, but processes such
  744.    packets differently from those whose Target Address matches an
  745.    address assigned to the interface. Other packets addressed to the
  746.    tentative address should be silently discarded.
  747.  
  748.    It should also be noted that Duplicate Address Detection must be
  749.    performed prior to assigning an address to an interface in order to
  750.    prevent multiple nodes from using the same address simultaneously.
  751.    If a node begins using an address in parallel with Duplicate Address
  752.    Detection, and another node is already using the address, the node
  753.    performing Duplicate Address Detection will erroneously process
  754.    traffic intended for the other node, resulting in such possible
  755.    negative consequences as the resetting of open TCP connections.
  756.  
  757.    The following subsections describe specific tests a node performs to
  758.    verify an address's uniqueness.  An address is considered unique if
  759.    none of the tests indicate the presence of a duplicate address within
  760.    RetransTimer milliseconds after having sent DupAddrDetectTransmits
  761.    Neighbor Solicitations. Once an address is determined to be unique,
  762.    it may be assigned to an interface.
  763.  
  764. 5.4.1.  Message Validation
  765.  
  766.    A node MUST silently discard any Neighbor Solicitation or
  767.    Advertisement message that does not pass the validity checks
  768.    specified in [DISCOVERY]. A solicitation that passes these validity
  769.    checks is called a valid solicitation or valid advertisement.
  770.  
  771. 5.4.2.  Sending Neighbor Solicitation Messages
  772.  
  773.    Before sending a Neighbor Solicitation, an interface MUST join the
  774.    all-nodes multicast address and the solicited-node multicast address
  775.    of the tentative address.  The former insures that the node receives
  776.    Neighbor Advertisements from other nodes already using the address;
  777.    the latter insures that two nodes attempting to use the same address
  778.    simultaneously detect each other's presence.
  779.  
  780.    To check an address, a node sends DupAddrDetectTransmits Neighbor
  781.    Solicitations, each separated by RetransTimer milliseconds. The
  782.    solicitation's Target Address is set to the address being checked,
  783.  
  784.  
  785.  
  786. Thomson & Narten            Standards Track                    [Page 14]
  787.  
  788. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  789.  
  790.  
  791.    the IP source is set to the unspecified address and the IP
  792.    destination is set to the solicited-node multicast address of the
  793.    target address.
  794.  
  795.    If the Neighbor Solicitation is the first message to be sent from an
  796.    interface after interface (re)initialization, the node should delay
  797.    sending the message by a random delay between 0 and
  798.    MAX_RTR_SOLICITATION_DELAY as specified in [DISCOVERY].  This serves
  799.    to alleviate congestion when many nodes start up on the link at the
  800.    same time, such as after a power failure, and may help to avoid race
  801.    conditions when more than one node is trying to solicit for the same
  802.    address at the same time. In order to improve the robustness of the
  803.    Duplicate Address Detection algorithm, an interface MUST receive and
  804.    process datagrams sent to the all-nodes multicast address or
  805.    solicited-node multicast address of the tentative address while
  806.    delaying transmission of the initial Neighbor Solicitation.
  807.  
  808. 5.4.3.  Receiving Neighbor Solicitation Messages
  809.  
  810.    On receipt of a valid Neighbor Solicitation message on an interface,
  811.    node behavior depends on whether the target address is tentative or
  812.    not.  If the target address is not tentative (i.e., it is assigned to
  813.    the receiving interface), the solicitation is processed as described
  814.    in [DISCOVERY].  If the target address is tentative, and the source
  815.    address is a unicast address, the solicitation's sender is performing
  816.    address resolution on the target; the solicitation should be silently
  817.    ignored.  Otherwise, processing takes place as described below. In
  818.    all cases, a node MUST NOT respond to a Neighbor Solicitation for a
  819.    tentative address.
  820.  
  821.    If the source address of the Neighbor Solicitation is the unspecified
  822.    address, the solicitation is from a node performing Duplicate Address
  823.    Detection. If the solicitation is from another node, the tentative
  824.    address is a duplicate and should not be used (by either node). If
  825.    the solicitation is from the node itself (because the node loops back
  826.    multicast packets), the solicitation does not indicate the presence
  827.    of a duplicate address.
  828.  
  829.    Implementor's Note: many interfaces provide a way for upper layers to
  830.    selectively enable and disable the looping back of multicast packets.
  831.    The details of how such a facility is implemented may prevent
  832.    Duplicate Address Detection from working correctly.  See the Appendix
  833.    for further discussion.
  834.  
  835.    The following tests identify conditions under which a tentative
  836.    address is not unique:
  837.  
  838.  
  839.  
  840.  
  841.  
  842. Thomson & Narten            Standards Track                    [Page 15]
  843.  
  844. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  845.  
  846.  
  847.       - If a Neighbor Solicitation for a tentative address is
  848.         received prior to having sent one, the tentative address is a
  849.         duplicate.  This condition occurs when two nodes run Duplicate
  850.         Address Detection simultaneously, but transmit initial
  851.         solicitations at different times (e.g., by selecting different
  852.         random delay values before transmitting an initial
  853.         solicitation).
  854.  
  855.       - If the actual number of Neighbor Solicitations received exceeds
  856.         the number expected based on the loopback semantics (e.g., the
  857.         interface does not loopback packet, yet one or more
  858.         solicitations was received), the tentative address is a
  859.         duplicate. This condition occurs when two nodes run Duplicate
  860.         Address Detection simultaneously and transmit solicitations at
  861.         roughly the same time.
  862.  
  863. 5.4.4.  Receiving Neighbor Advertisement Messages
  864.  
  865.    On receipt of a valid Neighbor Advertisement message on an interface,
  866.    node behavior depends on whether the target address is tentative or
  867.    matches a unicast or anycast address assigned to the interface.  If
  868.    the target address is assigned to the receiving interface, the
  869.    solicitation is processed as described in [DISCOVERY]. If the target
  870.    address is tentative, the tentative address is not unique.
  871.  
  872. 5.4.5.  When Duplicate Address Detection Fails
  873.  
  874.    A tentative address that is determined to be a duplicate as described
  875.    above, MUST NOT be assigned to an interface and the node SHOULD log a
  876.    system management error.  If the address is a link-local address
  877.    formed from an interface identifier, the interface SHOULD be
  878.    disabled.
  879.  
  880. 5.5.  Creation of Global and Site-Local Addresses
  881.  
  882.    Global and site-local addresses are formed by appending an interface
  883.    identifier to a prefix of appropriate length. Prefixes are obtained
  884.    from Prefix Information options contained in Router Advertisements.
  885.    Creation of global and site-local addresses and configuration of
  886.    other parameters as described in this section SHOULD be locally
  887.    configurable. However, the processing described below MUST be enabled
  888.    by default.
  889.  
  890. 5.5.1.  Soliciting Router Advertisements
  891.  
  892.    Router Advertisements are sent periodically to the all-nodes
  893.    multicast address. To obtain an advertisement quickly, a host sends
  894.    out Router Solicitations as described in [DISCOVERY].
  895.  
  896.  
  897.  
  898. Thomson & Narten            Standards Track                    [Page 16]
  899.  
  900. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  901.  
  902.  
  903.  
  904. 5.5.2.  Absence of Router Advertisements
  905.  
  906.    If a link has no routers, a host MUST attempt to use stateful
  907.    autoconfiguration to obtain addresses and other configuration
  908.    information. An implementation MAY provide a way to disable the
  909.    invocation of stateful autoconfiguration in this case, but the
  910.    default SHOULD be enabled.  From the perspective of
  911.    autoconfiguration, a link has no routers if no Router Advertisements
  912.    are received after having sent a small number of Router Solicitations
  913.    as described in [DISCOVERY].
  914.  
  915. 5.5.3.  Router Advertisement Processing
  916.  
  917.    On receipt of a valid Router Advertisement (as defined in
  918.    [DISCOVERY]), a host copies the value of the advertisement's M bit
  919.    into ManagedFlag. If the value of ManagedFlag changes from FALSE to
  920.    TRUE, and the host is not already running the stateful address
  921.    autoconfiguration protocol, the host should invoke the stateful
  922.    address autoconfiguration protocol, requesting both address
  923.    information and other information.  If the value of the ManagedFlag
  924.    changes from TRUE to FALSE, the host should continue running the
  925.    stateful address autoconfiguration, i.e., the change in the value of
  926.    the ManagedFlag has no effect.  If the value of the flag stays
  927.    unchanged, no special action takes place. In particular, a host MUST
  928.    NOT reinvoke stateful address configuration if it is already
  929.    participating in the stateful protocol as a result of an earlier
  930.    advertisement.
  931.  
  932.    An advertisement's O flag field is processed in an analogous manner.
  933.    A host copies the value of the O flag into OtherConfigFlag. If the
  934.    value of OtherConfigFlag changes from FALSE to TRUE, the host should
  935.    invoke the stateful autoconfiguration protocol, requesting
  936.    information (excluding addresses if ManagedFlag is set to FALSE).  If
  937.    the value of the OtherConfigFlag changes from TRUE to FALSE, the host
  938.    should continue running the stateful address autoconfiguration
  939.    protocol, i.e., the change in the value of OtherConfigFlag has no
  940.    effect. If the value of the flag stays unchanged, no special action
  941.    takes place. In particular, a host MUST NOT reinvoke stateful
  942.    configuration if it is already participating in the stateful protocol
  943.    as a result of an earlier advertisement.
  944.  
  945.    For each Prefix-Information option in the Router Advertisement:
  946.  
  947.     a) If the Autonomous flag is not set, silently ignore the
  948.        Prefix Information
  949.        option.
  950.  
  951.  
  952.  
  953.  
  954. Thomson & Narten            Standards Track                    [Page 17]
  955.  
  956. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  957.  
  958.  
  959.     b) If the prefix is the link-local prefix, silently ignore the
  960.        Prefix Information option.
  961.  
  962.     c) If the preferred lifetime is greater than the valid lifetime,
  963.        silently ignore the Prefix Information option. A node MAY wish to
  964.        log a system management error in this case.
  965.  
  966.     d) If the prefix advertised does not match the prefix of an address
  967.        already in the list, and the Valid Lifetime is not 0, form an
  968.        address (and add it to the list) by combining the advertised
  969.        prefix with the link's interface identifier as follows:
  970.  
  971.    |            128 - N bits               |       N bits           |
  972.    +---------------------------------------+------------------------+
  973.    |            link prefix                |  interface identifier  |
  974.    +----------------------------------------------------------------+
  975.  
  976.  
  977.        If the sum of the prefix length and interface identifier length
  978.        does not equal 128 bits, the Prefix Information option MUST be
  979.        ignored.  An implementation MAY wish to log a system management
  980.        error in this case. It is the responsibility of the system
  981.        administrator to insure that the lengths of prefixes contained in
  982.        Router Advertisements are consistent with the length of interface
  983.        identifiers for that link type. Note that interface identifiers
  984.        will typically be 64-bits long and based on EUI-64 identifiers as
  985.        described in [ADDR-ARCH].
  986.  
  987.        If an address is formed successfully, the host adds it to the
  988.        list of addresses assigned to the interface, initializing its
  989.        preferred and valid lifetime values from the Prefix Information
  990.        option.
  991.  
  992.     e) If the advertised prefix matches the prefix of an autoconfigured
  993.        address (i.e., one obtained via stateless or stateful address
  994.        autoconfiguration) in the list of addresses associated with the
  995.        interface, the specific action to perform depends on the Valid
  996.        Lifetime in the received advertisement and the Lifetime
  997.        associated with the previously autoconfigured address (which we
  998.        call StoredLifetime in the discussion that follows):
  999.  
  1000.        1) If the received Lifetime is greater than 2 hours or greater
  1001.           than StoredLifetime, update the stored Lifetime of the
  1002.           corresponding address.
  1003.  
  1004.        2) If the StoredLifetime is less than or equal to 2 hours and the
  1005.           received Lifetime is less than or equal to StoredLifetime,
  1006.           ignore the prefix, unless the Router Advertisement from which
  1007.  
  1008.  
  1009.  
  1010. Thomson & Narten            Standards Track                    [Page 18]
  1011.  
  1012. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  1013.  
  1014.  
  1015.           this Prefix Information option was obtained has been
  1016.           authenticated (e.g., via IPSec [RFC2402]). If the Router
  1017.           Advertisment was authenticated, the StoredLifetime should be
  1018.           set to the Lifetime in the received option.
  1019.  
  1020.        3) Otherwise, reset the stored Lifetime in the corresponding
  1021.           address to two hours.
  1022.  
  1023.        The above rules address a specific denial of service attack in
  1024.        which a bogus advertisement could contain prefixes with very
  1025.        small Valid Lifetimes. Without the above rules, a single
  1026.        unauthenticated advertisement containing bogus Prefix Information
  1027.        options with short Lifetimes could cause all of a node's
  1028.        addresses to expire prematurely. The above rules insure that
  1029.        legitimate advertisements (which are sent periodically) will
  1030.        "cancel" the short lifetimes before they actually take effect.
  1031.  
  1032. 5.5.4.  Address Lifetime Expiry
  1033.  
  1034.    A preferred address becomes deprecated when its preferred lifetime
  1035.    expires.  A deprecated address SHOULD continue to be used as a source
  1036.    address in existing communications, but SHOULD NOT be used in new
  1037.    communications if an alternate (non-deprecated) address is available
  1038.    and has sufficient scope.  IP and higher layers (e.g., TCP, UDP) MUST
  1039.    continue to accept datagrams destined to a deprecated address since a
  1040.    deprecated address is still a valid address for the interface. An
  1041.    implementation MAY prevent any new communication from using a
  1042.    deprecated address, but system management MUST have the ability to
  1043.    disable such a facility, and the facility MUST be disabled by
  1044.    default.
  1045.  
  1046.    An address (and its association with an interface) becomes invalid
  1047.    when its valid lifetime expires.  An invalid address MUST NOT be used
  1048.    as a source address in outgoing communications and MUST NOT be
  1049.    recognized as a destination on a receiving interface.
  1050.  
  1051. 5.6.  Configuration Consistency
  1052.  
  1053.    It is possible for hosts to obtain address information using both
  1054.    stateless and stateful protocols since both may be enabled at the
  1055.    same time.  It is also possible that the values of other
  1056.    configuration parameters such as MTU size and hop limit will be
  1057.    learned from both Router Advertisements and the stateful
  1058.    autoconfiguration protocol.  If the same configuration information is
  1059.    provided by multiple sources, the value of this information should be
  1060.    consistent. However, it is not considered a fatal error if
  1061.    information received from multiple sources is inconsistent. Hosts
  1062.    accept the union of all information received via the stateless and
  1063.  
  1064.  
  1065.  
  1066. Thomson & Narten            Standards Track                    [Page 19]
  1067.  
  1068. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  1069.  
  1070.  
  1071.    stateful protocols. If inconsistent information is learned different
  1072.    sources, the most recently obtained values always have precedence
  1073.    over information learned earlier.
  1074.  
  1075. 6.  SECURITY CONSIDERATIONS
  1076.  
  1077.    Stateless address autoconfiguration allows a host to connect to a
  1078.    network, configure an address and start communicating with other
  1079.    nodes without ever registering or authenticating itself with the
  1080.    local site.  Although this allows unauthorized users to connect to
  1081.    and use a network, the threat is inherently present in the
  1082.    Internet        architecture. Any node with a physical attachment to
  1083.    a network can generate an address (using a variety of ad hoc
  1084.    techniques) that provides connectivity.
  1085.  
  1086.    The use of Duplicate Address Detection opens up the possibility of
  1087.    denial of service attacks. Any node can respond to Neighbor
  1088.    Solicitations for a tentative address, causing the other node to
  1089.    reject the address as a duplicate.  This attack is similar to other
  1090.    attacks involving the spoofing of Neighbor Discovery messages and can
  1091.    be addressed by requiring that Neighbor Discovery packets be
  1092.    authenticated [RFC2402].
  1093.  
  1094. 7.  References
  1095.  
  1096.    [RFC2402]    Kent, S. and R. Atkinson, "IP Authentication Header",
  1097.                 RFC 2402, November 1998.
  1098.  
  1099.    [IPv6-ETHER] Crawford, M., "A Method for the Transmission of
  1100.                 IPv6        Packets over Ethernet Networks", RFC 2464,
  1101.                 December 1998.
  1102.  
  1103.    [KEYWORDS]   Bradner, S., "Key words for use in RFCs to Indicate
  1104.                 Requirement Levels", BCP 14, RFC 2119, March
  1105.                 1997.
  1106.  
  1107.    [RFC1112]    Deering, S., "Host Extensions for IP Multicasting", STD
  1108.                 5, RFC 1112, August
  1109.                 1989.
  1110.  
  1111.    [ADDR-ARCH]  Hinden, R. and S. Deering, "Internet Protocol Version
  1112.                 (IPv6) Addressing Architecture", RFC 2373, July 1998
  1113.  
  1114.    [DHCPv6]     Bound, J. and C. Perkins, "Dynamic Host Configuration
  1115.                 Protocol for IPv6 (DHCPv6)", Work in Progress.
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Thomson & Narten            Standards Track                    [Page 20]
  1123.  
  1124. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  1125.  
  1126.  
  1127.    [DISCOVERY]  Narten, T., Nordmark, E. and W. Simpson, "Neighbor
  1128.                 Discovery for IP Version 6 (IPv6)", RFC 2461, December
  1129.                 1998.
  1130.  
  1131. 8.  Acknowledgements
  1132.  
  1133.    The authors would like to thank the members of both the IPNG and
  1134.    ADDRCONF working groups for their input. In particular, thanks to Jim
  1135.    Bound, Steve Deering, Richard Draves, and Erik Nordmark.  Thanks also
  1136.    goes to John Gilmore for alerting the WG of the "0 Lifetime Prefix
  1137.    Advertisement" denial of service attack vulnerability; this document
  1138.    incorporates changes that address this vulnerability.
  1139.  
  1140. AUTHORS' ADDRESSES
  1141.  
  1142.    Susan Thomson
  1143.    Bellcore
  1144.    445 South Street
  1145.    Morristown, NJ 07960
  1146.    USA
  1147.  
  1148.    Phone: +1 201-829-4514
  1149.    EMail: set@thumper.bellcore.com
  1150.  
  1151.  
  1152.    Thomas Narten
  1153.    IBM Corporation
  1154.    P.O. Box 12195
  1155.    Research Triangle Park, NC 27709-2195
  1156.    USA
  1157.  
  1158.    Phone: +1 919 254 7798
  1159.    EMail: narten@raleigh.ibm.com
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Thomson & Narten            Standards Track                    [Page 21]
  1179.  
  1180. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  1181.  
  1182.  
  1183. 9.  APPENDIX A: LOOPBACK SUPPRESSION & DUPLICATE ADDRESS DETECTION
  1184.  
  1185.    Determining whether a received multicast solicitation was looped back
  1186.    to the sender or actually came from another node is implementation-
  1187.    dependent.  A problematic case occurs when two interfaces attached to
  1188.    the same link happen to have the same identifier and link-layer
  1189.    address, and they both send out packets with identical contents at
  1190.    roughly the same time (e.g., Neighbor Solicitations for a tentative
  1191.    address as part of Duplicate Address Detection messages). Although a
  1192.    receiver will receive both packets, it cannot determine which packet
  1193.    was looped back and which packet came from the other node by simply
  1194.    comparing packet contents (i.e., the contents are identical). In this
  1195.    particular case, it is not necessary to know precisely which packet
  1196.    was looped back and which was sent by another node; if one receives
  1197.    more solicitations than were sent, the tentative address is a
  1198.    duplicate. However, the situation may not always be this
  1199.    straightforward.
  1200.  
  1201.    The IPv4 multicast specification [RFC1112] recommends that the
  1202.    service interface provide a way for an upper-layer protocol to
  1203.    inhibit local delivery of packets sent to a multicast group that the
  1204.    sending host is a member of. Some applications know that there will
  1205.    be no other group members on the same host, and suppressing loopback
  1206.    prevents them from having to receive (and discard) the packets they
  1207.    themselves send out.  A straightforward way to implement this
  1208.    facility is to disable loopback at the hardware level (if supported
  1209.    by the hardware), with packets looped back (if requested) by
  1210.    software.  On interfaces in which the hardware itself suppresses
  1211.    loopbacks, a node running Duplicate Address Detection simply counts
  1212.    the number of Neighbor Solicitations received for a tentative address
  1213.    and compares them with the number expected. If there is a mismatch,
  1214.    the tentative address is a duplicate.
  1215.  
  1216.    In those cases where the hardware cannot suppress loopbacks, however,
  1217.    one possible software heuristic to filter out unwanted loopbacks is
  1218.    to discard any received packet whose link-layer source address is the
  1219.    same as the receiving interface's.  Unfortunately, use of that
  1220.    criteria also results in the discarding of all packets sent by
  1221.    another node using the same link-layer address. Duplicate Address
  1222.    Detection will fail on interfaces that filter received packets in
  1223.    this manner:
  1224.  
  1225.       o If a node performing Duplicate Address Detection discards
  1226.         received packets having the same source link-layer address as
  1227.         the receiving interface, it will also discard packets from other
  1228.         nodes also using the same link-layer address, including Neighbor
  1229.         Advertisement and Neighbor Solicitation messages required to
  1230.         make Duplicate Address Detection work correctly.  This
  1231.  
  1232.  
  1233.  
  1234. Thomson & Narten            Standards Track                    [Page 22]
  1235.  
  1236. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  1237.  
  1238.  
  1239.         particular problem can be avoided by temporarily disabling the
  1240.         software suppression of loopbacks while a node performs
  1241.         Duplicate Address Detection.
  1242.  
  1243.       o If a node that is already using a particular IP address discards
  1244.         received packets having the same link-layer source address as
  1245.         the interface, it will also discard Duplicate Address
  1246.         Detection-related Neighbor Solicitation messages sent by another
  1247.         node also using the same link-layer address.  Consequently,
  1248.         Duplicate Address Detection will fail, and the other node will
  1249.         configure a non-unique address. Since it is generally impossible
  1250.         to know when another node is performing Duplicate Address
  1251.         Detection, this scenario can be avoided only if software
  1252.         suppression of loopback is permanently disabled.
  1253.  
  1254.    Thus, to perform Duplicate Address Detection correctly in the case
  1255.    where two interfaces are using the same link-layer address, an
  1256.    implementation must have a good understanding of the interface's
  1257.    multicast loopback semantics, and the interface cannot discard
  1258.    received packets simply because the source link-layer address is the
  1259.    same as the interfaces.
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Thomson & Narten            Standards Track                    [Page 23]
  1291.  
  1292. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  1293.  
  1294.  
  1295. 10.  APPENDIX B: CHANGES SINCE RFC 1971
  1296.  
  1297.    o Changed document to use term "interface identifier" rather than
  1298.      "interface token" for consistency with other IPv6 documents.
  1299.  
  1300.    o Clarified definition of deprecated address to make clear it is OK
  1301.      to continue sending to or from deprecated addresses.
  1302.  
  1303.    o Reworded section 5.4 for clarity (no substantive change).
  1304.  
  1305.    o Added rules to Section 5.5.3 Router Advertisement processing to
  1306.      address potential denial-of-service attack when prefixes are
  1307.      advertised with very short Lifetimes.
  1308.  
  1309.    o Clarified wording in Section 5.5.4 to make clear that all upper
  1310.      layer protocols must process (i.e., send and receive) packets sent
  1311.      to deprecated addresses.
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Thomson & Narten            Standards Track                    [Page 24]
  1347.  
  1348. RFC 2462        IPv6 Stateless Address Autoconfiguration   December 1998
  1349.  
  1350.  
  1351. 11.  Full Copyright Statement
  1352.  
  1353.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  1354.  
  1355.    This document and translations of it may be copied and furnished to
  1356.    others, and derivative works that comment on or otherwise explain it
  1357.    or assist in its implementation may be prepared, copied, published
  1358.    and distributed, in whole or in part, without restriction of any
  1359.    kind, provided that the above copyright notice and this paragraph are
  1360.    included on all such copies and derivative works.  However, this
  1361.    document itself may not be modified in any way, such as by removing
  1362.    the copyright notice or references to the Internet Society or other
  1363.    Internet organizations, except as needed for the purpose of
  1364.    developing Internet standards in which case the procedures for
  1365.    copyrights defined in the Internet Standards process must be
  1366.    followed, or as required to translate it into languages other than
  1367.    English.
  1368.  
  1369.    The limited permissions granted above are perpetual and will not be
  1370.    revoked by the Internet Society or its successors or assigns.
  1371.  
  1372.    This document and the information contained herein is provided on an
  1373.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  1374.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  1375.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  1376.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  1377.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Thomson & Narten            Standards Track                    [Page 25]
  1403.  
  1404.