6lowpan Working Group Z. Shelby, Ed. Internet-Draft Sensinode Updates: 4944 (if approved) S. Chakrabarti Intended status: Standards Track IP Infusion Expires: October 29, 2010 E. Nordmark Oracle, Inc. April 27, 2010 Neighbor Discovery Optimization for Low-power and Lossy Networks draft-ietf-6lowpan-nd-09 Abstract The IETF 6LoWPAN working group defines IPv6 for low-power and lossy networks (LLNs) such as IEEE 802.15.4. This and other similar link technologies have limited or no usage of multicast signaling due to energy conservation. In addition, the wireless network may not strictly follow traditional concept of IP subnets and IP links. IPv6 Neighbor Discovery was not designed for non-transitive wireless links. The traditional IPv6 link concept and heavy use of multicast make the protocol inefficient and sometimes impractical in a low power and lossy network. This document describes simple optimizations to IPv6 Neighbor Discovery, addressing mechanisms and duplicate address detection for 6LoWPAN and similar networks. Status of this Memo This Internet-Draft is submitted to IETF in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on October 29, 2010. Shelby, et al. Expires October 29, 2010 [Page 1] Internet-Draft ND Optimization for LLNs April 2010 Copyright Notice Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. The Shortcomings of IPv6 Neighbor Discovery . . . . . . . 5 1.2. Mesh-under and Route-over Concepts . . . . . . . . . . . . 6 1.3. Applicability, Goals and Assumptions . . . . . . . . . . . 7 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 8 3. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 9 3.1. Extensions to RFC4861 . . . . . . . . . . . . . . . . . . 10 3.2. Address Assignment . . . . . . . . . . . . . . . . . . . . 11 3.3. Host-to-Router Interaction . . . . . . . . . . . . . . . . 11 3.4. Router-to-Router Interaction . . . . . . . . . . . . . . . 12 4. New Neighbor Discovery Options . . . . . . . . . . . . . . . . 13 4.1. Address Registration Option . . . . . . . . . . . . . . . 13 4.2. 6LoWPAN Context Option . . . . . . . . . . . . . . . . . . 15 4.3. Authoritative Border Router Option . . . . . . . . . . . . 16 5. Host Behavior . . . . . . . . . . . . . . . . . . . . . . . . 17 5.1. Forbidden Actions . . . . . . . . . . . . . . . . . . . . 18 5.2. Interface Initialization . . . . . . . . . . . . . . . . . 18 5.3. Sending a Router Solicitation . . . . . . . . . . . . . . 18 5.4. Processing a Router Advertisement . . . . . . . . . . . . 18 5.4.1. Address configuration . . . . . . . . . . . . . . . . 18 5.4.2. Storing Contexts . . . . . . . . . . . . . . . . . . . 19 5.4.3. Maintaining Prefix and Context Information . . . . . . 19 5.5. Registration and Neighbor Unreachability Detection . . . . 19 5.5.1. Sending a Neighbor Solicitation . . . . . . . . . . . 20 5.5.2. Processing a Neighbor Advertisement . . . . . . . . . 20 5.5.3. Recovering from Failures . . . . . . . . . . . . . . . 20 5.6. Next-hop Determination . . . . . . . . . . . . . . . . . . 21 5.7. Address Resolution . . . . . . . . . . . . . . . . . . . . 21 5.8. Sleeping . . . . . . . . . . . . . . . . . . . . . . . . . 22 5.8.1. Picking an Appropriate Registration Lifetime . . . . . 22 Shelby, et al. Expires October 29, 2010 [Page 2] Internet-Draft ND Optimization for LLNs April 2010 5.8.2. Behavior on Wakeup . . . . . . . . . . . . . . . . . . 22 6. Router Behavior for 6LR and 6LBR . . . . . . . . . . . . . . . 22 6.1. Forbidden Actions . . . . . . . . . . . . . . . . . . . . 23 6.2. Interface Initialization . . . . . . . . . . . . . . . . . 23 6.3. Processing a Router Solicitation . . . . . . . . . . . . . 23 6.4. Periodic Router Advertisements . . . . . . . . . . . . . . 24 6.5. Processing a Neighbor Solicitation . . . . . . . . . . . . 24 6.5.1. Checking for Duplicates . . . . . . . . . . . . . . . 24 6.5.2. Updating the Neighbor Cache . . . . . . . . . . . . . 25 6.5.3. Address Resolution between Routers . . . . . . . . . . 25 6.5.4. Neighbor Unreachability Detection . . . . . . . . . . 25 7. Border Router Behavior . . . . . . . . . . . . . . . . . . . . 25 7.1. Prefix Determination . . . . . . . . . . . . . . . . . . . 26 7.2. Context Configuration and Management . . . . . . . . . . . 26 8. Optional Behavior . . . . . . . . . . . . . . . . . . . . . . 27 8.1. Multihop Prefix and Context Distribution . . . . . . . . . 27 8.1.1. Routers Sending Router Solicitations . . . . . . . . . 27 8.1.2. Routers Processing Router Advertisements . . . . . . . 28 8.1.3. Storing the Information . . . . . . . . . . . . . . . 28 8.1.4. Sending Router Advertisements . . . . . . . . . . . . 28 8.2. Duplicate Address Detection . . . . . . . . . . . . . . . 29 8.2.1. Special Message Validation . . . . . . . . . . . . . . 30 8.2.2. Conceptual Data Structures . . . . . . . . . . . . . . 30 8.2.3. 6LR Sending a special Neighbor Solicitation . . . . . 30 8.2.4. 6LBR Receiving a special Neighbor Solicitation . . . . 31 8.2.5. Processing a special Neighbor Advertisement . . . . . 31 8.2.6. Recovering from Failures . . . . . . . . . . . . . . . 31 9. Protocol Constants . . . . . . . . . . . . . . . . . . . . . . 32 10. Message Examples . . . . . . . . . . . . . . . . . . . . . . . 32 11. Security Considerations . . . . . . . . . . . . . . . . . . . 33 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 33 13. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 34 14. Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . 34 15. References . . . . . . . . . . . . . . . . . . . . . . . . . . 38 15.1. Normative References . . . . . . . . . . . . . . . . . . . 38 15.2. Informative References . . . . . . . . . . . . . . . . . . 39 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 39 Shelby, et al. Expires October 29, 2010 [Page 3] Internet-Draft ND Optimization for LLNs April 2010 1. Introduction The IPv6-over-IEEE 802.15.4 [RFC4944] document specifies how IPv6 is carried over an IEEE 802.15.4 network with the help of an adaptation layer which sits between the MAC layer and the IP network layer. A link in a LoWPAN is characterized as lossy, low-power, low bit-rate, short range, with many nodes saving energy with long sleep periods. Multicast as used in IPv6 Neighbor Discovery [RFC4861] is not desirable in such a wireless low-power and lossy network. Moreover, LoWPAN links are asymmetric and non-transitive in nature. A LoWPAN is potentially composed of a large number of overlapping radio ranges. Although a given radio range has broadcast capabilities, the aggregation of these is a complex Non-Broadcast MultiAccess (NBMA, [RFC2491]) structure with generally no LoWPAN-wide multicast capabilities. Link-local scope is in reality defined by reachability and radio strength. Thus we can consider a LoWPAN to be made up of links with undetermined connectivity properties as in [I-D.ietf-autoconf-adhoc-addr-model], along with the corresponding address model assumptions defined therein. This specification introduces the following optimizations to IPv6 Neighbor Discovery [RFC4861] specifically aimed at low-power and lossy networks such as LoWPANs: o Host-initiated interactions to allow for sleeping hosts. o Elimination of multicast-based address resolution. o Elimination of redirects since they are problematic on links with non-transitive connectivity. o A host address registration feature using a new option in unicast Neighbor Solicitation and Neighbor Advertisement messages. o A new Neighbor Discovery option to distribute 6LoWPAN header compression context to hosts. o Optional multihop distribution of prefix and 6LoWPAN header compression context. o Optional multihop duplicate address detection. The document defines three new ICMPv6 message options: the required Address Registration option and the optional Authoritative Border Router and 6LoWPAN Context options. Shelby, et al. Expires October 29, 2010 [Page 4] Internet-Draft ND Optimization for LLNs April 2010 1.1. The Shortcomings of IPv6 Neighbor Discovery IPv6 Neighbor Discovery [RFC4861] provides several important mechanisms used for Router Discovery, Address Resolution, Duplicate Address Detection, Redirect, along with Prefix and Parameter Discovery. Following power-on and initialization of the network in IPv6 Ethernet networks, a node joins the solicited-node multicast address on the interface and then performs Duplicate Address Detection (DAD) for the acquired link-local address by sending a solicited-node multicast message to the link. After that it sends multicast messages to the all-router address to solicit router advertisements. If the host receives a valid Router Advertisement with the "A" flag, it autoconfigures the IPv6 address with the advertised prefix in the Router Advertisement (RA) message. Besides this, the IPv6 routers usually send router advertisements periodically on the network. RAs are sent to the all-node multicast address. Nodes send Neighbor Solicitation/Neighbor Advertisement messages to resolve the IPv6 address of the destination on the link. The Neighbor Solicitation messages used for address resolution are multicast. The Duplicate Address Detection procedure and the use of periodic Router Advertisement messages assumes that the nodes are powered on and reachable most of the time. In Neighbor Discovery the routers find the hosts by assuming that a subnet prefix maps to one broadcast domain, and then multicast Neighbor Solicitation messages to find the host and its link-layer address. Furthermore, the DAD of use multicast assumes that all hosts that autoconfigure IPv6 addresses from the same prefix can be used using link-local multicast messages. Note that the 'L' (on-link) bit in the Prefix Information option can be set to zero in Neighbor Discovery, which makes the host not use multicast Neighbor Solicitation (NS) messages for address resolution of other hosts, but routers still use multicast NS messages to find the hosts. In a LoWPAN, primarily two types of network topologies are found - star networks and mesh networks. A star network is similar to a regular IPv6 subnet with a router and a set of nodes connected to it via the same non-transitive link. But in Mesh networks, the nodes are capable of routing and forwarding packets. Due to the lossy nature of wireless communication and a changing radio environment, the IPv6-link node-set may change due to external physical factors. Thus the link is often unstable and the nodes appear to be moving without moving physically. Shelby, et al. Expires October 29, 2010 [Page 5] Internet-Draft ND Optimization for LLNs April 2010 A LoWPAN can use two types of link-layer addresses; 16-bit short addresses and 64-bit unique addresses as defined in [RFC4944]. Moreover, the available link-layer payload size is on the order of less than 100 bytes thus header compression is very useful. Considering the above characteristics in a LoWPAN, and the IPv6 Neighbor Discovery [RFC4861] protocol design center, some optimizations and extensions to Neighbor Discovery are useful for the wide deployment of IPv6 over low-powered and lossy networks such as 6LoWPANs. 1.2. Mesh-under and Route-over Concepts In the 6LoWPAN context, often a link-layer mesh routing mechanism is referred to as "mesh-under" while routing/forwarding packets using IP-layer addresses is referred to as "route-over". The difference between mesh-under and route-over is similar to a bridged-network versus IP-routing using Ethernet. In a mesh-under network all nodes are on the same link which is served by one or more routers, which we call 6LoWPAN Border Routers (6LBR). In a route-over network, there are multiple links in the 6LoWPAN. Unlike fixed IP links, these link's members may be changing due to the nature of the low-power and lossy behavior of wireless technology. Thus a route-over network is made up of a flexible set of links interconnected by interior routers, which we call 6LoWPAN Routers (6LR). This specification is applicable to both mesh-under and route-over networks. However, in route-over networks, we have two types of routers - 6LBRs and 6LRs. 6LoWPAN Border Routers sit at the boundary of the 6LoWPAN and the rest of the network while 6LoWPAN Routers are inside the LoWPAN. 6LoWPAN Routers are assumed to be running a routing protocol. In a mesh-under configuration a 6LBR is acting as the IPv6 router where all the hosts in the LoWPAN are on the same link, thus they are only one IP hop away. No 6LoWPAN Routers exist in this topology as forwarding is handled by a link-layer mesh routing protocol. In a route-over configuration, Neighbor Discovery operations take place between hosts and 6LRs or 6LBRs. The 6LR nodes are able to send and receive Router Advertisements, Router Solicitations as well as forward and route IPv6 packets. Here packet forwarding happens at the routing layer. In both types of configurations, hosts do not take part in routing and forwarding packets and they act as simple IPv6 hosts. Shelby, et al. Expires October 29, 2010 [Page 6] Internet-Draft ND Optimization for LLNs April 2010 1.3. Applicability, Goals and Assumptions The optimizations described in this document are most useful for route-over and mesh-under configurations in Mesh topologies. However, Star topology configurations will also benefit from the optimizations due to minimized signaling, robust handling of the non- transitive link, and header compression context information. The document has the following main goals and assumptions Goals: o Optimize Neighbor Discovery with a mechanism that is minimal yet sufficient for the operation in both mesh-under and route-over configurations. o Make the host to router interaction the same whether mesh-under or route-over is used. o Minimize signaling by avoiding the use of multicast flooding and reducing the use of link-scope multicast messages. o Optimize the interfaces between hosts and their default routers. o Support for sleeping hosts. o Minimize the complexity of nodes. o Disseminate context information to hosts as needed by [I-D.ietf-6lowpan-hc]. o Optionally disseminate context information and prefix information from the border to all routers in a LoWPAN. o Optional duplicate address detection mechanism suitable for route- over LoWPANs. Assumptions: o EUI-64s are globally unique. o All nodes in the LLN have an EUI-64 interface identifier in order to do address auto-configuration and detect duplicate addresses. o If IEEE 802.15.4 16-bit short addresses are used, then some technique is used to ensure uniqueness of those link-layer addresses. That could be done using DHCPv6 or other techniques outside of the scope of this document. Optionally it can be done Shelby, et al. Expires October 29, 2010 [Page 7] Internet-Draft ND Optimization for LLNs April 2010 using the Address Registration Option based duplicate address detection (Specified in Section 8.2). o The link layer technology is assumed to be low-power and lossy, exhibiting undetermined connectivity, such as IEEE 802.15.4 [RFC4944]. However, the Address Registration mechanism might be useful for other link layer technologies. o A 6LoWPAN is configured with one or more global IPv6 address prefixes to enable hosts to move between routers in the 6LoWPAN without changing their IPv6 addresses. 2. Terminology The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. This specification requires readers to be familiar with all the terms and concepts that are discussed in "Neighbor Discovery for IP version 6" [RFC4861] "IPv6 Stateless Address Autoconfiguration" [RFC4862], "IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs): Overview, Assumptions, Problem Statement, and Goals" [RFC4919], "Transmission of IPv6 Packets over IEEE 802.15.4 Networks" [RFC4944] and "IP Addressing Model in Ad Hoc Networks" [I-D.ietf-autoconf-adhoc-addr-model]. This specification makes extensive use of the same terminology defined in [RFC4861] unless otherwise defined below. 6LoWPAN link: A wireless link determined by single hop reachability of neighboring nodes. These are considered links with undetermined connectivity properties as in [I-D.ietf-autoconf-adhoc-addr-model] Low-Power and Lossy Network (LLN): A network made up of low-power links, often with a high probability of packet loss and undetermined connectivity properties. A LoWPAN is such a network for example. 6LoWPAN Router (6LR): An intermediate router in the LoWPAN who can communicate with other 6LoWPAN routers in the same LoWPAN. 6LoWPAN routers are present only in route-over topologies. Shelby, et al. Expires October 29, 2010 [Page 8] Internet-Draft ND Optimization for LLNs April 2010 6LoWPAN Border Router (6LBR): A border router located at the junction of separate 6LoWPAN networks or between a 6LoWPAN network and another IP network. There may be one or more 6LBRs at the 6LoWPAN network boundary. A 6LBR is the responsible authority for IPv6 Prefix propagation for the 6LoWPAN network it is serving. An isolated LoWPAN also contains a 6LBR in the network, which provides the prefix(es) for the isolated network. Router: Either a 6LR or a 6LBR. Note that nothing in this document precludes a node bring a router on some interfaces and a host on other interfaces as allowed by [RFC2460]. Mesh-under: A topology where hosts are connected to a 6LBR through a mesh using link-layer forwarding. Thus in a mesh-under configuration all IPv6 hosts in a LoWPAN are only one IP hop away from the 6LBR. This topology simulates the typical IP-subnet topology with one router with multiple nodes in the same subnet. Route-over: A configuration topology where hosts are connected to the 6LBR through the use of intermediate layer-3 (IP) routing. Here hosts are typically multiple IP hops away from a 6LBR. The route-over topology typically consists of a 6LBR, a set of 6LRs and hosts. Registration: The process during which a LoWPAN node sends an Neighbor Solicitation message with an Address Registration option to a Router creating a Neighbor Cache entry for the LoWPAN node with a specific timeout. 3. Protocol Overview The Neighbor Discovery optimizations for LLNs are applicable to both mesh-under and route-over configurations. In a mesh-under configuration only 6LoWPAN Border Routers and hosts exist; there are no 6LoWPAN routers in mesh-under topologies. The most important part of the optizations is the evolved host-to- router interaction that allows for sleeping nodes and avoids using multicast Neighbor Discovery messages except for the case of a host finding an initial set of default routers, and redoing such determination when those set of routers have become unreachable. The protocol also provides for header compression Shelby, et al. Expires October 29, 2010 [Page 9] Internet-Draft ND Optimization for LLNs April 2010 [I-D.ietf-6lowpan-hc] by carrying header compression information in a new option in Router Advertisement messages. In addition, there are optional and separate mechanisms that can be used between 6LRs and 6LBRs to perform multihop Duplicate Address Detection and distribution of the Prefix and compression Context information from the 6LBRs to all the 6LRs, which in turn use normal Neighbor Discovery mechanisms to convey this information to the hosts. The protocol is designed so that the host-to-router interaction is not affected by the configuration of the 6LoWPAN; the host-to-router interaction is the same in a mesh-under and route-over configuration. 3.1. Extensions to RFC4861 This document specifies the following optimizations and extensions to IPv6 Neighbor Discovery [RFC4861]: o Host initiated refresh of Router Advertisement information. This removes the need for periodic or unsolicited Router Advertisements from routers to hosts. o No Duplicate Address Detection (DAD) is required if EUI-64 based IPv6 addresses are used. o DAD is optional if DHCPv6 is used to assign addresses. o A New Address Registration mechanism using new Address Registration option between hosts and routers. This removes the need for Routers to use multicast Neighbor Solicitations to find hosts, and supports sleeping hosts. This also enables the same IPv6 address prefix(es) to be used across a route-over 6LoWPAN. It provides the host-to-router interface for Duplicate Address Detection. o A new optional Router Advertisement option for Context information used by 6LoWPAN header compression. o A new optional mechanism to perform Duplicate Address Detection across a route-over 6LoWPAN reusing the above Address Registration option. o New optional mechanisms to distribute Prefixes and Context information across a route-over network which uses a new Authoritative Border Router option to control the flooding of configuration changes. Shelby, et al. Expires October 29, 2010 [Page 10] Internet-Draft ND Optimization for LLNs April 2010 o A few new default protocol constants are introduced and some existing Neighbor Discovery protocol constants are tuned for LLN usage. 3.2. Address Assignment Hosts in a 6LoWPAN configure their IPv6 address as specified in [RFC4861] and [RFC4862] based on the information received in Router Advertisement messages. Optionally, 6LRs can use the same mechanisms to configure their IPv6 addresses. The 6LBRs are responsible for managing the prefix(es) assigned to the 6LoWPAN, using manual configuration, DHCPv6 Prefix Delegation [RFC3633], or other mechanisms. In an isolated LoWPAN a ULA [RFC4193] prefix SHOULD be generated by the 6LBR. 3.3. Host-to-Router Interaction A host sends Router Solicitation messages at startup and also when it suspects that one of its default routers have become unreachable (after Neighbor Unreachability Detection towards the router fails). Hosts receive Router Advertisement messages typically containing the Authoritative Border Router option (ABRO) and may optionally contain one or more 6LoWPAN Context options (6CO) in addition to the existing Prefix Information options (PIO) as described in [RFC4861]. When a host has configured a non-link-local IPv6 address, it registers that address with one or more of its default routers using the Address Registration option (ARO). The host chooses a lifetime of the registration and repeats the ARO option to maintain the registration, even while the host is sleeping. The registration can fail (an ARO option returned to the host with a non-zero Status) if the router determines that the IPv6 address is already used by another hosts, that is, is used by a host with a different EUI-64. This can be used to support non-EUI-64 based addresses such as temporary IPv6 addresses [RFC4941] or addresses based on an Interface ID that is a IEEE 802.15.4 16-bit short addresses. The re-registration of a address can be combined with Neighbor Unreachability Detection (NUD) of the router since both use unicast Neighbor Solicitation messages. This makes things efficient when a host wakes up to send a packet and both need to perform NUD to check that the router is still reachable, and refresh its registration with Shelby, et al. Expires October 29, 2010 [Page 11] Internet-Draft ND Optimization for LLNs April 2010 the router. The response to an address registration might not be immediate since in route-over configurations the 6LR might perform Duplicate Address Detection against the 6LBR. A host retransmits the Address Registration option until it is acknowledged by the receipt of a Address Registration option. As part of the optimizations, Address Resolution is not performed by multicasting Neighbor Solicitation messages as in [RFC4861]. Instead, the routers maintain Neighbor Cache entries for all registered IPv6 addresses. If the address is not in the Neighbor Cache in the router, then the address either doesn't exist, or is assigned a host attached to some other router in the 6LoWPAN, or is external to the 6LoWPAN. In a route-over configuration the routing protocol is used to route such packets toward the destination. 3.4. Router-to-Router Interaction The optional new router-to-router interaction is only for the route- over configuration where 6LRs are present. It is optional in this protocol since the functions it provides might be better provided by other protocol mechanisms, be it DHCPv6, link-layer mechanisms, the routing protocol, or something else. Some mechanisms from this protocol might be used for router-to-router, while others are provided by other protocols. For instance, context information and/or prefix information might be disseminated using this protocol, while Duplicate Address Detection is done using some other protocol. 6LRs can act like a host during system startup and prefix configuration by sending Router Solicitation messages and autoconfiguring their IPv6 addresses unlike routers in [RFC4861]. When multihop prefix or context dissemination is used then the 6LRs store the ABRO, 6CO and Prefix Information received (directly or indirectly) from the 6LBRs and redistribute this information in the Router Advertisements they send to other 6LRs or send to hosts in response to a Router Solicitations. There is a version number field in the ABRO which is used to limit the flooding of updated information between the 6LRs. Optionally the 6LRs can perform Duplicate Address Detection against one or more 6LBRs using a special form of the Address Registration option. In this case, the Neighbor Solicitation and Advertisement messages will be forwarded between the 6LR and 6LBRs and the [RFC4861] rule for checking hop-limit=255 is relaxed. Such multihop DAD messages MUST NOT modify any Neighbor Cache entries on the routers since we do not have the security benefits provided by the Shelby, et al. Expires October 29, 2010 [Page 12] Internet-Draft ND Optimization for LLNs April 2010 hop-limit=255 check. 4. New Neighbor Discovery Options This section defines new Neighbor Discovery message options used by this specification. The Address Registration Option is mandatory, whereas the Authoritative Border Router Option and 6LoWPAN Context Option are optional. 4.1. Address Registration Option The routers need to know the set of host IP addresses that are directly reachable and their corresponding link-layer addresses. This needs to be maintained as the radio reachability changes. For this purpose an Address Registration Option (ARO) is introduced, which can be included in unicast Neighbor Solicitation (NS) messages sent by hosts. Thus it can be included in the unicast NS messages that a host sends as part of Neighbor Unreachability Detection to determine that it can still reach a default router. The ARO is used by the receiving router to reliably maintain its Neighbor Cache. The same option is included in corresponding Neighbor Advertisement (NA) messages with a Status field indicating the success or failure of the registration. This option is always host initiated. The ARO is reused for the optional multihop Duplicate Address Detection from 6LRs to 6LBRs, in which case it has a different Length. In that case one or more AROs can be included in an NS. The ARO is required for reliability and power saving. The lifetime field provides flexibility to the host to register an address which should be usable (continue to be advertised by the 6LR in the routing protocol etc.) during its intended sleep schedule. The sender of the NS also includes the EUI-64 of the interface it is registering an address from. This is used as a unique ID for the detection of duplicate addresses. It is used to tell the difference between the same node re-registering its address and a different node (with a different EUI-64) registering an address that is already in use by someone else. When the ARO is used by hosts the address that is registered MUST be the IPv6 source address for the Neighbor Solicitation message. Thus the Registered Address field is omitted and the Length field MUST be two. When the ARO is used for the optional multihop DAD between a 6LR and a 6LBR then the Registered Address field is included and the Length field MUST be four. Shelby, et al. Expires October 29, 2010 [Page 13] Internet-Draft ND Optimization for LLNs April 2010 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | Status | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Registration Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | EUI-64 | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Registered Address (Optional) + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Type: TBD1 Length: 8-bit unsigned integer. The length of the option in units of 8 octets. 2 without or 4 with the Registered Address. Status: 8-bit unsigned integer. Indicates the status of a registration in the NA response. MUST be set to 0 in NS messages. See below. Reserved: 8-bits. This field is unused. It MUST be initialized to zero by the sender and MUST be ignored by the receiver. Registration Lifetime: 32-bit unsigned integer. The amount of time in seconds that the router should retain the Neighbor Cache entry for the sender of the NS that includes this option. EUI-64: 64 bits. This field is used to uniquely identify the interface of the registered address. Registered Address: 128-bit optional field. MUST NOT be sent by a host. Used for the optional router-router registrations on behalf of a host. Carries the host address, which was contained in the IPv6 Source field Shelby, et al. Expires October 29, 2010 [Page 14] Internet-Draft ND Optimization for LLNs April 2010 in the original NS that contained the option sent by the host. The Status values used in Neighbor Advertisements are: +--------+--------------------------------------------+ | Status | Description | +--------+--------------------------------------------+ | 0 | Success | | 1 | Duplicate Address | | 2-255 | Allocated using Standards Action [RFC2434] | +--------+--------------------------------------------+ Table 1 4.2. 6LoWPAN Context Option The optional 6LoWPAN Context Option (6CO) carries prefix information for LoWPAN header compression, and is similar to the Prefix Information Option of [RFC4861]. However, the prefixes can be remote as well as local to the LoWPAN since header compression potentially applies to all IPv6 addresses. This option allows for the dissemination of multiple contexts identified by a Context Identifier (CID) for use as specified in [I-D.ietf-6lowpan-hc]. A context may be a prefix of any length or an address (/128), and up to 16 6LoWPAN Context options may be carried in an Router Advertisement message. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length |Context Length | Res |C| CID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Valid Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . Context Prefix . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 1: 6LoWPAN Context Option format Type: TBD2 Length: 8-bit unsigned integer. The length of the option (including the type and length fields) in units of 8 octets. May be 2 or 3 depending on the length of the Context Prefix field. Shelby, et al. Expires October 29, 2010 [Page 15] Internet-Draft ND Optimization for LLNs April 2010 Context Length: 8-bit unsigned integer. The number of leading bits in the Context Prefix field that are valid. The value ranges from 0 to 128. If it is more than 64 then the Length MUST be 3. C: 1-bit context compression flag. This flag indicates if the context is valid for use in compression. A context that is not valid MUST NOT be used for compression, but SHOULD be used in decompression in case another compressor has not yet received the updated context information. CID: 4-bit Context Identifier for this prefix information. CID is used by context based header compression specified in [I-D.ietf-6lowpan-hc]. The list of CIDs for a LoWPAN is configured by on the 6LBR that originates the context information for the 6LoWPAN. Res: 3-bit reserved field. This field is unused. It MUST be initialized to zero by the sender and MUST be ignored by the receiver. Valid Lifetime: 32-bit unsigned integer. The length of time in seconds (relative to the time the packet is received) that the context is valid for the purpose of header compression or decompression. A value of all one bits (0xffffffff) represents infinity. A value of all zero bits (0x0) indicates that this context entry MUST be removed immediately. Context Prefix: The IPv6 prefix or address corresponding to the Context ID (CID) field. The valid length of this field is included in the Context Length field. This field is padded with zeros in order to make the option a multiple of 8-bytes. 4.3. Authoritative Border Router Option The optional Authoritative Border Router Option (ABRO) is needed when Router Advertisement (RA) messages are used to disseminate prefixes and context information across a route-over topology. In this case 6LRs receive Prefix Information options from other 6LRs. This implies that a 6LR can't just let the most recently received RA win. In order to be able to reliably add and remove prefixes from the 6LoWPAN we need to carry information from the authoritative 6LBR. This is done by introducing a version number which the 6LBR sets and 6LRs propagate as they propagate the prefix and context information with this Authoritative Border Router Option. When there are multiple 6LBRs they would have separate version number spaces. Thus this option needs to carry the IP address of the 6LBR that originated that set of information. Shelby, et al. Expires October 29, 2010 [Page 16] Internet-Draft ND Optimization for LLNs April 2010 The Authoritative Border Router option MUST be included in all Router Advertisement messages in the case when Router Advertisements are used to propagate information between routers (as described in Section 8.2. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length = 3 | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + 6LBR Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Type: TBD3 Length: 8-bit unsigned integer. The length of the option in units of 8 octets. Always 3. Reserved: 16-bits. This field is unused. It MUST be initialized to zero by the sender and MUST be ignored by the receiver. Version Number: 32-bit unsigned integer. The version number corresponding to this set of information contained in the RA message. The authoritative 6LBR originating the prefix increases this version number each time its set of prefix or context information changes. 6LBR Address: IPv6 address of the 6LBR that is the origin of the included version number. 5. Host Behavior Hosts in a LoWPAN use the Address Registration option in the Neighbor Solicitation messages they send as a way to maintain the Neighbor Cache in the routers thereby removing the need for multicast Neighbor Solicitations to do address resolution. Unlike in [RFC4861] the Shelby, et al. Expires October 29, 2010 [Page 17] Internet-Draft ND Optimization for LLNs April 2010 hosts initiate updating the information they receive in Router Advertisements by sending Router Solicitations before the information expires. Finally, when Neighbor Unreachability Detection indicates that one or all default routers have become unreachable, then the host uses Router Solicitations to find a new set of default routers. 5.1. Forbidden Actions A host in a 6LoWPAN MUST NOT accept a Redirect message. Redirect messages are problematic on a link with non-transitive reachability. A host would never multicast a Neighbor Solicitation message. 5.2. Interface Initialization When the interface on a host is initialized it follows the specification in [RFC4861]. A link-local address is formed based on the EUI-64 assigned to the interface, and then the host sends Router Solicitation messages as described in [RFC4861] Section 6.3.7. There is no need to join the Solicited-Node multicast address since nobody multicasts Neighbor Solicitations in this type of network. 5.3. Sending a Router Solicitation The Router Solicitation is formatted as specified in [RFC4861] and sent to the IPv6 All-Routers multicast address (see [RFC4861] Section 6.3.7 for details). If the link layer supports a way to send packets to some kind of all-routers anycast link-layer address, then that MAY be used to convey theses packets to a router. 5.4. Processing a Router Advertisement The processing of Router Advertisements is as in [RFC4861] with the addition of handling the 6LoWPAN Context option and triggering address registration when a new address has been configured. Should the host erroneously receive a Prefix Information option with the 'L' (on-link) flag set, then that Prefix Information Option (PIO) MUST be ignored. 5.4.1. Address configuration Address configuration follows [RFC4862]. Once an address has been configured it will be registered by unicasting a Neighbor Solicitation with the Address Registration option to the router. Shelby, et al. Expires October 29, 2010 [Page 18] Internet-Draft ND Optimization for LLNs April 2010 5.4.2. Storing Contexts The host maintains a conceptual data structure for the context information it receives from the routers, which is called the Context Table. This includes the Context ID, the prefix (from the Context Prefix field in the 6CO), the Compression bit, and the Valid Lifetime. A Context Table entry that has the Compression bit clear is used for decompression when receiving packets, but MUST NOT be used for compression when sending packets. When a 6CO option is received in a Router Advertisement it is used to add or update the information in the Context Table. If the Context ID field in the 6CO matches an existing Context Table entry, then that entry is updated with the information in the 6CO. If the Valid Lifetime field in the 6CO is zero, then the entry is immediately deleted. If there is no matching entry in the Context Table, and the Valid Lifetime field is non-zero, then a new context is added to the Context Table. The 6CO is used to update the created entry. When the 6LBR changes the context information a host might not immediately notice. And in the worst case a host might have stale context information. For this reason 6LBRs use the recommendations in Section 7.2 for carefully managing the context lifecycle. 5.4.3. Maintaining Prefix and Context Information The prefix information is timed out as specified in [RFC4861]. When the Valid Lifetime for a Context Table entry expires the entry is deleted. A host should inspect the various lifetimes to determine when it should next initiate sending a Router Solicitation to ask for any updates to the information. The lifetimes that matter are the Default Router lifetime, the Valid Lifetime in the Prefix Information options, and the Valid Lifetime in the 6CO. The host SHOULD unicast an Router Solicitation to the router well before the minimum of those lifetimes (across all the prefixes and all the contexts) expire. 5.5. Registration and Neighbor Unreachability Detection Unicast Neighbor Solicitation (NS) messages are send by hosts to register their IPv6 addresses, and also to do NUD to verify that its default routers are still reachable. The registration is performed by the host including an ARO in the Neighbor Solicitation it sends. Even if the host doesn't have data to send, but is expecting others to try to send packets to the host, the host needs to maintain its Shelby, et al. Expires October 29, 2010 [Page 19] Internet-Draft ND Optimization for LLNs April 2010 Neighbor Cache entries in the routers. This is done by sending NS messages with the ARO to the router well in advance of the registration lifetime expiring. NS messages are retransmitted up to MAX_UNICAST_SOLICIT times using a minimum timeout of RETRANS_TIMER until the host receives an Neighbor Advertisement message with an ARO option. Hosts that receive Router Advertisement messages from multiple default routers SHOULD attempt to register with more than one of them in order to increase the robustness of the network. Note that Neighbor Unreachability Detection probes can be suppressed if by Reachability Confirmations from transport protocols or applications as specified in [RFC4861]. 5.5.1. Sending a Neighbor Solicitation The host triggers sending Neighbor Solicitation (NS) messages containing an ARO when a new address is configured, when it discovers a new default router, or well before the Registration Lifetime expires. Such an NS MUST include a Source Link-Layer Address (SLLA) option, since the router needs to record the link-layer address of the host. 5.5.2. Processing a Neighbor Advertisement A host handles Neighbor Advertisement messages as specified in [RFC4861], with added logic described in this section for handling the Address Registration option. In addition to the normal validation of a Neighbor Advertisement and its options, the Address Registration option is verified as follows (if present). If the Length field is not two, the option is silently ignored. If the EUI-64 field does not match the EUI-64 of the interface, the option is silently ignored. If the status field is zero, then the address registration was successful. The host saves the Registration Lifetime from the Address Registration option for use to trigger a new NS well before the lifetime expires. If the Status field is not equal to zero, the address registration has failed. 5.5.3. Recovering from Failures The procedure for maintaining reachability information about a neighbor is the same as in [RFC4861] Section 7.3 with the exception that address resolution is not performed. Shelby, et al. Expires October 29, 2010 [Page 20] Internet-Draft ND Optimization for LLNs April 2010 The address registration procedure may fail for two reasons: no response to Neighbor Solicitations is received (NUD failure), or an Address Registration option with a failure Status (Status > 0) is received. In the case of NUD failure the entry for that router will be removed thus address registration is no longer of importance. When an Address Registration option with a non-zero Status field is received this indicates that registration for that address has failed. A failure Status of one indicates that a duplicate address was detected and the procedure described in [RFC4862] Section 5.4.5 is followed. Other failure codes may be defined in future documents. For all non-zero Status values the host MUST NOT use the address it tried to register. 5.6. Next-hop Determination The IP address of the next-hop for a destination is determined as follows. Destinations to the link-local prefix (FE80::) are always sent on the link to that destination. All other prefixes are assumed to be off-link [I-D.ietf-autoconf-adhoc-addr-model]. Anycast addresses are always considered to be off-link. They are therefore sent to one of the routers in the Default Router List. Multicast addresses are considered to be on-link and are resolved as specified in [RFC4944] or the appropriate IP-over-foo document. A LoWPAN Node is not required to maintain a minimum of one buffer per neighbor as specified in [RFC4861], since packets are never queued while waiting for address resolution. 5.7. Address Resolution The address registration mechanism and the SLLA option in Router Advertisement message provide sufficient a priori state in routers and hosts to resolve an IPv6 address to its associated link-layer address. As all prefixes but the link-local prefix are always assumed to be off-link, multicast-based address resolution between neighbors is not needed. Link-layer addresses for neighbors are stored in Neighbor Cache entries [RFC4861] In order to achieve LoWPAN compression, most global addresses are formed using a link-layer address. Thus a host can minimize memory usage by optimizing for this case and only storing link-layer address information if it differs from the link-layer address corresponding to the Interface ID of the IPv6 address (i.e., differs in more than the on-link/global bit being inverted). Shelby, et al. Expires October 29, 2010 [Page 21] Internet-Draft ND Optimization for LLNs April 2010 5.8. Sleeping It is often advantageous for battery-powered hosts in LoWPANs to keep a low duty cycle. The optimizations described in this document enable hosts to sleep as described further in this section. Routers may want to cache traffic destined to a host which is sleeping, but such functionality is out of the scope of this document. 5.8.1. Picking an Appropriate Registration Lifetime As all Neighbor Discovery messages are initiated by the hosts, this allows a host to sleep or otherwise be unreachable between NS messages. The Address Registration option attached to NS messages indicates to a router to keep the Neighbor Cache entry for that address valid for the period in the Registration Lifetime field. A host should choose a sleep time appropriate for its energy characteristics, and set a registration lifetime larger than the sleep time to ensure the registration is renewed successfully (considering e.g. clock drift). A host should also consider the stability of the network (how quickly the topology changes) when choosing its sleep time (and thus registration lifetime). A dynamic network may require a shorter sleep time. 5.8.2. Behavior on Wakeup When a host wakes up from a sleep period it SHOULD maintain its current address registrations that will timeout before the next wakeup. This is done by sending Neighbor Solicitation messages with the Address Registration option as described in Section 5.5.1. The host may also need to refresh its prefix and context information by sending new unicast Router Solicitation. If after wakeup the host (using NUD) determines that some or all previous default routers have become unreachable, then the host will restart doing multicast Router Solicitations to discover new default router(s) and restart the address registration process. 6. Router Behavior for 6LR and 6LBR Both 6LRs and 6LBRs maintain the Neighbor Cache [RFC4861] based on the Address Registration Options they receive in Neighbor Advertisement messages from hosts. Note that the handling of ARO from other routers (with Length=4) is specified in Section 8. The routers SHOULD NOT garbage collect the Neighbor Cache entries since they need to retain them until the Registration Lifetime expires. Similarly, if Neighbor Unreachability Detection on the router determines that the a host is UNREACHABLE (based on the logic Shelby, et al. Expires October 29, 2010 [Page 22] Internet-Draft ND Optimization for LLNs April 2010 in [RFC4861]), the Neighbor Cache entry SHOULD NOT be deleted but be retained until the Registration Lifetime expires. A renewed ARO should mark the cache entry as STALE. Routers MAY implement the Default Router Preferences [RFC4191] and use that to indicate to the host whether the router is a 6LBR or a 6LR. If this is implemented then 6LRs with no route to a border router MUST set Prf to (11) for low preference, other 6LRs MUST set Prf to (00) for normal preference, and 6LBRs MUST set Prf to (01) for high preference. 6.1. Forbidden Actions A router SHOULD NOT send Redirect messages. Since the link has non- transitive reachability the router has no way to determine that the recipient of a Redirect message can reach the link-layer address. A router MUST NOT set the 'L' (on-link) flag in the Prefix Information options, since that might trigger hosts to send multicast Neighbor Solicitations. 6.2. Interface Initialization A router initializes its interface more or less as in [RFC4861]. However, a 6LR might want to wait to make its interfaces advertising (implicitly keeping the AdvSendAdvertisements flag clear) until it has received the prefix(es) and context information from its 6LBR. That is independent of whether prefixes and context information is disseminated using the methods specified in this document, or using some other method. 6.3. Processing a Router Solicitation A router processes Router Solicitation messages as specified in [RFC4861]. The differences relate to the inclusion of Authoritative Border Router options in the Router Advertisement (RA) messages. If a 6LR has received an ABRO from a 6LBR, then it will include that option unmodified in the Router Advertisement messages it sends. And if the 6LR has received RAs, whether with the same prefixes and context information or different, from different 6LBR, then it will need to keep those prefixes and context information separately so that the RAs the 6LR sends will maintain the association between the ABRO and the prefixes and context information. The router can tell which 6LBR originated the prefixes and context information from the 6LBR Address field in the ABRO. A 6LR or 6LBR MUST include a Source Link-layer address option in the Router Advertisements it sends. That is required so that the hosts Shelby, et al. Expires October 29, 2010 [Page 23] Internet-Draft ND Optimization for LLNs April 2010 will know the link-layer address of the router. 6.4. Periodic Router Advertisements A router does not need to send any periodic Router Advertisement messages since the hosts will solicit updated information by sending Router Solicitations before the lifetimes expire. However, if the routers use Router Advertisements to optionally distribute prefix and/or context information across a route-over topology, that might require periodic Router Advertisement messages. 6.5. Processing a Neighbor Solicitation A router handles Neighbor Solicitation messages as specified in [RFC4861], with added logic described in this section for handling the Address Registration option. In addition to the normal validation of a Neighbor Solicitation and its options, the Address Registration option is verified as follows (if present). If the Length field is not two, or if the Status field is not zero, then the Neighbor Solicitation is silently ignored. Note that Section 8.2 specify optional behavior for a 6LBR for other Length field values. If the source address of the NS is the unspecified address, or if no SLLA option is included, then any included ARO is ignored, that is, the NS is processed as if it did not contain an ARO. 6.5.1. Checking for Duplicates If the NS contains a valid ARO, then the router inspects its Neighbor Cache on the arriving interface to see if it is a duplicate. If there is no Neighbor Cache entry for the IPv6 source address of the NS, then it isn't a duplicate. If there is such a Neighbor Cache entry and the EUI-64 is the same, then it isn't a duplicate either. Otherwise it is a duplicate address. In the case it is a duplicate address then the router responds with a unicast Neighbor Advertisement (NA) message sent to the source link- layer address (from the Source Link-Layer Address (SLLA) option) of the NS. The NA is formatted with a copy of the ARO from the NS, but with the Status field set to one to indicate it was a duplicate. In this case there is no modification to the Neighbor Cache. Shelby, et al. Expires October 29, 2010 [Page 24] Internet-Draft ND Optimization for LLNs April 2010 6.5.2. Updating the Neighbor Cache If ARO did not result in a duplicate address being detected as above, then if the Registration Lifetime is non-zero the router creates (if it didn't exist) or updates (otherwise) a Neighbor Cache entry for the IPv6 source address of the NS. The Registration Lifetime and the EUI-64 are recorded in the Neighbor Cache entry. A unicast Neighbor Advertisement (NA) is then sent in response to the NS. This NA SHOULD include a copy of the ARO, with the Status field set to zero. If the ARO contains a zero Registration Lifetime then any existing Neighbor Cache entry for the IPv6 source address of the NS MUST be deleted, and a NA sent as above. Should the Registration Lifetime in a Neighbor Cache entry expire, then the router MUST delete the cache entry. This might result in notifying the routing protocol. 6.5.3. Address Resolution between Routers There needs to be a mechanism somewhere for the routers to discover each other's link-layer addresses. If the routing protocol used between the routers provides this, then there is no need for the routers to use the Address Registration option between each other. Otherwise, the routers MAY use the ARO. When routers use ARO to register with each other and the optional DAD to the 6LBR Section 8.2 is in use, then care should be taken to ensure that there isn't a flood of ARO-carrying messages send to the 6LBR as each router hears an ARO from their neighboring routers. The details for this is out of scope of this document. 6.5.4. Neighbor Unreachability Detection Just like in [RFC4861] the use of NUD from routers to hosts is required. NUD may also be used between routers, but is not required if an equivalent mechanism is available, for example, as part of the routing protocols. 7. Border Router Behavior A 6LBR handles sending of Router Advertisements and processing of Neighbor Solicitations from hosts as specified above in section Section 6. A 6LBR SHOULD always include an Authoritative Border Router option in the Router Advertisements it sends, listing itself as the 6LBR Address. That requires that the 6LBR maintain the version number in stable storage, and increases the version number when some information in its Router Advertisements change. Shelby, et al. Expires October 29, 2010 [Page 25] Internet-Draft ND Optimization for LLNs April 2010 In addition, a 6LBR is somehow configured with the prefix or prefixes that are assigned to the LoWPAN, and advertises those in Router Advertisements as in [RFC4861]. Optionally, in the case of route- over, those prefixes can be disseminated to all the 6LRs using the technique in Section 8.1. However, there might be mechanisms outside of the scope of this document that can be used instead for prefix dissemination with route-over. If the 6LoWPAN uses Header Compression [I-D.ietf-6lowpan-hc] then the 6LBR needs to manage the context IDs, and advertise those in Router Advertisements by including 6CO options in its Router Advertisements so that directly attached hosts are informed about the context IDs. Below we specify things to consider when the 6LBR needs to add, remove, or change the context information. Optionally, in the case of route-over, the context information can be disseminated to all the 6LRs using the technique in Section 8. However, there might be mechanisms outside of the scope of this document that can be used instead for disseminating context information with route-over. 7.1. Prefix Determination The prefix or prefixes used in a LoWPAN can be manually configured, or can be acquired using DHCPv6 Prefix Delegation [RFC3633]. For a LoWPAN that is isolated from the network, either permanently or occasionally, the 6LBR can assign a ULA prefix using [RFC4193]. The ULA prefix should be stored in stable storage so that the same prefix is used after a failure of the 6LBR. If the LoWPAN has multiple 6LBRs, then they should be configured with the same set of prefixes. The set of prefixes are included in the Router Advertisement messages as specified in [RFC4861]. 7.2. Context Configuration and Management If the LoWPAN uses Header Compression [I-D.ietf-6lowpan-hc] then the 6LBR may be configured with context information and related context IDs. If the LoWPAN has multiple 6LBRs, then they MUST be configured with the same context information and context IDs. The context information carried in Router Advertisement (RA) messages originate at 6LBRs and must be disseminated to all the routers and hosts within the LoWPAN. RAs include one 6CO for each context. For the dissemination of context information using the 6CO, a strict lifecycle SHOULD be used in order to ensure the context information stays synchronized throughout the LoWPAN. New context information SHOULD be introduced into the LoWPAN with C=0, to ensure it is known by all nodes that may have to decompress based on this context information. Only when it is reasonable to assume that this Shelby, et al. Expires October 29, 2010 [Page 26] Internet-Draft ND Optimization for LLNs April 2010 information was successfully disseminated SHOULD an option with C=1 be sent, enabling the actual use of the context information for compression. Conversely, to avoid that nodes send packets making use of previous values of contexts, resulting in ambiguity when receiving a packet that uses a recently changed context, old values of a context SHOULD be taken out of use for a while before new values are assigned to this specific context. That is, in preparation for a change of context information, its dissemination SHOULD continue for at least MIN_CONTEXT_CHANGE_DELAY with C=0. Only when it is reasonable to assume that the fact that the context is now invalid was successfully disseminated, should the context ID be taken out of dissemination or reused with a different Context Prefix field. In the latter case, dissemination of the new value again SHOULD start with C=0, as above. 8. Optional Behavior Optionally the Router Advertisement messages can be used to disseminate prefixes to all the 6LRs in a route-over topology. This is optional because there are likely to be other mechanisms for such information distribution. There is also the option to reuse the Address Registration option as a way for a 6LR to perform DAD (for non-EUI-64 derived IPv6 addresses) against a 6LBR in a route-over topology. This is optional because there might be other ways to either allocate unique address, such as DHCPv6 [RFC3315], or other future mechanisms for DAD. 8.1. Multihop Prefix and Context Distribution The multihop distribution relies on Router Solicitation messages and Router Advertisement (RA) messages sent between routers, and using the ABRO version number to control the propagation of the information (prefixes and context information) that is being sent in the RAs. 8.1.1. Routers Sending Router Solicitations If multihop distribution is done using Router Advertisement (RA) messages, then on interface initialization a router SHOULD send some Router Solicitation messages similarly to how hosts do this in [RFC4861]. That will cause the routers to respond with RA messages which then can be used to initially seed the prefix and context information. Shelby, et al. Expires October 29, 2010 [Page 27] Internet-Draft ND Optimization for LLNs April 2010 8.1.2. Routers Processing Router Advertisements If multihop distribution is not done using RA messages, then the routers follow [RFC4861] which states that they merely do some consistency checks. Otherwise the routers will check and record the prefix and context information from the receive RAs, and use that information as follows. If a received RA does not contain a Authoritative Border Router option, then the RA MUST be silently ignored. The router uses the 6LBR Address field in the ABRO to check if it has previously received information from the 6LBR. If it finds no such information, then it just records the 6LBR Address and Version and the associated prefixes and context information. If the 6LBR is previously known, then the Version number field MUST be compared against the recorded version number for that 6LBR. The comparison MUST be done the same way as TCP sequence number comparisons to handle the case when the version number wraps around. If the received version number is older or the same as the recorded version, then the information in the RA is silently ignored. Otherwise the recorded information and version number are updated. 8.1.3. Storing the Information The router keeps state for each 6LBR that it sees with an ABRO. This includes the version number, and the complete set of Prefix Information options and 6LoWPAN Context options. The prefixes are timed out based on the Valid lifetime in the Prefix Information Option. The Context Prefix is timed out based on the Valid lifetime in the 6LoWPAN Context option. While the prefixes and context information are stored in the router their valid and preferred lifetimes are decremented as time passes. This ensures that when the router is in turn later advertising that information in the Router Advertisements it sends the 'expiry time' doesn't accidentally move further into the future. For example, if a 6CO with a Valid lifetime of 10 minutes is receive at time T, and the router includes this in a RA it sends at time T+5 minutes, the Valid lifetime in the 6CO it sends will be only 5 minutes. 8.1.4. Sending Router Advertisements If multihop distribution is performed using RA messages, then the routers MUST ensure that the ABRO always stay together with the prefixes and context information received with that ABRO. Thus if the router has received prefix P1 with ABRO saying it is from one 6LBR, and prefix P2 from another 6LBR, then the router MUST NOT Shelby, et al. Expires October 29, 2010 [Page 28] Internet-Draft ND Optimization for LLNs April 2010 include the two prefixes in the same RA message. Prefix P1 MUST be in a RA that include a ABRO from the first 6LBR etc. The routers periodically send Router Advertisements as in [RFC4861]. This is for the benefit of the other routers receiving the prefixes and context information. And the routers also respond to Router Solicitations by unicasting RA messages. In both cases the above constraint of keeping the ABRO together with 'its' prefixes and context information apply. When a router receives new information from a 6LBR, that is, either it hears from a new 6LBR (a new 6LBR Address in the ABRO) or the ABRO version number of an existing 6LBR has increased, then it is useful to send out a few triggered updates. The recommendation is to behave the same as when an interface has become an advertising interface in [RFC4861], that is, send up to three RA messages. This ensures rapid propagation of new information to all the 6LRs. 8.2. Duplicate Address Detection The ARO can be used, in addition to register an address in a 6LR, to have the 6LR verify that the address isn't used by some other host. However, that isn't sufficient in a route-over topology since some host attached to another 6LR could be using the same address. There might be different ways for the 6LRs to coordinate such Duplicate Address Detection in the future, or addresses could be assigned using a DHCPv6 server that verifies uniqueness as part of the assignment. This specification offers an optional and simple technique for 6LRs and 6LBRs to perform Duplicate Address Detection that reuses the Address Registration option. This technique is not needed when the Interface ID in the address is based on an EUI-64, since those are assumed to be globally unique. When a 6LR receives a Neighbor Solicitation containing an Address Registration option with a non-zero Registration Lifetime and there was no existing Neighbor Cache entry, then with this mechanism the 6LR will unicast a new Neighbor Solicitation message to one or more 6LBRs, where the NS contains an ARO with the host's address in the Registered Address field. This NS will be forwarded by 6LRs until it reaches the 6LBR, hence its IPv6 hop limit field might be less than 255 when received by the 6LBR. The 6LBR will respond with a Neighbor Advertisement message containing an ARO, which might have a hop limit less than 255 when it reaches the 6LR. When the 6LR receives the NS from the 6LBR it will respond to the host, copying the Status field from the ARO it received from the 6LBR. Shelby, et al. Expires October 29, 2010 [Page 29] Internet-Draft ND Optimization for LLNs April 2010 8.2.1. Special Message Validation Due to the forwarding of the above special NS/NA between the 6LR and 6LBR the hop limit check on receipt MUST be bypassed for such messages that contain a ARO with a Length field of 4. The receipt of such messages MUST NOT modify any state on the router with the exception of the DAD table below. 8.2.2. Conceptual Data Structures A 6LBR implementing the optional multi-hop DAD needs to maintain some state separate from the Neighbor Cache. We call this conceptual data structure the DAD table. It is indexed by the IPv6 address - the Registered Address in the ARO - and contains the EUI-64 of the host that is using that address. 8.2.3. 6LR Sending a special Neighbor Solicitation When a 6LR that implements the optional multihop DAD receives an NS from a host (the ARO has Length = 2) and the 6LR does not already have a Neighbor Cache entry for the host's IPv6 address, then the 6LR forms and sends an NS to at least one 6LBR. The NS contains the following information: o In the IPv6 source address, a global address of the 6LR. o In the IPv6 destination address, the address of the 6LBR. o In the IPv6 hop limit, 255 or a smaller number. o In the NS Target Address, the address of the 6LBR. o No SLLA option - just an Address Registration option with Length 4 o In the ARO the Status field MUST be set to zero o In the ARO the EUI-64 and Registration lifetime are copied from the ARO received from the host. o In the ARO and the Registered Address set to the IPv6 address of the host, that is, the sender of the triggering NS. When a 6LR receives an NS from a host with a zero Registration Lifetime then, in addition to removing the Neighbor Cache entry for the host as specified in section Section 6, an NS is sent to the 6LBRs as above. A router MUST NOT modify the Neighbor Cache as a result of receiving Shelby, et al. Expires October 29, 2010 [Page 30] Internet-Draft ND Optimization for LLNs April 2010 a Neighbor Solicitation with an ARO of Length=4. 8.2.4. 6LBR Receiving a special Neighbor Solicitation When a 6LBR that implements the optional multihop DAD receives an NS from a 6LR, that is an NS that contains an ARO with Length = 4, then it MUST NOT verify that the hop limit is 255 as specified above. The it proceeds to look for the Registration Address in the DAD Table. If an entry is found and the recorded EUI-64 is different than the EUI-64 in the ARO, then it returns an NA with the ARO Status set to 1 ('Duplicate Address'). Otherwise it returns an NA with ARO Status set to zero. If no entry is found in the DAD Table and the Registration Lifetime is non-zero, then an entry is created and the EUI-64 and Registered Address from the ARO are stored in that entry. If an entry is found in the DAD Table and the Registration Lifetime is zero then the entry is deleted from the table. A router MUST NOT modify the Neighbor Cache as a result of receiving a Neighbor Advertisement with an ARO of Length=4. In both of the above cases the 6LBR forms an NA with the ARO Status set to zero and sends it back to the 6LR. 8.2.5. Processing a special Neighbor Advertisement When a 6LR that implements the optional multihop DAD receives an NA from a 6LBR, that is an NS that contains an ARO with Length = 4, then it MUST NOT verify that the hop limit is 255 as specified above. If there is no pending ARO from a host for the Registered Address, then NA is silently ignored. Otherwise, the information from the 6LBR is used to form an NA to send to the host. The Status code is copied from the ARO received from the 6LBR to the ARO that is sent to the host. If the Status is non-zero indicating an error, then the Neighbor Cache entry for the Registration Address is removed. 8.2.6. Recovering from Failures If there is no response from a 6LBR after RETRANS_TIMER [RFC4861] then the 6LR would retransmit the NS to the 6LBR up to MAX_UNICAST_SOLICIT [RFC4861] times. After this the 6LR SHOULD respond to the host with an ARO Status of zero. Shelby, et al. Expires October 29, 2010 [Page 31] Internet-Draft ND Optimization for LLNs April 2010 9. Protocol Constants This section defines the relevant protocol constants used in this document based on a subset of [RFC4861] constants. (*) indicates constants modified from [RFC4861] and (+) indicates new constants. Additional protocol constants are defined in Section Section 4. 6LBR Constants: MIN_CONTEXT_CHANGE_DELAY+ 60 seconds 6LR Constants: MAX_RTR_ADVERTISEMENTS 3 transmissions MIN_DELAY_BETWEEN_RAS* 10 seconds MAX_RA_DELAY_TIME* 2 seconds Host Constants: MAX_RTR_SOLICITATION_DELAY* 2 second RTR_SOLICITATION_INTERVAL* 10 seconds MAX_RTR_SOLICITATIONS 3 transmissions 10. Message Examples The following diagrams show the two-step process of the optimized Neighbor Discovery mechanisms for bootstrapping and Address Registration. Node Router | | | ---------- Router Solicitation --------> | | | | <-------- Router Advertisement --------- | | [PIO + ABRO + SLLAO] | Figure 2: Basic Router Solicitation/Router Advertisement exchange between a node and 6LR or 6LBR Shelby, et al. Expires October 29, 2010 [Page 32] Internet-Draft ND Optimization for LLNs April 2010 Node Router | | | ------- NS with Address Registration -----> | | [NS + ARO + SLLAO] | | <-----NA with Address Registration --------- | | [NA + ARO with Status + SLLAO] | Figure 3: Neighbor Discovery Address Registration 11. Security Considerations The security considerations of IPv6 Neighbor Discovery [RFC4861] apply. Additional considerations can be found in [RFC3756]. This specification expects that the link layer is sufficiently protected, for instance using MAC sublayer cryptography. In other words, model 1 from [RFC3756] applies. In particular, it is expected that the LoWPAN MAC provides secure unicast to/from Routers and secure broadcast from the Routers in a way that prevents tampering with or replaying the Router Advertisement messages. However, any future 6LoWPAN security protocol that applies to Neighbor Discovery for 6LoWPAN protocol, is out of scope of this document. The multihop DAD mechanisms rely on Neighbor Solicitation and Neighbor Advertisement messages that are forwarded by 6LRs, and as a result the hop_limit=255 check on the receiver is disabled for such messages. This implies that any node on the Internet could successfully send such messages. We avoid any additional security issues due to this by requiring that the routers never modify the Neighbor Cache entry due to such messages, and that they reject them unless they are received on an interface that has been explicitly configured to use these LLN optimizations. In some future deployments one might want to use SEcure Neighbor Discovery [RFC3971] [RFC3972]. This is possible with the Address Registration option as sent between hosts and routers, since the address that is being registered is the IPv6 source address of the Neighbor Solicitation and SeND verifies the IPv6 source address of the packet. Applying SeND to the optional router-to-router communication in this document is out of scope. 12. IANA Considerations The document requires three new Neighbor Discovery option types under the subregistry "IPv6 Neighbor Discovery Option Formats": Shelby, et al. Expires October 29, 2010 [Page 33] Internet-Draft ND Optimization for LLNs April 2010 o Address Registration Option (TBD1) o 6LoWPAN Context Option (TBD2) o Authoritative Border Router Option (TBD3) [TO BE REMOVED: This registration should take place at the following location: http://www.iana.org/assignments/icmpv6-parameters] 13. Acknowledgments The authors thank Pascal Thubert, Jonathan Hui, Carsten Bormann, Richard Kelsey, Geoff Mulligan, Julien Abeille, Alexandru Petrescu, Peter Siklosi, Pieter De Mil, Fred Baker, Anthony Schoofs, Phil Roberts, Daniel Gavelle and Joakim Eriksson for useful discussions and comments that have helped shaped and improve this document. Additionally, the authors would like to recognize Carsten Bormann for the suggestions on the Context Prefix Option and contribution to earlier version of the draft, Pascal Thubert for contribution of the original registration idea and contribution to earlier version of the draft, Jonathan Hui for contribution to earlier versions of the draft, and Geoff Mulligan for suggesting the use of Address Registration as part of existing IPv6 Neighbor Discovery messages. 14. Changelog Changes from -08 to -09: o Clean re-write of the draft (re-use of some introductory material) o Merged in draft-chakrabarti-6lowpan-ipv6-nd-simple-00 o Changed address registration to an option piggybacked on NS/NA o New Authoritative Border Router option o New Address Registration Option o Separated Prefix Information and Content Information o Optional DAD to the edge Changes from -07 to -08: Shelby, et al. Expires October 29, 2010 [Page 34] Internet-Draft ND Optimization for LLNs April 2010 o Removed Extended LoWPAN and Whiteboard related sections. o Included reference to the autoconf addressing model. o Added Optimistic Flag to 6AO. o Added guidelines on routers performing DAD. o Removed the NR/NC Advertising Interval. o Added assumption of uniform IID formation and DAD throughout a LoWPAN. Changes from -06 to -07: o Updated addressing and address resolution (#60). o Changed the Address Option to 6LoWPAN Address Option, fixed S values (#61). o Added support for classic RFC4861 RA Prefix Information messages to be processed (#62). o Added a section on using 6LoWPAN-ND under a hard-wired RFC4861 stack (#63). o Updated the NR/NC message with a new Router flag, combined the Code and Status fields into one byte, and added the capability to carry 6IOs (#64). o Made co-existence with other ND mechanisms clear (#59). o Added a new Protocol Specification section with all mechanisms specified there (#59). o Removed dependencies and conflicts with RFC4861 wherever possible (#59). o Some editorial cleanup. Changes from -05 to -06: o Fixed the Prf codes (#52). o Corrected the OIIO TID field to 8-bits. Changed the Nonce/OII order in both the OIIO and the NR/NC. (#53) Shelby, et al. Expires October 29, 2010 [Page 35] Internet-Draft ND Optimization for LLNs April 2010 o Corrected an error in Table 1 (#54). o Fixed asymmetric and a misplaced transient in the 6LoWPAN terminology section. o Added Updates RFC4861 to header Changes from -04 to -05: o Meaning of the RA's M-bit changed to original [RFC4861] meaning (#46). o Terms "on-link" and "off-link" used in place of "on-link" and "off-link". o Next-hop determination text simplified (#49). o Neighbor cache and destination cache removed. o IID to link-layer address requirement relaxed. o NR/NC changes to enable on-link refresh with routers (#48). o Modified 6LoWPAN Information Option (#47). o Added a Protocol Constants section (#24) o Added the NR processing table (#51) o Considered the use of SeND on backbone NS/NA messages (#50) Changes from -03 to -04: o Moved Ad-hoc LoWPAN operation to Section 7 and made ULA prefix generation a features useful also in Simple and Extended LoWPANs. (#41) o Added a 32-bit Owner Nonce to the NR/NC messages and the Whiteboard, removed the TID history. (#39) o Improved the duplicate OII detection algorithm using the Owner Nonce. (#39) o Clarified the use of Source and Target link-layer options in NR/NC. (#43) o Included text on the use of alternative methods to acquire addresses. (#38) Shelby, et al. Expires October 29, 2010 [Page 36] Internet-Draft ND Optimization for LLNs April 2010 o Removed S=2 from Address Option (not needed). (#36) o Added a section on router dissemination consistency. (#44) o Small improvements and extensive editing. (#42, #37, #35) Changes from -02 to -03: o Updated terminology, with RFC4861 non-transitive link model. o 6LoWPAN and ND terminology separated. o Protocol overview explains RFC4861 diff in detail. o RR/RC is now Node Registration/Confirmation (NR/NC). o Added NR failure codes. o ER Metric now included in 6LoWPAN Summary Option for use in default router determination by hosts. o Examples of host data structures, and the Whiteboard given. o Whiteboard is supported by all Edge Routers for option simplicity. o Edge Router Specification chapter re-structured, clarifying optional Extended LoWPAN operation. o NS/NA now completely optional for nodes. No address resolution or NS/NA NUD required. o link-local operation now compatible with oDAD (was broken). o Exception to hop limit = 255 for NR/NC messages. o Security considerations improved. o ICMPv6 destination unreachable supported. Changes from -01 to -02: o Fixed 16 != 0xff bug (ticket closed). o Specified use of ULAs in ad-hoc LoWPAN section 9 (ticket closed). Shelby, et al. Expires October 29, 2010 [Page 37] Internet-Draft ND Optimization for LLNs April 2010 o Terminology cleanup based on Alex's comments. o General editing improvements. Changes from -00 to -01: o Specified the duplicate owner interface identifier procedures. A TID lollipop algorithm was sufficient (nonce unnecessary). o Defined fault tolerance using secondary bindings. o Defined ad-hoc network operation. o Removed the E flag from RA and the X flag from RR/RC. o Completed message examples. o Lots of improvements in text quality and consistency were made. 15. References 15.1. Normative References [I-D.ietf-autoconf-adhoc-addr-model] Baccelli, E. and M. Townsley, "IP Addressing Model in Ad Hoc Networks", draft-ietf-autoconf-adhoc-addr-model-03 (work in progress), March 2010. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998. [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998. [RFC2491] Armitage, G., Schulter, P., Jork, M., and G. Harter, "IPv6 over Non-Broadcast Multiple Access (NBMA) networks", RFC 2491, January 1999. [RFC4191] Draves, R. and D. Thaler, "Default Router Preferences and More-Specific Routes", RFC 4191, November 2005. [RFC4193] Hinden, R. and B. Haberman, "Unique Local IPv6 Unicast Addresses", RFC 4193, October 2005. Shelby, et al. Expires October 29, 2010 [Page 38] Internet-Draft ND Optimization for LLNs April 2010 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, September 2007. [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless Address Autoconfiguration", RFC 4862, September 2007. [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, "Transmission of IPv6 Packets over IEEE 802.15.4 Networks", RFC 4944, September 2007. 15.2. Informative References [I-D.ietf-6lowpan-hc] Hui, J. and P. Thubert, "Compression Format for IPv6 Datagrams in 6LoWPAN Networks", draft-ietf-6lowpan-hc-07 (work in progress), April 2010. [RFC3315] Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C., and M. Carney, "Dynamic Host Configuration Protocol for IPv6 (DHCPv6)", RFC 3315, July 2003. [RFC3633] Troan, O. and R. Droms, "IPv6 Prefix Options for Dynamic Host Configuration Protocol (DHCP) version 6", RFC 3633, December 2003. [RFC3756] Nikander, P., Kempf, J., and E. Nordmark, "IPv6 Neighbor Discovery (ND) Trust Models and Threats", RFC 3756, May 2004. [RFC3971] Arkko, J., Kempf, J., Zill, B., and P. Nikander, "SEcure Neighbor Discovery (SEND)", RFC 3971, March 2005. [RFC3972] Aura, T., "Cryptographically Generated Addresses (CGA)", RFC 3972, March 2005. [RFC4919] Kushalnagar, N., Montenegro, G., and C. Schumacher, "IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs): Overview, Assumptions, Problem Statement, and Goals", RFC 4919, August 2007. [RFC4941] Narten, T., Draves, R., and S. Krishnan, "Privacy Extensions for Stateless Address Autoconfiguration in IPv6", RFC 4941, September 2007. Shelby, et al. Expires October 29, 2010 [Page 39] Internet-Draft ND Optimization for LLNs April 2010 Authors' Addresses Zach Shelby (editor) Sensinode Hallituskatu 13-17D Oulu 90100 FINLAND Phone: +358407796297 Email: zach@sensinode.com Samita Chakrabarti IP Infusion 1188 Arquest Street Sunnyvale, CA USA Email: samitac@ipinfusion.com Erik Nordmark Oracle, Inc. 17 Network Circle Menlo Park, CA 94025 USA Email: Erik.Nordmark@Oracle.COM Shelby, et al. Expires October 29, 2010 [Page 40]