home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 1900s / rfc1970.txt < prev    next >
Text File  |  1996-08-13  |  198KB  |  4,596 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                          T. Narten
  8. Request for Comments: 1970                                           IBM
  9. Category: Standards Track                                    E. Nordmark
  10.                                                         Sun Microsystems
  11.                                                               W. Simpson
  12.                                                               Daydreamer
  13.                                                              August 1996
  14.  
  15.  
  16.                Neighbor Discovery for IP Version 6 (IPv6)
  17.  
  18. Status of this Memo
  19.  
  20.    This document specifies an Internet standards track protocol for the
  21.    Internet community, and requests discussion and suggestions for
  22.    improvements.  Please refer to the current edition of the "Internet
  23.    Official Protocol Standards" (STD 1) for the standardization state
  24.    and status of this protocol.  Distribution of this memo is unlimited.
  25.  
  26. Abstract
  27.  
  28.    This document specifies the Neighbor Discovery protocol for IP
  29.    Version 6.  IPv6 nodes on the same link use Neighbor Discovery to
  30.    discover each other's presence, to determine each other's link-layer
  31.    addresses, to find routers and to maintain reachability information
  32.    about the paths to active neighbors.
  33.  
  34. Table of Contents
  35.  
  36.    1.  INTRODUCTION.............................................    3
  37.    2.  TERMINOLOGY..............................................    4
  38.       2.1.  General.............................................    4
  39.       2.2.  Link Types..........................................    7
  40.       2.3.  Addresses...........................................    8
  41.       2.4.  Requirements........................................    9
  42.    3.  PROTOCOL OVERVIEW........................................   10
  43.       3.1.  Comparison with IPv4................................   14
  44.       3.2.  Supported Link Types................................   16
  45.    4.  MESSAGE FORMATS..........................................   17
  46.       4.1.  Router Solicitation Message Format..................   17
  47.       4.2.  Router Advertisement Message Format.................   18
  48.       4.3.  Neighbor Solicitation Message Format................   21
  49.       4.4.  Neighbor Advertisement Message Format...............   23
  50.       4.5.  Redirect Message Format.............................   25
  51.       4.6.  Option Formats......................................   27
  52.          4.6.1.  Source/Target Link-layer Address...............   28
  53.          4.6.2.  Prefix Information.............................   29
  54.          4.6.3.  Redirected Header..............................   31
  55.  
  56.  
  57.  
  58. Narten, Nordmark & Simpson  Standards Track                     [Page 1]
  59.  
  60. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  61.  
  62.  
  63.          4.6.4.  MTU............................................   31
  64.    5.  CONCEPTUAL MODEL OF A HOST...............................   32
  65.       5.1.  Conceptual Data Structures..........................   33
  66.       5.2.  Conceptual Sending Algorithm........................   35
  67.       5.3.  Garbage Collection and Timeout Requirements.........   36
  68.    6.  ROUTER AND PREFIX DISCOVERY..............................   37
  69.       6.1.  Message Validation..................................   38
  70.          6.1.1.  Validation of Router Solicitation Messages.....   38
  71.          6.1.2.  Validation of Router Advertisement Messages....   38
  72.       6.2.  Router Specification................................   39
  73.          6.2.1.  Router Configuration Variables.................   39
  74.          6.2.2.  Becoming An Advertising Interface..............   43
  75.          6.2.3.  Router Advertisement Message Content...........   43
  76.          6.2.4.  Sending Unsolicited Router Advertisements......   45
  77.          6.2.5.  Ceasing To Be An Advertising Interface.........   45
  78.          6.2.6.  Processing Router Solicitations................   46
  79.          6.2.7.  Router Advertisement Consistency...............   47
  80.          6.2.8.  Link-local Address Change......................   48
  81.       6.3.  Host Specification..................................   48
  82.          6.3.1.  Host Configuration Variables...................   48
  83.          6.3.2.  Host Variables.................................   48
  84.          6.3.3.  Interface Initialization.......................   50
  85.          6.3.4.  Processing Received Router Advertisements......   50
  86.          6.3.5.  Timing out Prefixes and Default Routers........   52
  87.          6.3.6.  Default Router Selection.......................   53
  88.          6.3.7.  Sending Router Solicitations...................   54
  89.    7.  ADDRESS RESOLUTION AND NEIGHBOR UNREACHABILITY DETECTION.   55
  90.       7.1.  Message Validation..................................   55
  91.          7.1.1.  Validation of Neighbor Solicitations...........   55
  92.          7.1.2.  Validation of Neighbor Advertisements..........   56
  93.       7.2.  Address Resolution..................................   57
  94.          7.2.1.  Interface Initialization.......................   57
  95.          7.2.2.  Sending Neighbor Solicitations.................   57
  96.          7.2.3.  Receipt of Neighbor Solicitations..............   58
  97.          7.2.4.  Sending Solicited Neighbor Advertisements......   59
  98.          7.2.5.  Receipt of Neighbor Advertisements.............   59
  99.          7.2.6.  Sending Unsolicited Neighbor Advertisements....   61
  100.          7.2.7.  Anycast Neighbor Advertisements................   62
  101.          7.2.8.  Proxy Neighbor Advertisements..................   62
  102.       7.3.  Neighbor Unreachability Detection...................   63
  103.          7.3.1.  Reachability Confirmation......................   63
  104.          7.3.2.  Neighbor Cache Entry States....................   64
  105.          7.3.3.  Node Behavior..................................   66
  106.    8.  REDIRECT FUNCTION........................................   68
  107.       8.1.  Validation of Redirect Messages.....................   68
  108.       8.2.  Router Specification................................   69
  109.       8.3.  Host Specification..................................   70
  110.    9.  EXTENSIBILITY - OPTION PROCESSING........................   71
  111.  
  112.  
  113.  
  114. Narten, Nordmark & Simpson  Standards Track                     [Page 2]
  115.  
  116. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  117.  
  118.  
  119.    10.  PROTOCOL CONSTANTS......................................   72
  120.    11.  SECURITY CONSIDERATIONS.................................   73
  121.    REFERENCES...................................................   75
  122.    AUTHORS' ADDRESSES...........................................   76
  123.    APPENDIX A: MULTIHOMED HOSTS.................................   77
  124.    APPENDIX B: FUTURE EXTENSIONS................................   78
  125.    APPENDIX C: STATE MACHINE FOR THE REACHABILITY STATE.........   78
  126.    APPENDIX D: IMPLEMENTATION ISSUES............................   80
  127.       Appendix D.1: Reachability confirmations..................   80
  128.  
  129. 1.  INTRODUCTION
  130.  
  131.    This specification defines the Neighbor Discovery (ND) protocol for
  132.    Internet Protocol Version 6 (IPv6).  Nodes (hosts and routers) use
  133.    Neighbor Discovery to determine the link-layer addresses for
  134.    neighbors known to reside on attached links and to quickly purge
  135.    cached values that become invalid.  Hosts also use Neighbor Discovery
  136.    to find neighboring routers that are willing to forward packets on
  137.    their behalf.  Finally, nodes use the protocol to actively keep track
  138.    of which neighbors are reachable and which are not, and to detect
  139.    changed link-layer addresses.  When a router or the path to a router
  140.    fails, a host actively searches for functioning alternates.
  141.  
  142.    Unless specified otherwise (in a document that covers operating IP
  143.    over a particular link type) this document applies to all link types.
  144.    However, because ND uses link-layer multicast for some of its
  145.    services, it is possible that on some link types (e.g., NBMA links)
  146.    alternative protocols or mechanisms to implement those services will
  147.    be specified (in the appropriate document covering the operation of
  148.    IP over a particular link type).  The services described in this
  149.    document that are not directly dependent on multicast, such as
  150.    Redirects, Next-hop determination, Neighbor Unreachability Detection,
  151.    etc., are expected to be provided as specified in this document.  The
  152.    details of how one uses ND on NBMA links is an area for further
  153.    study.
  154.  
  155.    The authors would like to acknowledge the contributions the IPNGWG
  156.    working group and, in particular, (in alphabetical order) Ran
  157.    Atkinson, Jim Bound, Scott Bradner, Alex Conta, Stephen Deering,
  158.    Francis Dupont, Robert Elz, Robert Gilligan, Robert Hinden, Allison
  159.    Mankin, Dan McDonald, Charles Perkins, Matt Thomas, and Susan
  160.    Thomson.
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Narten, Nordmark & Simpson  Standards Track                     [Page 3]
  171.  
  172. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  173.  
  174.  
  175. 2.  TERMINOLOGY
  176.  
  177. 2.1.  General
  178.  
  179.    IP          - Internet Protocol Version 6.  The terms IPv4 and IPv6
  180.                  are used only in contexts where necessary to avoid
  181.                  ambiguity.
  182.  
  183.    ICMP        - Internet Message Control Protocol for the Internet
  184.                  Protocol Version 6.  The terms ICMPv4 and ICMPv6 are
  185.                  used only in contexts where necessary to avoid
  186.                  ambiguity.
  187.  
  188.    node        - a device that implements IP.
  189.  
  190.    router      - a node that forwards IP packets not explicitly
  191.                  addressed to itself.
  192.  
  193.    host        - any node that is not a router.
  194.  
  195.    upper layer - a protocol layer immediately above IP.  Examples are
  196.                  transport protocols such as TCP and UDP, control
  197.                  protocols such as ICMP, routing protocols such as OSPF,
  198.                  and internet or lower-layer protocols being "tunneled"
  199.                  over (i.e., encapsulated in) IP such as IPX, AppleTalk,
  200.                  or IP itself.
  201.  
  202.    link        - a communication facility or medium over which nodes can
  203.                  communicate at the link layer, i.e., the layer
  204.                  immediately below IP.  Examples are Ethernets (simple
  205.                  or bridged), PPP links, X.25, Frame Relay, or ATM
  206.                  networks as well as internet (or higher) layer
  207.                  "tunnels", such as tunnels over IPv4 or IPv6 itself.
  208.  
  209.    interface   - a node's attachment to a link.
  210.  
  211.    neighbors   - nodes attached to the same link.
  212.  
  213.    address     - an IP-layer identifier for an interface or a set of
  214.                  interfaces.
  215.  
  216.    anycast address
  217.                - an identifier for a set of interfaces (typically
  218.                  belonging to different nodes).  A packet sent to an
  219.                  anycast address is delivered to one of the interfaces
  220.                  identified by that address (the "nearest" one,
  221.                  according to the routing protocol's measure of
  222.                  distance).  See [ADDR-ARCH].
  223.  
  224.  
  225.  
  226. Narten, Nordmark & Simpson  Standards Track                     [Page 4]
  227.  
  228. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  229.  
  230.  
  231.                  Note that an anycast address is syntactically
  232.                  indistinguishable from a unicast address.  Thus, nodes
  233.                  sending packets to anycast addresses don't generally
  234.                  know that an anycast address is being used.  Throughout
  235.                  the rest of this document, references to unicast
  236.                  addresses also apply to anycast addresses in those
  237.                  cases where the node is unaware that a unicast address
  238.                  is actually an anycast address.
  239.  
  240.    prefix      - a bit string that consists of some number of initial
  241.                  bits of an address.
  242.  
  243.    link-layer address
  244.                - a link-layer identifier for an interface.  Examples
  245.                  include IEEE 802 addresses for Ethernet links and E.164
  246.                  addresses for ISDN links.
  247.  
  248.    on-link     - an address that is assigned to an interface on a
  249.                  specified link.  A node considers an address to be on-
  250.                  link if:
  251.  
  252.                    - it is covered by one of the link's prefixes, or
  253.  
  254.                    - a neighboring router specifies the address as the
  255.                      target of a Redirect message, or
  256.  
  257.                    - a Neighbor Advertisement message is received for
  258.                      the (target) address, or
  259.  
  260.                    - any Neighbor Discovery message is received from the
  261.                      address.
  262.  
  263.    off-link    - the opposite of "on-link"; an address that is not
  264.                  assigned to any interfaces on the specified link.
  265.  
  266.    longest prefix match
  267.                - The process of determining which prefix (if any) in a
  268.                  set of prefixes covers a target address.  A target
  269.                  address is covered by a prefix if all of the bits in
  270.                  the prefix match the left-most bits of the target
  271.                  address.  When multiple prefixes cover an address, the
  272.                  longest prefix is the one that matches.
  273.  
  274.    reachability
  275.                - whether or not the one-way "forward" path to a neighbor
  276.                  is functioning properly.  In particular, whether
  277.                  packets sent to a neighbor are reaching the IP layer on
  278.                  the neighboring machine and are being processed
  279.  
  280.  
  281.  
  282. Narten, Nordmark & Simpson  Standards Track                     [Page 5]
  283.  
  284. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  285.  
  286.  
  287.                  properly by the receiving IP layer.  For neighboring
  288.                  routers, reachability means that packets sent by a
  289.                  node's IP layer are delivered to the router's IP layer,
  290.                  and the router is indeed forwarding packets (i.e., it
  291.                  is configured as a router, not a host).  For hosts,
  292.                  reachability means that packets sent by a node's IP
  293.                  layer are delivered to the neighbor host's IP layer.
  294.  
  295.    packet      - an IP header plus payload.
  296.  
  297.    link MTU    - the maximum transmission unit, i.e., maximum packet
  298.                  size in octets, that can be conveyed in one piece over
  299.                  a link.
  300.  
  301.    target      - an address about which address resolution information
  302.                  is sought, or an address which is the new first-hop
  303.                  when being redirected.
  304.  
  305.    proxy       - a router that responds to Neighbor Discovery query
  306.                  messages on behalf of another node.  A router acting on
  307.                  behalf of a mobile node that has moved off-link could
  308.                  potentially act as a proxy for the mobile node.
  309.  
  310.    ICMP destination unreachable indication
  311.                - an error indication returned to the original sender of
  312.                  a packet that cannot be delivered for the reasons
  313.                  outlined in [ICMPv6].  If the error occurs on a node
  314.                  other than the node originating the packet, an ICMP
  315.                  error message is generated.  If the error occurs on the
  316.                  originating node, an implementation is not required to
  317.                  actually create and send an ICMP error packet to the
  318.                  source, as long as the upper-layer sender is notified
  319.                  through an appropriate mechanism (e.g., return value
  320.                  from a procedure call).  Note, however, that an
  321.                  implementation may find it convenient in some cases to
  322.                  return errors to the sender by taking the offending
  323.                  packet, generating an ICMP error message, and then
  324.                  delivering it (locally) through the generic error
  325.                  handling routines.
  326.  
  327.    random delay
  328.                - when sending out messages, it is sometimes necessary to
  329.                  delay a transmission for a random amount of time in
  330.                  order to prevent multiple nodes from transmitting at
  331.                  exactly the same time, or to prevent long-range
  332.                  periodic transmissions from synchronizing with each
  333.                  other [SYNC].  When a random component is required, a
  334.                  node calculates the actual delay in such a way that the
  335.  
  336.  
  337.  
  338. Narten, Nordmark & Simpson  Standards Track                     [Page 6]
  339.  
  340. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  341.  
  342.  
  343.                  computed delay forms a uniformly-distributed random
  344.                  value that falls between the specified minimum and
  345.                  maximum delay times.  The implementor must take care to
  346.                  insure that the granularity of the calculated random
  347.                  component and the resolution of the timer used are both
  348.                  high enough to insure that the probability of multiple
  349.                  nodes delaying the same amount of time is small.
  350.  
  351.    random delay seed
  352.                - If a pseudo-random number generator is used in
  353.                  calculating a random delay component, the generator
  354.                  should be initialized with a unique seed prior to being
  355.                  used.  Note that it is not sufficient to use the
  356.                  interface token alone as the seed, since interface
  357.                  tokens will not always be unique.  To reduce the
  358.                  probability that duplicate interface tokens cause the
  359.                  same seed to be used, the seed should be calculated
  360.                  from a variety of input sources (e.g., machine
  361.                  components) that are likely to be different even on
  362.                  identical "boxes".  For example, the seed could be
  363.                  formed by combining the CPU's serial number with an
  364.                  interface token.
  365.  
  366. 2.2.  Link Types
  367.  
  368.    Different link layers have different properties.  The ones of concern
  369.    to Neighbor Discovery are:
  370.  
  371.    multicast      - a link that supports a native mechanism at the link
  372.                     layer for sending packets to all (i.e., broadcast)
  373.                     or a subset of all neighbors.
  374.  
  375.    point-to-point - a link that connects exactly two interfaces.  A
  376.                     point-to-point link is assumed to have multicast
  377.                     capability and have a link-local address.
  378.  
  379.    non-broadcast multi-access (NBMA)
  380.                   - a link to which more than two interfaces can attach,
  381.                     but that does not support a native form of multicast
  382.                     or broadcast (e.g., X.25, ATM, frame relay, etc.).
  383.                     Note that all link types (including NBMA) are
  384.                     expected to provide multicast service for IP (e.g.,
  385.                     using multicast servers), but it is an issue for
  386.                     further study whether ND should use such facilities
  387.                     or an alternate mechanism that provides the
  388.                     equivalent ND services.
  389.  
  390.    shared media   - a link that allows direct communication among a
  391.  
  392.  
  393.  
  394. Narten, Nordmark & Simpson  Standards Track                     [Page 7]
  395.  
  396. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  397.  
  398.  
  399.                     number of nodes, but attached nodes are configured
  400.                     in such a way that they do not have complete prefix
  401.                     information for all on-link destinations.  That is,
  402.                     at the IP level, nodes on the same link may not know
  403.                     that they are neighbors; by default, they
  404.                     communicate through a router.  Examples are large
  405.                     (switched) public data networks such as SMDS and B-
  406.                     ISDN.  Also known as "large clouds".  See [SH-
  407.                     MEDIA].
  408.  
  409.    variable MTU   - a link that does not have a well-defined MTU (e.g.,
  410.                     IEEE 802.5 token rings).  Many links (e.g.,
  411.                     Ethernet) have a standard MTU defined by the link-
  412.                     layer protocol or by the specific document
  413.                     describing how to run IP over the link layer.
  414.  
  415.    asymmetric reachability
  416.                   - a link where non-reflexive and/or non-transitive
  417.                     reachability is part of normal operation.  (Non-
  418.                     reflexive reachability means packets from A reach B
  419.                     but packets from B don't reach A.  Non-transitive
  420.                     reachability means packets from A reach B, and
  421.                     packets from B reach C, but packets from A don't
  422.                     reach C.)  Many radio links exhibit these
  423.                     properties.
  424.  
  425. 2.3.  Addresses
  426.  
  427.    Neighbor Discovery makes use of a number of different addresses
  428.    defined in [ADDR-ARCH], including:
  429.  
  430.    all-nodes multicast address
  431.                - the link-local scope address to reach all nodes.
  432.                  FF02::1
  433.  
  434.    all-routers multicast address
  435.                - the link-local scope address to reach all routers.
  436.                  FF02::2
  437.  
  438.    solicited-node multicast address
  439.                - a link-local scope multicast address that is computed
  440.                  as a function of the solicited target's address.  The
  441.                  solicited-node multicast address is formed by taking
  442.                  the low-order 32 bits of the target IP address and
  443.                  appending those bits to the 96-bit prefix
  444.                  FF02:0:0:0:0:1 to produce a multicast address within
  445.                  the range FF02::1:0:0 to FF02::1:FFFF:FFFF.  For
  446.                  example, the solicited node multicast address
  447.  
  448.  
  449.  
  450. Narten, Nordmark & Simpson  Standards Track                     [Page 8]
  451.  
  452. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  453.  
  454.  
  455.                  corresponding to the IP address 4037::01:800:200E:8C6C
  456.                  is FF02::1:200E:8C6C.  IP addresses that differ only in
  457.                  the high-order bits, e.g., due to multiple high-order
  458.                  prefixes associated with different providers, will map
  459.                  to the same solicited-node address thereby reducing the
  460.                  number of multicast addresses a node must join.
  461.  
  462.    link-local address
  463.                - a unicast address having link-only scope that can be
  464.                  used to reach neighbors.  All interfaces on routers
  465.                  MUST have a link-local address.  Also, [ADDRCONF]
  466.                  requires that interfaces on hosts have a link-local
  467.                  address.
  468.  
  469.    unspecified address
  470.                - a reserved address value that indicates the lack of an
  471.                  address (e.g., the address is unknown).  It is never
  472.                  used as a destination address, but may be used as a
  473.                  source address if the sender does not (yet) know its
  474.                  own address (e.g., while verifying an address is unused
  475.                  during address autoconfiguration [ADDRCONF]).  The
  476.                  unspecified address has a value of 0:0:0:0:0:0:0:0.
  477.  
  478. 2.4.  Requirements
  479.  
  480.    Throughout this document, the words that are used to define the
  481.    significance of the particular requirements are capitalized.  These
  482.    words are:
  483.  
  484.    MUST
  485.         This word or the adjective "REQUIRED" means that the item is an
  486.         absolute requirement of this specification.
  487.  
  488.    MUST NOT
  489.         This phrase means the item is an absolute prohibition of this
  490.         specification.
  491.  
  492.    SHOULD
  493.         This word or the adjective "RECOMMENDED" means that there may
  494.         exist valid reasons in particular circumstances to ignore this
  495.         item, but the full implications should be understood and the
  496.         case carefully weighed before choosing a different course.
  497.  
  498.    SHOULD NOT
  499.         This phrase means that there may exist valid reasons in
  500.         particular circumstances when the listed behavior is acceptable
  501.         or even useful, but the full implications should be understood
  502.         and the case carefully weighted before implementing any behavior
  503.  
  504.  
  505.  
  506. Narten, Nordmark & Simpson  Standards Track                     [Page 9]
  507.  
  508. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  509.  
  510.  
  511.         described with this label.
  512.  
  513.    MAY  This word or the adjective "OPTIONAL" means that this item is
  514.         truly optional.  One vendor may choose to include the item
  515.         because a particular marketplace requires it or because it
  516.         enhances the product, for example, another vendor may omit the
  517.         same item.
  518.  
  519.    This document also makes use of internal conceptual variables to
  520.    describe protocol behavior and external variables that an
  521.    implementation must allow system administrators to change.  The
  522.    specific variable names, how their values change, and how their
  523.    settings influence protocol behavior are provided to demonstrate
  524.    protocol behavior.  An implementation is not required to have them in
  525.    the exact form described here, so long as its external behavior is
  526.    consistent with that described in this document.
  527.  
  528. 3.  PROTOCOL OVERVIEW
  529.  
  530.    This protocol solves a set of problems related to the interaction
  531.    between nodes attached to the same link.  It defines mechanisms for
  532.    solving each of the following problems:
  533.  
  534.     Router Discovery: How hosts locate routers that reside on an
  535.                attached link.
  536.  
  537.     Prefix Discovery: How hosts discover the set of address prefixes
  538.                that define which destinations are on-link for an
  539.                attached link.  (Nodes use prefixes to distinguish
  540.                destinations that reside on-link from those only
  541.                reachable through a router.)
  542.  
  543.     Parameter Discovery: How a node learns such link parameters as the
  544.                link MTU or such Internet parameters as the hop limit
  545.                value to place in outgoing packets.
  546.  
  547.     Address Autoconfiguration: How nodes automatically configure an
  548.                address for an interface.
  549.  
  550.     Address resolution: How nodes determine the link-layer address of an
  551.                on-link destination (e.g., a neighbor) given only the
  552.                destination's IP address.
  553.  
  554.     Next-hop determination: The algorithm for mapping an IP destination
  555.                address into the IP address of the neighbor to which
  556.                traffic for the destination should be sent.  The next-hop
  557.                can be a router or the destination itself.
  558.  
  559.  
  560.  
  561.  
  562. Narten, Nordmark & Simpson  Standards Track                    [Page 10]
  563.  
  564. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  565.  
  566.  
  567.     Neighbor Unreachability Detection: How nodes determine that a
  568.                neighbor is no longer reachable.  For neighbors used as
  569.                routers, alternate default routers can be tried.  For
  570.                both routers and hosts, address resolution can be
  571.                performed again.
  572.  
  573.     Duplicate Address Detection: How a node determines that an address
  574.                it wishes to use is not already in use by another node.
  575.  
  576.     Redirect:  How a router informs a host of a better first-hop node to
  577.                reach a particular destination.
  578.  
  579.    Neighbor Discovery defines five different ICMP packet types: A pair
  580.    of Router Solicitation and Router Advertisement messages, a pair of
  581.    Neighbor Solicitation and Neighbor Advertisements messages, and a
  582.    Redirect message.  The messages serve the following purpose:
  583.  
  584.     Router Solicitation: When an interface becomes enabled, hosts may
  585.                send out Router Solicitations that request routers to
  586.                generate Router Advertisements immediately rather than at
  587.                their next scheduled time.
  588.  
  589.     Router Advertisement: Routers advertise their presence together with
  590.                various link and Internet parameters either periodically,
  591.                or in response to a Router Solicitation message.  Router
  592.                Advertisements contain prefixes that are used for on-link
  593.                determination and/or address configuration, a suggested
  594.                hop limit value, etc.
  595.  
  596.     Neighbor Solicitation: Sent by a node to determine the link-layer
  597.                address of a neighbor, or to verify that a neighbor is
  598.                still reachable via a cached link-layer address.
  599.                Neighbor Solicitations are also used for Duplicate
  600.                Address Detection.
  601.  
  602.     Neighbor Advertisement: A response to a Neighbor Solicitation
  603.                message.  A node may also send unsolicited Neighbor
  604.                Advertisements to announce a link-layer address change.
  605.  
  606.     Redirect:  Used by routers to inform hosts of a better first hop for
  607.                a destination.
  608.  
  609.    On multicast-capable links, each router periodically multicasts a
  610.    Router Advertisement packet announcing its availability.  A host
  611.    receives Router Advertisements from all routers, building a list of
  612.    default routers.  Routers generate Router Advertisements frequently
  613.    enough that hosts will learn of their presence within a few minutes,
  614.    but not frequently enough to rely on an absence of advertisements to
  615.  
  616.  
  617.  
  618. Narten, Nordmark & Simpson  Standards Track                    [Page 11]
  619.  
  620. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  621.  
  622.  
  623.    detect router failure; a separate Neighbor Unreachability Detection
  624.    algorithm provides failure detection.
  625.  
  626.    Router Advertisements contain a list of prefixes used for on-link
  627.    determination and/or autonomous address configuration; flags
  628.    associated with the prefixes specify the intended uses of a
  629.    particular prefix.  Hosts use the advertised on-link prefixes to
  630.    build and maintain a list that is used in deciding when a packet's
  631.    destination is on-link or beyond a router.  Note that a destination
  632.    can be on-link even though it is not covered by any advertised on-
  633.    link prefix.  In such cases a router can send a Redirect informing
  634.    the sender that the destination is a neighbor.
  635.  
  636.    Router Advertisements (and per-prefix flags) allow routers to inform
  637.    hosts how to perform Address Autoconfiguration.  For example, routers
  638.    can specify whether hosts should use stateful (DHCPv6) and/or
  639.    autonomous (stateless) address configuration.  The exact semantics
  640.    and usage of the address configuration-related information is
  641.    specified in [ADDRCONF].
  642.  
  643.    Router Advertisement messages also contain Internet parameters such
  644.    as the hop limit that hosts should use in outgoing packets and,
  645.    optionally, link parameters such as the link MTU.  This facilitates
  646.    centralized administration of critical parameters that can be set on
  647.    routers and automatically propagated to all attached hosts.
  648.  
  649.    Nodes accomplish address resolution by multicasting a Neighbor
  650.    Solicitation that asks the target node to return its link-layer
  651.    address.  Neighbor Solicitation messages are multicast to the
  652.    solicited-node multicast address of the target address.  The target
  653.    returns its link-layer address in a unicast Neighbor Advertisement
  654.    message.  A single request-response pair of packets is sufficient for
  655.    both the initiator and the target to resolve each other's link-layer
  656.    addresses; the initiator includes its link-layer address in the
  657.    Neighbor Solicitation.
  658.  
  659.    Neighbor Solicitation messages can also be used to determine if more
  660.    than one node has been assigned the same unicast address.  The use of
  661.    Neighbor Solicitation messages for Duplicate Address Detection is
  662.    specified in [ADDRCONF].
  663.  
  664.    Neighbor Unreachability Detection detects the failure of a neighbor
  665.    or the failure of the forward path to the neighbor.  Doing so
  666.    requires positive confirmation that packets sent to a neighbor are
  667.    actually reaching that neighbor and being processed properly by its
  668.    IP layer.  Neighbor Unreachability Detection uses confirmation from
  669.    two sources.  When possible, upper-layer protocols provide a positive
  670.    confirmation that a connection is making "forward progress", that is,
  671.  
  672.  
  673.  
  674. Narten, Nordmark & Simpson  Standards Track                    [Page 12]
  675.  
  676. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  677.  
  678.  
  679.    previously sent data is known to have been delivered correctly (e.g.,
  680.    new acknowledgments were received recently).  When positive
  681.    confirmation is not forthcoming through such "hints", a node sends
  682.    unicast Neighbor Solicitation messages that solicit Neighbor
  683.    Advertisements as reachability confirmation from the next hop.  To
  684.    reduce unnecessary network traffic, probe messages are only sent to
  685.    neighbors to which the node is actively sending packets.
  686.  
  687.    In addition to addressing the above general problems, Neighbor
  688.    Discovery also handles the following situations:
  689.  
  690.      Link-layer address change - A node that knows its link-layer
  691.           address has changed can multicast a few (unsolicited) Neighbor
  692.           Advertisement packets to all nodes to quickly update cached
  693.           link-layer addresses that have become invalid.  Note that the
  694.           sending of unsolicited advertisements is a performance
  695.           enhancement only (e.g., unreliable).  The Neighbor
  696.           Unreachability Detection algorithm ensures that all nodes will
  697.           reliably discover the new address, though the delay may be
  698.           somewhat longer.
  699.  
  700.      Inbound load balancing - Nodes with replicated interfaces may want
  701.           to load balance the reception of incoming packets across
  702.           multiple network interfaces on the same link.  Such nodes have
  703.           multiple link-layer addresses assigned to the same interface.
  704.           For example, a single network driver could represent multiple
  705.           network interface cards as a single logical interface having
  706.           multiple link-layer addresses.  Load balancing is handled by
  707.           allowing routers to omit the source link-layer address from
  708.           Router Advertisement packets, thereby forcing neighbors to use
  709.           Neighbor Solicitation messages to learn link-layer addresses
  710.           of routers.  Returned Neighbor Advertisement messages can then
  711.           contain link-layer addresses that differ depending on who
  712.           issued the solicitation.
  713.  
  714.      Anycast addresses - Anycast addresses identify one of a set of
  715.           nodes providing an equivalent service, and multiple nodes on
  716.           the same link may be configured to recognize the same Anycast
  717.           address.  Neighbor Discovery handles anycasts by having nodes
  718.           expect to receive multiple Neighbor Advertisements for the
  719.           same target.  All advertisements for anycast addresses are
  720.           tagged as being non-Override advertisements.  This invokes
  721.           specific rules to determine which of potentially multiple
  722.           advertisements should be used.
  723.  
  724.      Proxy advertisements - A router willing to accept packets on behalf
  725.           of a target address that is unable to respond to Neighbor
  726.           Solicitations can issue non-Override Neighbor Advertisements.
  727.  
  728.  
  729.  
  730. Narten, Nordmark & Simpson  Standards Track                    [Page 13]
  731.  
  732. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  733.  
  734.  
  735.           There is currently no specified use of proxy, but proxy
  736.           advertising could potentially be used to handle cases like
  737.           mobile nodes that have moved off-link.  However, it is not
  738.           intended as a general mechanism to handle nodes that, e.g., do
  739.           not implement this protocol.
  740.  
  741. 3.1.  Comparison with IPv4
  742.  
  743.    The IPv6 Neighbor Discovery protocol corresponds to a combination of
  744.    the IPv4 protocols ARP [ARP], ICMP Router Discovery [RDISC], and ICMP
  745.    Redirect [ICMPv4].  In IPv4 there is no generally agreed upon
  746.    protocol or mechanism for Neighbor Unreachability Detection, although
  747.    Hosts Requirements [HR-CL] does specify some possible algorithms for
  748.    Dead Gateway Detection (a subset of the problems Neighbor
  749.    Unreachability Detection tackles).
  750.  
  751.    The Neighbor Discovery protocol provides a multitude of improvements
  752.    over the IPv4 set of protocols:
  753.  
  754.      Router Discovery is part of the base protocol set; there is no need
  755.      for hosts to "snoop" the routing protocols.
  756.  
  757.      Router advertisements carry link-layer addresses; no additional
  758.      packet exchange is needed to resolve the router's link-layer
  759.      address.
  760.  
  761.      Router advertisements carry prefixes for a link; there is no need
  762.      to have a separate mechanism to configure the "netmask".
  763.  
  764.      Router advertisements enable Address Autoconfiguration.
  765.  
  766.      Routers can advertise an MTU for hosts to use on the link, ensuring
  767.      that all nodes use the same MTU value on links lacking a well-
  768.      defined MTU.
  769.  
  770.      Address resolution multicasts are "spread" over 4 billion (2^32)
  771.      multicast addresses greatly reducing address resolution related
  772.      interrupts on nodes other than the target.  Moreover, non-IPv6
  773.      machines should not be interrupted at all.
  774.  
  775.      Redirects contain the link-layer address of the new first hop;
  776.      separate address resolution is not needed upon receiving a
  777.      redirect.
  778.  
  779.      Multiple prefixes can be associated with the same link.  By
  780.      default, hosts learn all on-link prefixes from Router
  781.      Advertisements.  However, routers may be configured to omit some or
  782.      all prefixes from Router Advertisements.  In such cases hosts
  783.  
  784.  
  785.  
  786. Narten, Nordmark & Simpson  Standards Track                    [Page 14]
  787.  
  788. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  789.  
  790.  
  791.      assume that destinations are off-link and send traffic to routers.
  792.  
  793.      A router can then issue redirects as appropriate.
  794.  
  795.      Unlike IPv4, the recipient of an IPv6 redirect assumes that the new
  796.      next-hop is on-link.  In IPv4, a host ignores redirects specifying
  797.      a next-hop that is not on-link according to the link's network
  798.      mask.  The IPv6 redirect mechanism is analogous to the XRedirect
  799.      facility specified in [SH-MEDIA].  It is expected to be useful on
  800.      non-broadcast and shared media links in which it is undesirable or
  801.      not possible for nodes to know all prefixes for on-link
  802.      destinations.
  803.  
  804.      Neighbor Unreachability Detection is part of the base significantly
  805.      improving the robustness of packet delivery in the presence of
  806.      failing routers, partially failing or partitioned links and nodes
  807.      that change their link-layer addresses.  For instance, mobile nodes
  808.      can move off-link without losing any connectivity due to stale ARP
  809.      caches.
  810.  
  811.      Unlike ARP, Neighbor Discovery detects half-link failures (using
  812.      Neighbor Unreachability Detection) and avoids sending traffic to
  813.      neighbors with which two-way connectivity is absent.
  814.  
  815.      Unlike in IPv4 Router Discovery the Router Advertisement messages
  816.      do not contain a preference field.  The preference field is not
  817.      needed to handle routers of different "stability"; the Neighbor
  818.      Unreachability Detection will detect dead routers and switch to a
  819.      working one.
  820.  
  821.      The use of link-local addresses to uniquely identify routers (for
  822.      Router Advertisement and Redirect messages) makes it possible for
  823.      hosts to maintain the router associations in the event of the site
  824.      renumbering to use new global prefixes.
  825.  
  826.      Using the Hop Limit equal to 255 trick Neighbor Discovery is immune
  827.      to off-link senders that accidentally or intentionally send ND
  828.      messages.  In IPv4 off-link senders can send both ICMP Redirects
  829.      and Router Advertisement messages.
  830.  
  831.      Placing address resolution at the ICMP layer makes the protocol
  832.      more media-independent than ARP and makes it possible to use
  833.      standard IP authentication and security mechanisms as appropriate
  834.      [IPv6-AUTH, IPv6-ESP].
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842. Narten, Nordmark & Simpson  Standards Track                    [Page 15]
  843.  
  844. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  845.  
  846.  
  847. 3.2.  Supported Link Types
  848.  
  849.    Neighbor Discovery supports links with different properties.  In the
  850.    presence of certain properties only a subset of the ND protocol
  851.    mechanisms are fully specified in this document:
  852.  
  853.    point-to-point - Neighbor Discovery handles such links just like
  854.                     multicast links.  (Multicast can be trivially
  855.                     provided on point to point links, and interfaces can
  856.                     be assigned link-local addresses.)  Neighbor
  857.                     Discovery should be implemented as described in this
  858.                     document.
  859.  
  860.    multicast      - Neighbor Discovery should be implemented as
  861.                     described in this document.
  862.  
  863.    non-broadcast multiple access (NBMA)
  864.                   - Redirect, Neighbor Unreachability Detection and
  865.                     next-hop determination should be implemented as
  866.                     described in this document.  Address resolution, and
  867.                     the mechanism for delivering Router Solicitations
  868.                     and Advertisements on NBMA links is not specified in
  869.                     this document.  Note that if hosts support manual
  870.                     configuration of a list of default routers, hosts
  871.                     can dynamically acquire the link-layer addresses for
  872.                     their neighbors from Redirect messages.
  873.  
  874.    shared media   - The Redirect message is modeled after the XRedirect
  875.                     message in [SH-MEDIA] in order to simplify use of
  876.                     the protocol on shared media links.
  877.  
  878.                     This specification does not address shared media
  879.                     issues that only relate to routers, such as:
  880.  
  881.                      - How routers exchange reachability information on
  882.                        a shared media link.
  883.  
  884.                      - How a router determines the link-layer address of
  885.                        a host, which it needs to send redirect messages
  886.                        to the host.
  887.  
  888.                      - How a router determines that it is the first-hop
  889.                        router for a received packet.
  890.  
  891.                     The protocol is extensible (through the definition
  892.                     of new options) so that other solutions might be
  893.                     possible in the future.
  894.  
  895.  
  896.  
  897.  
  898. Narten, Nordmark & Simpson  Standards Track                    [Page 16]
  899.  
  900. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  901.  
  902.  
  903.    variable MTU   - Neighbor Discovery allows routers to specify a MTU
  904.                     for the link, which all nodes then use.  All nodes
  905.                     on a link must use the same MTU (or Maximum Receive
  906.                     Unit) in order for multicast to work properly.
  907.                     Otherwise when multicasting a sender, which can not
  908.                     know which nodes will receive the packet, could not
  909.                     determine a minimum packet size all receivers can
  910.                     process.
  911.  
  912.    asymmetric reachability
  913.                   - Neighbor Discovery detects the absence of symmetric
  914.                     reachability; a node avoids paths to a neighbor with
  915.                     which it does not have symmetric connectivity.
  916.  
  917.                     The Neighbor Unreachability Detection will typically
  918.                     identify such half-links and the node will refrain
  919.                     from using them.
  920.  
  921.                     The protocol can presumably be extended in the
  922.                     future to find viable paths in environments that
  923.                     lack reflexive and transitive connectivity.
  924.  
  925. 4.  MESSAGE FORMATS
  926.  
  927. 4.1.  Router Solicitation Message Format
  928.  
  929.    Hosts send Router Solicitations in order to prompt routers to
  930.    generate Router Advertisements quickly.
  931.  
  932.       0                   1                   2                   3
  933.       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
  934.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  935.      |     Type      |     Code      |          Checksum             |
  936.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  937.      |                            Reserved                           |
  938.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  939.      |   Options ...
  940.      +-+-+-+-+-+-+-+-+-+-+-+-
  941.  
  942. IP Fields:
  943.  
  944.    Source Address
  945.                   An IP address assigned to the sending interface, or
  946.                   the unspecified address if no address is assigned to
  947.                   the sending interface.
  948.  
  949.    Destination Address
  950.                   Typically the all-routers multicast address.
  951.  
  952.  
  953.  
  954. Narten, Nordmark & Simpson  Standards Track                    [Page 17]
  955.  
  956. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  957.  
  958.  
  959.    Hop Limit      255
  960.  
  961.    Priority       15
  962.  
  963.    Authentication Header
  964.                   If a Security Association for the IP Authentication
  965.                   Header exists between the sender and the destination
  966.                   address, then the sender SHOULD include this header.
  967.  
  968. ICMP Fields:
  969.  
  970.    Type           133
  971.  
  972.    Code           0
  973.  
  974.    Checksum       The ICMP checksum.  See [ICMPv6].
  975.  
  976.    Reserved       This field is unused.  It MUST be initialized to zero
  977.                   by the sender and MUST be ignored by the receiver.
  978.  
  979. Valid Options:
  980.  
  981.    Source link-layer address
  982.                   The link-layer address of the sender, if known.
  983.  
  984.    Future versions of this protocol may define new option types.
  985.    Receivers MUST silently ignore any options they do not recognize and
  986.    continue processing the message.
  987.  
  988. 4.2.  Router Advertisement Message Format
  989.  
  990.    Routers send out Router Advertisement message periodically, or in
  991.    response to a Router Solicitation.
  992.  
  993.       0                   1                   2                   3
  994.       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
  995.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  996.      |     Type      |     Code      |          Checksum             |
  997.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  998.      | Cur Hop Limit |M|O|  Reserved |       Router Lifetime         |
  999.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1000.      |                         Reachable Time                        |
  1001.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1002.      |                          Retrans Timer                        |
  1003.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1004.      |   Options ...
  1005.      +-+-+-+-+-+-+-+-+-+-+-+-
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Narten, Nordmark & Simpson  Standards Track                    [Page 18]
  1011.  
  1012. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1013.  
  1014.  
  1015. IP Fields:
  1016.  
  1017.    Source Address
  1018.                   MUST be the link-local address assigned to the
  1019.                   interface from which this message is sent.
  1020.  
  1021.    Destination Address
  1022.                   Typically the Source Address of an invoking Router
  1023.                   Solicitation or the all-nodes multicast address.
  1024.  
  1025.    Hop Limit      255
  1026.  
  1027.    Priority       15
  1028.  
  1029.    Authentication Header
  1030.                   If a Security Association for the IP Authentication
  1031.                   Header exists between the sender and the destination
  1032.                   address, then the sender SHOULD include this header.
  1033.  
  1034. ICMP Fields:
  1035.  
  1036.    Type           134
  1037.  
  1038.    Code           0
  1039.  
  1040.    Checksum       The ICMP checksum.  See [ICMPv6].
  1041.  
  1042.    Cur Hop Limit  8-bit unsigned integer.  The default value that should
  1043.                   be placed in the Hop Count field of the IP header for
  1044.                   outgoing IP packets.  A value of zero means
  1045.                   unspecified (by this router).
  1046.  
  1047.    M              1-bit "Managed address configuration" flag.  When set,
  1048.                   hosts use the administered (stateful) protocol for
  1049.                   address autoconfiguration in addition to any addresses
  1050.                   autoconfigured using stateless address
  1051.                   autoconfiguration.  The use of this flag is described
  1052.                   in [ADDRCONF].
  1053.  
  1054.    O              1-bit "Other stateful configuration" flag.  When set,
  1055.                   hosts use the administered (stateful) protocol for
  1056.                   autoconfiguration of other (non-address) information.
  1057.                   The use of this flag is described in [ADDRCONF].
  1058.  
  1059.    Reserved       A 6-bit unused field.  It MUST be initialized to zero
  1060.                   by the sender and MUST be ignored by the receiver.
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Narten, Nordmark & Simpson  Standards Track                    [Page 19]
  1067.  
  1068. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1069.  
  1070.  
  1071.    Router Lifetime
  1072.                   16-bit unsigned integer.  The lifetime associated with
  1073.                   the default router in units of seconds.  The maximum
  1074.                   value corresponds to 18.2 hours.  A Lifetime of 0
  1075.                   indicates that the router is not a default router and
  1076.                   SHOULD NOT appear on the default router list.  The
  1077.                   Router Lifetime applies only to the router's
  1078.                   usefulness as a default router; it does not apply to
  1079.                   information contained in other message fields or
  1080.                   options.  Options that need time limits for their
  1081.                   information include their own lifetime fields.
  1082.  
  1083.    Reachable Time 32-bit unsigned integer.  The time, in milliseconds,
  1084.                   that a node assumes a neighbor is reachable after
  1085.                   having received a reachability confirmation.  Used by
  1086.                   the Neighbor Unreachability Detection algorithm (see
  1087.                   Section 7.3).  A value of zero means unspecified (by
  1088.                   this router).
  1089.  
  1090.    Retrans Timer  32-bit unsigned integer.  The time, in milliseconds,
  1091.                   between retransmitted Neighbor Solicitation messages.
  1092.                   Used by address resolution and the Neighbor
  1093.                   Unreachability Detection algorithm (see Sections 7.2
  1094.                   and 7.3).  A value of zero means unspecified (by this
  1095.                   router).
  1096.  
  1097. Possible options:
  1098.  
  1099.    Source link-layer address
  1100.                   The link-layer address of the interface from which the
  1101.                   Router Advertisement is sent.  Only used on link
  1102.                   layers that have addresses.  A router MAY omit this
  1103.                   option in order to enable inbound load sharing across
  1104.                   multiple link-layer addresses.
  1105.  
  1106.    MTU            SHOULD be sent on links that have a variable MTU (as
  1107.                   specified in the document that describes how to run IP
  1108.                   over the particular link type).  MAY be sent on other
  1109.                   links.
  1110.  
  1111.    Prefix Information
  1112.                   These options specify the prefixes that are on-link
  1113.                   and/or are used for address autoconfiguration.  A
  1114.                   router SHOULD include all its on-link prefixes (except
  1115.                   the link-local prefix) so that multihomed hosts have
  1116.                   complete prefix information about on-link destinations
  1117.                   for the links to which they attach.  If complete
  1118.                   information is lacking, a multihomed host may not be
  1119.  
  1120.  
  1121.  
  1122. Narten, Nordmark & Simpson  Standards Track                    [Page 20]
  1123.  
  1124. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1125.  
  1126.  
  1127.                   able to chose the correct outgoing interface when
  1128.                   sending traffic to its neighbors.
  1129.  
  1130.    Future versions of this protocol may define new option types.
  1131.    Receivers MUST silently ignore any options they do not recognize and
  1132.    continue processing the message.
  1133.  
  1134. 4.3.  Neighbor Solicitation Message Format
  1135.  
  1136.    Nodes send Neighbor Solicitations to request the link-layer address
  1137.    of a target node while also providing their own link-layer address to
  1138.    the target.  Neighbor Solicitations are multicast when the node needs
  1139.    to resolve an address and unicast when the node seeks to verify the
  1140.    reachability of a neighbor.
  1141.  
  1142.       0                   1                   2                   3
  1143.       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
  1144.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1145.      |     Type      |     Code      |          Checksum             |
  1146.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1147.      |                           Reserved                            |
  1148.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1149.      |                                                               |
  1150.      +                                                               +
  1151.      |                                                               |
  1152.      +                       Target Address                          +
  1153.      |                                                               |
  1154.      +                                                               +
  1155.      |                                                               |
  1156.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1157.      |   Options ...
  1158.      +-+-+-+-+-+-+-+-+-+-+-+-
  1159.  
  1160. IP Fields:
  1161.  
  1162.    Source Address
  1163.                   Either an address assigned to the interface from which
  1164.                   this message is sent or (if Duplicate Address
  1165.                   Detection is in progress [ADDRCONF]) the unspecified
  1166.                   address.
  1167.  
  1168.    Destination Address
  1169.                   Either the solicited-node multicast address
  1170.                   corresponding to the target address, or the target
  1171.                   address.
  1172.  
  1173.    Hop Limit      255
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Narten, Nordmark & Simpson  Standards Track                    [Page 21]
  1179.  
  1180. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1181.  
  1182.  
  1183.    Priority       15
  1184.  
  1185.    Authentication Header
  1186.                   If a Security Association for the IP Authentication
  1187.                   Header exists between the sender and the destination
  1188.                   address, then the sender SHOULD include this header.
  1189.  
  1190. ICMP Fields:
  1191.  
  1192.    Type           135
  1193.  
  1194.    Code           0
  1195.  
  1196.    Checksum       The ICMP checksum.  See [ICMPv6].
  1197.  
  1198.    Reserved       This field is unused.  It MUST be initialized to zero
  1199.                   by the sender and MUST be ignored by the receiver.
  1200.  
  1201.    Target Address
  1202.                   The IP address of the target of the solicitation.  It
  1203.                   MUST NOT be a multicast address.
  1204.  
  1205. Possible options:
  1206.  
  1207.    Source link-layer address
  1208.                   The link-layer address for the sender.  On link layers
  1209.                   that have addresses this option MUST be included in
  1210.                   multicast solicitations and SHOULD be included in
  1211.                   unicast solicitations.
  1212.  
  1213.    Future versions of this protocol may define new option types.
  1214.    Receivers MUST silently ignore any options they do not recognize and
  1215.    continue processing the message.
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234. Narten, Nordmark & Simpson  Standards Track                    [Page 22]
  1235.  
  1236. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1237.  
  1238.  
  1239. 4.4.  Neighbor Advertisement Message Format
  1240.  
  1241.    A node sends Neighbor Advertisements in response to Neighbor
  1242.    Solicitations and sends unsolicited Neighbor Advertisements in order
  1243.    to (unreliably) propagate new information quickly.
  1244.  
  1245.       0                   1                   2                   3
  1246.       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
  1247.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1248.      |     Type      |     Code      |          Checksum             |
  1249.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1250.      |R|S|O|                     Reserved                            |
  1251.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1252.      |                                                               |
  1253.      +                                                               +
  1254.      |                                                               |
  1255.      +                       Target Address                          +
  1256.      |                                                               |
  1257.      +                                                               +
  1258.      |                                                               |
  1259.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1260.      |   Options ...
  1261.      +-+-+-+-+-+-+-+-+-+-+-+-
  1262.  
  1263. IP Fields:
  1264.  
  1265.    Source Address
  1266.                   An address assigned to the interface from which the
  1267.                   advertisement is sent.
  1268.  
  1269.    Destination Address
  1270.                   For solicited advertisements, the Source Address of an
  1271.                   invoking Neighbor Solicitation or, if the
  1272.                   solicitation's Source Address is the unspecified
  1273.                   address, the all-nodes multicast address.
  1274.  
  1275.                   For unsolicited advertisements typically the all-nodes
  1276.                   multicast address.
  1277.  
  1278.    Hop Limit      255
  1279.  
  1280.    Priority       15
  1281.  
  1282.    Authentication Header
  1283.                   If a Security Association for the IP Authentication
  1284.                   Header exists between the sender and the destination
  1285.                   address, then the sender SHOULD include this header.
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Narten, Nordmark & Simpson  Standards Track                    [Page 23]
  1291.  
  1292. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1293.  
  1294.  
  1295. ICMP Fields:
  1296.  
  1297.    Type           136
  1298.  
  1299.    Code           0
  1300.  
  1301.    Checksum       The ICMP checksum.  See [ICMPv6].
  1302.  
  1303.    R              Router flag.  When set, the R-bit indicates that the
  1304.                   sender is a router.  The R-bit is used by Neighbor
  1305.                   Unreachability Detection to detect a router that
  1306.                   changes to a host.
  1307.  
  1308.    S              Solicited flag.  When set, the S-bit indicates that
  1309.                   the advertisement was sent in response to a Neighbor
  1310.                   Solicitation from the Destination address.  The S-bit
  1311.                   is used as a reachability confirmation for Neighbor
  1312.                   Unreachability Detection.  It MUST NOT be set in
  1313.                   multicast advertisements or in unsolicited unicast
  1314.                   advertisements.
  1315.  
  1316.    O              Override flag.  When set, the O-bit indicates that the
  1317.                   advertisement should override an existing cache entry
  1318.                   and update the cached link-layer address.  When it is
  1319.                   not set the advertisement will not update a cached
  1320.                   link-layer address though it will update an existing
  1321.                   Neighbor Cache entry for which no link-layer address
  1322.                   is known.  It SHOULD NOT be set in solicited
  1323.                   advertisements for anycast addresses and in solicited
  1324.                   proxy advertisements.  It SHOULD be set in other
  1325.                   solicited advertisements and in unsolicited
  1326.                   advertisements.
  1327.  
  1328.    Reserved       29-bit unused field.  It MUST be initialized to zero
  1329.                   by the sender and MUST be ignored by the receiver.
  1330.  
  1331.    Target Address
  1332.                   For solicited advertisements, the Target Address field
  1333.                   in the Neighbor Solicitation message that prompted
  1334.                   this advertisement.  For an unsolicited advertisement,
  1335.                   the address whose link-layer address has changed.  The
  1336.                   Target Address MUST NOT be a multicast address.
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Narten, Nordmark & Simpson  Standards Track                    [Page 24]
  1347.  
  1348. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1349.  
  1350.  
  1351. Possible options:
  1352.  
  1353.    Target link-layer address
  1354.                   The link-layer address for the target, i.e., the
  1355.                   sender of the advertisement.  MUST be included on link
  1356.                   layers that have addresses.
  1357.  
  1358.    Future versions of this protocol may define new option types.
  1359.    Receivers MUST silently ignore any options they do not recognize and
  1360.    continue processing the message.
  1361.  
  1362. 4.5.  Redirect Message Format
  1363.  
  1364.    Routers send Redirect packets to inform a host of a better first-hop
  1365.    node on the path to a destination.  Hosts can be redirected to a
  1366.    better first-hop router but can also be informed by a redirect that
  1367.    the destination is in fact a neighbor.  The latter is accomplished by
  1368.    setting the ICMP Target Address equal to the ICMP Destination
  1369.    Address.
  1370.  
  1371.       0                   1                   2                   3
  1372.       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
  1373.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1374.      |     Type      |     Code      |          Checksum             |
  1375.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1376.      |                           Reserved                            |
  1377.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1378.      |                                                               |
  1379.      +                                                               +
  1380.      |                                                               |
  1381.      +                       Target Address                          +
  1382.      |                                                               |
  1383.      +                                                               +
  1384.      |                                                               |
  1385.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1386.      |                                                               |
  1387.      +                                                               +
  1388.      |                                                               |
  1389.      +                     Destination Address                       +
  1390.      |                                                               |
  1391.      +                                                               +
  1392.      |                                                               |
  1393.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1394.      |   Options ...
  1395.      +-+-+-+-+-+-+-+-+-+-+-+-
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Narten, Nordmark & Simpson  Standards Track                    [Page 25]
  1403.  
  1404. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1405.  
  1406.  
  1407. IP Fields:
  1408.  
  1409.    Source Address
  1410.                   MUST be the link-local address assigned to the
  1411.                   interface from which this message is sent.
  1412.  
  1413.    Destination Address
  1414.                   The Source Address of the packet that triggered the
  1415.                   redirect.
  1416.  
  1417.    Hop Limit      255
  1418.  
  1419.    Priority       15
  1420.  
  1421.    Authentication Header
  1422.                   If a Security Association for the IP Authentication
  1423.                   Header exists between the sender and the destination
  1424.                   address, then the sender SHOULD include this header.
  1425.  
  1426. ICMP Fields:
  1427.  
  1428.    Type           137
  1429.  
  1430.    Code           0
  1431.  
  1432.    Checksum       The ICMP checksum.  See [ICMPv6].
  1433.  
  1434.    Reserved       This field is unused.  It MUST be initialized to zero
  1435.                   by the sender and MUST be ignored by the receiver.
  1436.  
  1437.    Target Address An IP address that is a better first hop to use for
  1438.                   the ICMP Destination Address.  When the target is the
  1439.                   actual endpoint of communication, i.e., the
  1440.                   destination is a neighbor, the Target Address field
  1441.                   MUST contain the same value as the ICMP Destination
  1442.                   Address field.  Otherwise the target is a better
  1443.                   first-hop router and the Target Address MUST be the
  1444.                   router's link-local address so that hosts can uniquely
  1445.                   identify routers.
  1446.  
  1447.    Destination Address
  1448.                   The IP address of the destination which is redirected
  1449.                   to the target.
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458. Narten, Nordmark & Simpson  Standards Track                    [Page 26]
  1459.  
  1460. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1461.  
  1462.  
  1463. Possible options:
  1464.  
  1465.    Target link-layer address
  1466.                   The link-layer address for the target.  It SHOULD be
  1467.                   included (if known).  Note that on NBMA links, hosts
  1468.                   may rely on the presence of the Target Link-Layer
  1469.                   Address option in Redirect messages as the means for
  1470.                   determining the link-layer addresses of neighbors.  In
  1471.                   such cases, the option MUST be included in Redirect
  1472.                   messages.
  1473.  
  1474.    Redirected Header
  1475.                   As much as possible of the IP packet that triggered
  1476.                   the sending of the Redirect without making the
  1477.                   redirect packet exceed 576 octets.
  1478.  
  1479. 4.6.  Option Formats
  1480.  
  1481.    Neighbor Discovery messages include zero or more options, some of
  1482.    which may appear multiple times in the same message.  All options are
  1483.    of the form:
  1484.  
  1485.       0                   1                   2                   3
  1486.       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
  1487.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1488.      |     Type      |    Length     |              ...              |
  1489.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1490.      ~                              ...                              ~
  1491.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1492.  
  1493. Fields:
  1494.  
  1495.    Type           8-bit identifier of the type of option.  The options
  1496.                   defined in this document are:
  1497.  
  1498.                         Option Name                             Type
  1499.  
  1500.                      Source Link-Layer Address                    1
  1501.                      Target Link-Layer Address                    2
  1502.                      Prefix Information                           3
  1503.                      Redirected Header                            4
  1504.                      MTU                                          5
  1505.  
  1506.  
  1507.    Length         8-bit unsigned integer.  The length of the option in
  1508.                   units of 8 octets.  The value 0 is invalid.  Nodes
  1509.                   MUST silently discard an ND packet that contains an
  1510.                   option with length zero.
  1511.  
  1512.  
  1513.  
  1514. Narten, Nordmark & Simpson  Standards Track                    [Page 27]
  1515.  
  1516. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1517.  
  1518.  
  1519. 4.6.1.  Source/Target Link-layer Address
  1520.  
  1521.       0                   1                   2                   3
  1522.       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
  1523.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1524.      |     Type      |    Length     |    Link-Layer Address ...
  1525.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1526.  
  1527. Fields:
  1528.  
  1529.    Type
  1530.                   1 for Source Link-layer Address
  1531.                   2 for Target Link-layer Address
  1532.  
  1533.    Length         The length of the option in units of 8 octets.  For
  1534.                   example, the length for IEEE 802 addresses is 1
  1535.                   [IPv6-ETHER].
  1536.  
  1537.    Link-Layer Address
  1538.                   The variable length link-layer address.
  1539.  
  1540.                   The content and format of this field (including byte
  1541.                   and bit ordering) is expected to be specified in
  1542.                   specific documents that describe how IPv6 operates
  1543.                   over different link layers.  For instance, [IPv6-
  1544.                   ETHER].
  1545.  
  1546. Description
  1547.                   The Source Link-Layer Address option contains the
  1548.                   link-layer address of the sender of the packet.  It is
  1549.                   used in the Neighbor Solicitation, Router
  1550.                   Solicitation, and Router Advertisement packets.
  1551.  
  1552.                   The Target Link-Layer Address option contains the
  1553.                   link-layer address of the target.  It is used in
  1554.                   Neighbor Advertisement and Redirect packets.
  1555.  
  1556.                   These options MUST be silently ignored for other
  1557.                   Neighbor Discovery messages.
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570. Narten, Nordmark & Simpson  Standards Track                    [Page 28]
  1571.  
  1572. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1573.  
  1574.  
  1575. 4.6.2.  Prefix Information
  1576.  
  1577.       0                   1                   2                   3
  1578.       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
  1579.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1580.      |     Type      |    Length     | Prefix Length |L|A| Reserved1 |
  1581.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1582.      |                         Valid Lifetime                        |
  1583.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1584.      |                       Preferred Lifetime                      |
  1585.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1586.      |                           Reserved2                           |
  1587.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1588.      |                                                               |
  1589.      +                                                               +
  1590.      |                                                               |
  1591.      +                            Prefix                             +
  1592.      |                                                               |
  1593.      +                                                               +
  1594.      |                                                               |
  1595.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1596.  
  1597. Fields:
  1598.  
  1599.    Type           3
  1600.  
  1601.    Length         4
  1602.  
  1603.    Prefix Length  8-bit unsigned integer.  The number of leading bits in
  1604.                   the Prefix that are valid.  The value ranges from 0 to
  1605.                   128.
  1606.  
  1607.    L              1-bit on-link flag.  When set, indicates that this
  1608.                   prefix can be used for on-link determination.  When
  1609.                   not set the advertisement makes no statement about
  1610.                   on-link or off-link properties of the prefix.  For
  1611.                   instance, the prefix might be used for address
  1612.                   configuration with some of the addresses belonging to
  1613.                   the prefix being on-link and others being off-link.
  1614.  
  1615.    A              1-bit autonomous address-configuration flag.  When set
  1616.                   indicates that this prefix can be used for autonomous
  1617.                   address configuration as specified in [ADDRCONF].
  1618.  
  1619.    Reserved1      6-bit unused field.  It MUST be initialized to zero by
  1620.                   the sender and MUST be ignored by the receiver.
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626. Narten, Nordmark & Simpson  Standards Track                    [Page 29]
  1627.  
  1628. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1629.  
  1630.  
  1631.    Valid Lifetime
  1632.                   32-bit unsigned integer.  The length of time in
  1633.                   seconds (relative to the time the packet is sent) that
  1634.                   the prefix is valid for the purpose of on-link
  1635.                   determination.  A value of all one bits (0xffffffff)
  1636.                   represents infinity.  The Valid Lifetime is also used
  1637.                   by [ADDRCONF].
  1638.  
  1639.    Preferred Lifetime
  1640.                   32-bit unsigned integer.  The length of time in
  1641.                   seconds (relative to the time the packet is sent) that
  1642.                   addresses generated from the prefix via stateless
  1643.                   address autoconfiguration remain preferred [ADDRCONF].
  1644.                   A value of all one bits (0xffffffff) represents
  1645.                   infinity.  See [ADDRCONF].
  1646.  
  1647.    Reserved2      This field is unused.  It MUST be initialized to zero
  1648.                   by the sender and MUST be ignored by the receiver.
  1649.  
  1650.    Prefix         An IP address or a prefix of an IP address.  The
  1651.                   Prefix Length field contains the number of valid
  1652.                   leading bits in the prefix.  The bits in the prefix
  1653.                   after the prefix length are reserved and MUST be
  1654.                   initialized to zero by the sender and ignored by the
  1655.                   receiver.  A router SHOULD NOT send a prefix option
  1656.                   for the link-local prefix and a host SHOULD ignore
  1657.                   such a prefix option.
  1658.  
  1659. Description
  1660.                   The Prefix Information option provide hosts with on-
  1661.                   link prefixes and prefixes for Address
  1662.                   Autoconfiguration.
  1663.  
  1664.                   The Prefix Information option appears in Router
  1665.                   Advertisement packets and MUST be silently ignored for
  1666.                   other messages.
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682. Narten, Nordmark & Simpson  Standards Track                    [Page 30]
  1683.  
  1684. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1685.  
  1686.  
  1687. 4.6.3.  Redirected Header
  1688.  
  1689.       0                   1                   2                   3
  1690.       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
  1691.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1692.      |     Type      |    Length     |            Reserved           |
  1693.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1694.      |                           Reserved                            |
  1695.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1696.      |                                                               |
  1697.      ~                       IP header + data                        ~
  1698.      |                                                               |
  1699.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1700.  
  1701. Fields:
  1702.  
  1703.    Type           4
  1704.  
  1705.    Length         The length of the option in units of 8 octets.
  1706.  
  1707.    Reserved       These fields are unused.  They MUST be initialized to
  1708.                   zero by the sender and MUST be ignored by the
  1709.                   receiver.
  1710.  
  1711.    IP header + data
  1712.                   The original packet truncated to ensure that the size
  1713.                   of the redirect message does not exceed 576 octets.
  1714.  
  1715. Description
  1716.                   The Redirected Header option is used in Redirect
  1717.                   messages and contains all or part of the packet that
  1718.                   is being redirected.
  1719.  
  1720.                   This option MUST be silently ignored for other
  1721.                   Neighbor Discovery messages.
  1722.  
  1723. 4.6.4.  MTU
  1724.  
  1725.       0                   1                   2                   3
  1726.       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
  1727.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1728.      |     Type      |    Length     |           Reserved            |
  1729.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1730.      |                              MTU                              |
  1731.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738. Narten, Nordmark & Simpson  Standards Track                    [Page 31]
  1739.  
  1740. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1741.  
  1742.  
  1743. Fields:
  1744.  
  1745.    Type           5
  1746.  
  1747.    Length         1
  1748.  
  1749.    Reserved       This field is unused.  It MUST be initialized to zero
  1750.                   by the sender and MUST be ignored by the receiver.
  1751.  
  1752.    MTU            32-bit unsigned integer.  The recommended MTU for the
  1753.                   link.
  1754.  
  1755. Description
  1756.                   The MTU option is used in  Router Advertisement
  1757.                   messages to insure that all nodes on a link use the
  1758.                   same MTU value in those cases where the link MTU is
  1759.                   not well known.
  1760.  
  1761.                   This option MUST be silently ignored for other
  1762.                   Neighbor Discovery messages.
  1763.  
  1764.                   In configurations in which heterogeneous technologies
  1765.                   are bridged together, the maximum supported MTU may
  1766.                   differ from one segment to another.  If the bridges do
  1767.                   not generate ICMP Packet Too Big messages,
  1768.                   communicating nodes will be unable to use Path MTU to
  1769.                   dynamically determine the appropriate MTU on a per-
  1770.                   neighbor basis.  In such cases, routers use the MTU
  1771.                   option to specify an MTU value supported by all
  1772.                   segments.
  1773.  
  1774. 5.  CONCEPTUAL MODEL OF A HOST
  1775.  
  1776.    This section describes a conceptual model of one possible data
  1777.    structure organization that hosts (and to some extent routers) will
  1778.    maintain in interacting with neighboring nodes.  The described
  1779.    organization is provided to facilitate the explanation of how the
  1780.    Neighbor Discovery protocol should behave.  This document does not
  1781.    mandate that implementations adhere to this model as long as their
  1782.    external behavior is consistent with that described in this document.
  1783.  
  1784.    This model is only concerned with the aspects of host behavior
  1785.    directly related to Neighbor Discovery.  In particular, it does not
  1786.    concern itself with such issues as source address selection or the
  1787.    selecting of an outgoing interface on a multihomed host.
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794. Narten, Nordmark & Simpson  Standards Track                    [Page 32]
  1795.  
  1796. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1797.  
  1798.  
  1799. 5.1.  Conceptual Data Structures
  1800.  
  1801.    Hosts will need to maintain the following pieces of information for
  1802.    each interface:
  1803.  
  1804.    Neighbor Cache
  1805.                 - A set of entries about individual neighbors to which
  1806.                   traffic has been sent recently.  Entries are keyed on
  1807.                   the neighbor's on-link unicast IP address and contain
  1808.                   such information as its link-layer address, a flag
  1809.                   indicating whether the neighbor is a router or a host
  1810.                   (called IsRouter in this document), a pointer to any
  1811.                   queued packets waiting for address resolution to
  1812.                   complete, etc.
  1813.  
  1814.                   A Neighbor Cache entry also contains information used
  1815.                   by the Neighbor Unreachability Detection algorithm,
  1816.                   including the reachability state, the number of
  1817.                   unanswered probes, and the time the next Neighbor
  1818.                   Unreachability Detection event is scheduled to take
  1819.                   place.
  1820.  
  1821.    Destination Cache
  1822.                 - A set of entries about destinations to which traffic
  1823.                   has been sent recently.  The Destination Cache
  1824.                   includes both on-link and off-link destinations and
  1825.                   provides a level of indirection into the Neighbor
  1826.                   Cache; the Destination Cache maps a destination IP
  1827.                   address to the IP address of the next-hop neighbor.
  1828.                   This cache is updated with information learned from
  1829.                   Redirect messages.  Implementations may find it
  1830.                   convenient to store additional information not
  1831.                   directly related to Neighbor Discovery in Destination
  1832.                   Cache entries, such as the Path MTU (PMTU) and round
  1833.                   trip timers maintained by transport protocols.
  1834.  
  1835.    Prefix List  - A list of the prefixes that define a set of addresses
  1836.                   that are on-link.  Prefix List entries are created
  1837.                   from information received in Router Advertisements.
  1838.                   Each entry has an associated invalidation timer value
  1839.                   (extracted from the advertisement) used to expire
  1840.                   prefixes when they become invalid.  A special
  1841.                   "infinity" timer value specifies that a prefix remains
  1842.                   valid forever, unless a new (finite) value is received
  1843.                   in a subsequent advertisement.
  1844.  
  1845.                   The link-local prefix is considered to be on the
  1846.                   prefix list with an infinite invalidation timer
  1847.  
  1848.  
  1849.  
  1850. Narten, Nordmark & Simpson  Standards Track                    [Page 33]
  1851.  
  1852. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1853.  
  1854.  
  1855.                   regardless of whether routers are advertising a prefix
  1856.                   for it.  Received Router Advertisements SHOULD NOT
  1857.                   modify the invalidation timer for the link-local
  1858.                   prefix.
  1859.  
  1860.    Default Router List
  1861.                 - A list of routers to which packets may be sent.
  1862.                   Router list entries point to entries in the Neighbor
  1863.                   Cache; the algorithm for selecting a default router
  1864.                   favors routers known to be reachable over those whose
  1865.                   reachability is suspect.  Each entry also has an
  1866.                   associated invalidation timer value (extracted from
  1867.                   Router Advertisements) used to delete entries that are
  1868.                   no longer advertised.
  1869.  
  1870.    Note that the above conceptual data structures can be implemented
  1871.    using a variety of techniques.  One possible implementation is to use
  1872.    a single longest-match routing table for all of the above data
  1873.    structures.  Regardless of the specific implementation, it is
  1874.    critical that the Neighbor Cache entry for a router is shared by all
  1875.    Destination Cache entries using that router in order to prevent
  1876.    redundant Neighbor Unreachability Detection probes.
  1877.  
  1878.    Note also that other protocols (e.g. IPv6 Mobility) might add
  1879.    additional conceptual data structures.  An implementation is at
  1880.    liberty to implement such data structures in any way it pleases.  For
  1881.    example, an implementation could merge all conceptual data structures
  1882.    into a single routing table.
  1883.  
  1884.    The Neighbor Cache contains information maintained by the Neighbor
  1885.    Unreachability Detection algorithm.  A key piece of information is a
  1886.    neighbor's reachability state, which is one of five possible values.
  1887.  
  1888.    The following definitions are informal; precise definitions can be
  1889.    found in Section 7.3.2.
  1890.  
  1891.    INCOMPLETE  Address resolution is in progress and the link-layer
  1892.                address of the neighbor has not yet been determined.
  1893.  
  1894.    REACHABLE   Roughly speaking, the neighbor is known to have been
  1895.                reachable recently (within tens of seconds ago).
  1896.  
  1897.    STALE       The neighbor is no longer known to be reachable but until
  1898.                traffic is sent to the neighbor, no attempt should be
  1899.                made to verify its reachability.
  1900.  
  1901.    DELAY       The neighbor is no longer known to be reachable, and
  1902.                traffic has recently be sent to the neighbor.  Rather
  1903.  
  1904.  
  1905.  
  1906. Narten, Nordmark & Simpson  Standards Track                    [Page 34]
  1907.  
  1908. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1909.  
  1910.  
  1911.                than probe the neighbor immediately, however, delay
  1912.                sending probes for a short while in order to give upper
  1913.                layer protocols a chance to provide reachability
  1914.                confirmation.
  1915.  
  1916.    PROBE       The neighbor is no longer known to be reachable, and
  1917.                unicast Neighbor Solicitation probes are being sent to
  1918.                verify reachability.
  1919.  
  1920. 5.2.  Conceptual Sending Algorithm
  1921.  
  1922.    When sending a packet to a destination, a node uses a combination of
  1923.    the Destination Cache, the Prefix List, and the Default Router List
  1924.    to determine the IP address of the appropriate next hop, an operation
  1925.    known as "next-hop determination".  Once the IP address of the next
  1926.    hop is known, the Neighbor Cache is consulted for link-layer
  1927.    information about that neighbor.
  1928.  
  1929.    Next-hop determination for a given unicast destination operates as
  1930.    follows.  The sender performs a longest prefix match against the
  1931.    Prefix List to determine whether the packet's destination is on- or
  1932.    off-link.  If the destination is on-link, the next-hop address is the
  1933.    same as the packet's destination address.  Otherwise, the sender
  1934.    selects a router from the Default Router List (following the rules
  1935.    described in Section 6.3.6).  If the Default Router List is empty,
  1936.    the sender assumes that the destination is on-link.
  1937.  
  1938.    For efficiency reasons, next-hop determination is not performed on
  1939.    every packet that is sent.  Instead, the results of next-hop
  1940.    determination computations are saved in the Destination Cache (which
  1941.    also contains updates learned from Redirect messages).  When the
  1942.    sending node has a packet to send, it first examines the Destination
  1943.    Cache.  If no entry exists for the destination, next-hop
  1944.    determination is invoked to create a Destination Cache entry.
  1945.  
  1946.    Once the IP address of the next-hop node is known, the sender
  1947.    examines the Neighbor Cache for link-layer information about that
  1948.    neighbor.  If no entry exists, the sender creates one, sets its state
  1949.    to INCOMPLETE, initiates Address Resolution, and then queues the data
  1950.    packet pending completion of address resolution.  For multicast-
  1951.    capable interfaces Address Resolution consists of sending a Neighbor
  1952.    Solicitation message and waiting for a Neighbor Advertisement.  When
  1953.    a Neighbor Advertisement response is received, the link-layer
  1954.    addresses is entered in the Neighbor Cache entry and the queued
  1955.    packet is transmitted.  The address resolution mechanism is described
  1956.    in detail in Section 7.2.
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962. Narten, Nordmark & Simpson  Standards Track                    [Page 35]
  1963.  
  1964. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  1965.  
  1966.  
  1967.    For multicast packets the next-hop is always the (multicast)
  1968.    destination address and is considered to be on-link.  The procedure
  1969.    for determining the link-layer address corresponding to a given IP
  1970.    multicast address can be found in a separate document that covers
  1971.    operating IP over a particular link type (e.g., [IPv6-ETHER]).
  1972.  
  1973.    Each time a Neighbor Cache entry is accessed while transmitting a
  1974.    unicast packet, the sender checks Neighbor Unreachability Detection
  1975.    related information according to the Neighbor Unreachability
  1976.    Detection algorithm (Section 7.3).  This unreachability check might
  1977.    result in the sender transmitting a unicast Neighbor Solicitation to
  1978.    verify that the neighbor is still reachable.
  1979.  
  1980.    Next-hop determination is done the first time traffic is sent to a
  1981.    destination.  As long as subsequent communication to that destination
  1982.    proceeds successfully, the Destination Cache entry continues to be
  1983.    used.  If at some point communication ceases to proceed, as
  1984.    determined by the Neighbor Unreachability Detection algorithm, next-
  1985.    hop determination may need to be performed again.  For example,
  1986.    traffic through a failed router should be switched to a working
  1987.    router.  Likewise, it may be possible to reroute traffic destined for
  1988.    a mobile node to a "mobility agent".
  1989.  
  1990.    Note that when a node redoes next-hop determination there is no need
  1991.    to discard the complete Destination Cache entry.  In fact, it is
  1992.    generally beneficial to retain such cached information as the PMTU
  1993.    and round trip timer values that may also be kept in the Destination
  1994.    Cache entry.
  1995.  
  1996.    Routers and multihomed hosts have multiple interfaces.  The remainder
  1997.    of this document assumes that all sent and received Neighbor
  1998.    Discovery messages refer to the interface of appropriate context.
  1999.    For example, when responding to a Router Solicitation, the
  2000.    corresponding Router Advertisement is sent out the interface on which
  2001.    the solicitation was received.
  2002.  
  2003. 5.3.  Garbage Collection and Timeout Requirements
  2004.  
  2005.    The conceptual data structures described above use different
  2006.    mechanisms for discarding potentially stale or unused information.
  2007.  
  2008.    From the perspective of correctness there is no need to periodically
  2009.    purge Destination and Neighbor Cache entries.  Although stale
  2010.    information can potentially remain in the cache indefinitely, the
  2011.    Neighbor Unreachability Detection algorithm ensures that stale
  2012.    information is purged quickly if it is actually being used.
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018. Narten, Nordmark & Simpson  Standards Track                    [Page 36]
  2019.  
  2020. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2021.  
  2022.  
  2023.    To limit the storage needed for the Destination and Neighbor Caches,
  2024.    a node may need to garbage-collect old entries.  However, care must
  2025.    be taken to insure that sufficient space is always present to hold
  2026.    the working set of active entries.  A small cache may result in an
  2027.    excessive number of Neighbor Discovery messages if entries are
  2028.    discarded and rebuilt in quick succession.  Any LRU-based policy that
  2029.    only reclaims entries that have not been used in some time (e.g., ten
  2030.    minutes or more) should be adequate for garbage-collecting unused
  2031.    entries.
  2032.  
  2033.    A node should retain entries in the Default Router List and the
  2034.    Prefix List until their lifetimes expire.  However, a node may
  2035.    garbage collect entries prematurely if it is low on memory.  If not
  2036.    all routers are kept on the Default Router list, a node should retain
  2037.    at least two entries in the Default Router List (and preferably more)
  2038.    in order to maintain robust connectivity for off-link destinations.
  2039.  
  2040.    When removing an entry from the Prefix List there is no need to purge
  2041.    any entries from the Destination or Neighbor Caches.  Neighbor
  2042.    Unreachability Detection will efficiently purge any entries in these
  2043.    caches that have become invalid.  When removing an entry from the
  2044.    Default Router List, however, any entries in the Destination Cache
  2045.    that go through that router must perform next-hop determination again
  2046.    to select a new default router.
  2047.  
  2048. 6.  ROUTER AND PREFIX DISCOVERY
  2049.  
  2050.    This section describes router and host behavior related to the Router
  2051.    Discovery portion of Neighbor Discovery.  Router Discovery is used to
  2052.    locate neighboring routers as well as learn prefixes and
  2053.    configuration parameters related to address autoconfiguration.
  2054.  
  2055.    Prefix Discovery is the process through which hosts learn the ranges
  2056.    of IP addresses that reside on-link and can be reached directly
  2057.    without going through a router.  Routers send Router Advertisements
  2058.    that indicate whether the sender is willing to be a default router.
  2059.    Router Advertisements also contain Prefix Information options that
  2060.    list the set of prefixes that identify on-link IP addresses.
  2061.  
  2062.    Stateless Address Autoconfiguration must also obtain subnet prefixes
  2063.    as part of configuring addresses.  Although the prefixes used for
  2064.    address autoconfiguration are logically distinct from those used for
  2065.    on-link determination, autoconfiguration information is piggybacked
  2066.    on Router Discovery messages to reduce network traffic.  Indeed, the
  2067.    same prefixes can be advertised for on-link determination and address
  2068.    autoconfiguration by specifying the appropriate flags in the Prefix
  2069.    Information options.  See [ADDRCONF] for details on how
  2070.    autoconfiguration information is processed.
  2071.  
  2072.  
  2073.  
  2074. Narten, Nordmark & Simpson  Standards Track                    [Page 37]
  2075.  
  2076. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2077.  
  2078.  
  2079. 6.1.  Message Validation
  2080.  
  2081. 6.1.1.  Validation of Router Solicitation Messages
  2082.  
  2083.    Hosts MUST silently discard any received Router Solicitation
  2084.    Messages.
  2085.  
  2086.    A router MUST silently discard any received Router Solicitation
  2087.    messages that do not satisfy all of the following validity checks:
  2088.  
  2089.    - The IP Hop Limit field has a value of 255, i.e., the packet could
  2090.      not possibly have been forwarded by a router.
  2091.  
  2092.    - If the message includes an IP Authentication Header, the message
  2093.      authenticates correctly.
  2094.  
  2095.    - ICMP Checksum is valid.
  2096.  
  2097.    - ICMP Code is 0.
  2098.  
  2099.    - ICMP length (derived from the IP length) is 8 or more octets.
  2100.  
  2101.    - All included options have a length that is greater than zero.
  2102.  
  2103.    The contents of the Reserved field, and of any unrecognized options,
  2104.    MUST be ignored.  Future, backward-compatible changes to the protocol
  2105.    may specify the contents of the Reserved field or add new options;
  2106.    backward-incompatible changes may use different Code values.
  2107.  
  2108.    The contents of any defined options that are not specified to be used
  2109.    with Router Solicitation messages MUST be ignored and the packet
  2110.    processed as normal.  The only defined option that may appear is the
  2111.    Source Link-Layer Address option.
  2112.  
  2113.    A solicitation that passes the validity checks is called a "valid
  2114.    solicitation".
  2115.  
  2116. 6.1.2.  Validation of Router Advertisement Messages
  2117.  
  2118.    A node MUST silently discard any received Router Advertisement
  2119.    messages that do not satisfy all of the following validity checks:
  2120.  
  2121.    - IP Source Address is a link-local address.  Routers must use their
  2122.      link-local address as the source for Router Advertisement and
  2123.      Redirect messages so that hosts can uniquely identify routers.
  2124.  
  2125.    - The IP Hop Limit field has a value of 255, i.e., the packet could
  2126.      not possibly have been forwarded by a router.
  2127.  
  2128.  
  2129.  
  2130. Narten, Nordmark & Simpson  Standards Track                    [Page 38]
  2131.  
  2132. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2133.  
  2134.  
  2135.    - If the message includes an IP Authentication Header, the message
  2136.      authenticates correctly.
  2137.  
  2138.    - ICMP Checksum is valid.
  2139.  
  2140.    - ICMP Code is 0.
  2141.  
  2142.    - ICMP length (derived from the IP length) is 16 or more octets.
  2143.  
  2144.    - All included options have a length that is greater than zero.
  2145.  
  2146.    The contents of the Reserved field, and of any unrecognized options,
  2147.    MUST be ignored.  Future, backward-compatible changes to the protocol
  2148.    may specify the contents of the Reserved field or add new options;
  2149.    backward-incompatible changes may use different Code values.
  2150.  
  2151.    The contents of any defined options that are not specified to be used
  2152.    with Router Advertisement messages MUST be ignored and the packet
  2153.    processed as normal.  The only defined options that may appear are
  2154.    the Source Link-Layer Address, Prefix Information and MTU options.
  2155.  
  2156.    An advertisement that passes the validity checks is called a "valid
  2157.    advertisement".
  2158.  
  2159. 6.2.  Router Specification
  2160.  
  2161. 6.2.1.  Router Configuration Variables
  2162.  
  2163.    A router MUST allow for the following conceptual variables to be
  2164.    configured by system management.  The specific variable names are
  2165.    used for demonstration purposes only, and an implementation is not
  2166.    required to have them, so long as its external behavior is consistent
  2167.    with that described in this document.  Default values are specified
  2168.    to simplify configuration in common cases.
  2169.  
  2170.    The default values for some of the variables listed below may be
  2171.    overridden by specific documents that describe how IPv6 operates over
  2172.    different link layers.  This rule simplifies the configuration of
  2173.    Neighbor Discovery over link types with widely differing performance
  2174.    characteristics.
  2175.  
  2176.    For each multicast interface:
  2177.  
  2178.      AdvSendAdvertisements
  2179.                     A flag indicating whether or not the router sends
  2180.                     periodic Router Advertisements and responds to
  2181.                     Router Solicitations.
  2182.  
  2183.  
  2184.  
  2185.  
  2186. Narten, Nordmark & Simpson  Standards Track                    [Page 39]
  2187.  
  2188. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2189.  
  2190.  
  2191.                     Default: FALSE
  2192.  
  2193.                     Note that AdvSendAdvertisements MUST be false by
  2194.                     default so that a node will not accidentally start
  2195.                     acting as a router unless it is explicitly
  2196.                     configured by system management to send Router
  2197.                     Advertisements.
  2198.  
  2199.      MaxRtrAdvInterval
  2200.                     The maximum time allowed between sending unsolicited
  2201.                     multicast Router Advertisements from the interface,
  2202.                     in seconds.  MUST be no less than 4 seconds and no
  2203.                     greater than 1800 seconds.
  2204.  
  2205.                     Default: 600 seconds
  2206.  
  2207.      MinRtrAdvInterval
  2208.                     The minimum time allowed between sending unsolicited
  2209.                     multicast Router Advertisements from the interface,
  2210.                     in seconds.  MUST be no less than 3 seconds and no
  2211.                     greater than .75 * MaxRtrAdvInterval.
  2212.  
  2213.                     Default: 0.33 * MaxRtrAdvInterval
  2214.  
  2215.      AdvManagedFlag
  2216.                     The true/false value to be placed in the "Managed
  2217.                     address configuration" flag field in the Router
  2218.                     Advertisement.  See [ADDRCONF].
  2219.  
  2220.                     Default: FALSE
  2221.  
  2222.      AdvOtherConfigFlag
  2223.                     The true/false value to be placed in the "Other
  2224.                     stateful configuration" flag field in the Router
  2225.                     Advertisement.  See [ADDRCONF].
  2226.  
  2227.                     Default: FALSE
  2228.  
  2229.      AdvLinkMTU     The value to be placed in MTU options sent by the
  2230.                     router.  A value of zero indicates that no MTU
  2231.                     options are sent.
  2232.  
  2233.                     Default: 0
  2234.  
  2235.      AdvReachableTime
  2236.                     The value to be placed in the Reachable Time field
  2237.                     in the Router Advertisement messages sent by the
  2238.                     router.  The value zero means unspecified (by this
  2239.  
  2240.  
  2241.  
  2242. Narten, Nordmark & Simpson  Standards Track                    [Page 40]
  2243.  
  2244. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2245.  
  2246.  
  2247.                     router).  MUST be no greater than 3,600,000
  2248.                     milliseconds (1 hour).
  2249.  
  2250.                     Default: 0
  2251.  
  2252.      AdvRetransTimer
  2253.                     The value to be placed in the Retrans Timer field in
  2254.                     the Router Advertisement messages sent by the
  2255.                     router.  The value zero means unspecified (by this
  2256.                     router).
  2257.  
  2258.                     Default: 0
  2259.  
  2260.      AdvCurHopLimit
  2261.                     The default value to be placed in the Cur Hop Limit
  2262.                     field in the Router Advertisement messages sent by
  2263.                     the router.  The value should be set to that current
  2264.                     diameter of the Internet.  The value zero means
  2265.                     unspecified (by this router).
  2266.  
  2267.                     Default:  The value specified in the "Assigned
  2268.                     Numbers" RFC [ASSIGNED] that was in effect at the
  2269.                     time of implementation.
  2270.  
  2271.      AdvDefaultLifetime
  2272.                     The value to be placed in the Router Lifetime field
  2273.                     of Router Advertisements sent from the interface, in
  2274.                     seconds.  MUST be either zero or between
  2275.                     MaxRtrAdvInterval and 9000 seconds.  A value of zero
  2276.                     indicates that the router is not to be used as a
  2277.                     default router.
  2278.  
  2279.                     Default: 3 * MaxRtrAdvInterval
  2280.  
  2281.      AdvPrefixList
  2282.                     A list of prefixes to be placed in Prefix
  2283.                     Information options in Router Advertisement messages
  2284.                     sent from the interface.
  2285.  
  2286.                     Default: all prefixes that the router advertises via
  2287.                     routing protocols as being on-link for the interface
  2288.                     from which the advertisement is sent.  The link-
  2289.                     local prefix SHOULD NOT be included in the list of
  2290.                     advertised prefixes.
  2291.  
  2292.                     Each prefix has an associated:
  2293.  
  2294.                        AdvValidLifetime
  2295.  
  2296.  
  2297.  
  2298. Narten, Nordmark & Simpson  Standards Track                    [Page 41]
  2299.  
  2300. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2301.  
  2302.  
  2303.                             The value to be placed in the Valid Lifetime
  2304.                             in the Prefix Information option, in
  2305.                             seconds.  The designated value of all 1's
  2306.                             (0xffffffff) represents infinity.
  2307.  
  2308.                             Default: infinity.
  2309.  
  2310.                        AdvOnLinkFlag
  2311.                             The value to be placed in the on-link flag
  2312.                             ("L-bit") field in the Prefix Information
  2313.                             option.
  2314.  
  2315.                             Default: TRUE
  2316.  
  2317.                     Automatic address configuration [ADDRCONF] defines
  2318.                     additional information associated with each the
  2319.                     prefixes:
  2320.  
  2321.                        AdvPreferredLifetime
  2322.                             The value to be placed in the Preferred
  2323.                             Lifetime in the Prefix Information option,
  2324.                             in seconds.  The designated value of all 1's
  2325.                             (0xffffffff) represents infinity.  See
  2326.                             [ADDRCONF].
  2327.  
  2328.                             Default: 604800 seconds (7 days)
  2329.  
  2330.                        AdvAutonomousFlag
  2331.                             The value to be placed in the Autonomous
  2332.                             Flag field in the Prefix Information option.
  2333.                             See [ADDRCONF].
  2334.  
  2335.                             Default: TRUE
  2336.  
  2337.    The above variables contain information that is placed in outgoing
  2338.    Router Advertisement messages.  Hosts use the received information to
  2339.    initialize a set of analogous variables that control their external
  2340.    behavior (see Section 6.3.2).  Some of these host variables (e.g.,
  2341.    CurHopLimit, RetransTimer, and ReachableTime) apply to all nodes
  2342.    including routers.  In practice, these variables may not actually be
  2343.    present on routers, since their contents can be derived from the
  2344.    variables described above.  However, external router behavior MUST be
  2345.    the same as host behavior with respect to these variables.  In
  2346.    particular, this includes the occasional randomization of the
  2347.    ReachableTime value as described in Section 6.3.2.
  2348.  
  2349.    Protocol constants are defined in Section 10.
  2350.  
  2351.  
  2352.  
  2353.  
  2354. Narten, Nordmark & Simpson  Standards Track                    [Page 42]
  2355.  
  2356. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2357.  
  2358.  
  2359. 6.2.2.  Becoming An Advertising Interface
  2360.  
  2361.    The term "advertising interface" refers to any functioning and
  2362.    enabled multicast interface that has at least one unicast IP address
  2363.    assigned to it and whose corresponding AdvSendAdvertisements flag is
  2364.    TRUE.  A router MUST NOT send Router Advertisements out any interface
  2365.    that is not an advertising interface.
  2366.  
  2367.    An interface may become an advertising interface at times other than
  2368.    system startup.  For example:
  2369.  
  2370.    - changing the AdvSendAdvertisements flag on an enabled interface
  2371.      from FALSE to TRUE, or
  2372.  
  2373.    - administratively enabling the interface, if it had been
  2374.      administratively disabled, and its AdvSendAdvertisements flag is
  2375.      TRUE, or
  2376.  
  2377.    - enabling IP forwarding capability (i.e., changing the system from
  2378.      being a host to being a router), when the interface's
  2379.      AdvSendAdvertisements flag is TRUE.
  2380.  
  2381.    A router MUST join the all-routers multicast address on an
  2382.    advertising interface.  Routers respond to Router Solicitations sent
  2383.    to the all-routers address and verify the consistency of Router
  2384.    Advertisements sent by neighboring routers.
  2385.  
  2386. 6.2.3.  Router Advertisement Message Content
  2387.  
  2388.    A router sends periodic as well as solicited Router Advertisements
  2389.    out its advertising interfaces.  Outgoing Router Advertisements are
  2390.    filled with the following values consistent with the message format
  2391.    given in Section 4.2:
  2392.  
  2393.    - In the Router Lifetime field: the interface's configured
  2394.      AdvDefaultLifetime.
  2395.  
  2396.    - In the M and O flags: the interface's configured AdvManagedFlag and
  2397.      AdvOtherConfigFlag, respectively.  See [ADDRCONF].
  2398.  
  2399.    - In the Cur Hop Limit field: the interface's configured CurHopLimit.
  2400.  
  2401.    - In the Reachable Time field: the interface's configured
  2402.      AdvReachableTime.
  2403.  
  2404.    - In the Retrans Timer field: the interface's configured
  2405.      AdvRetransTimer.
  2406.  
  2407.  
  2408.  
  2409.  
  2410. Narten, Nordmark & Simpson  Standards Track                    [Page 43]
  2411.  
  2412. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2413.  
  2414.  
  2415.    - In the options:
  2416.  
  2417.         o Source Link-Layer Address option: link-layer address of the
  2418.           sending interface.  This option MAY be omitted to facilitate
  2419.           in-bound load balancing over replicated interfaces.
  2420.  
  2421.         o MTU option: the interface's configured AdvLinkMTU value if the
  2422.           value is non-zero.  If AdvLinkMTU is zero the MTU option is
  2423.           not sent.
  2424.  
  2425.         o Prefix Information options: one Prefix Information option for
  2426.           each prefix listed in AdvPrefixList with the option fields set
  2427.           from the information in the AdvPrefixList entry as follows:
  2428.  
  2429.              - In the "on-link" flag: the entry's AdvOnLinkFlag.
  2430.  
  2431.              - In the Valid Lifetime field: the entry's
  2432.                AdvValidLifetime.
  2433.  
  2434.              - In the "Autonomous address configuration" flag: the
  2435.                entry's AdvAutonomousFlag.
  2436.  
  2437.              - In the Preferred Lifetime field: the entry's
  2438.                AdvPreferredLifetime.
  2439.  
  2440.    A router might want to send Router Advertisements without advertising
  2441.    itself as a default router.  For instance, a router might advertise
  2442.    prefixes for address autoconfiguration while not wishing to forward
  2443.    packets.  Such a router sets the Router Lifetime field in outgoing
  2444.    advertisements to zero.
  2445.  
  2446.    A router MAY choose not to include some or all options when sending
  2447.    unsolicited Router Advertisements.  For example, if prefix lifetimes
  2448.    are much longer than AdvDefaultLifetime, including them every few
  2449.    advertisements may be sufficient.  However, when responding to a
  2450.    Router Solicitation or while sending the first few initial
  2451.    unsolicited advertisements, a router SHOULD include all options so
  2452.    that all information (e.g., prefixes) is propagated quickly during
  2453.    system initialization.
  2454.  
  2455.    If including all options causes the size of an advertisement to
  2456.    exceed the link MTU, multiple advertisements can be sent, each
  2457.    containing a subset of the options.
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466. Narten, Nordmark & Simpson  Standards Track                    [Page 44]
  2467.  
  2468. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2469.  
  2470.  
  2471. 6.2.4.  Sending Unsolicited Router Advertisements
  2472.  
  2473.    A host MUST NOT send Router Advertisement messages at any time.
  2474.  
  2475.    Unsolicited Router Advertisements are not strictly periodic: the
  2476.    interval between subsequent transmissions is randomized to reduce the
  2477.    probability of synchronization with the advertisements from other
  2478.    routers on the same link [SYNC].  Each advertising interface has its
  2479.    own timer.  Whenever a multicast advertisement is sent from an
  2480.    interface, the timer is reset to a uniformly-distributed random value
  2481.    between the interface's configured MinRtrAdvInterval and
  2482.    MaxRtrAdvInterval; expiration of the timer causes the next
  2483.    advertisement to be sent and a new random value to be chosen.
  2484.  
  2485.    For the first few advertisements (up to
  2486.    MAX_INITIAL_RTR_ADVERTISEMENTS) sent from an interface when it
  2487.    becomes an advertising interface, if the randomly chosen interval is
  2488.    greater than MAX_INITIAL_RTR_ADVERT_INTERVAL, the timer SHOULD be set
  2489.    to MAX_INITIAL_RTR_ADVERT_INTERVAL instead.  Using a smaller interval
  2490.    for the initial advertisements increases the likelihood of a router
  2491.    being discovered quickly when it first becomes available, in the
  2492.    presence of possible packet loss.
  2493.  
  2494.    The information contained in Router Advertisements may change through
  2495.    actions of system management.  For instance, the lifetime of
  2496.    advertised prefixes may change, new prefixes could be added, a router
  2497.    could cease to be a router (i.e., switch from being a router to being
  2498.    a host), etc.  In such cases, the router MAY transmit up to
  2499.    MAX_INITIAL_RTR_ADVERTISEMENTS unsolicited advertisements, using the
  2500.    same rules as when an interface becomes an advertising interface.
  2501.  
  2502. 6.2.5.  Ceasing To Be An Advertising Interface
  2503.  
  2504.    An interface may cease to be an advertising interface, through
  2505.    actions of system management such as:
  2506.  
  2507.    - changing the AdvSendAdvertisements flag of an enabled interface
  2508.      from TRUE to FALSE, or
  2509.  
  2510.    - administratively disabling the interface, or
  2511.  
  2512.    - shutting down the system.
  2513.  
  2514.    In such cases the router SHOULD transmit one or more (but not more
  2515.    than MAX_FINAL_RTR_ADVERTISEMENTS) final multicast Router
  2516.    Advertisements on the interface with a Router Lifetime field of zero.
  2517.    In the case of a router becoming a host, the system SHOULD also
  2518.    depart from the all-routers IP multicast group on all interfaces on
  2519.  
  2520.  
  2521.  
  2522. Narten, Nordmark & Simpson  Standards Track                    [Page 45]
  2523.  
  2524. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2525.  
  2526.  
  2527.    which the router supports IP multicast (whether or not they had been
  2528.    advertising interfaces).  In addition, the host MUST insure that
  2529.    subsequent Neighbor Advertisement messages sent from the interface
  2530.    have the Router flag set to zero.
  2531.  
  2532.    Note that system management may disable a router's IP forwarding
  2533.    capability (i.e., changing the system from being a router to being a
  2534.    host), a step that does not necessarily imply that the router's
  2535.    interfaces stop being advertising interfaces.  In such cases,
  2536.    subsequent Router Advertisements MUST set the Router Lifetime field
  2537.    to zero.
  2538.  
  2539. 6.2.6.  Processing Router Solicitations
  2540.  
  2541.    A host MUST silently discard any received Router Solicitation
  2542.    messages.
  2543.  
  2544.    In addition to sending periodic, unsolicited advertisements, a router
  2545.    sends advertisements in response to valid solicitations received on
  2546.    an advertising interface.  A router MAY choose to unicast the
  2547.    response directly to the soliciting host's address (if the
  2548.    solicitation's source address is not the unspecified address), but
  2549.    the usual case is to multicast the response to the all-nodes group.
  2550.    In the latter case, the interface's interval timer is reset to a new
  2551.    random value, as if an unsolicited advertisement had just been sent
  2552.    (see Section 6.2.4).
  2553.  
  2554.    In all cases, Router Advertisements sent in response to a Router
  2555.    Solicitation MUST be delayed by a random time between 0 and
  2556.    MAX_RA_DELAY_TIME seconds. (If a single advertisement is sent in
  2557.    response to multiple solicitations, the delay is relative to the
  2558.    first solicitation.)  In addition, consecutive Router Advertisements
  2559.    sent to the all-nodes multicast address MUST be rate limited to no
  2560.    more than one advertisement every MIN_DELAY_BETWEEN_RAS seconds.
  2561.  
  2562.    A router might process Router Solicitations as follows:
  2563.  
  2564.  - Upon receipt of a Router Solicitation, compute a random delay within
  2565.    the range 0 through MAX_RA_DELAY_TIME.  If the computed value
  2566.    corresponds to a time later than the time the next multicast Router
  2567.    Advertisement is scheduled to be sent, ignore the random delay and
  2568.    send the advertisement at the already-scheduled time.
  2569.  
  2570.  - If the router sent a multicast Router Advertisement (solicited or
  2571.    unsolicited) within the last MIN_DELAY_BETWEEN_RAS seconds, schedule
  2572.    the advertisement to be sent at a time corresponding to
  2573.    MIN_DELAY_BETWEEN_RAS plus the random value after the previous
  2574.    advertisement was sent.  This ensures that the multicast Router
  2575.  
  2576.  
  2577.  
  2578. Narten, Nordmark & Simpson  Standards Track                    [Page 46]
  2579.  
  2580. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2581.  
  2582.  
  2583.    Advertisements are rate limited.
  2584.  
  2585.  - Otherwise, schedule the sending of a Router Advertisement at the time
  2586.    given by the random value.
  2587.  
  2588.    Note that a router is permitted to send multicast Router
  2589.    Advertisements more frequently than indicated by the
  2590.    MinRtrAdvInterval configuration variable so long as the more frequent
  2591.    advertisements are responses to Router Solicitations.  In all cases,
  2592.    however, unsolicited multicast advertisements MUST NOT be sent more
  2593.    frequently than indicated by MinRtrAdvInterval.
  2594.  
  2595.    When a router receives a Router Solicitation and the Source Address
  2596.    is not the unspecified address, it records that the source of the
  2597.    packet is a neighbor by creating or updating the Neighbor Cache
  2598.    entry.  If the solicitation contains a Source Link-Layer Address
  2599.    option, and the router has a Neighbor Cache entry for the neighbor,
  2600.    the link-layer address SHOULD be updated in the Neighbor Cache.  If a
  2601.    Neighbor Cache entry is created for the source its reachability state
  2602.    MUST be set to STALE as specified in Section 7.3.3.  If a cache entry
  2603.    already exists and is updated with a different link-layer address the
  2604.    reachability state MUST also be set to STALE.  In either case the
  2605.    entry's IsRouter flag SHOULD be set to false.
  2606.  
  2607.    If the Source Address is the unspecified address the router MUST NOT
  2608.    create or update the Neighbor Cache entry.
  2609.  
  2610. 6.2.7.  Router Advertisement Consistency
  2611.  
  2612.    Routers SHOULD inspect valid Router Advertisements sent by other
  2613.    routers and verify that the routers are advertising consistent
  2614.    information on a link.  Detected inconsistencies indicate that one or
  2615.    more routers might be misconfigured and SHOULD be logged to system or
  2616.    network management.  The minimum set of information to check
  2617.    includes:
  2618.  
  2619.  - Cur Hop Limit values (except for the unspecified value of zero).
  2620.  
  2621.  - Values of the M or O flags.
  2622.  
  2623.  - Reachable Time values (except for the unspecified value of zero).
  2624.  
  2625.  - Retrans Timer values (except for the unspecified value of zero).
  2626.  
  2627.  - Values in the MTU options.
  2628.  
  2629.  - Preferred and Valid Lifetimes for the same prefix.
  2630.  
  2631.  
  2632.  
  2633.  
  2634. Narten, Nordmark & Simpson  Standards Track                    [Page 47]
  2635.  
  2636. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2637.  
  2638.  
  2639.    Note that it is not an error for different routers to advertise
  2640.    different sets of prefixes.  Also, some routers might leave some
  2641.    fields as unspecified, i.e., with the value zero, while other routers
  2642.    specify values.  The logging of errors SHOULD be restricted to
  2643.    conflicting information that causes hosts to switch from one value to
  2644.    another with each received advertisement.
  2645.  
  2646.    Any other action on reception of Router Advertisement messages by a
  2647.    router is beyond the scope of this document.
  2648.  
  2649. 6.2.8.  Link-local Address Change
  2650.  
  2651.    The link-local address on a router SHOULD change rarely, if ever.
  2652.    Nodes receiving Neighbor Discovery messages use the source address to
  2653.    identify the sender.  If multiple packets from the same router
  2654.    contain different source addresses, nodes will assume they come from
  2655.    different routers, leading to undesirable behavior.  For example, a
  2656.    node will ignore Redirect messages that are believed to have been
  2657.    sent by a router other than the current first-hop router.  Thus the
  2658.    source address used in Router Advertisements sent by a particular
  2659.    router must be identical to the target address in a Redirect message
  2660.    when redirecting to that router.
  2661.  
  2662.    Using the link-local address to uniquely identify routers on the link
  2663.    has the benefit that the address a router is known by should not
  2664.    change when a site renumbers.
  2665.  
  2666.    If a router changes the link-local address for one of its interfaces,
  2667.    it SHOULD inform hosts of this change.  The router SHOULD multicast a
  2668.    few Router Advertisements from the old link-local address with the
  2669.    Router Lifetime field set to zero and also multicast a few Router
  2670.    Advertisements from the new link-local address.  The overall effect
  2671.    should be the same as if one interface ceases being an advertising
  2672.    interface, and a different one starts being an advertising interface.
  2673.  
  2674. 6.3.  Host Specification
  2675.  
  2676. 6.3.1.  Host Configuration Variables
  2677.  
  2678.    None.
  2679.  
  2680. 6.3.2.  Host Variables
  2681.  
  2682.    A host maintains certain Neighbor Discovery related variables in
  2683.    addition to the data structures defined in Section 5.1.  The specific
  2684.    variable names are used for demonstration purposes only, and an
  2685.    implementation is not required to have them, so long as its external
  2686.    behavior is consistent with that described in this document.
  2687.  
  2688.  
  2689.  
  2690. Narten, Nordmark & Simpson  Standards Track                    [Page 48]
  2691.  
  2692. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2693.  
  2694.  
  2695.    These variables have default values that are overridden by
  2696.    information received in Router Advertisement messages.  The default
  2697.    values are used when there is no router on the link or when all
  2698.    received Router Advertisements have left a particular value
  2699.    unspecified.
  2700.  
  2701.    The default values in this specification may be overridden by
  2702.    specific documents that describe how IP operates over different link
  2703.    layers.  This rule allows Neighbor Discovery to operate over links
  2704.    with widely varying performance characteristics.
  2705.  
  2706.    For each interface:
  2707.  
  2708.      LinkMTU        The MTU of the link.
  2709.  
  2710.                     Default: The valued defined in the specific document
  2711.                     that describes how IPv6 operates over the particular
  2712.                     link layer (e.g., [IPv6-ETHER]).
  2713.  
  2714.      CurHopLimit    The default hop limit to be used when sending
  2715.                     (unicast) IP packets.
  2716.  
  2717.                     Default: The value specified in the "Assigned
  2718.                     Numbers" RFC [ASSIGNED] that was in effect at the
  2719.                     time of implementation.
  2720.  
  2721.      BaseReachableTime
  2722.                     A base value used for computing the random
  2723.                     ReachableTime value.
  2724.  
  2725.                     Default: REACHABLE_TIME milliseconds.
  2726.  
  2727.      ReachableTime  The time a neighbor is considered reachable after
  2728.                     receiving a reachability confirmation.
  2729.  
  2730.                     This value should be a uniformly-distributed random
  2731.                     value between MIN_RANDOM_FACTOR and
  2732.                     MAX_RANDOM_FACTOR times BaseReachableTime
  2733.                     milliseconds.  A new random value should be
  2734.                     calculated when BaseReachableTime changes (due to
  2735.                     Router Advertisements) or at least every few hours
  2736.                     even if no Router Advertisements are received.
  2737.  
  2738.      RetransTimer   The time between retransmissions of Neighbor
  2739.                     Solicitation messages to a neighbor when resolving
  2740.                     the address or when probing the reachability of a
  2741.                     neighbor.
  2742.  
  2743.  
  2744.  
  2745.  
  2746. Narten, Nordmark & Simpson  Standards Track                    [Page 49]
  2747.  
  2748. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2749.  
  2750.  
  2751.                     Default: RETRANS_TIMER milliseconds
  2752.  
  2753. 6.3.3.  Interface Initialization
  2754.  
  2755.    The host joins the all-nodes multicast address on all multicast-
  2756.    capable interfaces.
  2757.  
  2758. 6.3.4.  Processing Received Router Advertisements
  2759.  
  2760.    When multiple routers are present, the information advertised
  2761.    collectively by all routers may be a superset of the information
  2762.    contained in a single Router Advertisement.  Moreover, information
  2763.    may also be obtained through other dynamic means, such as stateful
  2764.    autoconfiguration.  Hosts accept the union of all received
  2765.    information; the receipt of a Router Advertisement MUST NOT
  2766.    invalidate all information received in a previous advertisement or
  2767.    from another source.  However, when received information for a
  2768.    specific parameter (e.g., Link MTU) or option (e.g., Lifetime on a
  2769.    specific Prefix) differs from information received earlier, and the
  2770.    parameter/option can only have one value, the most recently-received
  2771.    information is considered authoritative.
  2772.  
  2773.    Some Router Advertisement fields (e.g., Cur Hop Limit, Reachable Time
  2774.    and Retrans Timer) may contain a value denoting unspecified.  In such
  2775.    cases, the parameter should be ignored and the host should continue
  2776.    using whatever value it is already using.  In particular, a host MUST
  2777.    NOT interpret the unspecified value as meaning change back to the
  2778.    default value that was in use before the first Router Advertisement
  2779.    was received.  This rule prevents hosts from continually changing an
  2780.    internal variable when one router advertises a specific value, but
  2781.    other routers advertise the unspecified value.
  2782.  
  2783.    On receipt of a valid Router Advertisement, a host extracts the
  2784.    source address of the packet and does the following:
  2785.  
  2786.    - If the address is not already present in the host's Default Router
  2787.      List, and the advertisement's Router Lifetime is non-zero, create a
  2788.      new entry in the list, and initialize its invalidation timer value
  2789.      from the advertisement's Router Lifetime field.
  2790.  
  2791.    - If the address is already present in the host's Default Router List
  2792.      as a result of a previously-received advertisement, reset its
  2793.      invalidation timer to the Router Lifetime value in the newly-
  2794.      received advertisement.
  2795.  
  2796.    - If the address is already present in the host's Default Router List
  2797.      and the received Router Lifetime value is zero, immediately time-
  2798.      out the entry as specified in Section 6.3.5.
  2799.  
  2800.  
  2801.  
  2802. Narten, Nordmark & Simpson  Standards Track                    [Page 50]
  2803.  
  2804. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2805.  
  2806.  
  2807.    To limit the storage needed for the Default Router List, a host MAY
  2808.    choose not to store all of the router addresses discovered via
  2809.    advertisements.  However, a host MUST retain at least two router
  2810.    addresses and SHOULD retain more.  Default router selections are made
  2811.    whenever communication to a destination appears to be failing.  Thus,
  2812.    the more routers on the list, the more likely an alternative working
  2813.    router can be found quickly (e.g., without having to wait for the
  2814.    next advertisement to arrive).
  2815.  
  2816.    If the received Cur Hop Limit value is non-zero the host SHOULD set
  2817.    its CurHopLimit variable to the received value.
  2818.  
  2819.    If the received Reachable Time value is non-zero the host SHOULD set
  2820.    its BaseReachableTime variable to the received value.  If the new
  2821.    value differs from the previous value, the host SHOULD recompute a
  2822.    new random ReachableTime value.  ReachableTime is computed as a
  2823.    uniformly-distributed random value between MIN_RANDOM_FACTOR and
  2824.    MAX_RANDOM_FACTOR times the BaseReachableTime.  Using a random
  2825.    component eliminates the possibility Neighbor Unreachability
  2826.    Detection messages synchronize with each other.
  2827.  
  2828.    In most cases, the advertised Reachable Time value will be the same
  2829.    in consecutive Router Advertisements and a host's BaseReachableTime
  2830.    rarely changes.  In such cases, an implementation SHOULD insure that
  2831.    a new random value gets recomputed at least once every few hours.
  2832.  
  2833.    The RetransTimer variable SHOULD be copied from the Retrans Timer
  2834.    field, if the received value is non-zero.
  2835.  
  2836.    After extracting information from the fixed part of the Router
  2837.    Advertisement message, the advertisement is scanned for valid
  2838.    options.  If the advertisement contains a Source Link-Layer Address
  2839.    option the link-layer address SHOULD be recorded in the Neighbor
  2840.    Cache entry for the router (creating an entry if necessary) and the
  2841.    IsRouter flag in the Neighbor Cache entry MUST be set to true.  The
  2842.    IsRouter flag is used by Neighbor Unreachability Detection to
  2843.    determine when a router changes to being a host (i.e., no longer
  2844.    capable of forwarding packets).  If a Neighbor Cache entry is created
  2845.    for the router its reachability state MUST be set to STALE as
  2846.    specified in Section 7.3.3.  If a cache entry already exists and is
  2847.    updated with a different link-layer address the reachability state
  2848.    MUST also be set to STALE.
  2849.  
  2850.    If the MTU option is present, hosts SHOULD copy the option's value
  2851.    into LinkMTU if the value does not exceed the default LinkMTU value
  2852.    specified in the link type specific document (e.g., [IPv6-ETHER]).
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858. Narten, Nordmark & Simpson  Standards Track                    [Page 51]
  2859.  
  2860. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2861.  
  2862.  
  2863.    Prefix Information options that have the "on-link" (L) flag set
  2864.    indicate a prefix identifying a range of addresses that should be
  2865.    considered on-link.  Note, however, that a Prefix Information option
  2866.    with the on-link flag set to zero conveys no information concerning
  2867.    on-link determination and MUST NOT be interpreted to mean that
  2868.    addresses covered by the prefix are off-link.  The default behavior
  2869.    (see Section 5.2) when no information is known about an address is to
  2870.    send the packets to a default router and the reception of a Prefix
  2871.    Information option with the "on-link " (L) flag set to zero does not
  2872.    change this behavior.  The reasons for an address being treated as
  2873.    on-link is specified in the definition of "on-link" in Section 2.1.
  2874.    Prefixes with the on-link flag set to zero would normally have the
  2875.    autonomous flag set and be used by [ADDRCONF].
  2876.  
  2877.    For each Prefix Information option with the on-link flag set, a host
  2878.    does the following:
  2879.  
  2880.    - If the prefix is the link-local prefix, silently ignore the Prefix
  2881.      Information option.
  2882.  
  2883.    - If the prefix is not already present in the Prefix List, and the
  2884.      Prefix Information option's Valid Lifetime field is non-zero,
  2885.      create a new entry for the prefix and initialize its invalidation
  2886.      timer to the Valid Lifetime value in the Prefix Information option.
  2887.  
  2888.    - If the prefix is already present in the host's Prefix List as the
  2889.      result of a previously-received advertisement, reset its
  2890.      invalidation timer to the Valid Lifetime value in the Prefix
  2891.      Information option.  If the new Lifetime value is zero, time-out
  2892.      the prefix immediately (see Section 6.3.5).
  2893.  
  2894.    - If the Prefix Information option's Valid Lifetime field is zero,
  2895.      and the prefix is not present in the host's Prefix List, silently
  2896.      ignore the option.
  2897.  
  2898.    Note: Implementations can choose to process the on-link aspects of
  2899.    the prefixes separately from the address autoconfiguration aspects of
  2900.    the prefixes by, e.g., passing a copy of each valid Router
  2901.    Advertisement message to both an "on-link" and an "addrconf"
  2902.    function.  Each function can then operate independently on the
  2903.    prefixes that have the appropriate flag set.
  2904.  
  2905. 6.3.5.  Timing out Prefixes and Default Routers
  2906.  
  2907.    Whenever the invalidation timer expires for a Prefix List entry, that
  2908.    entry is discarded.  No existing Destination Cache entries need be
  2909.    updated, however.  Should a reachability problem arise with an
  2910.    existing Neighbor Cache entry, Neighbor Unreachability Detection will
  2911.  
  2912.  
  2913.  
  2914. Narten, Nordmark & Simpson  Standards Track                    [Page 52]
  2915.  
  2916. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2917.  
  2918.  
  2919.    perform any needed recovery.
  2920.  
  2921.    Whenever the Lifetime of an entry in the Default Router List expires,
  2922.    that entry is discarded.  When removing a router from the Default
  2923.    Router list, the node MUST update the Destination Cache in such a way
  2924.    that all entries using the router perform next-hop determination
  2925.    again rather than continue sending traffic to the (deleted) router.
  2926.  
  2927. 6.3.6.  Default Router Selection
  2928.  
  2929.    The algorithm for selecting a router depends in part on whether or
  2930.    not a router is known to be reachable.  The exact details of how a
  2931.    node keeps track of a neighbor's reachability state are covered in
  2932.    Section 7.3.  The algorithm for selecting a default router is invoked
  2933.    during next-hop determination when no Destination Cache entry exists
  2934.    for an off-link destination or when communication through an existing
  2935.    router appears to be failing.  Under normal conditions, a router
  2936.    would be selected the first time traffic is sent to a destination,
  2937.    with subsequent traffic for that destination using the same router as
  2938.    indicated in the Destination Cache modulo any changes to the
  2939.    Destination Cache caused by Redirect messages.
  2940.  
  2941.    The policy for selecting routers from the Default Router List is as
  2942.    follows:
  2943.  
  2944.   1) Routers that are reachable or probably reachable (i.e., in any
  2945.      state other than INCOMPLETE) SHOULD be preferred over routers whose
  2946.      reachability is unknown or suspect (i.e., in the INCOMPLETE state,
  2947.      or for which no Neighbor Cache entry exists).  An implementation
  2948.      may choose to always return the same router or cycle through the
  2949.      router list in a round-robin fashion as long as it always returns a
  2950.      reachable or a probably reachable router when one is available.
  2951.  
  2952.   2) When no routers on the list are known to be reachable or probably
  2953.      reachable, routers SHOULD be selected in a round-robin fashion, so
  2954.      that subsequent requests for a default router do not return the
  2955.      same router until all other routers have been selected.
  2956.  
  2957.      Cycling through the router list in this case ensures that all
  2958.      available routers are actively probed by the Neighbor
  2959.      Unreachability Detection algorithm.  A request for a default router
  2960.      is made in conjunction with the sending of a packet to a router,
  2961.      and the selected router will be probed for reachability as a side
  2962.      effect.
  2963.  
  2964.   3) If the Default Router List is empty, assume that all destinations
  2965.      are on-link as specified in Section 5.2.
  2966.  
  2967.  
  2968.  
  2969.  
  2970. Narten, Nordmark & Simpson  Standards Track                    [Page 53]
  2971.  
  2972. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  2973.  
  2974.  
  2975. 6.3.7.  Sending Router Solicitations
  2976.  
  2977.    When an interface becomes enabled, a host may be unwilling to wait
  2978.    for the next unsolicited Router Advertisement to locate default
  2979.    routers or learn prefixes.  To obtain Router Advertisements quickly,
  2980.    a host SHOULD transmit up to MAX_RTR_SOLICITATIONS Router
  2981.    Solicitation messages each separated by at least
  2982.    RTR_SOLICITATION_INTERVAL seconds.  Router Solicitations may be sent
  2983.    after any of the following events:
  2984.  
  2985.    - The interface is initialized at system startup time.
  2986.  
  2987.    - The interface is reinitialized after a temporary interface failure
  2988.      or after being temporarily disabled by system management.
  2989.  
  2990.    - The system changes from being a router to being a host, by having
  2991.      its IP forwarding capability turned off by system management.
  2992.  
  2993.    - The host attaches to a link for the first time.
  2994.  
  2995.    - The host re-attaches to a link after being detached for some time.
  2996.  
  2997.    A host sends Router Solicitations to the all-routers multicast
  2998.    address.  The IP source address is set to either one of the
  2999.    interface's unicast addresses or the unspecified address.  The Source
  3000.    Link-Layer Address option SHOULD be set to the host's link-layer
  3001.    address, if the IP source address is a unicast address.
  3002.  
  3003.    Before a host sends an initial solicitation, it SHOULD delay the
  3004.    transmission for a random amount of time between 0 and
  3005.    MAX_RTR_SOLICITATION_DELAY.  This serves to alleviate congestion when
  3006.    many hosts start up on a link at the same time, such as might happen
  3007.    after recovery from a power failure.  If a host has already performed
  3008.    a random delay since the interface became (re)enabled (e.g., as part
  3009.    of Duplicate Address Detection [ADDRCONF]) there is no need to delay
  3010.    again before sending the first Router Solicitation message.
  3011.  
  3012.    Once the host sends a Router Solicitation, and receives a valid
  3013.    Router Advertisement with a non-zero Router Lifetime, the host MUST
  3014.    desist from sending additional solicitations on that interface, until
  3015.    the next time one of the above events occurs.  Moreover, a host
  3016.    SHOULD send at least one solicitation in the case where an
  3017.    advertisement is received prior to having sent a solicitation.
  3018.    Unsolicited Router Advertisements may be incomplete (see Section
  3019.    6.2.3); solicited advertisements are expected to contain complete
  3020.    information.
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026. Narten, Nordmark & Simpson  Standards Track                    [Page 54]
  3027.  
  3028. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3029.  
  3030.  
  3031.    If a host sends MAX_RTR_SOLICITATIONS solicitations, and receives no
  3032.    Router Advertisements after having waited MAX_RTR_SOLICITATION_DELAY
  3033.    seconds after sending the last solicitation, the host concludes that
  3034.    there are no routers on the link for the purpose of [ADDRCONF].
  3035.    However, the host continues to receive and process Router
  3036.    Advertisements messages in the event that routers appear on the link.
  3037.  
  3038. 7.  ADDRESS RESOLUTION AND NEIGHBOR UNREACHABILITY DETECTION
  3039.  
  3040.    This section describes the functions related to Neighbor Solicitation
  3041.    and Neighbor Advertisement messages and includes descriptions of
  3042.    address resolution and the Neighbor Unreachability Detection
  3043.    algorithm.
  3044.  
  3045.    Neighbor Solicitation and Advertisement messages are also used for
  3046.    Duplicate Address Detection as specified by [ADDRCONF].  In
  3047.    particular, Duplicate Address Detection sends Neighbor Solicitation
  3048.    messages with an unspecified source address targeting its own
  3049.    "tentative" address.  Such messages trigger nodes already using the
  3050.    address to respond with a multicast Neighbor Advertisement indicating
  3051.    that the address is in use.
  3052.  
  3053. 7.1.  Message Validation
  3054.  
  3055. 7.1.1.  Validation of Neighbor Solicitations
  3056.  
  3057.    A node MUST silently discard any received Neighbor Solicitation
  3058.    messages that do not satisfy all of the following validity checks:
  3059.  
  3060.    - The IP Hop Limit field has a value of 255, i.e., the packet could
  3061.      not possibly have been forwarded by a router.
  3062.  
  3063.    - If the message includes an IP Authentication Header, the message
  3064.      authenticates correctly.
  3065.  
  3066.    - ICMP Checksum is valid.
  3067.  
  3068.    - ICMP Code is 0.
  3069.  
  3070.    - ICMP length (derived from the IP length) is 24 or more octets.
  3071.  
  3072.    - Target Address is not a multicast address.
  3073.  
  3074.    - All included options have a length that is greater than zero.
  3075.  
  3076.    The contents of the Reserved field, and of any unrecognized options,
  3077.    MUST be ignored.  Future, backward-compatible changes to the protocol
  3078.    may specify the contents of the Reserved field or add new options;
  3079.  
  3080.  
  3081.  
  3082. Narten, Nordmark & Simpson  Standards Track                    [Page 55]
  3083.  
  3084. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3085.  
  3086.  
  3087.    backward-incompatible changes may use different Code values.
  3088.  
  3089.    The contents of any defined options that are not specified to be used
  3090.    with Neighbor Solicitation messages MUST be ignored and the packet
  3091.    processed as normal.  The only defined option that may appear is the
  3092.    Source Link-Layer Address option.
  3093.  
  3094.    A Neighbor Solicitation that passes the validity checks is called a
  3095.    "valid solicitation".
  3096.  
  3097. 7.1.2.  Validation of Neighbor Advertisements
  3098.  
  3099.    A node MUST silently discard any received Neighbor Advertisement
  3100.    messages that do not satisfy all of the following validity checks:
  3101.  
  3102.    - The IP Hop Limit field has a value of 255, i.e., the packet could
  3103.      not possibly have been forwarded by a router.
  3104.  
  3105.    - If the message includes an IP Authentication Header, the message
  3106.      authenticates correctly.
  3107.  
  3108.    - ICMP Checksum is valid.
  3109.  
  3110.    - ICMP Code is 0.
  3111.  
  3112.    - ICMP length (derived from the IP length) is 24 or more octets.
  3113.  
  3114.    - Target Address is not a multicast address.
  3115.  
  3116.    - If the IP Destination Address is a multicast address the Solicited
  3117.      flag is zero.
  3118.  
  3119.    - All included options have a length that is greater than zero.
  3120.  
  3121.    The contents of the Reserved field, and of any unrecognized options,
  3122.    MUST be ignored.  Future, backward-compatible changes to the protocol
  3123.    may specify the contents of the Reserved field or add new options;
  3124.    backward-incompatible changes may use different Code values.
  3125.  
  3126.    The contents of any defined options that are not specified to be used
  3127.    with Neighbor Advertisement messages MUST be ignored and the packet
  3128.    processed as normal.  The only defined option that may appear is the
  3129.    Target Link-Layer Address option.
  3130.  
  3131.    A Neighbor Advertisements that passes the validity checks is called a
  3132.    "valid advertisement".
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138. Narten, Nordmark & Simpson  Standards Track                    [Page 56]
  3139.  
  3140. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3141.  
  3142.  
  3143. 7.2.  Address Resolution
  3144.  
  3145.    Address resolution is the process through which a node determines the
  3146.    link-layer address of a neighbor given only its IP address.  Address
  3147.    resolution is performed only on addresses that are determined to be
  3148.    on-link and for which the sender does not know the corresponding
  3149.    link-layer address.  Address resolution is never performed on
  3150.    multicast addresses.
  3151.  
  3152. 7.2.1.  Interface Initialization
  3153.  
  3154.    When a multicast-capable interface becomes enabled the node MUST join
  3155.    the all-nodes multicast address on that interface, as well as the
  3156.    solicited-node multicast address corresponding to each of the IP
  3157.    addresses assigned to the interface.
  3158.  
  3159.    The set of addresses assigned to an interface may change over time.
  3160.    New addresses might be added and old addresses might be removed
  3161.    [ADDRCONF].  In such cases the node MUST join and leave the
  3162.    solicited-node multicast address corresponding to the new and old
  3163.    addresses, respectively.  Note that multiple unicast addresses may
  3164.    map into the same solicited-node multicast address; a node MUST NOT
  3165.    leave the solicited-node multicast group until all assigned addresses
  3166.    corresponding to that multicast address have been removed.
  3167.  
  3168. 7.2.2.  Sending Neighbor Solicitations
  3169.  
  3170.    When a node has a unicast packet to send to a neighbor, but does not
  3171.    know the neighbor's link-layer address, it performs address
  3172.    resolution.  For multicast-capable interfaces this entails creating a
  3173.    Neighbor Cache entry in the INCOMPLETE state and transmitting a
  3174.    Neighbor Solicitation message targeted at the neighbor.  The
  3175.    solicitation is sent to the solicited-node multicast address
  3176.    corresponding to the target address.
  3177.  
  3178.    If the source address of the packet prompting the solicitation is the
  3179.    same as one of the addresses assigned to the outgoing interface, that
  3180.    address SHOULD be placed in the IP Source Address of the outgoing
  3181.    solicitation.  Otherwise, any one of the addresses assigned to the
  3182.    interface should be used.  Using the prompting packet's source
  3183.    address when possible insures that the recipient of the Neighbor
  3184.    Solicitation installs in its Neighbor Cache the IP address that is
  3185.    highly likely to be used in subsequent return traffic belonging to
  3186.    the prompting packet's "connection".
  3187.  
  3188.    If the solicitation is being sent to a solicited-node multicast
  3189.    address, the sender MUST include its link-layer address (if it has
  3190.    one) as a Source Link-Layer Address option.  Otherwise, the sender
  3191.  
  3192.  
  3193.  
  3194. Narten, Nordmark & Simpson  Standards Track                    [Page 57]
  3195.  
  3196. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3197.  
  3198.  
  3199.    SHOULD include its link-layer address (if it has one) as a Source
  3200.    Link-Layer Address option.  Including the source link-layer address
  3201.    in a multicast solicitation is required to give the target an address
  3202.    to which it can send the Neighbor Advertisement.
  3203.  
  3204.    While waiting for address resolution to complete, the sender MUST,
  3205.    for each neighbor, retain a small queue of packets waiting for
  3206.    address resolution to complete.  The queue MUST hold at least one
  3207.    packet, and MAY contain more.  However, the number of queued packets
  3208.    per neighbor SHOULD be limited to some small value.  When a queue
  3209.    overflows, the new arrival SHOULD replace the oldest entry.  Once
  3210.    address resolution completes, the node transmits any queued packets.
  3211.  
  3212.    While awaiting a response, the sender SHOULD retransmit Neighbor
  3213.    Solicitation messages approximately every RetransTimer milliseconds,
  3214.    even in the absence of additional traffic to the neighbor.
  3215.    Retransmissions MUST be rate-limited to at most one solicitation per
  3216.    neighbor every RetransTimer milliseconds.
  3217.  
  3218.    If no Neighbor Advertisement is received after MAX_MULTICAST_SOLICIT
  3219.    solicitations, address resolution has failed.  The sender MUST return
  3220.    ICMP destination unreachable indications with code 3 (Address
  3221.    Unreachable) for each packet queued awaiting address resolution.
  3222.  
  3223. 7.2.3.  Receipt of Neighbor Solicitations
  3224.  
  3225.    A valid Neighbor Solicitation where the Target Address is not a
  3226.    unicast or anycast address assigned to the receiving interface, and
  3227.    the Target Address is not a "tentative" address on which Duplicate
  3228.    Address Detection is being performed [ADDRCONF] MUST be silently
  3229.    ignored.  If the Target Address is tentative, the Neighbor
  3230.    Solicitation should be processed as described in [ADDRCONF].
  3231.  
  3232.    Upon receipt of a valid Neighbor Solicitation targeted at the node,
  3233.    the recipient SHOULD update the Neighbor Cache entry for the IP
  3234.    Source Address of the solicitation if the Source Address is not the
  3235.    unspecified address.  If an entry does not already exist, the node
  3236.    SHOULD create a new one and set its reachability state to STALE as
  3237.    specified in Section 7.3.3.  If a cache entry already exists and is
  3238.    updated with a different link-layer address its reachability state
  3239.    MUST be set to STALE.  If the solicitation contains a Source Link-
  3240.    Layer Address option, the entry's cached link-layer address should be
  3241.    replaced with the one in the solicitation.
  3242.  
  3243.    If the Source Address is the unspecified address the node MUST NOT
  3244.    create or update the Neighbor Cache entry.
  3245.  
  3246.  
  3247.  
  3248.  
  3249.  
  3250. Narten, Nordmark & Simpson  Standards Track                    [Page 58]
  3251.  
  3252. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3253.  
  3254.  
  3255.    After any updates to the Neighbor Cache, the node sends a Neighbor
  3256.    Advertisement response as described in the next section.
  3257.  
  3258. 7.2.4.  Sending Solicited Neighbor Advertisements
  3259.  
  3260.    A node sends a Neighbor Advertisement in response to a valid Neighbor
  3261.    Solicitation targeting one of the node's assigned addresses.  The
  3262.    Target Address of the advertisement is copied from the Target Address
  3263.    of the solicitation.  If the solicitation's IP Destination Address is
  3264.    a unicast or anycast address, the Target Link-Layer Address option
  3265.    SHOULD NOT be included; the neighboring node's cached value must
  3266.    already be current in order for the solicitation to have been
  3267.    received.  If the solicitation's IP Destination Address is a
  3268.    solicited-node multicast address, the Target Link-Layer option MUST
  3269.    be included in the advertisement.  If the node is a router, it MUST
  3270.    set the Router flag to one; otherwise it MUST set the flag to zero.
  3271.  
  3272.    If the Target Address is either an anycast address or a unicast
  3273.    address for which the node is providing proxy service, or the Target
  3274.    Link-Layer Address option is not included in the outgoing
  3275.    advertisement, the Override flag SHOULD be set to zero.  Otherwise,
  3276.    it SHOULD be set to one.  Proper setting of the Override flag insures
  3277.    that nodes give preference to non-proxy advertisements, even when
  3278.    received after proxy advertisements, but that the first advertisement
  3279.    for an anycast address "wins".
  3280.  
  3281.    If the source of the solicitation is the unspecified address, the
  3282.    node MUST set the Solicited flag to zero and multicast the
  3283.    advertisement to the all-nodes address.  Otherwise, the node MUST set
  3284.    the Solicited flag to one and unicast the advertisement to the Source
  3285.    Address of the solicitation.
  3286.  
  3287.    If the Target Address is an anycast address the sender SHOULD delay
  3288.    sending a response for a random time between 0 and
  3289.    MAX_ANYCAST_DELAY_TIME seconds.
  3290.  
  3291. 7.2.5.  Receipt of Neighbor Advertisements
  3292.  
  3293.    When a valid Neighbor Advertisement is received (either solicited or
  3294.    unsolicited), the Neighbor Cache is searched for the target's entry.
  3295.    If no entry exists, the advertisement SHOULD be silently discarded.
  3296.    There is no need to create an entry in this case, since the recipient
  3297.    has apparently not initiated any communication with the target.
  3298.  
  3299.    Once the appropriate Neighbor Cache entry has been located, the
  3300.    specific actions taken depend on the state of the Neighbor Cache
  3301.    entry and the flags in the advertisement.  If the entry is in an
  3302.    INCOMPLETE state (i.e., no link-layer address is cached for the
  3303.  
  3304.  
  3305.  
  3306. Narten, Nordmark & Simpson  Standards Track                    [Page 59]
  3307.  
  3308. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3309.  
  3310.  
  3311.    target) the received advertisement updates the entry.  If a cached
  3312.    link-layer address is already present, however, a node might choose
  3313.    to ignore the received advertisement and continue using the cached
  3314.    link-layer address.
  3315.  
  3316.    If the target's Neighbor Cache entry is in the INCOMPLETE state, the
  3317.    receiving node records the link-layer address in the Neighbor Cache
  3318.    entry and sends any packets queued for the neighbor awaiting address
  3319.    resolution.  If the Solicited flag is set, the reachability state for
  3320.    the neighbor MUST be set to REACHABLE; otherwise it MUST be set to
  3321.    STALE. (A more detailed explanation of reachability state is
  3322.    described in Section 7.3.3).  The Override flag is ignored if the
  3323.    entry is in the INCOMPLETE state.
  3324.  
  3325.    If the target's Neighbor Cache entry is in any state other than
  3326.    INCOMPLETE when the advertisement is received, the advertisement's
  3327.    Override flag's setting determines whether the Target Link-Layer
  3328.    Address option (if present) replaces the cached address.  If the
  3329.    Override flag is set, the receiving node MUST install the link-layer
  3330.    address in its cache; if the flag is zero, the receiving node MUST
  3331.    NOT install the link-layer address in its cache.  An advertisement's
  3332.    sender sets the Override flag when it wants its Target Link-Layer
  3333.    Address option to replace the cached value in Neighbor Cache entries,
  3334.    regardless of their current contents.
  3335.  
  3336.    If the target's Neighbor Cache entry is in any state other than
  3337.    INCOMPLETE when the advertisement is received, the advertisement's
  3338.    Solicited flag setting determines what the entry's new state should
  3339.    be.  If the Solicited flag is set, the entry's state MUST be set to
  3340.    REACHABLE; if the flag is zero, the entry's state MUST be set to
  3341.    STALE.  An advertisement's Solicited flag should only be set if the
  3342.    advertisement is a response to a Neighbor Solicitation.  Because
  3343.    Neighbor Unreachability Solicitations are sent to the cached link-
  3344.    layer address, a receipt of a solicited advertisement indicates that
  3345.    the forward path is working.  Receipt of an unsolicited
  3346.    advertisement, however, suggests that a neighbor has urgent
  3347.    information to announce (e.g., a changed link-layer address).
  3348.    Regardless of whether or not the new link-layer address is installed
  3349.    in the cache, a node should verify the reachability of the path it is
  3350.    currently using when it sends the next packet, so that it quickly
  3351.    finds a working path if the existing path has failed (e.g., as would
  3352.    be the case if the unsolicited Neighbor Advertisement is sent to
  3353.    announce a link-layer address change).
  3354.  
  3355.    In those cases where the cached link-layer address is updated, the
  3356.    receiving node MUST examine the Router flag in the received
  3357.    advertisement and update the IsRouter flag in the Neighbor Cache
  3358.    entry to reflect whether the node is a host or router.  In those
  3359.  
  3360.  
  3361.  
  3362. Narten, Nordmark & Simpson  Standards Track                    [Page 60]
  3363.  
  3364. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3365.  
  3366.  
  3367.    cases where the neighbor was previously used as a router, but the
  3368.    advertisement's Router flag is now set to zero, the node MUST remove
  3369.    that router from the Default Router List and update the Destination
  3370.    Cache entries for all destinations using that neighbor as a router as
  3371.    specified in Section 7.3.3.
  3372.  
  3373. 7.2.6.  Sending Unsolicited Neighbor Advertisements
  3374.  
  3375.    In some cases a node may be able to determine that its link-layer
  3376.    address has changed (e.g., hot-swap of an interface card) and may
  3377.    wish to inform its neighbors of the new link-layer address quickly.
  3378.    In such cases a node MAY send up to MAX_NEIGHBOR_ADVERTISEMENT
  3379.    unsolicited Neighbor Advertisement messages to the all-nodes
  3380.    multicast address.  These advertisements MUST be separated by at
  3381.    least RetransTimer seconds.
  3382.  
  3383.    The Target Address field in the unsolicited advertisement is set to
  3384.    an IP address of the interface, and the Target Link-Layer Address
  3385.    option is filled with the new link-layer address.  The Solicited flag
  3386.    MUST be set to zero, in order to avoid confusing the Neighbor
  3387.    Unreachability Detection algorithm.  If the node is a router, it MUST
  3388.    set the Router flag to one; otherwise it MUST set it to zero.  The
  3389.    Override flag MAY be set to either zero or one.  In either case,
  3390.    neighboring nodes will immediately change the state of their Neighbor
  3391.    Cache entries for the Target Address to STALE, prompting them to
  3392.    verify the path for reachability.  If the Override flag is set to
  3393.    one, neighboring nodes will install the new link-layer address in
  3394.    their caches.  Otherwise, they will ignore the new link-layer
  3395.    address, choosing instead to probe the cached address.
  3396.  
  3397.    A node that has multiple IP addresses assigned to an interface MAY
  3398.    multicast a separate Neighbor Advertisement for each address.  In
  3399.    such a case the node SHOULD introduce a small delay between the
  3400.    sending of each advertisement to reduce the probability of the
  3401.    advertisements being lost due to congestion.
  3402.  
  3403.    A proxy MAY multicast Neighbor Advertisements when its link-layer
  3404.    address changes or when it is configured (by system management or
  3405.    other mechanisms) to proxy for an address.  If there are multiple
  3406.    nodes that are providing proxy services for the same set of addresses
  3407.    the proxies SHOULD provide a mechanism that prevents multiple proxies
  3408.    from multicasting advertisements for any one address, in order to
  3409.    reduce the risk of excessive multicast traffic.
  3410.  
  3411.    Also, a node belonging to an anycast address MAY multicast
  3412.    unsolicited Neighbor Advertisements for the anycast address when the
  3413.    node's link- layer address changes.
  3414.  
  3415.  
  3416.  
  3417.  
  3418. Narten, Nordmark & Simpson  Standards Track                    [Page 61]
  3419.  
  3420. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3421.  
  3422.  
  3423.    Note that because unsolicited Neighbor Advertisements do not reliably
  3424.    update caches in all nodes (the advertisements might not be received
  3425.    by all nodes), they should only be viewed as a performance
  3426.    optimization to quickly update the caches in most neighbors.  The
  3427.    Neighbor Unreachability Detection algorithm ensures that all nodes
  3428.    obtain a reachable link-layer address, though the delay may be
  3429.    slightly longer.
  3430.  
  3431. 7.2.7.  Anycast Neighbor Advertisements
  3432.  
  3433.    From the perspective of Neighbor Discovery, anycast addresses are
  3434.    treated just like unicast addresses in most cases.  Because an
  3435.    anycast address is syntactically the same as a unicast address, nodes
  3436.    performing address resolution or Neighbor Unreachability Detection on
  3437.    an anycast address treat it as if it were a unicast address.  No
  3438.    special processing takes place.
  3439.  
  3440.    Nodes that have an anycast address assigned to an interface treat
  3441.    them exactly the same as if they were unicast addresses with two
  3442.    exceptions.  First, Neighbor Advertisements sent in response to a
  3443.    Neighbor Solicitation SHOULD be delayed by a random time between 0
  3444.    and MAX_ANYCAST_DELAY_TIME to reduce the probability of network
  3445.    congestion.  Second, the Override flag in Neighbor Advertisements
  3446.    SHOULD be set to 0, so that when multiple advertisements are
  3447.    received, the first received advertisement is used rather than the
  3448.    most recently received advertisement.
  3449.  
  3450.    As with unicast addresses, Neighbor Unreachability Detection ensures
  3451.    that a node quickly detects when the current binding for an anycast
  3452.    address becomes invalid.
  3453.  
  3454. 7.2.8.  Proxy Neighbor Advertisements
  3455.  
  3456.    Under limited circumstances, a router MAY proxy for one or more other
  3457.    nodes, that is, through Neighbor Advertisements indicate that it is
  3458.    willing to accept packets not explicitly addressed to itself.  For
  3459.    example, a router might accept packets on behalf of a mobile node
  3460.    that has moved off-link.  The mechanisms used by proxy are identical
  3461.    to the mechanisms used with anycast addresses.
  3462.  
  3463.    A proxy MUST join the solicited-node multicast address(es) that
  3464.    correspond to the IP address(es) assigned to the node for which it is
  3465.    proxying.
  3466.  
  3467.    All solicited proxy Neighbor Advertisement messages MUST have the
  3468.    Override flag set to zero.  This ensures that if the node itself is
  3469.    present on the link its Neighbor Advertisement (with the Override
  3470.    flag set to one) will take precedence of any advertisement received
  3471.  
  3472.  
  3473.  
  3474. Narten, Nordmark & Simpson  Standards Track                    [Page 62]
  3475.  
  3476. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3477.  
  3478.  
  3479.    from a proxy.  A proxy MAY send unsolicited advertisements with the
  3480.    Override flag set to one as specified in Section 7.2.6, but doing so
  3481.    may cause the proxy advertisement to override a valid entry created
  3482.    by the node itself.
  3483.  
  3484.    Finally, when sending a proxy advertisement in response to a Neighbor
  3485.    Solicitation, the sender should delay its response by a random time
  3486.    between 0 and MAX_ANYCAST_DELAY_TIME seconds.
  3487.  
  3488. 7.3.  Neighbor Unreachability Detection
  3489.  
  3490.    Communication to or through a neighbor may fail for numerous reasons
  3491.    at any time, including hardware failure, hot-swap of an interface
  3492.    card, etc.  If the destination has failed, no recovery is possible
  3493.    and communication fails.  On the other hand, if it is the path that
  3494.    has failed, recovery may be possible.  Thus, a node actively tracks
  3495.    the reachability "state" for the neighbors to which it is sending
  3496.    packets.
  3497.  
  3498.    Neighbor Unreachability Detection is used for all paths between hosts
  3499.    and neighboring nodes, including host-to-host, host-to-router, and
  3500.    router-to-host communication.  Neighbor Unreachability Detection may
  3501.    also be used between routers, but is not required if an equivalent
  3502.    mechanism is available, for example, as part of the routing
  3503.    protocols.
  3504.  
  3505.    When a path to a neighbor appears to be failing, the specific
  3506.    recovery procedure depends on how the neighbor is being used.  If the
  3507.    neighbor is the ultimate destination, for example, address resolution
  3508.    should be performed again.  If the neighbor is a router, however,
  3509.    attempting to switch to another router would be appropriate.  The
  3510.    specific recovery that takes place is covered under next-hop
  3511.    determination; Neighbor Unreachability Detection signals the need for
  3512.    next-hop determination by deleting a Neighbor Cache entry.
  3513.  
  3514.    Neighbor Unreachability Detection is performed only for neighbors to
  3515.    which unicast packets are sent; it is not used when sending to
  3516.    multicast addresses.
  3517.  
  3518. 7.3.1.  Reachability Confirmation
  3519.  
  3520.    A neighbor is considered reachable if the node has recently received
  3521.    a confirmation that packets sent recently to the neighbor were
  3522.    received by its IP layer.  Positive confirmation can be gathered in
  3523.    two ways: hints from upper layer protocols that indicate a connection
  3524.    is making "forward progress", or receipt of a Neighbor Advertisement
  3525.    message that is a response to a Neighbor Solicitation message.
  3526.  
  3527.  
  3528.  
  3529.  
  3530. Narten, Nordmark & Simpson  Standards Track                    [Page 63]
  3531.  
  3532. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3533.  
  3534.  
  3535.    A connection makes "forward progress" if the packets received from a
  3536.    remote peer can only be arriving if recent packets sent to that peer
  3537.    are actually reaching it.  In TCP, for example, receipt of a (new)
  3538.    acknowledgement indicates that previously sent data reached the peer.
  3539.    Likewise, the arrival of new (non-duplicate) data indicates that
  3540.    earlier acknowledgements are being delivered to the remote peer.  If
  3541.    packets are reaching the peer, they must also be reaching the
  3542.    sender's next-hop neighbor; thus "forward progress" is a confirmation
  3543.    that the next-hop neighbor is reachable.  For off-link destinations,
  3544.    forward progress implies that the first-hop router is reachable.
  3545.    When available, this upper-layer information SHOULD be used.
  3546.  
  3547.    In some cases (e.g., UDP-based protocols and routers forwarding
  3548.    packets to hosts) such reachability information may not be readily
  3549.    available from upper-layer protocols.  When no hints are available
  3550.    and a node is sending packets to a neighbor, the node actively probes
  3551.    the neighbor using unicast Neighbor Solicitation messages to verify
  3552.    that the forward path is still working.
  3553.  
  3554.    The receipt of a solicited Neighbor Advertisement serves as
  3555.    reachability confirmation, since advertisements with the Solicited
  3556.    flag set to one are sent only in response to a Neighbor Solicitation.
  3557.    Receipt of other Neighbor Discovery messages such as Router
  3558.    Advertisements and Neighbor Advertisement with the Solicited flag set
  3559.    to zero MUST NOT be treated as a reachability confirmation.  Receipt
  3560.    of unsolicited messages only confirm the one-way path from the sender
  3561.    to the recipient node.  In contrast, Neighbor Unreachability
  3562.    Detection requires that a node keep track of the reachability of the
  3563.    forward path to a neighbor from the its perspective, not the
  3564.    neighbor's perspective.  Note that receipt of a solicited
  3565.    advertisement indicates that a path is working in both directions.
  3566.    The solicitation must have reached the neighbor, prompting it to
  3567.    generate an advertisement.  Likewise, receipt of an advertisement
  3568.    indicates that the path from the sender to the recipient is working.
  3569.    However, the latter fact is known only to the recipient; the
  3570.    advertisement's sender has no direct way of knowing that the
  3571.    advertisement it sent actually reached a neighbor.  From the
  3572.    perspective of Neighbor Unreachability Detection, only the
  3573.    reachability of the forward path is of interest.
  3574.  
  3575. 7.3.2.  Neighbor Cache Entry States
  3576.  
  3577.    A Neighbor Cache entry can be in one of five states:
  3578.  
  3579.    INCOMPLETE  Address resolution is being performed on the entry.
  3580.                Specifically, a Neighbor Solicitation has been sent to
  3581.                the solicited-node multicast address of the target, but
  3582.                the corresponding Neighbor Advertisement has not yet been
  3583.  
  3584.  
  3585.  
  3586. Narten, Nordmark & Simpson  Standards Track                    [Page 64]
  3587.  
  3588. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3589.  
  3590.  
  3591.                received.
  3592.  
  3593.    REACHABLE   Positive confirmation was received within the last
  3594.                ReachableTime milliseconds that the forward path to the
  3595.                neighbor was functioning properly.  While REACHABLE, no
  3596.                special action takes place as packets are sent.
  3597.  
  3598.    STALE       More than ReachableTime milliseconds have elapsed since
  3599.                the last positive confirmation was received that the
  3600.                forward path was functioning properly.  While stale, no
  3601.                action takes place until a packet is sent.
  3602.  
  3603.                The STALE state is entered upon receiving an unsolicited
  3604.                Neighbor Discovery message that updates the cached link-
  3605.                layer address.  Receipt of such a message does not
  3606.                confirm reachability, and entering the STALE state
  3607.                insures reachability is verified quickly if the entry is
  3608.                actually being used.  However, reachability is not
  3609.                actually verified until the entry is actually used.
  3610.  
  3611.    DELAY       More than ReachableTime milliseconds have elapsed since
  3612.                the last positive confirmation was received that the
  3613.                forward path was functioning properly, and a packet was
  3614.                sent within the last DELAY_FIRST_PROBE_TIME seconds.  If
  3615.                no reachability confirmation is received within
  3616.                DELAY_FIRST_PROBE_TIME seconds of entering the DELAY
  3617.                state, send a Neighbor Solicitation and change the state
  3618.                to PROBE.
  3619.  
  3620.                The DELAY state is an optimization that gives upper-layer
  3621.                protocols additional time to provide reachability
  3622.                confirmation in those cases where ReachableTime
  3623.                milliseconds have passed since the last confirmation due
  3624.                to lack of recent traffic.  Without this optimization the
  3625.                opening of a TCP connection after a traffic lull would
  3626.                initiate probes even though the subsequent three-way
  3627.                handshake would provide a reachability confirmation
  3628.                almost immediately.
  3629.  
  3630.    PROBE       A reachability confirmation is actively sought by
  3631.                retransmitting Neighbor Solicitations every RetransTimer
  3632.                milliseconds until a reachability confirmation is
  3633.                received.
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642. Narten, Nordmark & Simpson  Standards Track                    [Page 65]
  3643.  
  3644. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3645.  
  3646.  
  3647. 7.3.3.  Node Behavior
  3648.  
  3649.    Neighbor Unreachability Detection operates in parallel with the
  3650.    sending of packets to a neighbor.  While reasserting a neighbor's
  3651.    reachability, a node continues sending packets to that neighbor using
  3652.    the cached link-layer address.  If no traffic is sent to a neighbor,
  3653.    no probes are sent.
  3654.  
  3655.    When a node needs to perform address resolution on a neighboring
  3656.    address, it creates an entry in the INCOMPLETE state and initiates
  3657.    address resolution as specified in Section 7.2.  If address
  3658.    resolution fails, the entry SHOULD be deleted, so that subsequent
  3659.    traffic to that neighbor invokes the next-hop determination procedure
  3660.    again.  Invoking next-hop determination at this point insures that
  3661.    alternate default routers are tried.
  3662.  
  3663.    When a reachability confirmation is received (either through upper-
  3664.    layer advice or a solicited Neighbor Advertisement) an entry's state
  3665.    changes to REACHABLE.  The one exception is that upper-layer advice
  3666.    has no effect on entries in the INCOMPLETE state (e.g., for which no
  3667.    link-layer address is cached).
  3668.  
  3669.    When ReachableTime milliseconds have passed since receipt of the last
  3670.    reachability confirmation for a neighbor, the Neighbor Cache entry's
  3671.    state changes from REACHABLE to STALE.
  3672.  
  3673.       Note: An implementation may actually defer changing the state from
  3674.       REACHABLE to STALE until a packet is sent to the neighbor, i.e.,
  3675.       there need not be an explicit timeout event associated with the
  3676.       expiration of ReachableTime.
  3677.  
  3678.    The first time a node sends a packet to a neighbor whose entry is
  3679.    STALE, the sender changes the state to DELAY and a sets a timer to
  3680.    expire in DELAY_FIRST_PROBE_TIME seconds.  If the entry is still in
  3681.    the DELAY state when the timer expires, the entry's state changes to
  3682.    PROBE.  If reachability confirmation is received, the entry's state
  3683.    changes to REACHABLE.
  3684.  
  3685.    Upon entering the PROBE state, a node sends a unicast Neighbor
  3686.    Solicitation message to the neighbor using the cached link-layer
  3687.    address.  While in the PROBE state, a node retransmits Neighbor
  3688.    Solicitation messages every RetransTimer milliseconds until
  3689.    reachability confirmation is obtained.  Probes are retransmitted even
  3690.    if no additional packets are sent to the neighbor.  If no response is
  3691.    received after waiting RetransTimer milliseconds after sending the
  3692.    MAX_UNICAST_SOLICIT solicitations, retransmissions cease and the
  3693.    entry SHOULD be deleted.  Subsequent traffic to that neighbor will
  3694.    recreate the entry and performs address resolution again.
  3695.  
  3696.  
  3697.  
  3698. Narten, Nordmark & Simpson  Standards Track                    [Page 66]
  3699.  
  3700. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3701.  
  3702.  
  3703.    Note that all Neighbor Solicitations are rate-limited on a per-
  3704.    neighbor basis.  A node MUST NOT send Neighbor Solicitations to the
  3705.    same neighbor more frequently than once every RetransTimer
  3706.    milliseconds.
  3707.  
  3708.    A Neighbor Cache entry enters the STALE state when created as a
  3709.    result of receiving packets other than solicited Neighbor
  3710.    Advertisements (i.e., Router Solicitations, Router Advertisements,
  3711.    Redirects, and Neighbor Solicitations).  These packets contain the
  3712.    link-layer address of either the sender or, in the case of Redirect,
  3713.    the redirection target.  However, receipt of these link-layer
  3714.    addresses does not confirm reachability of the forward-direction path
  3715.    to that node.  Placing a newly created Neighbor Cache entry for which
  3716.    the link-layer address is known in the STALE state provides assurance
  3717.    that path failures are detected quickly.  In addition, should a
  3718.    cached link-layer address be modified due to receiving one of the
  3719.    above messages the state SHOULD also be set to STALE to provide
  3720.    prompt verification that the path to the new link-layer address is
  3721.    working.
  3722.  
  3723.    To properly detect the case where a router switches from being a
  3724.    router to being a host (e.g., if its IP forwarding capability is
  3725.    turned off by system management), a node MUST compare the Router flag
  3726.    field in all received Neighbor Advertisement messages with the
  3727.    IsRouter flag recorded in the Neighbor Cache entry.  When a node
  3728.    detects that a neighbor has changed from being a router to being a
  3729.    host, the node MUST remove that router from the Default Router List
  3730.    and update the Destination Cache as described in Section 6.3.5.  Note
  3731.    that a router may not be listed in the Default Router List, even
  3732.    though a Destination Cache entry is using it (e.g., a host was
  3733.    redirected to it).  In such cases, all Destination Cache entries that
  3734.    reference the (former) router must perform next-hop determination
  3735.    again before using the entry.
  3736.  
  3737.    In some cases, link-specific information may indicate that a path to
  3738.    a neighbor has failed (e.g., the resetting of a virtual circuit).  In
  3739.    such cases, link-specific information may be used to purge Neighbor
  3740.    Cache entries before the Neighbor Unreachability Detection would do
  3741.    so.  However, link-specific information MUST NOT be used to confirm
  3742.    the reachability of a neighbor; such information does not provide
  3743.    end-to-end confirmation between neighboring IP layers.
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754. Narten, Nordmark & Simpson  Standards Track                    [Page 67]
  3755.  
  3756. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3757.  
  3758.  
  3759. 8.  REDIRECT FUNCTION
  3760.  
  3761.    This section describes the functions related to the sending and
  3762.    processing of Redirect messages.
  3763.  
  3764.    Redirect messages are sent by routers to redirect a host to a better
  3765.    first-hop router for a specific destination or to inform hosts that a
  3766.    destination is in fact a neighbor (i.e., on-link).  The latter is
  3767.    accomplished by having the ICMP Target Address be equal to the ICMP
  3768.    Destination Address.
  3769.  
  3770.    A router MUST be able to determine the link-local address for each of
  3771.    its neighboring routers in order to ensure that the target address in
  3772.    a Redirect message identifies the neighbor router by its link-local
  3773.    address.  For static routing this requirement implies that the next-
  3774.    hop router's address should be specified using the link-local address
  3775.    of the router.  For dynamic routing this requirement implies that all
  3776.    IPv6 routing protocols must somehow exchange the link-local addresses
  3777.    of neighboring routers.
  3778.  
  3779. 8.1.  Validation of Redirect Messages
  3780.  
  3781.    A host MUST silently discard any received Redirect message that does
  3782.    not satisfy all of the following validity checks:
  3783.  
  3784.    - IP Source Address is a link-local address.  Routers must use their
  3785.      link-local address as the source for Router Advertisement and
  3786.      Redirect messages so that hosts can uniquely identify routers.
  3787.  
  3788.    - The IP Hop Limit field has a value of 255, i.e., the packet could
  3789.      not possibly have been forwarded by a router.
  3790.  
  3791.    - If the message includes an IP Authentication Header, the message
  3792.      authenticates correctly.
  3793.  
  3794.    - ICMP Checksum is valid.
  3795.  
  3796.    - ICMP Code is 0.
  3797.  
  3798.    - ICMP length (derived from the IP length) is 40 or more octets.
  3799.  
  3800.    - The IP source address of the Redirect is the same as the current
  3801.      first-hop router for the specified ICMP Destination Address.
  3802.  
  3803.    - The ICMP Destination Address field in the redirect message does not
  3804.      contain a multicast address.
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810. Narten, Nordmark & Simpson  Standards Track                    [Page 68]
  3811.  
  3812. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3813.  
  3814.  
  3815.    - The ICMP Target Address is either a link-local address (when
  3816.      redirected to a router) or the same as the ICMP Destination Address
  3817.      (when redirected to the on-link destination).
  3818.  
  3819.    - All included options have a length that is greater than zero.
  3820.  
  3821.    The contents of the Reserved field, and of any unrecognized options
  3822.    MUST be ignored.  Future, backward-compatible changes to the protocol
  3823.    may specify the contents of the Reserved field or add new options;
  3824.    backward-incompatible changes may use different Code values.
  3825.  
  3826.    The contents of any defined options that are not specified to be used
  3827.    with Redirect messages MUST be ignored and the packet processed as
  3828.    normal.  The only defined options that may appear are the Target
  3829.    Link-Layer Address option and the Redirected Header option.
  3830.  
  3831.    A host MUST NOT consider a redirect invalid just because the Target
  3832.    Address of the redirect is not covered under one of the link's
  3833.    prefixes.  Part of the semantics of the Redirect message is that the
  3834.    Target Address is on-link.
  3835.  
  3836.    A redirect that passes the validity checks is called a "valid
  3837.    redirect".
  3838.  
  3839. 8.2.  Router Specification
  3840.  
  3841.    A router SHOULD send a redirect message, subject to rate limiting,
  3842.    whenever it forwards a packet that is not explicitly addressed to
  3843.    itself (i.e. a packet that is not source routed through the router)
  3844.    in which:
  3845.  
  3846.    - the Source Address field of the packet identifies a neighbor, and
  3847.  
  3848.    - the router determines that a better first-hop node resides on the
  3849.      same link as the sending node for the Destination Address of the
  3850.      packet being forwarded, and
  3851.  
  3852.    - the Destination Address of the packet is not a multicast address,
  3853.      and
  3854.  
  3855.    The transmitted redirect packet contains, consistent with the message
  3856.    format given in Section 4.5:
  3857.  
  3858.    - In the Target Address field: the address to which subsequent
  3859.      packets for the destination SHOULD be sent.  If the target is a
  3860.      router, that router's link-local address MUST be used.  If the
  3861.      target is a host the target address field MUST be set to the same
  3862.      value as the Destination Address field.
  3863.  
  3864.  
  3865.  
  3866. Narten, Nordmark & Simpson  Standards Track                    [Page 69]
  3867.  
  3868. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3869.  
  3870.  
  3871.    - In the Destination Address field: the destination address of the
  3872.      invoking IP packet.
  3873.  
  3874.    - In the options:
  3875.  
  3876.         o Target Link-Layer Address option: link-layer address of the
  3877.           target, if known.
  3878.  
  3879.         o Redirected Header: as much of the forwarded packet as can fit
  3880.           without the redirect packet exceeding 576 octets in size.
  3881.  
  3882.    A router MUST limit the rate at which Redirect messages are sent, in
  3883.    order to limit the bandwidth and processing costs incurred by the
  3884.    Redirect messages when the source does not correctly respond to the
  3885.    Redirects, or the source chooses to ignore unauthenticated Redirect
  3886.    messages.  More details on the rate-limiting of ICMP error messages
  3887.    can be found in [ICMPv6].
  3888.  
  3889.    A router MUST NOT update its routing tables upon receipt of a
  3890.    Redirect.
  3891.  
  3892. 8.3.  Host Specification
  3893.  
  3894.    A host receiving a valid redirect SHOULD update its Destination Cache
  3895.    accordingly so that subsequent traffic goes to the specified target.
  3896.    If no Destination Cache entry exists for the destination, an
  3897.    implementation SHOULD create such an entry.
  3898.  
  3899.    If the redirect contains a Target Link-Layer Address option the host
  3900.    either creates or updates the Neighbor Cache entry for the target.
  3901.    In both cases the cached link-layer address is copied from the Target
  3902.    Link-Layer Address option.  If a Neighbor Cache entry is created for
  3903.    the target its reachability state MUST be set to STALE as specified
  3904.    in Section 7.3.3.  If a cache entry already existed and it is updated
  3905.    with a different link-layer address its reachability state MUST also
  3906.    be set to STALE.
  3907.  
  3908.    In addition, if the Target Address is the same as the Destination
  3909.    Address, the host MUST treat the destination as on-link and set the
  3910.    IsRouter field in the corresponding Neighbor Cache entry to FALSE.
  3911.    Otherwise it MUST set IsRouter to true.
  3912.  
  3913.    Redirect messages apply to all flows that are being sent to a given
  3914.    destination.  That is, upon receipt of a Redirect for a Destination
  3915.    Address, all Destination Cache entries to that address should be
  3916.    updated to use the specified next-hop, regardless of the contents of
  3917.    the Flow Label field that appears in the Redirected Header option.
  3918.  
  3919.  
  3920.  
  3921.  
  3922. Narten, Nordmark & Simpson  Standards Track                    [Page 70]
  3923.  
  3924. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3925.  
  3926.  
  3927.    A host MAY have a configuration switch that can be set to make it
  3928.    ignore a Redirect message that does not have an IP Authentication
  3929.    header.
  3930.  
  3931.    A host MUST NOT send Redirect messages.
  3932.  
  3933. 9.  EXTENSIBILITY - OPTION PROCESSING
  3934.  
  3935.    Options provide a mechanism for encoding variable length fields,
  3936.    fields that may appear multiple times in the same packet, or
  3937.    information that may not appear in all packets.  Options can also be
  3938.    used to add additional functionality to future versions of ND.
  3939.  
  3940.    In order to ensure that future extensions properly coexist with
  3941.    current implementations, all nodes MUST silently ignore any options
  3942.    they do not recognize in received ND packets and continue processing
  3943.    the packet.  All options specified in this document MUST be
  3944.    recognized.  A node MUST NOT ignore valid options just because the ND
  3945.    message contains unrecognized ones.
  3946.  
  3947.    The current set of options is defined in such a way that receivers
  3948.    can process multiple options in the same packet independently of each
  3949.    other.  In order to maintain these properties future options SHOULD
  3950.    follow the simple rule:
  3951.  
  3952.       The option MUST NOT depend on the presence or absence of any other
  3953.       options.  The semantics of an option should depend only on the
  3954.       information in the fixed part of the ND packet and on the
  3955.       information contained in the option itself.
  3956.  
  3957.    Adhering to the above rule has the following benefits:
  3958.  
  3959.   1) Receivers can process options independently of one another.  For
  3960.      example, an implementation can choose to process the Prefix
  3961.      Information option contained in a Router Advertisement message in a
  3962.      user-space process while the link-layer address option in the same
  3963.      message is processed by routines in the kernel.
  3964.  
  3965.   2) Should the number of options cause a packet to exceed a link's MTU,
  3966.      multiple packets can carry subsets of the options without any
  3967.      change in semantics.
  3968.  
  3969.   3) Senders MAY send a subset of options in different packets.  For
  3970.      instance, if a prefix's Valid and Preferred Lifetime are high
  3971.      enough, it might not be necessary to include the Prefix Information
  3972.      option in every Router Advertisement.  In addition, different
  3973.      routers might send different sets of options.  Thus, a receiver
  3974.      MUST NOT associate any action with the absence of an option in a
  3975.  
  3976.  
  3977.  
  3978. Narten, Nordmark & Simpson  Standards Track                    [Page 71]
  3979.  
  3980. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  3981.  
  3982.  
  3983.      particular packet.  This protocol specifies that receivers should
  3984.      only act on the expiration of timers and on the information that is
  3985.      received in the packets.
  3986.  
  3987.    Options in Neighbor Discovery packets can appear in any order;
  3988.    receivers MUST be prepared to process them independently of their
  3989.    order.  There can also be multiple instances of the same option in a
  3990.    message (e.g., Prefix Information options).
  3991.  
  3992.    If the number of included options in a Router Advertisement causes
  3993.    the advertisement's size to exceed the link MTU, the router can send
  3994.    multiple separate advertisements each containing a subset of the
  3995.    options.
  3996.  
  3997.    The amount of data to include in the Redirected Header option MUST be
  3998.    limited so that the entire redirect packet does not exceed 576
  3999.    octets.
  4000.  
  4001.    All options are a multiple of 8 octets of length, ensuring
  4002.    appropriate alignment without any "pad" options.  The fields in the
  4003.    options (as well as the fields in ND packets) are defined to align on
  4004.    their natural boundaries (e.g., a 16-bit field is aligned on a 16-bit
  4005.    boundary) with the exception of the 128-bit IP addresses/prefixes,
  4006.    which are aligned on a 64-bit boundary.  The link-layer address field
  4007.    contains an uninterpreted octet string; it is aligned on an 8-bit
  4008.    boundary.
  4009.  
  4010.    The size of an ND packet including the IP header is limited to the
  4011.    link MTU (which is at least 576 octets).  When adding options to an
  4012.    ND packet a node MUST NOT exceed the link MTU.
  4013.  
  4014.    Future versions of this protocol may define new option types.
  4015.    Receivers MUST silently ignore any options they do not recognize and
  4016.    continue processing the message.
  4017.  
  4018. 10.  PROTOCOL CONSTANTS
  4019.  
  4020. Router constants:
  4021.  
  4022.          MAX_INITIAL_RTR_ADVERT_INTERVAL  16 seconds
  4023.  
  4024.          MAX_INITIAL_RTR_ADVERTISEMENTS    3 transmissions
  4025.  
  4026.          MAX_FINAL_RTR_ADVERTISEMENTS      3 transmissions
  4027.  
  4028.          MIN_DELAY_BETWEEN_RAS             3 seconds
  4029.  
  4030.          MAX_RA_DELAY_TIME                 .5 seconds
  4031.  
  4032.  
  4033.  
  4034. Narten, Nordmark & Simpson  Standards Track                    [Page 72]
  4035.  
  4036. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  4037.  
  4038.  
  4039. Host constants:
  4040.  
  4041.          MAX_RTR_SOLICITATION_DELAY        1 second
  4042.  
  4043.          RTR_SOLICITATION_INTERVAL         4 seconds
  4044.  
  4045.          MAX_RTR_SOLICITATIONS             3 transmissions
  4046.  
  4047. Node constants:
  4048.  
  4049.          MAX_MULTICAST_SOLICIT             3 transmissions
  4050.  
  4051.          MAX_UNICAST_SOLICIT               3 transmissions
  4052.  
  4053.          MAX_ANYCAST_DELAY_TIME            1 second
  4054.  
  4055.          MAX_NEIGHBOR_ADVERTISEMENT        3 transmissions
  4056.  
  4057.          REACHABLE_TIME               30,000 milliseconds
  4058.  
  4059.          RETRANS_TIMER                 1,000 milliseconds
  4060.  
  4061.          DELAY_FIRST_PROBE_TIME            5 seconds
  4062.  
  4063.          MIN_RANDOM_FACTOR                 .5
  4064.  
  4065.          MAX_RANDOM_FACTOR                 1.5
  4066.  
  4067.    Additional protocol constants are defined with the message formats in
  4068.    Section 4.
  4069.  
  4070.    All protocol constants are subject to change in future revisions of
  4071.    the protocol.
  4072.  
  4073.    The constants in this specification may be overridden by specific
  4074.    documents that describe how IPv6 operates over different link layers.
  4075.    This rule allows Neighbor Discovery to operate over links with widely
  4076.    varying performance characteristics.
  4077.  
  4078. 11.  SECURITY CONSIDERATIONS
  4079.  
  4080.    Neighbor Discovery is subject to attacks that cause IP packets to
  4081.    flow to unexpected places.  Such attacks can be used to cause denial
  4082.    of service but also allow nodes to intercept and optionally modify
  4083.    packets destined for other nodes.
  4084.  
  4085.    The protocol reduces the exposure to such threats in the absence of
  4086.    authentication by ignoring ND packets received from off-link senders.
  4087.  
  4088.  
  4089.  
  4090. Narten, Nordmark & Simpson  Standards Track                    [Page 73]
  4091.  
  4092. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  4093.  
  4094.  
  4095.    The Hop Limit field of all received packets is verified to contain
  4096.    255, the maximum legal value.  Because routers decrement the Hop
  4097.    Limit on all packets they forward, received packets containing a Hop
  4098.    Limit of 255 must have originated from a neighbor.
  4099.  
  4100.    The trust model for redirects is the same as in IPv4.  A redirect is
  4101.    accepted only if received from the same router that is currently
  4102.    being used for that destination.  It is natural to trust the routers
  4103.    on the link.  If a host has been redirected to another node (i.e.,
  4104.    the destination is on-link) there is no way to prevent the target
  4105.    from issuing another redirect to some other destination.  However,
  4106.    this exposure is no worse than it was; the target host, once
  4107.    subverted, could always act as a hidden router to forward traffic
  4108.    elsewhere.
  4109.  
  4110.    The protocol contains no mechanism to determine which neighbors are
  4111.    authorized to send a particular type of message e.g.  Router
  4112.    Advertisements; any neighbor, presumably even in the presence of
  4113.    authentication, can send Router Advertisement messages thereby being
  4114.    able to cause denial of service.  Furthermore, any neighbor can send
  4115.    proxy Neighbor Advertisements as well as unsolicited Neighbor
  4116.    Advertisements as a potential denial of service attack.
  4117.  
  4118.    Neighbor Discovery protocol packet exchanges can be authenticated
  4119.    using the IP Authentication Header [IPv6-AUTH].  A node SHOULD
  4120.    include an Authentication Header when sending Neighbor Discovery
  4121.    packets if a security association for use with the IP Authentication
  4122.    Header exists for the destination address.  The security associations
  4123.    may have been created through manual configuration or through the
  4124.    operation of some key management protocol.
  4125.  
  4126.    Received Authentication Headers in Neighbor Discovery packets MUST be
  4127.    verified for correctness and packets with incorrect authentication
  4128.    MUST be ignored.
  4129.  
  4130.    It SHOULD be possible for the system administrator to configure a
  4131.    node to ignore any Neighbor Discovery messages that are not
  4132.    authenticated using either the Authentication Header or Encapsulating
  4133.    Security Payload.  The configuration technique for this MUST be
  4134.    documented.  Such a switch SHOULD default to allowing unauthenticated
  4135.    messages.
  4136.  
  4137.    Confidentiality issues are addressed by the IP Security Architecture
  4138.    and the IP Encapsulating Security Payload documents [IPv6-SA, IPv6-
  4139.    ESP].
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146. Narten, Nordmark & Simpson  Standards Track                    [Page 74]
  4147.  
  4148. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  4149.  
  4150.  
  4151. REFERENCES
  4152.  
  4153.   [ADDRCONF] Thomson, S., and T. Narten, "IPv6 Address
  4154.           Autoconfiguration", RFC 1971, August 1996.
  4155.  
  4156.   [ADDR-ARCH] Deering, S., and R. Hinden, Editors, "IP Version 6
  4157.           Addressing Architecture", RFC 1884, January 1996.
  4158.  
  4159.   [ANYCST] Partridge, C., Mendez, T., and W. Milliken, "Host
  4160.           Anycasting Service", RFC 1546, November 1993.
  4161.  
  4162.   [ARP] Plummer, D., "An Ethernet Address Resolution Protocol", STD
  4163.           37, RFC 826, November 1982.
  4164.  
  4165.   [HR-CL] Braden, R., Editor, "Requirements for Internet Hosts --
  4166.           Communication Layers", STD 3, RFC 1122, October 1989.
  4167.  
  4168.   [ICMPv4] Postel, J., "Internet Control Message Protocol", STD 5, RFC
  4169.           792, September 1981.
  4170.  
  4171.   [ICMPv6] Conta, A., and S. Deering, "Internet Control Message
  4172.           Protocol (ICMPv6) for the Internet Protocol Version 6
  4173.           (IPv6)", RFC 1885, January 1996.
  4174.  
  4175.   [IPv6] Deering, S., and R. Hinden, Editors, "Internet Protocol,
  4176.           Version 6 (IPv6) Specification", RFC 1883, January, 1996.
  4177.  
  4178.   [IPv6-ETHER] Crawford, M., "A Method for the Transmission of IPv6
  4179.           Packets over Ethernet Networks", RFC 1972, August 1996.
  4180.  
  4181.   [IPv6-SA] Atkinson, R., "Security Architecture for the Internet
  4182.           Protocol", RFC 1825, August 1995.
  4183.  
  4184.   [IPv6-AUTH] Atkinson, R., "IP Authentication Header", RFC 1826,
  4185.           August 1995.
  4186.  
  4187.   [IPv6-ESP] Atkinson, R., "IP Encapsulating Security Payload (ESP)",
  4188.           RFC 1827, August 1995.
  4189.  
  4190.   [RDISC] Deering, S., "ICMP Router Discovery Messages", RFC 1256,
  4191.           September 1991.
  4192.  
  4193.   [SH-MEDIA] Braden, R., Postel, J., and Y. Rekhter, "Internet
  4194.           Architecture Extensions for Shared Media", RFC 1620, May
  4195.           1994.
  4196.  
  4197.   [ASSIGNED] Reynolds, J., and J. Postel, "ASSIGNED NUMBERS", STD 2,
  4198.           RFC 1700, October 1994.
  4199.  
  4200.  
  4201.  
  4202. Narten, Nordmark & Simpson  Standards Track                    [Page 75]
  4203.  
  4204. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  4205.  
  4206.  
  4207.   [SYNC] S. Floyd, V. Jacobsen, "The Synchronization of Periodic Routing
  4208.           Messages", IEEE/ACM Transactions on Networking, April 1994.
  4209.           ftp://ftp.ee.lbl.gov/papers/sync_94.ps.Z
  4210.  
  4211. AUTHORS' ADDRESSES
  4212.  
  4213.      Erik Nordmark                Thomas Narten
  4214.      Sun Microsystems, Inc.       IBM Corporation
  4215.      2550 Garcia Ave              P.O. Box 12195
  4216.      Mt. View, CA 94041           Research Triangle Park, NC 27709-2195
  4217.      USA                          USA
  4218.  
  4219.      Phone: +1 415 786 5166       Phone: +1 919 254 7798
  4220.      Fax:   +1 415 786 5896       Fax:   +1 919 254 4027
  4221.      EMail: nordmark@sun.com      EMail: narten@vnet.ibm.com
  4222.  
  4223.  
  4224.      William Allen Simpson
  4225.      Daydreamer
  4226.      Computer Systems Consulting Services
  4227.      1384 Fontaine
  4228.      Madison Heights, Michigan  48071
  4229.      USA
  4230.  
  4231.      EMail: Bill.Simpson@um.cc.umich.edu
  4232.             bsimpson@MorningStar.com
  4233.  
  4234.  
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245.  
  4246.  
  4247.  
  4248.  
  4249.  
  4250.  
  4251.  
  4252.  
  4253.  
  4254.  
  4255.  
  4256.  
  4257.  
  4258. Narten, Nordmark & Simpson  Standards Track                    [Page 76]
  4259.  
  4260. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  4261.  
  4262.  
  4263. APPENDIX A: MULTIHOMED HOSTS
  4264.  
  4265.    There are a number of complicating issues that arise when Neighbor
  4266.    Discovery is used by hosts that have multiple interfaces.  This
  4267.    section does not attempt to define the proper operation of multihomed
  4268.    hosts with regard to Neighbor Discovery.  Rather, it identifies
  4269.    issues that require further study.  Implementors are encouraged to
  4270.    experiment with various approaches to making Neighbor Discovery work
  4271.    on multihomed hosts and to report their experiences.
  4272.  
  4273.    If a multihomed host receives Router Advertisements on all of its
  4274.    interfaces, it will (probably) have learned on-link prefixes for the
  4275.    addresses residing on each link.  When a packet must be sent through
  4276.    a router, however, selecting the "wrong" router can result in a
  4277.    suboptimal or non-functioning path.  There are number of issues to
  4278.    consider:
  4279.  
  4280.   1) In order for a router to send a redirect, it must determine that
  4281.      the packet it is forwarding originates from a neighbor.  The
  4282.      standard test for this case is to compare the source address of the
  4283.      packet to the list of on-link prefixes associated with the
  4284.      interface on which the packet was received.  If the originating
  4285.      host is multihomed, however, the source address it uses may belong
  4286.      to an interface other than the interface from which it was sent.
  4287.      In such cases, a router will not send redirects, and suboptimal
  4288.      routing is likely.  In order to be redirected, the sending host
  4289.      must always send packets out the interface corresponding to the
  4290.      outgoing packet's source address.  Note that this issue never
  4291.      arises with non-multihomed hosts; they only have one interface.
  4292.  
  4293.   2) If the selected first-hop router does not have a route at all for
  4294.      the destination, it will be unable to deliver the packet.  However,
  4295.      the destination may be reachable through a router on one of the
  4296.      other interfaces.  Neighbor Discovery does not address this
  4297.      scenario; it does not arise in the non-multihomed case.
  4298.  
  4299.   3) Even if the first-hop router does have a route for a destination,
  4300.      there may be a better route via another interface.  No mechanism
  4301.      exists for the multihomed host to detect this situation.
  4302.  
  4303.    If a multihomed host fails to receive Router Advertisements on one or
  4304.    more of its interfaces, it will not know (in the absence of
  4305.    configured information) which destinations are on-link on the
  4306.    affected interface(s).  This leads to a number of problems:
  4307.  
  4308.   1) If no Router Advertisement is received on any interfaces, a
  4309.      multihomed host will have no way of knowing which interface to send
  4310.      packets out on, even for on-link destinations.  Under similar
  4311.  
  4312.  
  4313.  
  4314. Narten, Nordmark & Simpson  Standards Track                    [Page 77]
  4315.  
  4316. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  4317.  
  4318.  
  4319.      conditions in the non-multihomed host case, a node treats all
  4320.      destinations as residing on-link, and communication proceeds.  In
  4321.      the multihomed case, however, additional information is needed to
  4322.      select the proper outgoing interface.  Alternatively, a node could
  4323.      attempt to perform address resolution on all interfaces, a step
  4324.      involving significant complexity that is not present in the non-
  4325.      multihomed host case.
  4326.  
  4327.   2) If Router Advertisements are received on some, but not all
  4328.      interfaces, a multihomed host could choose to only send packets out
  4329.      on the interfaces on which it has received Router Advertisements.
  4330.      A key assumption made here, however, is that routers on those other
  4331.      interfaces will be able to route packets to the ultimate
  4332.      destination, even when those destinations reside on the subnet to
  4333.      which the sender connects, but has no on-link prefix information.
  4334.      Should the assumption be false, communication would fail.  Even if
  4335.      the assumption holds, packets will traverse a sub-optimal path.
  4336.  
  4337. APPENDIX B: FUTURE EXTENSIONS
  4338.  
  4339. Possible extensions for future study are:
  4340.  
  4341.  o Using dynamic timers to be able to adapt to links with widely varying
  4342.    delay.  Measuring round trip times, however, requires acknowledgments
  4343.    and sequence numbers in order to match received Neighbor
  4344.    Advertisements with the actual Neighbor Solicitation that triggered
  4345.    the advertisement.  Implementors wishing to experiment with such a
  4346.    facility could do so in a backwards-compatible way by defining a new
  4347.    option carrying the necessary information.  Nodes not understanding
  4348.    the option would simply ignore it.
  4349.  
  4350.  o Adding capabilities to facilitate the operation over links that
  4351.    currently require hosts to register with an address resolution
  4352.    server.  This could for instance enable routers to ask hosts to send
  4353.    them periodic unsolicited advertisements.  Once again this can be
  4354.    added using a new option sent in the Router Advertisements.
  4355.  
  4356.  o Adding additional procedures for links where asymmetric and non-
  4357.    transitive reachability is part of normal operations.  Such
  4358.    procedures might allow hosts and routers to find usable paths on,
  4359.    e.g., radio links.
  4360.  
  4361. APPENDIX C: STATE MACHINE FOR THE REACHABILITY STATE
  4362.  
  4363.    This appendix contains a summary of the rules specified in Sections
  4364.    7.2 and 7.3.  This document does not mandate that implementations
  4365.    adhere to this model as long as their external behavior is consistent
  4366.    with that described in this document.
  4367.  
  4368.  
  4369.  
  4370. Narten, Nordmark & Simpson  Standards Track                    [Page 78]
  4371.  
  4372. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  4373.  
  4374.  
  4375.    When performing address resolution and Neighbor Unreachability
  4376.    Detection the following state transitions apply using the conceptual
  4377.    model:
  4378.  
  4379. State           Event                   Action                New state
  4380.  
  4381. -               Packet to send.         Create entry.         INCOMPLETE
  4382.                                         Send multicast NS.
  4383.                                         Start retransmit timer
  4384.  
  4385. INCOMPLETE      Retransmit timeout,     Retransmit NS         INCOMPLETE
  4386.                 less than N             Start retransmit timer
  4387.                 retransmissions.
  4388.  
  4389. INCOMPLETE      Retransmit timeout,     Discard entry         -
  4390.                 N or more               Send ICMP error
  4391.                 retransmissions.
  4392.  
  4393. INCOMPLETE      NA, Solicited=0,        Record link-layer     STALE
  4394.                 Override=any            address.  Send queued
  4395.                                         packets.
  4396.  
  4397. INCOMPLETE      NA, Solicited=1,        Record link-layer     REACHABLE
  4398.                 Override=any            address.  Send queued
  4399.                                         packets.
  4400.  
  4401. !INCOMPLETE     NA, Solicited=1,        -                     REACHABLE
  4402.                 Override=0
  4403.  
  4404. !INCOMPLETE     NA, Solicited=1,        Record link-layer     REACHABLE
  4405.                 Override=1              address.
  4406.  
  4407. !INCOMPLETE     NA, Solicited=0,        -                     STALE
  4408.                 Override=0
  4409.  
  4410. !INCOMPLETE     NA, Solicited=0,        Record link-layer     STALE
  4411.                 Override=1              address.
  4412.  
  4413. !INCOMPLETE     upper-layer reachability  -                   REACHABLE
  4414.                 confirmation
  4415.  
  4416. REACHABLE       timeout, more than      -                     STALE
  4417.                 N seconds since
  4418.                 reachability confirm.
  4419.  
  4420. STALE           Sending packet          Start delay timer     DELAY
  4421.  
  4422. DELAY           Delay timeout           Send unicast NS probe PROBE
  4423.  
  4424.  
  4425.  
  4426. Narten, Nordmark & Simpson  Standards Track                    [Page 79]
  4427.  
  4428. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  4429.  
  4430.  
  4431.                                         Start retransmit timer
  4432.  
  4433. PROBE           Retransmit timeout,     Retransmit NS         PROBE
  4434.                 less than N
  4435.                 retransmissions.
  4436.  
  4437. PROBE           Retransmit timeout,     Discard entry         -
  4438.                 N or more
  4439.                 retransmissions.
  4440.  
  4441.    The state transitions for receiving unsolicited information other
  4442.    than Neighbor Advertisement messages apply to either the source of
  4443.    the packet (for Neighbor Solicitation, Router Solicitation, and
  4444.    Router Advertisement messages) or the target address (for Redirect
  4445.    messages) as follows:
  4446.  
  4447. State           Event                   Action                New state
  4448.  
  4449. -               NS, RS, RA, Redirect    Create entry.         STALE
  4450.  
  4451. INCOMPLETE      NS, RS, RA, Redirect    Record link-layer     STALE
  4452.                                         address.  Send queued
  4453.                                         packets.
  4454.  
  4455. !INCOMPLETE     NS, RS, RA, Redirect    Update link-layer     STALE
  4456.                 Different link-layer    address
  4457.                 address than cached.
  4458.  
  4459. !INCOMPLETE     NS, RS, RA, Redirect    -                     unchanged
  4460.                 Same link-layer
  4461.                 address as cached.
  4462.  
  4463. APPENDIX D: IMPLEMENTATION ISSUES
  4464.  
  4465. Appendix D.1: Reachability confirmations
  4466.  
  4467.    Neighbor Unreachability Detection requires explicit confirmation that
  4468.    a forward-path is functioning properly.  To avoid the need for
  4469.    Neighbor Solicitation probe messages, upper layer protocols should
  4470.    provide such an indication when the cost of doing so is small.
  4471.    Reliable connection-oriented protocols such as TCP are generally
  4472.    aware when the forward-path is working.  When TCP sends (or receives)
  4473.    data, for instance, it updates its window sequence numbers, sets and
  4474.    cancels retransmit timers, etc.  Specific scenarios that usually
  4475.    indicate a properly functioning forward-path include:
  4476.  
  4477. - Receipt of an acknowledgement that covers a sequence number (e.g.,
  4478.    data) not previously acknowledged indicates that the forward path was
  4479.  
  4480.  
  4481.  
  4482. Narten, Nordmark & Simpson  Standards Track                    [Page 80]
  4483.  
  4484. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  4485.  
  4486.  
  4487.    working at the time the data was sent.
  4488.  
  4489. - Completion of the initial three-way handshake is a special case of the
  4490.    previous rule; although no data is sent during the handshake, the SYN
  4491.    flags are counted as data from the sequence number perspective.  This
  4492.    applies to both the SYN+ACK for the active open the ACK of that
  4493.    packet on the passively opening peer.
  4494.  
  4495. - Receipt of new data (i.e., data not previously received) indicates
  4496.    that the forward-path was working at the time an acknowledgement was
  4497.    sent that advanced the peer's send window that allowed the new data
  4498.    to be sent.
  4499.  
  4500.    To minimize the cost of communicating reachability information
  4501.    between the TCP and IP layers, an implementation may wish to rate-
  4502.    limit the reachability confirmations its sends IP.  One possibility
  4503.    is to process reachability only every few packets.  For example, one
  4504.    might update reachability information once per round trip time, if an
  4505.    implementation only has one round trip timer per connection.  For
  4506.    those implementations that cache Destination Cache entries within
  4507.    control blocks, it may be possible to update the Neighbor Cache entry
  4508.    directly (i.e., without an expensive lookup) once the TCP packet has
  4509.    been demultiplexed to its corresponding control block.  For other
  4510.    implementation it may be possible to piggyback the reachability
  4511.    confirmation on the next packet submitted to IP assuming that the
  4512.    implementation guards against the piggybacked confirmation becoming
  4513.    stale when no packets are sent to IP for an extended period of time.
  4514.  
  4515.    TCP must also guard against thinking "stale" information indicates
  4516.    current reachability.  For example, new data received 30 minutes
  4517.    after a window has opened up does not constitute a confirmation that
  4518.    the path is currently working.  In merely indicates that 30 minutes
  4519.    ago the window update reached the peer i.e. the path was working at
  4520.    that point in time.  An implementation must also take into account
  4521.    TCP zero-window probes that are sent even if the path is broken and
  4522.    the window update did not reach the peer.
  4523.  
  4524.    For UDP based applications (RPC, DNS) it is relatively simple to make
  4525.    the client send reachability confirmations when the response packet
  4526.    is received.  It is more difficult and in some cases impossible for
  4527.    the server to generate such confirmations since there is no flow
  4528.    control, i.e., the server can not determine whether a received
  4529.    request indicates that a previous response reached the client.
  4530.  
  4531.    Note that an implementation can not use negative upper-layer advise
  4532.    as a replacement for the Neighbor Unreachability Detection algorithm.
  4533.    Negative advise (e.g. from TCP when there are excessive
  4534.    retransmissions) could serve as a hint that the forward path from the
  4535.  
  4536.  
  4537.  
  4538. Narten, Nordmark & Simpson  Standards Track                    [Page 81]
  4539.  
  4540. RFC 1970       Neighbor Discovery for IP Version 6 (IPv6)    August 1996
  4541.  
  4542.  
  4543.    sender of the data might not be working.  But it would fail to detect
  4544.    when the path from the receiver of the data is not functioning
  4545.    causing, none of the acknowledgement packets to reach the
  4546.    dgement
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.  
  4562.  
  4563.  
  4564.  
  4565.  
  4566.  
  4567.  
  4568.  
  4569.  
  4570.  
  4571.  
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.  
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594. Narten, Nordmark & Simpson  Standards Track                    [Page 82]
  4595.  
  4596.