Network Working Group                                        T. Narten
Request for Comments: 2461                                         IBM
Obsoletes: 1970                                            E. Nordmark
Category: Standards Track                             Sun Microsystems
                                                            W. Simpson
                                                            Daydreamer
                                                         December 1998


               Neighbor Discovery for IP Version 6 (IPv6)

Status of this Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (1998).  All Rights Reserved.

Abstract

   This document specifies the Neighbor Discovery protocol for IP
   Version 6.  IPv6 nodes on the same link use Neighbor Discovery to
   discover each other's presence, to determine each other's link-layer
   addresses, to find routers and to maintain reachability information
   about the paths to active neighbors.

   Table of Contents

   1.  INTRODUCTION.............................................    3
   2.  TERMINOLOGY..............................................    4
      2.1.  General.............................................    4
      2.2.  Link Types..........................................    7
      2.3.  Addresses...........................................    8
      2.4.  Requirements........................................    9
   3.  PROTOCOL OVERVIEW........................................    9
      3.1.  Comparison with IPv4................................   13
      3.2.  Supported Link Types................................   15
   4.  MESSAGE FORMATS..........................................   17
      4.1.  Router Solicitation Message Format..................   17
      4.2.  Router Advertisement Message Format.................   18
      4.3.  Neighbor Solicitation Message Format................   21
      4.4.  Neighbor Advertisement Message Format...............   23
      4.5.  Redirect Message Format.............................   26



Narten, et. al.             Standards Track                     [Page 1]

RFC 2461              Neighbor Discovery for IPv6          December 1998


      4.6.  Option Formats......................................   28
         4.6.1.  Source/Target Link-layer Address...............   28
         4.6.2.  Prefix Information.............................   29
         4.6.3.  Redirected Header..............................   31
         4.6.4.  MTU............................................   32
   5.  CONCEPTUAL MODEL OF A HOST...............................   33
      5.1.  Conceptual Data Structures..........................   33
      5.2.  Conceptual Sending Algorithm........................   35
      5.3.  Garbage Collection and Timeout Requirements.........   37
   6.  ROUTER AND PREFIX DISCOVERY..............................   37
      6.1.  Message Validation..................................   38
         6.1.1.  Validation of Router Solicitation Messages.....   38
         6.1.2.  Validation of Router Advertisement Messages....   39
      6.2.  Router Specification................................   40
         6.2.1.  Router Configuration Variables.................   40
         6.2.2.  Becoming An Advertising Interface..............   44
         6.2.3.  Router Advertisement Message Content...........   44
         6.2.4.  Sending Unsolicited Router Advertisements......   46
         6.2.5.  Ceasing To Be An Advertising Interface.........   46
         6.2.6.  Processing Router Solicitations................   47
         6.2.7.  Router Advertisement Consistency...............   48
         6.2.8.  Link-local Address Change......................   49
      6.3.  Host Specification..................................   50
         6.3.1.  Host Configuration Variables...................   50
         6.3.2.  Host Variables.................................   50
         6.3.3.  Interface Initialization.......................   51
         6.3.4.  Processing Received Router Advertisements......   51
         6.3.5.  Timing out Prefixes and Default Routers........   54
         6.3.6.  Default Router Selection.......................   54
         6.3.7.  Sending Router Solicitations...................   55
   7.  ADDRESS RESOLUTION AND NEIGHBOR UNREACHABILITY DETECTION.   56
      7.1.  Message Validation..................................   57
         7.1.1.  Validation of Neighbor Solicitations...........   57
         7.1.2.  Validation of Neighbor Advertisements..........   58
      7.2.  Address Resolution..................................   58
         7.2.1.  Interface Initialization.......................   59
         7.2.2.  Sending Neighbor Solicitations.................   59
         7.2.3.  Receipt of Neighbor Solicitations..............   60
         7.2.4.  Sending Solicited Neighbor Advertisements......   61
         7.2.5.  Receipt of Neighbor Advertisements.............   62
         7.2.6.  Sending Unsolicited Neighbor Advertisements....   64
         7.2.7.  Anycast Neighbor Advertisements................   65
         7.2.8.  Proxy Neighbor Advertisements..................   65
      7.3.  Neighbor Unreachability Detection...................   66
         7.3.1.  Reachability Confirmation......................   66
         7.3.2.  Neighbor Cache Entry States....................   67
         7.3.3.  Node Behavior..................................   68
   8.  REDIRECT FUNCTION........................................   70



Narten, et. al.             Standards Track                     [Page 2]

RFC 2461              Neighbor Discovery for IPv6          December 1998


      8.1.  Validation of Redirect Messages.....................   71
      8.2.  Router Specification................................   72
      8.3.  Host Specification..................................   73
   9.  EXTENSIBILITY - OPTION PROCESSING........................   74
   10.  PROTOCOL CONSTANTS......................................   75
   11.  SECURITY CONSIDERATIONS.................................   76
   12.  RENUMBERING CONSIDERATIONS..............................   78

   References...................................................   80
   Authors' Addresses...........................................   81
   Appendix A: Multihomed Hosts.................................   82
   Appendix B: Future Extensions................................   84
   Appendix C: State Machine for the Reachability State.........   85
   Appendix D: Summary of ISROUTER Rules........................   88
   Appendix E: Implementation Issues............................   89
       Appendix E.1: Reachability confirmations.................   89
   Appendix F: Changes since RFC 1970...........................   91
   Full Copyright Statement.....................................   93

1.  INTRODUCTION

   This specification defines the Neighbor Discovery (ND) protocol for
   Internet Protocol Version 6 (IPv6).  Nodes (hosts and routers) use
   Neighbor Discovery to determine the link-layer addresses for
   neighbors known to reside on attached links and to quickly purge
   cached values that become invalid.  Hosts also use Neighbor Discovery
   to find neighboring routers that are willing to forward packets on
   their behalf.  Finally, nodes use the protocol to actively keep track
   of which neighbors are reachable and which are not, and to detect
   changed link-layer addresses.  When a router or the path to a router
   fails, a host actively searches for functioning alternates.

   Unless specified otherwise (in a document that covers operating IP
   over a particular link type) this document applies to all link types.
   However, because ND uses link-layer multicast for some of its
   services, it is possible that on some link types (e.g., NBMA links)
   alternative protocols or mechanisms to implement those services will
   be specified (in the appropriate document covering the operation of
   IP over a particular link type).  The services described in this
   document that are not directly dependent on multicast, such as
   Redirects, Next-hop determination, Neighbor Unreachability Detection,
   etc., are expected to be provided as specified in this document.  The
   details of how one uses ND on NBMA links is an area for further
   study.

   The authors would like to acknowledge the contributions of the IPNGWG
   working group and, in particular, (in alphabetical order) Ran
   Atkinson, Jim Bound, Scott Bradner, Alex Conta, Stephen Deering,



Narten, et. al.             Standards Track                     [Page 3]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   Richard Draves, Francis Dupont, Robert Elz, Robert Gilligan, Robert
   Hinden, Allison Mankin, Dan McDonald, Charles Perkins, Matt Thomas,
   and Susan Thomson.

2.  TERMINOLOGY

2.1.  General

   IP          - Internet Protocol Version 6.  The terms IPv4 and
                 IPv6 are used only in contexts where necessary to avoid
                 ambiguity.

   ICMP        - Internet Message Control Protocol for the Internet
                 Protocol Version 6.  The terms ICMPv4 and ICMPv6 are
                 used only in contexts where necessary to avoid
                 ambiguity.

   node        - a device that implements IP.

   router      - a node that forwards IP packets not explicitly
                 addressed to itself.

   host        - any node that is not a router.

   upper layer - a protocol layer immediately above IP.  Examples are
                 transport protocols such as TCP and UDP, control
                 protocols such as ICMP, routing protocols such as OSPF,
                 and internet or lower-layer protocols being "tunneled"
                 over (i.e., encapsulated in) IP such as IPX, AppleTalk,
                 or IP itself.

   link        - a communication facility or medium over which nodes can
                 communicate at the link layer, i.e., the layer
                 immediately below IP.  Examples are Ethernets (simple
                 or bridged), PPP links, X.25, Frame Relay, or ATM
                 networks as well as internet (or higher) layer
                 "tunnels", such as tunnels over IPv4 or IPv6 itself.

   interface   - a node's attachment to a link.

   neighbors   - nodes attached to the same link.

   address     - an IP-layer identifier for an interface or a set of
                 interfaces.

   anycast address
               - an identifier for a set of interfaces (typically
                 belonging to different nodes).  A packet sent to an



Narten, et. al.             Standards Track                     [Page 4]

RFC 2461              Neighbor Discovery for IPv6          December 1998


                 anycast address is delivered to one of the interfaces
                 identified by that address (the "nearest" one,
                 according to the routing protocol's measure of
                 distance).  See [ADDR-ARCH].

                 Note that an anycast address is syntactically
                 indistinguishable from a unicast address.  Thus, nodes
                 sending packets to anycast addresses don't generally
                 know that an anycast address is being used.  Throughout
                 the rest of this document, references to unicast
                 addresses also apply to anycast addresses in those
                 cases where the node is unaware that a unicast address
                 is actually an anycast address.

   prefix      - a bit string that consists of some number of initial
                 bits of an address.

   link-layer address
               - a link-layer identifier for an interface.  Examples
                 include IEEE 802 addresses for Ethernet links and E.164
                 addresses for ISDN links.

   on-link     - an address that is assigned to an interface on a
                 specified link.  A node considers an address to be on-
                 link if:

                    - it is covered by one of the link's prefixes, or

                    - a neighboring router specifies the address as
                      the target of a Redirect message, or

                    - a Neighbor Advertisement message is received for
                      the (target) address, or

                    - any Neighbor Discovery message is received from
                      the address.

   off-link    - the opposite of "on-link"; an address that is not
                 assigned to any interfaces on the specified link.

   longest prefix match
               - The process of determining which prefix (if any) in
                 a set of prefixes covers a target address.  A target
                 address is covered by a prefix if all of the bits in
                 the prefix match the left-most bits of the target
                 address.  When multiple prefixes cover an address,
                 the longest prefix is the one that matches.




Narten, et. al.             Standards Track                     [Page 5]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   reachability
               - whether or not the one-way "forward" path to a
                 neighbor is functioning properly.  In particular,
                 whether packets sent to a neighbor are reaching the
                 IP layer on the neighboring machine and are being
                 processed properly by the receiving IP layer.  For
                 neighboring routers, reachability means that packets
                 sent by a node's IP layer are delivered to the
                 router's IP layer, and the router is indeed
                 forwarding packets (i.e., it is configured as a
                 router, not a host).  For hosts, reachability means
                 that packets sent by a node's IP layer are delivered
                 to the neighbor host's IP layer.

   packet      - an IP header plus payload.

   link MTU    - the maximum transmission unit, i.e., maximum packet
                 size in octets, that can be conveyed in one piece
                 over a link.

   target      - an address about which address resolution
                 information is sought, or an address which is the
                 new first-hop when being redirected.

   proxy       - a router that responds to Neighbor Discovery query
                 messages on behalf of another node.  A router acting
                 on behalf of a mobile node that has moved off-link
                 could potentially act as a proxy for the mobile
                 node.

   ICMP destination unreachable indication
               - an error indication returned to the original sender
                 of a packet that cannot be delivered for the reasons
                 outlined in [ICMPv6].  If the error occurs on a node
                 other than the node originating the packet, an ICMP
                 error message is generated.  If the error occurs on
                 the originating node, an implementation is not
                 required to actually create and send an ICMP error
                 packet to the source, as long as the upper-layer
                 sender is notified through an appropriate mechanism
                 (e.g., return value from a procedure call).  Note,
                 however, that an implementation may find it
                 convenient in some cases to return errors to the
                 sender by taking the offending packet, generating an
                 ICMP error message, and then delivering it (locally)
                 through the generic error handling routines.





Narten, et. al.             Standards Track                     [Page 6]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   random delay
               - when sending out messages, it is sometimes necessary to
                 delay a transmission for a random amount of time in
                 order to prevent multiple nodes from transmitting at
                 exactly the same time, or to prevent long-range
                 periodic transmissions from synchronizing with each
                 other [SYNC].  When a random component is required, a
                 node calculates the actual delay in such a way that the
                 computed delay forms a uniformly-distributed random
                 value that falls between the specified minimum and
                 maximum delay times.  The implementor must take care to
                 insure that the granularity of the calculated random
                 component and the resolution of the timer used are both
                 high enough to insure that the probability of multiple
                 nodes delaying the same amount of time is small.

   random delay seed
               - If a pseudo-random number generator is used in
                 calculating a random delay component, the generator
                 should be initialized with a unique seed prior to being
                 used.  Note that it is not sufficient to use the
                 interface token alone as the seed, since interface
                 tokens will not always be unique.  To reduce the
                 probability that duplicate interface tokens cause the
                 same seed to be used, the seed should be calculated
                 from a variety of input sources (e.g., machine
                 components) that are likely to be different even on
                 identical "boxes".  For example, the seed could be
                 formed by combining the CPU's serial number with an
                 interface token.

2.2.  Link Types

   Different link layers have different properties.  The ones of concern
   to Neighbor Discovery are:

   multicast      - a link that supports a native mechanism at the
                    link layer for sending packets to all (i.e.,
                    broadcast) or a subset of all neighbors.

   point-to-point - a link that connects exactly two interfaces.  A
                    point-to-point link is assumed to have multicast
                    capability and have a link-local address.

   non-broadcast multi-access (NBMA)
                  - a link to which more than two interfaces can attach,
                    but that does not support a native form of multicast
                    or broadcast (e.g., X.25, ATM, frame relay, etc.).



Narten, et. al.             Standards Track                     [Page 7]

RFC 2461              Neighbor Discovery for IPv6          December 1998


                    Note that all link types (including NBMA) are
                    expected to provide multicast service for IP (e.g.,
                    using multicast servers), but it is an issue for
                    further study whether ND should use such facilities
                    or an alternate mechanism that provides the
                    equivalent ND services.

   shared media   - a link that allows direct communication among a
                    number of nodes, but attached nodes are configured
                    in such a way that they do not have complete prefix
                    information for all on-link destinations.  That is,
                    at the IP level, nodes on the same link may not know
                    that they are neighbors; by default, they
                    communicate through a router.  Examples are large
                    (switched) public data networks such as SMDS and B-
                    ISDN.  Also known as "large clouds".  See [SH-
                    MEDIA].

   variable MTU   - a link that does not have a well-defined MTU (e.g.,
                    IEEE 802.5 token rings).  Many links (e.g.,
                    Ethernet) have a standard MTU defined by the link-
                    layer protocol or by the specific document
                    describing how to run IP over the link layer.

   asymmetric reachability
                  - a link where non-reflexive and/or non-transitive
                    reachability is part of normal operation.  (Non-
                    reflexive reachability means packets from A reach B
                    but packets from B don't reach A.  Non-transitive
                    reachability means packets from A reach B, and
                    packets from B reach C, but packets from A don't
                    reach C.)  Many radio links exhibit these
                    properties.

2.3.  Addresses

   Neighbor Discovery makes use of a number of different addresses
   defined in [ADDR-ARCH], including:

   all-nodes multicast address
               - the link-local scope address to reach all nodes.
                 FF02::1

   all-routers multicast address
               - the link-local scope address to reach all routers.
                 FF02::2





Narten, et. al.             Standards Track                     [Page 8]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   solicited-node multicast address
               - a link-local scope multicast address that is computed
                 as a function of the solicited target's address.  The
                 function is described in [ADDR-ARCH]. The function is
                 chosen so that IP addresses which differ only in the
                 high-order bits, e.g., due to multiple high-order
                 prefixes associated with different providers, will map
                 to the same solicited-node address thereby reducing the
                 number of multicast addresses a node must join.

   link-local address
               - a unicast address having link-only scope that can be
                 used to reach neighbors.  All interfaces on routers
                 MUST have a link-local address.  Also, [ADDRCONF]
                 requires that interfaces on hosts have a link-local
                 address.

   unspecified address
               - a reserved address value that indicates the lack of an
                 address (e.g., the address is unknown).  It is never
                 used as a destination address, but may be used as a
                 source address if the sender does not (yet) know its
                 own address (e.g., while verifying an address is unused
                 during address autoconfiguration [ADDRCONF]).  The
                 unspecified address has a value of 0:0:0:0:0:0:0:0.

2.4.  Requirements

   The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
   SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this
   document, are to be interpreted as described in [KEYWORDS].

   This document also makes use of internal conceptual variables to
   describe protocol behavior and external variables that an
   implementation must allow system administrators to change.  The
   specific variable names, how their values change, and how their
   settings influence protocol behavior are provided to demonstrate
   protocol behavior.  An implementation is not required to have them in
   the exact form described here, so long as its external behavior is
   consistent with that described in this document.

3.  PROTOCOL OVERVIEW

   This protocol solves a set of problems related to the interaction
   between nodes attached to the same link.  It defines mechanisms for
   solving each of the following problems:





Narten, et. al.             Standards Track                     [Page 9]

RFC 2461              Neighbor Discovery for IPv6          December 1998


     Router Discovery: How hosts locate routers that reside on an
                attached link.

     Prefix Discovery: How hosts discover the set of address prefixes
                that define which destinations are on-link for an
                attached link.  (Nodes use prefixes to distinguish
                destinations that reside on-link from those only
                reachable through a router.)

     Parameter Discovery: How a node learns such link parameters as the
                link MTU or such Internet parameters as the hop limit
                value to place in outgoing packets.

     Address Autoconfiguration: How nodes automatically configure an
                address for an interface.

     Address resolution: How nodes determine the link-layer address of
                an on-link destination (e.g., a neighbor) given only the
                destination's IP address.

     Next-hop determination: The algorithm for mapping an IP destination
                address into the IP address of the neighbor to which
                traffic for the destination should be sent.  The next-
                hop can be a router or the destination itself.

     Neighbor Unreachability Detection: How nodes determine that a
                neighbor is no longer reachable.  For neighbors used as
                routers, alternate default routers can be tried.  For
                both routers and hosts, address resolution can be
                performed again.

     Duplicate Address Detection: How a node determines that an address
                it wishes to use is not already in use by another node.

     Redirect:  How a router informs a host of a better first-hop node
                to reach a particular destination.

   Neighbor Discovery defines five different ICMP packet types: A pair
   of Router Solicitation and Router Advertisement messages, a pair of
   Neighbor Solicitation and Neighbor Advertisements messages, and a
   Redirect message.  The messages serve the following purpose:

     Router Solicitation: When an interface becomes enabled, hosts may
                send out Router Solicitations that request routers to
                generate Router Advertisements immediately rather than
                at their next scheduled time.





Narten, et. al.             Standards Track                    [Page 10]

RFC 2461              Neighbor Discovery for IPv6          December 1998


     Router Advertisement: Routers advertise their presence together
                with various link and Internet parameters either
                periodically, or in response to a Router Solicitation
                message.  Router Advertisements contain prefixes that
                are used for on-link determination and/or address
                configuration, a suggested hop limit value, etc.

     Neighbor Solicitation: Sent by a node to determine the link-layer
                address of a neighbor, or to verify that a neighbor is
                still reachable via a cached link-layer address.
                Neighbor Solicitations are also used for Duplicate
                Address Detection.

     Neighbor Advertisement: A response to a Neighbor Solicitation
                message.  A node may also send unsolicited Neighbor
                Advertisements to announce a link-layer address change.

     Redirect:  Used by routers to inform hosts of a better first hop
                for a destination.

   On multicast-capable links, each router periodically multicasts a
   Router Advertisement packet announcing its availability.  A host
   receives Router Advertisements from all routers, building a list of
   default routers.  Routers generate Router Advertisements frequently
   enough that hosts will learn of their presence within a few minutes,
   but not frequently enough to rely on an absence of advertisements to
   detect router failure; a separate Neighbor Unreachability Detection
   algorithm provides failure detection.

   Router Advertisements contain a list of prefixes used for on-link
   determination and/or autonomous address configuration; flags
   associated with the prefixes specify the intended uses of a
   particular prefix.  Hosts use the advertised on-link prefixes to
   build and maintain a list that is used in deciding when a packet's
   destination is on-link or beyond a router.  Note that a destination
   can be on-link even though it is not covered by any advertised on-
   link prefix.  In such cases a router can send a Redirect informing
   the sender that the destination is a neighbor.

   Router Advertisements (and per-prefix flags) allow routers to inform
   hosts how to perform Address Autoconfiguration.  For example, routers
   can specify whether hosts should use stateful (DHCPv6) and/or
   autonomous (stateless) address configuration.  The exact semantics
   and usage of the address configuration-related information is
   specified in [ADDRCONF].

   Router Advertisement messages also contain Internet parameters such
   as the hop limit that hosts should use in outgoing packets and,



Narten, et. al.             Standards Track                    [Page 11]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   optionally, link parameters such as the link MTU.  This facilitates
   centralized administration of critical parameters that can be set on
   routers and automatically propagated to all attached hosts.

   Nodes accomplish address resolution by multicasting a Neighbor
   Solicitation that asks the target node to return its link-layer
   address.  Neighbor Solicitation messages are multicast to the
   solicited-node multicast address of the target address.  The target
   returns its link-layer address in a unicast Neighbor Advertisement
   message.  A single request-response pair of packets is sufficient for
   both the initiator and the target to resolve each other's link-layer
   addresses; the initiator includes its link-layer address in the
   Neighbor Solicitation.

   Neighbor Solicitation messages can also be used to determine if more
   than one node has been assigned the same unicast address.  The use of
   Neighbor Solicitation messages for Duplicate Address Detection is
   specified in [ADDRCONF].

   Neighbor Unreachability Detection detects the failure of a neighbor
   or the failure of the forward path to the neighbor.  Doing so
   requires positive confirmation that packets sent to a neighbor are
   actually reaching that neighbor and being processed properly by its
   IP layer.  Neighbor Unreachability Detection uses confirmation from
   two sources.  When possible, upper-layer protocols provide a positive
   confirmation that a connection is making "forward progress", that is,
   previously sent data is known to have been delivered correctly (e.g.,
   new acknowledgments were received recently).  When positive
   confirmation is not forthcoming through such "hints", a node sends
   unicast Neighbor Solicitation messages that solicit Neighbor
   Advertisements as reachability confirmation from the next hop.  To
   reduce unnecessary network traffic, probe messages are only sent to
   neighbors to which the node is actively sending packets.

   In addition to addressing the above general problems, Neighbor
   Discovery also handles the following situations:

     Link-layer address change - A node that knows its link-layer
           address has changed can multicast a few (unsolicited)
           Neighbor Advertisement packets to all nodes to quickly update
           cached link-layer addresses that have become invalid.  Note
           that the sending of unsolicited advertisements is a
           performance enhancement only (e.g., unreliable).  The
           Neighbor Unreachability Detection algorithm ensures that all
           nodes will reliably discover the new address, though the
           delay may be somewhat longer.





Narten, et. al.             Standards Track                    [Page 12]

RFC 2461              Neighbor Discovery for IPv6          December 1998


     Inbound load balancing - Nodes with replicated interfaces may want
           to load balance the reception of incoming packets across
           multiple network interfaces on the same link.  Such nodes
           have multiple link-layer addresses assigned to the same
           interface.  For example, a single network driver could
           represent multiple network interface cards as a single
           logical interface having multiple link-layer addresses.

           Load balancing is handled by allowing routers to omit the
           source link-layer address from Router Advertisement packets,
           thereby forcing neighbors to use Neighbor Solicitation
           messages to learn link-layer addresses of routers.  Returned
           Neighbor Advertisement messages can then contain link-layer
           addresses that differ depending on who issued the
           solicitation.

     Anycast addresses - Anycast addresses identify one of a set of
           nodes providing an equivalent service, and multiple nodes on
           the same link may be configured to recognize the same Anycast
           address.  Neighbor Discovery handles anycasts by having nodes
           expect to receive multiple Neighbor Advertisements for the
           same target.  All advertisements for anycast addresses are
           tagged as being non-Override advertisements.  This invokes
           specific rules to determine which of potentially multiple
           advertisements should be used.

     Proxy advertisements - A router willing to accept packets on behalf
           of a target address that is unable to respond to Neighbor
           Solicitations can issue non-Override Neighbor Advertisements.
           There is currently no specified use of proxy, but proxy
           advertising could potentially be used to handle cases like
           mobile nodes that have moved off-link.  However, it is not
           intended as a general mechanism to handle nodes that, e.g.,
           do not implement this protocol.

3.1.  Comparison with IPv4

   The IPv6 Neighbor Discovery protocol corresponds to a combination of
   the IPv4 protocols ARP [ARP], ICMP Router Discovery [RDISC], and ICMP
   Redirect [ICMPv4].  In IPv4 there is no generally agreed upon
   protocol or mechanism for Neighbor Unreachability Detection, although
   Hosts Requirements [HR-CL] does specify some possible algorithms for
   Dead Gateway Detection (a subset of the problems Neighbor
   Unreachability Detection tackles).

   The Neighbor Discovery protocol provides a multitude of improvements
   over the IPv4 set of protocols:




Narten, et. al.             Standards Track                    [Page 13]

RFC 2461              Neighbor Discovery for IPv6          December 1998


      Router Discovery is part of the base protocol set; there is no
      need for hosts to "snoop" the routing protocols.

      Router advertisements carry link-layer addresses; no additional
      packet exchange is needed to resolve the router's link-layer
      address.

      Router advertisements carry prefixes for a link; there is no need
      to have a separate mechanism to configure the "netmask".

      Router advertisements enable Address Autoconfiguration.

      Routers can advertise an MTU for hosts to use on the link,
      ensuring that all nodes use the same MTU value on links lacking a
      well-defined MTU.

      Address resolution multicasts are "spread" over 4 billion (2^32)
      multicast addresses greatly reducing address resolution related
      interrupts on nodes other than the target.  Moreover, non-IPv6
      machines should not be interrupted at all.

      Redirects contain the link-layer address of the new first hop;
      separate address resolution is not needed upon receiving a
      redirect.

      Multiple prefixes can be associated with the same link.  By
      default, hosts learn all on-link prefixes from Router
      Advertisements.  However, routers may be configured to omit some
      or all prefixes from Router Advertisements.  In such cases hosts
      assume that destinations are off-link and send traffic to routers.
      A router can then issue redirects as appropriate.

      Unlike IPv4, the recipient of an IPv6 redirect assumes that the
      new next-hop is on-link.  In IPv4, a host ignores redirects
      specifying a next-hop that is not on-link according to the link's
      network mask.  The IPv6 redirect mechanism is analogous to the
      XRedirect facility specified in [SH-MEDIA].  It is expected to be
      useful on non-broadcast and shared media links in which it is
      undesirable or not possible for nodes to know all prefixes for
      on-link destinations.

      Neighbor Unreachability Detection is part of the base
      significantly improving the robustness of packet delivery in the
      presence of failing routers, partially failing or partitioned
      links and nodes that change their link-layer addresses.  For
      instance, mobile nodes can move off-link without losing any
      connectivity due to stale ARP caches.




Narten, et. al.             Standards Track                    [Page 14]

RFC 2461              Neighbor Discovery for IPv6          December 1998


      Unlike ARP, Neighbor Discovery detects half-link failures (using
      Neighbor Unreachability Detection) and avoids sending traffic to
      neighbors with which two-way connectivity is absent.

      Unlike in IPv4 Router Discovery the Router Advertisement messages
      do not contain a preference field.  The preference field is not
      needed to handle routers of different "stability"; the Neighbor
      Unreachability Detection will detect dead routers and switch to a
      working one.

      The use of link-local addresses to uniquely identify routers (for
      Router Advertisement and Redirect messages) makes it possible for
      hosts to maintain the router associations in the event of the site
      renumbering to use new global prefixes.

      Using the Hop Limit equal to 255 trick Neighbor Discovery is
      immune to off-link senders that accidentally or intentionally send
      ND messages.  In IPv4 off-link senders can send both ICMP
      Redirects and Router Advertisement messages.

      Placing address resolution at the ICMP layer makes the protocol
      more media-independent than ARP and makes it possible to use
      standard IP authentication and security mechanisms as appropriate
      [IPv6-AUTH, IPv6-ESP].

3.2.  Supported Link Types

   Neighbor Discovery supports links with different properties.  In the
   presence of certain properties only a subset of the ND protocol
   mechanisms are fully specified in this document:

     point-to-point - Neighbor Discovery handles such links just like
                      multicast links.  (Multicast can be trivially
                      provided on point to point links, and interfaces
                      can be assigned link-local addresses.)  Neighbor
                      Discovery should be implemented as described in
                      this document.

     multicast      - Neighbor Discovery should be implemented as
                      described in this document.

     non-broadcast multiple access (NBMA)
                    - Redirect, Neighbor Unreachability Detection and
                      next-hop determination should be implemented as
                      described in this document.  Address resolution,
                      and the mechanism for delivering Router
                      Solicitations and Advertisements on NBMA links is
                      not specified in this document.  Note that if



Narten, et. al.             Standards Track                    [Page 15]

RFC 2461              Neighbor Discovery for IPv6          December 1998


                      hosts support manual configuration of a list of
                      default routers, hosts can dynamically acquire the
                      link-layer addresses for their neighbors from
                      Redirect messages.

     shared media   - The Redirect message is modeled after the
                      XRedirect message in [SH-MEDIA] in order to
                      simplify use of the protocol on shared media
                      links.

                      This specification does not address shared media
                      issues that only relate to routers, such as:

                       - How routers exchange reachability information
                         on a shared media link.

                       - How a router determines the link-layer address
                         of a host, which it needs to send redirect
                         messages to the host.

                       - How a router determines that it is the first-
                         hop router for a received packet.

                      The protocol is extensible (through the definition
                      of new options) so that other solutions might be
                      possible in the future.

     variable MTU   - Neighbor Discovery allows routers to specify a MTU
                      for the link, which all nodes then use.  All nodes
                      on a link must use the same MTU (or Maximum
                      Receive Unit) in order for multicast to work
                      properly.  Otherwise when multicasting a sender,
                      which can not know which nodes will receive the
                      packet, could not determine a minimum packet size
                      all receivers can process.

     asymmetric reachability
                    - Neighbor Discovery detects the absence of
                      symmetric reachability; a node avoids paths to a
                      neighbor with which it does not have symmetric
                      connectivity.

                      The Neighbor Unreachability Detection will
                      typically identify such half-links and the node
                      will refrain from using them.

                      The protocol can presumably be extended in the
                      future to find viable paths in environments that



Narten, et. al.             Standards Track                    [Page 16]

RFC 2461              Neighbor Discovery for IPv6          December 1998


                      lack reflexive and transitive connectivity.

4.  MESSAGE FORMATS

4.1.  Router Solicitation Message Format

   Hosts send Router Solicitations in order to prompt routers to
   generate Router Advertisements quickly.

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Type      |     Code      |          Checksum             |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                            Reserved                           |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |   Options ...
     +-+-+-+-+-+-+-+-+-+-+-+-

   IP Fields:

      Source Address
                     An IP address assigned to the sending interface, or
                     the unspecified address if no address is assigned
                     to the sending interface.

      Destination Address
                     Typically the all-routers multicast address.

      Hop Limit      255

      Authentication Header
                     If a Security Association for the IP Authentication
                     Header exists between the sender and the
                     destination address, then the sender SHOULD include
                     this header.

   ICMP Fields:

      Type           133

      Code           0

      Checksum       The ICMP checksum.  See [ICMPv6].

      Reserved       This field is unused.  It MUST be initialized to
                     zero by the sender and MUST be ignored by the
                     receiver.



Narten, et. al.             Standards Track                    [Page 17]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   Valid Options:

      Source link-layer address
                     The link-layer address of the sender, if known.
                     MUST NOT be included if the Source Address is the
                     unspecified address.  Otherwise it SHOULD be
                     included on link layers that have addresses.

      Future versions of this protocol may define new option types.
      Receivers MUST silently ignore any options they do not recognize
      and continue processing the message.

4.2.  Router Advertisement Message Format

   Routers send out Router Advertisement message periodically, or in
   response to a Router Solicitation.

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Type      |     Code      |          Checksum             |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Cur Hop Limit |M|O|  Reserved |       Router Lifetime         |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                         Reachable Time                        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                          Retrans Timer                        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |   Options ...
     +-+-+-+-+-+-+-+-+-+-+-+-

   IP Fields:

      Source Address
                     MUST be the link-local address assigned to the
                     interface from which this message is sent.

      Destination Address
                     Typically the Source Address of an invoking Router
                     Solicitation or the all-nodes multicast address.

      Hop Limit      255

      Authentication Header
                     If a Security Association for the IP Authentication
                     Header exists between the sender and the
                     destination address, then the sender SHOULD include
                     this header.



Narten, et. al.             Standards Track                    [Page 18]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   ICMP Fields:

      Type           134

      Code           0

      Checksum       The ICMP checksum.  See [ICMPv6].

      Cur Hop Limit  8-bit unsigned integer.  The default value that
                     should be placed in the Hop Count field of the IP
                     header for outgoing IP packets.  A value of zero
                     means unspecified (by this router).

      M              1-bit "Managed address configuration" flag.  When
                     set, hosts use the administered (stateful) protocol
                     for address autoconfiguration in addition to any
                     addresses autoconfigured using stateless address
                     autoconfiguration.  The use of this flag is
                     described in [ADDRCONF].

      O              1-bit "Other stateful configuration" flag.  When
                     set, hosts use the administered (stateful) protocol
                     for autoconfiguration of other (non-address)
                     information.  The use of this flag is described in
                     [ADDRCONF].

      Reserved       A 6-bit unused field.  It MUST be initialized to
                     zero by the sender and MUST be ignored by the
                     receiver.

      Router Lifetime
                     16-bit unsigned integer.  The lifetime associated
                     with the default router in units of seconds.  The
                     maximum value corresponds to 18.2 hours.  A
                     Lifetime of 0 indicates that the router is not a
                     default router and SHOULD NOT appear on the default
                     router list.  The Router Lifetime applies only to
                     the router's usefulness as a default router; it
                     does not apply to information contained in other
                     message fields or options.  Options that need time
                     limits for their information include their own
                     lifetime fields.

      Reachable Time 32-bit unsigned integer.  The time, in
                     milliseconds, that a node assumes a neighbor is
                     reachable after having received a reachability
                     confirmation.  Used by the Neighbor Unreachability
                     Detection algorithm (see Section 7.3).  A value of



Narten, et. al.             Standards Track                    [Page 19]

RFC 2461              Neighbor Discovery for IPv6          December 1998


                     zero means unspecified (by this router).

      Retrans Timer  32-bit unsigned integer.  The time, in
                     milliseconds, between retransmitted Neighbor
                     Solicitation messages.  Used by address resolution
                     and the Neighbor Unreachability Detection algorithm
                     (see Sections 7.2 and 7.3).  A value of zero means
                     unspecified (by this router).

   Possible options:

      Source link-layer address
                     The link-layer address of the interface from which
                     the Router Advertisement is sent.  Only used on
                     link layers that have addresses.  A router MAY omit
                     this option in order to enable inbound load sharing
                     across multiple link-layer addresses.

      MTU            SHOULD be sent on links that have a variable MTU
                     (as specified in the document that describes how to
                     run IP over the particular link type).  MAY be sent
                     on other links.

      Prefix Information
                     These options specify the prefixes that are on-link
                     and/or are used for address autoconfiguration.  A
                     router SHOULD include all its on-link prefixes
                     (except the link-local prefix) so that multihomed
                     hosts have complete prefix information about on-
                     link destinations for the links to which they
                     attach.  If complete information is lacking, a
                     multihomed host may not be able to choose the
                     correct outgoing interface when sending traffic to
                     its neighbors.

      Future versions of this protocol may define new option types.
      Receivers MUST silently ignore any options they do not recognize
      and continue processing the message.













Narten, et. al.             Standards Track                    [Page 20]

RFC 2461              Neighbor Discovery for IPv6          December 1998


4.3.  Neighbor Solicitation Message Format

   Nodes send Neighbor Solicitations to request the link-layer address
   of a target node while also providing their own link-layer address to
   the target.  Neighbor Solicitations are multicast when the node needs
   to resolve an address and unicast when the node seeks to verify the
   reachability of a neighbor.

         0                   1                   2                   3
         0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        |     Type      |     Code      |          Checksum             |
        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        |                           Reserved                            |
        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        |                                                               |
        +                                                               +
        |                                                               |
        +                       Target Address                          +
        |                                                               |
        +                                                               +
        |                                                               |
        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        |   Options ...
        +-+-+-+-+-+-+-+-+-+-+-+-

   IP Fields:

      Source Address
                     Either an address assigned to the interface from
                     which this message is sent or (if Duplicate Address
                     Detection is in progress [ADDRCONF]) the
                     unspecified address.

      Destination Address
                     Either the solicited-node multicast address
                     corresponding to the target address, or the target
                     address.

      Hop Limit      255

      Authentication Header
                     If a Security Association for the IP Authentication
                     Header exists between the sender and the
                     destination address, then the sender SHOULD include
                     this header.





Narten, et. al.             Standards Track                    [Page 21]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   ICMP Fields:

      Type           135

      Code           0

      Checksum       The ICMP checksum.  See [ICMPv6].

      Reserved       This field is unused.  It MUST be initialized to
                     zero by the sender and MUST be ignored by the
                     receiver.

      Target Address
                     The IP address of the target of the solicitation.
                     It MUST NOT be a multicast address.

   Possible options:

      Source link-layer address
                     The link-layer address for the sender.  MUST NOT be
                     included when the source IP address is the
                     unspecified address.  Otherwise, on link layers
                     that have addresses this option MUST be included in
                     multicast solicitations and SHOULD be included in
                     unicast solicitations.

      Future versions of this protocol may define new option types.
      Receivers MUST silently ignore any options they do not recognize
      and continue processing the message.






















Narten, et. al.             Standards Track                    [Page 22]

RFC 2461              Neighbor Discovery for IPv6          December 1998


4.4.  Neighbor Advertisement Message Format

   A node sends Neighbor Advertisements in response to Neighbor
   Solicitations and sends unsolicited Neighbor Advertisements in order
   to (unreliably) propagate new information quickly.

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |     Code      |          Checksum             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |R|S|O|                     Reserved                            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                                                               +
      |                                                               |
      +                       Target Address                          +
      |                                                               |
      +                                                               +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Options ...
      +-+-+-+-+-+-+-+-+-+-+-+-

   IP Fields:

      Source Address
                     An address assigned to the interface from which the
                     advertisement is sent.

      Destination Address
                     For solicited advertisements, the Source Address of
                     an invoking Neighbor Solicitation or, if the
                     solicitation's Source Address is the unspecified
                     address, the all-nodes multicast address.

                     For unsolicited advertisements typically the all-
                     nodes multicast address.

      Hop Limit      255

   Authentication Header
                     If a Security Association for the IP Authentication
                     Header exists between the sender and the
                     destination address, then the sender SHOULD include
                     this header.





Narten, et. al.             Standards Track                    [Page 23]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   ICMP Fields:

      Type           136

      Code           0

      Checksum       The ICMP checksum.  See [ICMPv6].

      R              Router flag.  When set, the R-bit indicates that
                     the sender is a router.  The R-bit is used by
                     Neighbor Unreachability Detection to detect a
                     router that changes to a host.

      S              Solicited flag.  When set, the S-bit indicates that
                     the advertisement was sent in response to a
                     Neighbor Solicitation from the Destination address.
                     The S-bit is used as a reachability confirmation
                     for Neighbor Unreachability Detection.  It MUST NOT
                     be set in multicast advertisements or in
                     unsolicited unicast advertisements.

      O              Override flag.  When set, the O-bit indicates that
                     the advertisement should override an existing cache
                     entry and update the cached link-layer address.
                     When it is not set the advertisement will not
                     update a cached link-layer address though it will
                     update an existing Neighbor Cache entry for which
                     no link-layer address is known.  It SHOULD NOT be
                     set in solicited advertisements for anycast
                     addresses and in solicited proxy advertisements.
                     It SHOULD be set in other solicited advertisements
                     and in unsolicited advertisements.

      Reserved       29-bit unused field.  It MUST be initialized to
                     zero by the sender and MUST be ignored by the
                     receiver.

      Target Address
                     For solicited advertisements, the Target Address
                     field in the Neighbor Solicitation message that
                     prompted this advertisement.  For an unsolicited
                     advertisement, the address whose link-layer address
                     has changed.  The Target Address MUST NOT be a
                     multicast address.







Narten, et. al.             Standards Track                    [Page 24]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   Possible options:

      Target link-layer address
                     The link-layer address for the target, i.e., the
                     sender of the advertisement.  This option MUST be
                     included on link layers that have addresses when
                     responding to multicast solicitations.  When
                     responding to a unicast Neighbor Solicitation this
                     option SHOULD be included.

                     The option MUST be included for multicast
                     solicitations in order to avoid infinite Neighbor
                     Solicitation "recursion" when the peer node does
                     not have a cache entry to return a Neighbor
                     Advertisements message.  When responding to unicast
                     solicitations, the option can be omitted since the
                     sender of the solicitation has the correct link-
                     layer address; otherwise it would not have be able
                     to send the unicast solicitation in the first
                     place. However, including the link-layer address in
                     this case adds little overhead and eliminates a
                     potential race condition where the sender deletes
                     the cached link-layer address prior to receiving a
                     response to a previous solicitation.

      Future versions of this protocol may define new option types.
      Receivers MUST silently ignore any options they do not recognize
      and continue processing the message.























Narten, et. al.             Standards Track                    [Page 25]

RFC 2461              Neighbor Discovery for IPv6          December 1998


4.5.  Redirect Message Format

   Routers send Redirect packets to inform a host of a better first-hop
   node on the path to a destination.  Hosts can be redirected to a
   better first-hop router but can also be informed by a redirect that
   the destination is in fact a neighbor.  The latter is accomplished by
   setting the ICMP Target Address equal to the ICMP Destination
   Address.

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |     Code      |          Checksum             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           Reserved                            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                                                               +
      |                                                               |
      +                       Target Address                          +
      |                                                               |
      +                                                               +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                                                               +
      |                                                               |
      +                     Destination Address                       +
      |                                                               |
      +                                                               +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Options ...
      +-+-+-+-+-+-+-+-+-+-+-+-

   IP Fields:

      Source Address
                     MUST be the link-local address assigned to the
                     interface from which this message is sent.

      Destination Address
                     The Source Address of the packet that triggered the
                     redirect.

      Hop Limit      255





Narten, et. al.             Standards Track                    [Page 26]

RFC 2461              Neighbor Discovery for IPv6          December 1998


      Authentication Header
                     If a Security Association for the IP Authentication
                     Header exists between the sender and the
                     destination address, then the sender SHOULD include
                     this header.

   ICMP Fields:

      Type           137

      Code           0

      Checksum       The ICMP checksum.  See [ICMPv6].

      Reserved       This field is unused.  It MUST be initialized to
                     zero by the sender and MUST be ignored by the
                     receiver.

      Target Address An IP address that is a better first hop to use for
                     the ICMP Destination Address.  When the target is
                     the actual endpoint of communication, i.e., the
                     destination is a neighbor, the Target Address field
                     MUST contain the same value as the ICMP Destination
                     Address field.  Otherwise the target is a better
                     first-hop router and the Target Address MUST be the
                     router's link-local address so that hosts can
                     uniquely identify routers.

      Destination Address
                     The IP address of the destination which is
                     redirected to the target.

   Possible options:

      Target link-layer address
                     The link-layer address for the target.  It SHOULD
                     be included (if known).  Note that on NBMA links,
                     hosts may rely on the presence of the Target Link-
                     Layer Address option in Redirect messages as the
                     means for determining the link-layer addresses of
                     neighbors.  In such cases, the option MUST be
                     included in Redirect messages.

      Redirected Header
                     As much as possible of the IP packet that triggered
                     the sending of the Redirect without making the
                     redirect packet exceed 1280 octets.




Narten, et. al.             Standards Track                    [Page 27]

RFC 2461              Neighbor Discovery for IPv6          December 1998


4.6.  Option Formats

   Neighbor Discovery messages include zero or more options, some of
   which may appear multiple times in the same message.  All options are
   of the form:

        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |     Type      |    Length     |              ...              |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       ~                              ...                              ~
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Fields:

      Type           8-bit identifier of the type of option.  The
                     options defined in this document are:

                           Option Name                             Type

                        Source Link-Layer Address                    1
                        Target Link-Layer Address                    2
                        Prefix Information                           3
                        Redirected Header                            4
                        MTU                                          5


      Length         8-bit unsigned integer.  The length of the option
                     (including the type and length fields) in units of
                     8 octets.  The value 0 is invalid.  Nodes MUST
                     silently discard an ND packet that contains an
                     option with length zero.

4.6.1.  Source/Target Link-layer Address

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Type      |    Length     |    Link-Layer Address ...
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Fields:

      Type
                     1 for Source Link-layer Address
                     2 for Target Link-layer Address




Narten, et. al.             Standards Track                    [Page 28]

RFC 2461              Neighbor Discovery for IPv6          December 1998


      Length         The length of the option (including the type and
                     length fields) in units of 8 octets.  For example,
                     the length for IEEE 802 addresses is 1 [IPv6-
                     ETHER].

      Link-Layer Address
                     The variable length link-layer address.

                     The content and format of this field (including
                     byte and bit ordering) is expected to be specified
                     in specific documents that describe how IPv6
                     operates over different link layers.  For instance,
                     [IPv6-ETHER].

   Description
                     The Source Link-Layer Address option contains the
                     link-layer address of the sender of the packet.  It
                     is used in the Neighbor Solicitation, Router
                     Solicitation, and Router Advertisement packets.

                     The Target Link-Layer Address option contains the
                     link-layer address of the target.  It is used in
                     Neighbor Advertisement and Redirect packets.

                     These options MUST be silently ignored for other
                     Neighbor Discovery messages.

4.6.2.  Prefix Information

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |    Length     | Prefix Length |L|A| Reserved1 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Valid Lifetime                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                       Preferred Lifetime                      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           Reserved2                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                                                               +
      |                                                               |
      +                            Prefix                             +
      |                                                               |
      +                                                               +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Narten, et. al.             Standards Track                    [Page 29]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   Fields:

      Type           3

      Length         4

      Prefix Length  8-bit unsigned integer.  The number of leading bits
                     in the Prefix that are valid.  The value ranges
                     from 0 to 128.

      L              1-bit on-link flag.  When set, indicates that this
                     prefix can be used for on-link determination.  When
                     not set the advertisement makes no statement about
                     on-link or off-link properties of the prefix.  For
                     instance, the prefix might be used for address
                     configuration with some of the addresses belonging
                     to the prefix being on-link and others being off-
                     link.

      A              1-bit autonomous address-configuration flag.  When
                     set indicates that this prefix can be used for
                     autonomous address configuration as specified in
                     [ADDRCONF].

      Reserved1      6-bit unused field.  It MUST be initialized to zero
                     by the sender and MUST be ignored by the receiver.

      Valid Lifetime
                     32-bit unsigned integer.  The length of time in
                     seconds (relative to the time the packet is sent)
                     that the prefix is valid for the purpose of on-link
                     determination.  A value of all one bits
                     (0xffffffff) represents infinity.  The Valid
                     Lifetime is also used by [ADDRCONF].

      Preferred Lifetime
                     32-bit unsigned integer.  The length of time in
                     seconds (relative to the time the packet is sent)
                     that addresses generated from the prefix via
                     stateless address autoconfiguration remain
                     preferred [ADDRCONF].  A value of all one bits
                     (0xffffffff) represents infinity.  See [ADDRCONF].

      Reserved2      This field is unused.  It MUST be initialized to
                     zero by the sender and MUST be ignored by the
                     receiver.





Narten, et. al.             Standards Track                    [Page 30]

RFC 2461              Neighbor Discovery for IPv6          December 1998


      Prefix         An IP address or a prefix of an IP address.  The
                     Prefix Length field contains the number of valid
                     leading bits in the prefix.  The bits in the prefix
                     after the prefix length are reserved and MUST be
                     initialized to zero by the sender and ignored by
                     the receiver.  A router SHOULD NOT send a prefix
                     option for the link-local prefix and a host SHOULD
                     ignore such a prefix option.

   Description
                     The Prefix Information option provide hosts with
                     on-link prefixes and prefixes for Address
                     Autoconfiguration.

                     The Prefix Information option appears in Router
                     Advertisement packets and MUST be silently ignored
                     for other messages.

4.6.3.  Redirected Header

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |    Length     |            Reserved           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           Reserved                            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      ~                       IP header + data                        ~
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Fields:

      Type           4

      Length         The length of the option in units of 8 octets.

      Reserved       These fields are unused.  They MUST be initialized
                     to zero by the sender and MUST be ignored by the
                     receiver.

      IP header + data
                     The original packet truncated to ensure that the
                     size of the redirect message does not exceed 1280
                     octets.





Narten, et. al.             Standards Track                    [Page 31]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   Description
                     The Redirected Header option is used in Redirect
                     messages and contains all or part of the packet
                     that is being redirected.

                     This option MUST be silently ignored for other
                     Neighbor Discovery messages.

4.6.4.  MTU

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |    Length     |           Reserved            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              MTU                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Fields:

      Type           5

      Length         1

      Reserved       This field is unused.  It MUST be initialized to
                     zero by the sender and MUST be ignored by the
                     receiver.

      MTU            32-bit unsigned integer.  The recommended MTU for
                     the link.

   Description
                     The MTU option is used in  Router Advertisement
                     messages to insure that all nodes on a link use the
                     same MTU value in those cases where the link MTU is
                     not well known.

                     This option MUST be silently ignored for other
                     Neighbor Discovery messages.

                     In configurations in which heterogeneous
                     technologies are bridged together, the maximum
                     supported MTU may differ from one segment to
                     another.  If the bridges do not generate ICMP
                     Packet Too Big messages, communicating nodes will
                     be unable to use Path MTU to dynamically determine
                     the appropriate MTU on a per-neighbor basis.  In
                     such cases, routers use the MTU option to specify



Narten, et. al.             Standards Track                    [Page 32]

RFC 2461              Neighbor Discovery for IPv6          December 1998


                     the maximum MTU value that is supported by all
                     segments.

5.  CONCEPTUAL MODEL OF A HOST

   This section describes a conceptual model of one possible data
   structure organization that hosts (and to some extent routers) will
   maintain in interacting with neighboring nodes.  The described
   organization is provided to facilitate the explanation of how the
   Neighbor Discovery protocol should behave.  This document does not
   mandate that implementations adhere to this model as long as their
   external behavior is consistent with that described in this document.

   This model is only concerned with the aspects of host behavior
   directly related to Neighbor Discovery.  In particular, it does not
   concern itself with such issues as source address selection or the
   selecting of an outgoing interface on a multihomed host.

5.1.  Conceptual Data Structures

   Hosts will need to maintain the following pieces of information for
   each interface:

      Neighbor Cache
                   - A set of entries about individual neighbors to
                     which traffic has been sent recently.  Entries are
                     keyed on the neighbor's on-link unicast IP address
                     and contain such information as its link-layer
                     address, a flag indicating whether the neighbor is
                     a router or a host (called IsRouter in this
                     document), a pointer to any queued packets waiting
                     for address resolution to complete, etc.

                     A Neighbor Cache entry also contains information
                     used by the Neighbor Unreachability Detection
                     algorithm, including the reachability state, the
                     number of unanswered probes, and the time the next
                     Neighbor Unreachability Detection event is
                     scheduled to take place.

      Destination Cache
                   - A set of entries about destinations to which
                     traffic has been sent recently.  The Destination
                     Cache includes both on-link and off-link
                     destinations and provides a level of indirection
                     into the Neighbor Cache; the Destination Cache maps
                     a destination IP address to the IP address of the
                     next-hop neighbor.  This cache is updated with



Narten, et. al.             Standards Track                    [Page 33]

RFC 2461              Neighbor Discovery for IPv6          December 1998


                     information learned from Redirect messages.
                     Implementations may find it convenient to store
                     additional information not directly related to
                     Neighbor Discovery in Destination Cache entries,
                     such as the Path MTU (PMTU) and round trip timers
                     maintained by transport protocols.

      Prefix List  - A list of the prefixes that define a set of
                     addresses that are on-link.  Prefix List entries
                     are created from information received in Router
                     Advertisements.  Each entry has an associated
                     invalidation timer value (extracted from the
                     advertisement) used to expire prefixes when they
                     become invalid.  A special "infinity" timer value
                     specifies that a prefix remains valid forever,
                     unless a new (finite) value is received in a
                     subsequent advertisement.

                     The link-local prefix is considered to be on the
                     prefix list with an infinite invalidation timer
                     regardless of whether routers are advertising a
                     prefix for it.  Received Router Advertisements
                     SHOULD NOT modify the invalidation timer for the
                     link-local prefix.

      Default Router List
                   - A list of routers to which packets may be sent.
                     Router list entries point to entries in the
                     Neighbor Cache; the algorithm for selecting a
                     default router favors routers known to be reachable
                     over those whose reachability is suspect.  Each
                     entry also has an associated invalidation timer
                     value (extracted from Router Advertisements) used
                     to delete entries that are no longer advertised.

   Note that the above conceptual data structures can be implemented
   using a variety of techniques.  One possible implementation is to use
   a single longest-match routing table for all of the above data
   structures.  Regardless of the specific implementation, it is
   critical that the Neighbor Cache entry for a router is shared by all
   Destination Cache entries using that router in order to prevent
   redundant Neighbor Unreachability Detection probes.

   Note also that other protocols (e.g., IPv6 Mobility) might add
   additional conceptual data structures.  An implementation is at
   liberty to implement such data structures in any way it pleases.  For
   example, an implementation could merge all conceptual data structures
   into a single routing table.



Narten, et. al.             Standards Track                    [Page 34]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   The Neighbor Cache contains information maintained by the Neighbor
   Unreachability Detection algorithm.  A key piece of information is a
   neighbor's reachability state, which is one of five possible values.
   The following definitions are informal; precise definitions can be
   found in Section 7.3.2.

      INCOMPLETE  Address resolution is in progress and the link-layer
                  address of the neighbor has not yet been determined.

      REACHABLE   Roughly speaking, the neighbor is known to have been
                  reachable recently (within tens of seconds ago).

      STALE       The neighbor is no longer known to be reachable but
                  until traffic is sent to the neighbor, no attempt
                  should be made to verify its reachability.

      DELAY       The neighbor is no longer known to be reachable, and
                  traffic has recently been sent to the neighbor.
                  Rather than probe the neighbor immediately, however,
                  delay sending probes for a short while in order to
                  give upper layer protocols a chance to provide
                  reachability confirmation.

      PROBE       The neighbor is no longer known to be reachable, and
                  unicast Neighbor Solicitation probes are being sent to
                  verify reachability.

5.2.  Conceptual Sending Algorithm

   When sending a packet to a destination, a node uses a combination of
   the Destination Cache, the Prefix List, and the Default Router List
   to determine the IP address of the appropriate next hop, an operation
   known as "next-hop determination".  Once the IP address of the next
   hop is known, the Neighbor Cache is consulted for link-layer
   information about that neighbor.

   Next-hop determination for a given unicast destination operates as
   follows.  The sender performs a longest prefix match against the
   Prefix List to determine whether the packet's destination is on- or
   off-link.  If the destination is on-link, the next-hop address is the
   same as the packet's destination address.  Otherwise, the sender
   selects a router from the Default Router List (following the rules
   described in Section 6.3.6).  If the Default Router List is empty,
   the sender assumes that the destination is on-link.

   For efficiency reasons, next-hop determination is not performed on
   every packet that is sent.  Instead, the results of next-hop
   determination computations are saved in the Destination Cache (which



Narten, et. al.             Standards Track                    [Page 35]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   also contains updates learned from Redirect messages).  When the
   sending node has a packet to send, it first examines the Destination
   Cache.  If no entry exists for the destination, next-hop
   determination is invoked to create a Destination Cache entry.

   Once the IP address of the next-hop node is known, the sender
   examines the Neighbor Cache for link-layer information about that
   neighbor.  If no entry exists, the sender creates one, sets its state
   to INCOMPLETE, initiates Address Resolution, and then queues the data
   packet pending completion of address resolution.  For multicast-
   capable interfaces Address Resolution consists of sending a Neighbor
   Solicitation message and waiting for a Neighbor Advertisement.  When
   a Neighbor Advertisement response is received, the link-layer
   addresses is entered in the Neighbor Cache entry and the queued
   packet is transmitted.  The address resolution mechanism is described
   in detail in Section 7.2.

   For multicast packets the next-hop is always the (multicast)
   destination address and is considered to be on-link.  The procedure
   for determining the link-layer address corresponding to a given IP
   multicast address can be found in a separate document that covers
   operating IP over a particular link type (e.g., [IPv6-ETHER]).

   Each time a Neighbor Cache entry is accessed while transmitting a
   unicast packet, the sender checks Neighbor Unreachability Detection
   related information according to the Neighbor Unreachability
   Detection algorithm (Section 7.3).  This unreachability check might
   result in the sender transmitting a unicast Neighbor Solicitation to
   verify that the neighbor is still reachable.

   Next-hop determination is done the first time traffic is sent to a
   destination.  As long as subsequent communication to that destination
   proceeds successfully, the Destination Cache entry continues to be
   used.  If at some point communication ceases to proceed, as
   determined by the Neighbor Unreachability Detection algorithm, next-
   hop determination may need to be performed again.  For example,
   traffic through a failed router should be switched to a working
   router.  Likewise, it may be possible to reroute traffic destined for
   a mobile node to a "mobility agent".

   Note that when a node redoes next-hop determination there is no need
   to discard the complete Destination Cache entry.  In fact, it is
   generally beneficial to retain such cached information as the PMTU
   and round trip timer values that may also be kept in the Destination
   Cache entry.






Narten, et. al.             Standards Track                    [Page 36]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   Routers and multihomed hosts have multiple interfaces.  The remainder
   of this document assumes that all sent and received Neighbor
   Discovery messages refer to the interface of appropriate context.
   For example, when responding to a Router Solicitation, the
   corresponding Router Advertisement is sent out the interface on which
   the solicitation was received.

5.3.  Garbage Collection and Timeout Requirements

   The conceptual data structures described above use different
   mechanisms for discarding potentially stale or unused information.

   From the perspective of correctness there is no need to periodically
   purge Destination and Neighbor Cache entries.  Although stale
   information can potentially remain in the cache indefinitely, the
   Neighbor Unreachability Detection algorithm ensures that stale
   information is purged quickly if it is actually being used.

   To limit the storage needed for the Destination and Neighbor Caches,
   a node may need to garbage-collect old entries.  However, care must
   be taken to insure that sufficient space is always present to hold
   the working set of active entries.  A small cache may result in an
   excessive number of Neighbor Discovery messages if entries are
   discarded and rebuilt in quick succession.  Any LRU-based policy that
   only reclaims entries that have not been used in some time (e.g., ten
   minutes or more) should be adequate for garbage-collecting unused
   entries.

   A node should retain entries in the Default Router List and the
   Prefix List until their lifetimes expire.  However, a node may
   garbage collect entries prematurely if it is low on memory.  If not
   all routers are kept on the Default Router list, a node should retain
   at least two entries in the Default Router List (and preferably more)
   in order to maintain robust connectivity for off-link destinations.

   When removing an entry from the Prefix List there is no need to purge
   any entries from the Destination or Neighbor Caches.  Neighbor
   Unreachability Detection will efficiently purge any entries in these
   caches that have become invalid.  When removing an entry from the
   Default Router List, however, any entries in the Destination Cache
   that go through that router must perform next-hop determination again
   to select a new default router.

6.  ROUTER AND PREFIX DISCOVERY

   This section describes router and host behavior related to the Router
   Discovery portion of Neighbor Discovery.  Router Discovery is used to
   locate neighboring routers as well as learn prefixes and



Narten, et. al.             Standards Track                    [Page 37]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   configuration parameters related to address autoconfiguration.

   Prefix Discovery is the process through which hosts learn the ranges
   of IP addresses that reside on-link and can be reached directly
   without going through a router.  Routers send Router Advertisements
   that indicate whether the sender is willing to be a default router.
   Router Advertisements also contain Prefix Information options that
   list the set of prefixes that identify on-link IP addresses.

   Stateless Address Autoconfiguration must also obtain subnet prefixes
   as part of configuring addresses.  Although the prefixes used for
   address autoconfiguration are logically distinct from those used for
   on-link determination, autoconfiguration information is piggybacked
   on Router Discovery messages to reduce network traffic.  Indeed, the
   same prefixes can be advertised for on-link determination and address
   autoconfiguration by specifying the appropriate flags in the Prefix
   Information options.  See [ADDRCONF] for details on how
   autoconfiguration information is processed.

6.1.  Message Validation

6.1.1.  Validation of Router Solicitation Messages

   Hosts MUST silently discard any received Router Solicitation
   Messages.

   A router MUST silently discard any received Router Solicitation
   messages that do not satisfy all of the following validity checks:

      - The IP Hop Limit field has a value of 255, i.e., the packet
        could not possibly have been forwarded by a router.

      - If the message includes an IP Authentication Header, the message
        authenticates correctly.

      - ICMP Checksum is valid.

      - ICMP Code is 0.

      - ICMP length (derived from the IP length) is 8 or more octets.

      - All included options have a length that is greater than zero.

      - If the IP source address is the unspecified address, there is no
        source link-layer address option in the message.






Narten, et. al.             Standards Track                    [Page 38]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   The contents of the Reserved field, and of any unrecognized options,
   MUST be ignored.  Future, backward-compatible changes to the protocol
   may specify the contents of the Reserved field or add new options;
   backward-incompatible changes may use different Code values.

   The contents of any defined options that are not specified to be used
   with Router Solicitation messages MUST be ignored and the packet
   processed as normal.  The only defined option that may appear is the
   Source Link-Layer Address option.

   A solicitation that passes the validity checks is called a "valid
   solicitation".

6.1.2.  Validation of Router Advertisement Messages

   A node MUST silently discard any received Router Advertisement
   messages that do not satisfy all of the following validity checks:

      - IP Source Address is a link-local address.  Routers must use
        their link-local address as the source for Router Advertisement
        and Redirect messages so that hosts can uniquely identify
        routers.

      - The IP Hop Limit field has a value of 255, i.e., the packet
        could not possibly have been forwarded by a router.

      - If the message includes an IP Authentication Header, the message
        authenticates correctly.

      - ICMP Checksum is valid.

      - ICMP Code is 0.

      - ICMP length (derived from the IP length) is 16 or more octets.

      - All included options have a length that is greater than zero.

   The contents of the Reserved field, and of any unrecognized options,
   MUST be ignored.  Future, backward-compatible changes to the protocol
   may specify the contents of the Reserved field or add new options;
   backward-incompatible changes may use different Code values.

   The contents of any defined options that are not specified to be used
   with Router Advertisement messages MUST be ignored and the packet
   processed as normal.  The only defined options that may appear are
   the Source Link-Layer Address, Prefix Information and MTU options.





Narten, et. al.             Standards Track                    [Page 39]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   An advertisement that passes the validity checks is called a "valid
   advertisement".

6.2.  Router Specification

6.2.1.  Router Configuration Variables

   A router MUST allow for the following conceptual variables to be
   configured by system management.  The specific variable names are
   used for demonstration purposes only, and an implementation is not
   required to have them, so long as its external behavior is consistent
   with that described in this document.  Default values are specified
   to simplify configuration in common cases.

   The default values for some of the variables listed below may be
   overridden by specific documents that describe how IPv6 operates over
   different link layers.  This rule simplifies the configuration of
   Neighbor Discovery over link types with widely differing performance
   characteristics.

   For each multicast interface:

      AdvSendAdvertisements
                     A flag indicating whether or not the router sends
                     periodic Router Advertisements and responds to
                     Router Solicitations.

                     Default: FALSE

                     Note that AdvSendAdvertisements MUST be FALSE by
                     default so that a node will not accidentally start
                     acting as a router unless it is explicitly
                     configured by system management to send Router
                     Advertisements.

      MaxRtrAdvInterval
                     The maximum time allowed between sending
                     unsolicited multicast Router Advertisements from
                     the interface, in seconds.  MUST be no less than 4
                     seconds and no greater than 1800 seconds.

                     Default: 600 seconds

      MinRtrAdvInterval
                     The minimum time allowed between sending
                     unsolicited multicast Router Advertisements from
                     the interface, in seconds.  MUST be no less than 3
                     seconds and no greater than .75 *



Narten, et. al.             Standards Track                    [Page 40]

RFC 2461              Neighbor Discovery for IPv6          December 1998


                     MaxRtrAdvInterval.

                     Default: 0.33 * MaxRtrAdvInterval

      AdvManagedFlag
                     The TRUE/FALSE value to be placed in the "Managed
                     address configuration" flag field in the Router
                     Advertisement.  See [ADDRCONF].

                     Default: FALSE

      AdvOtherConfigFlag
                     The TRUE/FALSE value to be placed in the "Other
                     stateful configuration" flag field in the Router
                     Advertisement.  See [ADDRCONF].

                     Default: FALSE

      AdvLinkMTU     The value to be placed in MTU options sent by the
                     router.  A value of zero indicates that no MTU
                     options are sent.

                     Default: 0

      AdvReachableTime
                     The value to be placed in the Reachable Time field
                     in the Router Advertisement messages sent by the
                     router.  The value zero means unspecified (by this
                     router).  MUST be no greater than 3,600,000
                     milliseconds (1 hour).

                     Default: 0

      AdvRetransTimer The value to be placed in the Retrans Timer field
                     in the Router Advertisement messages sent by the
                     router.  The value zero means unspecified (by this
                     router).

                     Default: 0

      AdvCurHopLimit
                     The default value to be placed in the Cur Hop Limit
                     field in the Router Advertisement messages sent by
                     the router.  The value should be set to that
                     current diameter of the Internet.  The value zero
                     means unspecified (by this router).





Narten, et. al.             Standards Track                    [Page 41]

RFC 2461              Neighbor Discovery for IPv6          December 1998


                     Default:  The value specified in the "Assigned
                     Numbers" RFC [ASSIGNED] that was in effect at the
                     time of implementation.

      AdvDefaultLifetime
                     The value to be placed in the Router Lifetime field
                     of Router Advertisements sent from the interface,
                     in seconds.  MUST be either zero or between
                     MaxRtrAdvInterval and 9000 seconds.  A value of
                     zero indicates that the router is not to be used as
                     a default router.

                     Default: 3 * MaxRtrAdvInterval

      AdvPrefixList
                     A list of prefixes to be placed in Prefix
                     Information options in Router Advertisement
                     messages sent from the interface.

                     Default: all prefixes that the router advertises
                     via routing protocols as being on-link for the
                     interface from which the advertisement is sent.
                     The link-local prefix SHOULD NOT be included in the
                     list of advertised prefixes.

                     Each prefix has an associated:

                        AdvValidLifetime
                             The value to be placed in the Valid
                             Lifetime in the Prefix Information
                             option, in seconds.  The designated value
                             of all 1's (0xffffffff) represents
                             infinity.  Implementations MUST allow
                             AdvValidLifetime to be specified in two
                             ways:

                               - a time that decrements in real time,
                                 that is, one that will result in a
                                 Lifetime of zero at the specified
                                 time in the future, or

                               - a fixed time that stays the same in
                                 consecutive advertisements.

                             Default: 2592000 seconds (30 days), fixed
                             (i.e., stays the same in consecutive
                             advertisements).




Narten, et. al.             Standards Track                    [Page 42]

RFC 2461              Neighbor Discovery for IPv6          December 1998


                        AdvOnLinkFlag
                             The value to be placed in the on-link
                             flag ("L-bit") field in the Prefix
                             Information option.

                             Default: TRUE

                   Automatic address configuration [ADDRCONF]
                   defines additional information associated with
                   each the prefixes:

                        AdvPreferredLifetime
                             The value to be placed in the Preferred
                             Lifetime in the Prefix Information
                             option, in seconds.  The designated value
                             of all 1's (0xffffffff) represents
                             infinity.  See [ADDRCONF] for details on
                             how this value is used.  Implementations
                             MUST allow AdvPreferredLifetime to be
                             specified in two ways:

                               - a time that decrements in real time,
                                 that is, one that will result in a
                                 Lifetime of zero at a specified time
                                 in the future, or

                               - a fixed time that stays the same in
                                 consecutive advertisements.

                             Default: 604800 seconds (7 days), fixed
                             (i.e., stays the same in consecutive
                             advertisements).

                        AdvAutonomousFlag
                             The value to be placed in the Autonomous
                             Flag field in the Prefix Information
                             option.  See [ADDRCONF].

                             Default: TRUE

   The above variables contain information that is placed in outgoing
   Router Advertisement messages.  Hosts use the received information to
   initialize a set of analogous variables that control their external
   behavior (see Section 6.3.2).  Some of these host variables (e.g.,
   CurHopLimit, RetransTimer, and ReachableTime) apply to all nodes
   including routers.  In practice, these variables may not actually be
   present on routers, since their contents can be derived from the
   variables described above.  However, external router behavior MUST be



Narten, et. al.             Standards Track                    [Page 43]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   the same as host behavior with respect to these variables.  In
   particular, this includes the occasional randomization of the
   ReachableTime value as described in Section 6.3.2.

   Protocol constants are defined in Section 10.

6.2.2.  Becoming An Advertising Interface

   The term "advertising interface" refers to any functioning and
   enabled multicast interface that has at least one unicast IP address
   assigned to it and whose corresponding AdvSendAdvertisements flag is
   TRUE.  A router MUST NOT send Router Advertisements out any interface
   that is not an advertising interface.

   An interface may become an advertising interface at times other than
   system startup.  For example:

      - changing the AdvSendAdvertisements flag on an enabled interface
        from FALSE to TRUE, or

      - administratively enabling the interface, if it had been
        administratively disabled, and its AdvSendAdvertisements flag is
        TRUE, or

      - enabling IP forwarding capability (i.e., changing the system
        from being a host to being a router), when the interface's
        AdvSendAdvertisements flag is TRUE.

   A router MUST join the all-routers multicast address on an
   advertising interface.  Routers respond to Router Solicitations sent
   to the all-routers address and verify the consistency of Router
   Advertisements sent by neighboring routers.

6.2.3.  Router Advertisement Message Content

   A router sends periodic as well as solicited Router Advertisements
   out its advertising interfaces.  Outgoing Router Advertisements are
   filled with the following values consistent with the message format
   given in Section 4.2:

      - In the Router Lifetime field: the interface's configured
        AdvDefaultLifetime.

      - In the M and O flags: the interface's configured AdvManagedFlag
        and AdvOtherConfigFlag, respectively.  See [ADDRCONF].

      - In the Cur Hop Limit field: the interface's configured
        CurHopLimit.



Narten, et. al.             Standards Track                    [Page 44]

RFC 2461              Neighbor Discovery for IPv6          December 1998


      - In the Reachable Time field: the interface's configured
        AdvReachableTime.

      - In the Retrans Timer field: the interface's configured
        AdvRetransTimer.

      - In the options:

           o Source Link-Layer Address option: link-layer address of the
             sending interface.  This option MAY be omitted to
             facilitate in-bound load balancing over replicated
             interfaces.

           o MTU option: the interface's configured AdvLinkMTU value if
             the value is non-zero.  If AdvLinkMTU is zero the MTU
             option is not sent.

           o Prefix Information options: one Prefix Information option
             for each prefix listed in AdvPrefixList with the option
             fields set from the information in the AdvPrefixList entry
             as follows:

                - In the "on-link" flag: the entry's AdvOnLinkFlag.

                - In the Valid Lifetime field: the entry's
                  AdvValidLifetime.

                - In the "Autonomous address configuration" flag: the
                  entry's AdvAutonomousFlag.

                - In the Preferred Lifetime field: the entry's
                  AdvPreferredLifetime.

   A router might want to send Router Advertisements without advertising
   itself as a default router.  For instance, a router might advertise
   prefixes for address autoconfiguration while not wishing to forward
   packets.  Such a router sets the Router Lifetime field in outgoing
   advertisements to zero.

   A router MAY choose not to include some or all options when sending
   unsolicited Router Advertisements.  For example, if prefix lifetimes
   are much longer than AdvDefaultLifetime, including them every few
   advertisements may be sufficient.  However, when responding to a
   Router Solicitation or while sending the first few initial
   unsolicited advertisements, a router SHOULD include all options so
   that all information (e.g., prefixes) is propagated quickly during
   system initialization.




Narten, et. al.             Standards Track                    [Page 45]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   If including all options causes the size of an advertisement to
   exceed the link MTU, multiple advertisements can be sent, each
   containing a subset of the options.

6.2.4.  Sending Unsolicited Router Advertisements

   A host MUST NOT send Router Advertisement messages at any time.

   Unsolicited Router Advertisements are not strictly periodic: the
   interval between subsequent transmissions is randomized to reduce the
   probability of synchronization with the advertisements from other
   routers on the same link [SYNC].  Each advertising interface has its
   own timer.  Whenever a multicast advertisement is sent from an
   interface, the timer is reset to a uniformly-distributed random value
   between the interface's configured MinRtrAdvInterval and
   MaxRtrAdvInterval; expiration of the timer causes the next
   advertisement to be sent and a new random value to be chosen.

   For the first few advertisements (up to
   MAX_INITIAL_RTR_ADVERTISEMENTS) sent from an interface when it
   becomes an advertising interface, if the randomly chosen interval is
   greater than MAX_INITIAL_RTR_ADVERT_INTERVAL, the timer SHOULD be set
   to MAX_INITIAL_RTR_ADVERT_INTERVAL instead.  Using a smaller interval
   for the initial advertisements increases the likelihood of a router
   being discovered quickly when it first becomes available, in the
   presence of possible packet loss.

   The information contained in Router Advertisements may change through
   actions of system management.  For instance, the lifetime of
   advertised prefixes may change, new prefixes could be added, a router
   could cease to be a router (i.e., switch from being a router to being
   a host), etc.  In such cases, the router MAY transmit up to
   MAX_INITIAL_RTR_ADVERTISEMENTS unsolicited advertisements, using the
   same rules as when an interface becomes an advertising interface.

6.2.5.  Ceasing To Be An Advertising Interface

   An interface may cease to be an advertising interface, through
   actions of system management such as:

      - changing the AdvSendAdvertisements flag of an enabled interface
        from TRUE to FALSE, or

      - administratively disabling the interface, or

      - shutting down the system.





Narten, et. al.             Standards Track                    [Page 46]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   In such cases the router SHOULD transmit one or more (but not more
   than MAX_FINAL_RTR_ADVERTISEMENTS) final multicast Router
   Advertisements on the interface with a Router Lifetime field of zero.
   In the case of a router becoming a host, the system SHOULD also
   depart from the all-routers IP multicast group on all interfaces on
   which the router supports IP multicast (whether or not they had been
   advertising interfaces).  In addition, the host MUST insure that
   subsequent Neighbor Advertisement messages sent from the interface
   have the Router flag set to zero.

   Note that system management may disable a router's IP forwarding
   capability (i.e., changing the system from being a router to being a
   host), a step that does not necessarily imply that the router's
   interfaces stop being advertising interfaces.  In such cases,
   subsequent Router Advertisements MUST set the Router Lifetime field
   to zero.

6.2.6.  Processing Router Solicitations

   A host MUST silently discard any received Router Solicitation
   messages.

   In addition to sending periodic, unsolicited advertisements, a router
   sends advertisements in response to valid solicitations received on
   an advertising interface.  A router MAY choose to unicast the
   response directly to the soliciting host's address (if the
   solicitation's source address is not the unspecified address), but
   the usual case is to multicast the response to the all-nodes group.
   In the latter case, the interface's interval timer is reset to a new
   random value, as if an unsolicited advertisement had just been sent
   (see Section 6.2.4).

   In all cases, Router Advertisements sent in response to a Router
   Solicitation MUST be delayed by a random time between 0 and
   MAX_RA_DELAY_TIME seconds. (If a single advertisement is sent in
   response to multiple solicitations, the delay is relative to the
   first solicitation.)  In addition, consecutive Router Advertisements
   sent to the all-nodes multicast address MUST be rate limited to no
   more than one advertisement every MIN_DELAY_BETWEEN_RAS seconds.

   A router might process Router Solicitations as follows:

    - Upon receipt of a Router Solicitation, compute a random delay
      within the range 0 through MAX_RA_DELAY_TIME.  If the computed
      value corresponds to a time later than the time the next multicast
      Router Advertisement is scheduled to be sent, ignore the random
      delay and send the advertisement at the already-scheduled time.




Narten, et. al.             Standards Track                    [Page 47]

RFC 2461              Neighbor Discovery for IPv6          December 1998


    - If the router sent a multicast Router Advertisement (solicited or
      unsolicited) within the last MIN_DELAY_BETWEEN_RAS seconds,
      schedule the advertisement to be sent at a time corresponding to
      MIN_DELAY_BETWEEN_RAS plus the random value after the previous
      advertisement was sent.  This ensures that the multicast Router
      Advertisements are rate limited.

    - Otherwise, schedule the sending of a Router Advertisement at the
      time given by the random value.

   Note that a router is permitted to send multicast Router
   Advertisements more frequently than indicated by the
   MinRtrAdvInterval configuration variable so long as the more frequent
   advertisements are responses to Router Solicitations.  In all cases,
   however, unsolicited multicast advertisements MUST NOT be sent more
   frequently than indicated by MinRtrAdvInterval.

   Router Solicitations in which the Source Address is the unspecified
   address MUST NOT update the router's Neighbor Cache; solicitations
   with a proper source address update the Neighbor Cache as follows. If
   the router already has a Neighbor Cache entry for the solicitation's
   sender, the solicitation contains a Source Link-Layer Address option,
   and the received link-layer address differs from that already in the
   cache, the link-layer address SHOULD be updated in the appropriate
   Neighbor Cache entry, and its reachability state MUST also be set to
   STALE.  If there is no existing Neighbor Cache entry for the
   solicitation's sender, the router creates one, installs the link-
   layer address and sets its reachability state to STALE as specified
   in Section 7.3.3.  Whether or not a Source Link-Layer Address option
   is provided, if a Neighbor Cache entry for the solicitation's sender
   exists (or is created) the entry's IsRouter flag MUST be set to
   FALSE.

6.2.7.  Router Advertisement Consistency

   Routers SHOULD inspect valid Router Advertisements sent by other
   routers and verify that the routers are advertising consistent
   information on a link.  Detected inconsistencies indicate that one or
   more routers might be misconfigured and SHOULD be logged to system or
   network management.  The minimum set of information to check
   includes:

    - Cur Hop Limit values (except for the unspecified value of zero).

    - Values of the M or O flags.

    - Reachable Time values (except for the unspecified value of zero).




Narten, et. al.             Standards Track                    [Page 48]

RFC 2461              Neighbor Discovery for IPv6          December 1998


    - Retrans Timer values (except for the unspecified value of zero).

    - Values in the MTU options.

    - Preferred and Valid Lifetimes for the same prefix.  If
      AdvPreferredLifetime and/or AdvValidLifetime decrement in real
      time as specified in section 6.2.7 then the comparison of the
      lifetimes can not compare the content of the fields in the Router
      Advertisement but must instead compare the time at which the
      prefix will become deprecated and invalidated, respectively.  Due
      to link propagation delays and potentially poorly synchronized
      clocks between the routers such comparison SHOULD allow some time
      skew.

   Note that it is not an error for different routers to advertise
   different sets of prefixes.  Also, some routers might leave some
   fields as unspecified, i.e., with the value zero, while other routers
   specify values.  The logging of errors SHOULD be restricted to
   conflicting information that causes hosts to switch from one value to
   another with each received advertisement.

   Any other action on reception of Router Advertisement messages by a
   router is beyond the scope of this document.

6.2.8.  Link-local Address Change

   The link-local address on a router SHOULD change rarely, if ever.
   Nodes receiving Neighbor Discovery messages use the source address to
   identify the sender.  If multiple packets from the same router
   contain different source addresses, nodes will assume they come from
   different routers, leading to undesirable behavior.  For example, a
   node will ignore Redirect messages that are believed to have been
   sent by a router other than the current first-hop router.  Thus the
   source address used in Router Advertisements sent by a particular
   router must be identical to the target address in a Redirect message
   when redirecting to that router.

   Using the link-local address to uniquely identify routers on the link
   has the benefit that the address a router is known by should not
   change when a site renumbers.

   If a router changes the link-local address for one of its interfaces,
   it SHOULD inform hosts of this change.  The router SHOULD multicast a
   few Router Advertisements from the old link-local address with the
   Router Lifetime field set to zero and also multicast a few Router
   Advertisements from the new link-local address.  The overall effect
   should be the same as if one interface ceases being an advertising
   interface, and a different one starts being an advertising interface.



Narten, et. al.             Standards Track                    [Page 49]

RFC 2461              Neighbor Discovery for IPv6          December 1998


6.3.  Host Specification

6.3.1.  Host Configuration Variables

   None.

6.3.2.  Host Variables

   A host maintains certain Neighbor Discovery related variables in
   addition to the data structures defined in Section 5.1.  The specific
   variable names are used for demonstration purposes only, and an
   implementation is not required to have them, so long as its external
   behavior is consistent with that described in this document.

   These variables have default values that are overridden by
   information received in Router Advertisement messages.  The default
   values are used when there is no router on the link or when all
   received Router Advertisements have left a particular value
   unspecified.

   The default values in this specification may be overridden by
   specific documents that describe how IP operates over different link
   layers.  This rule allows Neighbor Discovery to operate over links
   with widely varying performance characteristics.

   For each interface:

        LinkMTU        The MTU of the link.
                       Default: The valued defined in the specific
                       document that describes how IPv6 operates over
                       the particular link layer (e.g., [IPv6-ETHER]).

        CurHopLimit    The default hop limit to be used when sending
                       (unicast) IP packets.

                       Default: The value specified in the "Assigned
                       Numbers" RFC [ASSIGNED] that was in effect at the
                       time of implementation.

        BaseReachableTime
                       A base value used for computing the random
                       ReachableTime value.

                       Default: REACHABLE_TIME milliseconds.

        ReachableTime  The time a neighbor is considered reachable after
                       receiving a reachability confirmation.




Narten, et. al.             Standards Track                    [Page 50]

RFC 2461              Neighbor Discovery for IPv6          December 1998


                       This value should be a uniformly-distributed
                       random value between MIN_RANDOM_FACTOR and
                       MAX_RANDOM_FACTOR times BaseReachableTime
                       milliseconds.  A new random value should be
                       calculated when BaseReachableTime changes (due to
                       Router Advertisements) or at least every few
                       hours even if no Router Advertisements are
                       received.

        RetransTimer   The time between retransmissions of Neighbor
                       Solicitation messages to a neighbor when
                       resolving the address or when probing the
                       reachability of a neighbor.

                       Default: RETRANS_TIMER milliseconds

6.3.3.  Interface Initialization

   The host joins the all-nodes multicast address on all multicast-
   capable interfaces.

6.3.4.  Processing Received Router Advertisements

   When multiple routers are present, the information advertised
   collectively by all routers may be a superset of the information
   contained in a single Router Advertisement.  Moreover, information
   may also be obtained through other dynamic means, such as stateful
   autoconfiguration.  Hosts accept the union of all received
   information; the receipt of a Router Advertisement MUST NOT
   invalidate all information received in a previous advertisement or
   from another source.  However, when received information for a
   specific parameter (e.g., Link MTU) or option (e.g., Lifetime on a
   specific Prefix) differs from information received earlier, and the
   parameter/option can only have one value, the most recently-received
   information is considered authoritative.

   Some Router Advertisement fields (e.g., Cur Hop Limit, Reachable Time
   and Retrans Timer) may contain a value denoting unspecified.  In such
   cases, the parameter should be ignored and the host should continue
   using whatever value it is already using.  In particular, a host MUST
   NOT interpret the unspecified value as meaning change back to the
   default value that was in use before the first Router Advertisement
   was received.  This rule prevents hosts from continually changing an
   internal variable when one router advertises a specific value, but
   other routers advertise the unspecified value.

   On receipt of a valid Router Advertisement, a host extracts the
   source address of the packet and does the following:



Narten, et. al.             Standards Track                    [Page 51]

RFC 2461              Neighbor Discovery for IPv6          December 1998


      - If the address is not already present in the host's Default
        Router List, and the advertisement's Router Lifetime is non-
        zero, create a new entry in the list, and initialize its
        invalidation timer value from the advertisement's Router
        Lifetime field.

      - If the address is already present in the host's Default Router
        List as a result of a previously-received advertisement, reset
        its invalidation timer to the Router Lifetime value in the
        newly-received advertisement.

      - If the address is already present in the host's Default Router
        List and the received Router Lifetime value is zero, immediately
        time-out the entry as specified in Section 6.3.5.

   To limit the storage needed for the Default Router List, a host MAY
   choose not to store all of the router addresses discovered via
   advertisements.  However, a host MUST retain at least two router
   addresses and SHOULD retain more.  Default router selections are made
   whenever communication to a destination appears to be failing.  Thus,
   the more routers on the list, the more likely an alternative working
   router can be found quickly (e.g., without having to wait for the
   next advertisement to arrive).

   If the received Cur Hop Limit value is non-zero the host SHOULD set
   its CurHopLimit variable to the received value.

   If the received Reachable Time value is non-zero the host SHOULD set
   its BaseReachableTime variable to the received value.  If the new
   value differs from the previous value, the host SHOULD recompute a
   new random ReachableTime value.  ReachableTime is computed as a
   uniformly-distributed random value between MIN_RANDOM_FACTOR and
   MAX_RANDOM_FACTOR times the BaseReachableTime.  Using a random
   component eliminates the possibility Neighbor Unreachability
   Detection messages synchronize with each other.

   In most cases, the advertised Reachable Time value will be the same
   in consecutive Router Advertisements and a host's BaseReachableTime
   rarely changes.  In such cases, an implementation SHOULD insure that
   a new random value gets recomputed at least once every few hours.

   The RetransTimer variable SHOULD be copied from the Retrans Timer
   field, if the received value is non-zero.

   After extracting information from the fixed part of the Router
   Advertisement message, the advertisement is scanned for valid
   options.  If the advertisement contains a Source Link-Layer Address
   option the link-layer address SHOULD be recorded in the Neighbor



Narten, et. al.             Standards Track                    [Page 52]

RFC 2461              Neighbor Discovery for IPv6          December 1998


   Cache entry for the router (creating an entry if necessary) and the
   IsRouter flag in the Neighbor Cache entry MUST be set to TRUE.  If no