RFC 6775
Neighbor Discovery Optimization for IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs)
Neighbor Discovery Optimization for IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs) π
Part 1 of 12 β¨
okay bestie, let's start with the title block π¦ This is RFC 6775, a Standards Track doc from November 2012, and it's giving official IETF energy π . It's also tagged ISSN 2070-1721. The editor is Z. Shelby (Ed.) from Sensinode, and the other authors are S. Chakrabarti (Ericsson), E. Nordmark (Cisco Systems), and C. Bormann (Universitaet Bremen TZI). The big news is that it updates RFC 4944, so it's a glow-up of that one πΈ. The header doesn't list anything it obsoletes.
Abstract
okay so the IETF work on IPv6 over Low-power Wireless Personal Area Networks (6LoWPAN) defines 6LoWPANs like IEEE 802.15.4 π. These link types usually avoid multicast because it burns energy π. The wireless network also might not follow the classic idea of IP subnets and IP links, which is so messy ngl π.
Here's the tea: IPv6 Neighbor Discovery was never built for non-transitive wireless links. It leans hard on the traditional IPv6 link concept and uses multicast a lot, so it gets inefficient and sometimes just doesn't work in a low-power, lossy network π. This document adds simple optimizations to IPv6 Neighbor Discovery, its addressing mechanisms, and duplicate address detection for Low-power Wireless Personal Area Networks and similar networks β¨. It also updates RFC 4944 to specify that these optimizations get used π«Ά.
Status of This Memo
this is an Internet Standards Track document π₯.
It's a product of the Internet Engineering Task Force (IETF) and represents the consensus of the IETF community. It got public review and was approved for publication by the Internet Engineering Steering Group (IESG). For more on Internet Standards, check Section 2 of RFC 5741 π.
For the current status of this document, any errata, and how to give feedback, go to http://www.rfc-editor.org/info/rfc6775 π§.
Copyright Notice
Copyright (c) 2012 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) as in effect on the date of publication. Please read these carefully, because they explain your rights and restrictions for this document. Code Components pulled out of this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License β οΈ.
Table of Contents
1. Introduction ....................................................4
1.1. The Shortcomings of IPv6 Neighbor Discovery ................5
1.2. Applicability ..............................................6
1.3. Goals and Assumptions ......................................7
1.4. Substitutable Features .....................................8
2. Terminology .....................................................9
3. Protocol Overview ..............................................11
3.1. Extensions to RFC 4861 ....................................11
3.2. Address Assignment ........................................12
3.3. Host-to-Router Interaction ................................13
3.4. Router-to-Router Interaction ..............................14
3.5. Neighbor Cache Management .................................14
4. New Neighbor Discovery Options and Messages ....................15
4.1. Address Registration Option ...............................15
4.2. 6LoWPAN Context Option ....................................17
4.3. Authoritative Border Router Option ........................19
4.4. Duplicate Address Messages ................................20
5. Host Behavior ..................................................22
5.1. Forbidden Actions .........................................22
5.2. Interface Initialization ..................................22
5.3. Sending a Router Solicitation .............................23
5.4. Processing a Router Advertisement .........................23
5.4.1. Address Configuration ..............................23
5.4.2. Storing Contexts ...................................24
5.4.3. Maintaining Prefix and Context Information .........24
5.5. Registration and Neighbor Unreachability Detection ........25
5.5.1. Sending a Neighbor Solicitation ....................25
5.5.2. Processing a Neighbor Advertisement ................25
5.5.3. Recovering from Failures ...........................26
5.6. Next-Hop Determination ....................................26
5.7. Address Resolution ........................................27
5.8. Sleeping ..................................................27
5.8.1. Picking an Appropriate Registration Lifetime .......27
5.8.2. Behavior on Wakeup .................................28
6. Router Behavior for 6LRs and 6LBRs .............................28
6.1. Forbidden Actions .........................................28
6.2. Interface Initialization ..................................29
6.3. Processing a Router Solicitation ..........................29
6.4. Periodic Router Advertisements ............................30
6.5. Processing a Neighbor Solicitation ........................30
6.5.1. Checking for Duplicates ............................30
6.5.2. Returning Address Registration Errors ..............31
6.5.3. Updating the Neighbor Cache ........................31
6.5.4. Next-Hop Determination .............................32
6.5.5. Address Resolution between Routers .................32
7. Border Router Behavior .........................................32
7.1. Prefix Determination ......................................33
7.2. Context Configuration and Management ......................33
8. Substitutable Feature Behavior .................................34
8.1. Multihop Prefix and Context Distribution ..................34
8.1.1. 6LBRs Sending Router Advertisements ................35
8.1.2. Routers Sending Router Solicitations ...............35
8.1.3. Routers Processing Router Advertisements ...........35
8.1.4. Storing the Information ............................36
8.1.5. Sending Router Advertisements ......................36
8.2. Multihop Duplicate Address Detection ......................37
8.2.1. Message Validation for DAR and DAC .................38
8.2.2. Conceptual Data Structures .........................39
8.2.3. 6LR Sending a Duplicate Address Request ............39
8.2.4. 6LBR Receiving a Duplicate Address Request .........39
8.2.5. Processing a Duplicate Address Confirmation ........40
8.2.6. Recovering from Failures ...........................40
9. Protocol Constants .............................................41
10. Examples ......................................................42
10.1. Message Examples .........................................42
10.2. Host Bootstrapping Example ...............................43
10.2.1. Host Bootstrapping Messages .......................45
10.3. Router Interaction Example ...............................46
10.3.1. Bootstrapping a Router ............................46
10.3.2. Updating the Neighbor Cache .......................47
11. Security Considerations .......................................47
12. IANA Considerations ...........................................48
13. Interaction with Other Neighbor Discovery Extensions ..........49
14. Guidelines for New Features ...................................49
15. Acknowledgments ...............................................52
16. References ....................................................52
16.1. Normative References .....................................52
16.2. Informative References ...................................53
1. Introduction π
okay so the IPv6-over-IEEE 802.15.4 spec, [RFC4944], explains how IPv6 gets carried over an IEEE 802.15.4 network π§. It uses an adaptation layer between the Media Access Control (MAC) layer and the IP network layer. A link in a Low-power Wireless Personal Area Network (LoWPAN) is lossy, low-power, low-bit-rate, and short-range, and lots of its nodes save energy with long sleep periods π΄.
Multicast, as used in IPv6 Neighbor Discovery (ND) [RFC4861], is not a good vibe for this kind of wireless low-power, lossy network π ββοΈ. LoWPAN links are also asymmetric and non-transitive. A LoWPAN can be made of tons of overlapping radio ranges. Each radio range can broadcast, but when you stack them all together you get a complicated Non-Broadcast Multiple Access (NBMA) [RFC2491] structure, and it usually has no LoWPAN-wide multicast capability at all π. Link-local scope is really defined by reachability and radio strength π‘. So we can treat a LoWPAN as links with undetermined connectivity properties, like in [RFC5889], along with the address model assumptions defined there π«Ά.
This spec adds the following optimizations to IPv6 Neighbor Discovery [RFC4861], aimed right at low-power and lossy networks like LoWPANs π:
- Host-initiated interactions to allow for sleeping hosts.
- Elimination of multicast-based address resolution for hosts.
- A host address registration feature using a new option in unicast Neighbor Solicitation (NS) and Neighbor Advertisement (NA) messages.
- A new Neighbor Discovery option to distribute 6LoWPAN header compression context to hosts.
- Multihop distribution of prefix and 6LoWPAN header compression context.
- Multihop Duplicate Address Detection (DAD), which uses two new ICMPv6 message types.
The two multihop items can be swapped out for a routing protocol mechanism if you want. See Section 1.4 π.
The document defines three new ICMPv6 message options: the Address Registration Option (ARO), the Authoritative Border Router Option (ABRO), and the 6LoWPAN Context Option (6CO) π. It also defines two new ICMPv6 message types: the Duplicate Address Request (DAR) and the Duplicate Address Confirmation (DAC) π₯.
1.1. The Shortcomings of IPv6 Neighbor Discovery π
okay so IPv6 Neighbor Discovery [RFC4861] is the thing that does a bunch of important jobs for us πΈ router discovery, address resolution, Duplicate Address Detection, Redirect messages, and prefix and parameter discovery. iconic set of skills, honestly β¨
Here's how a fresh node gets going after power-on in IPv6 Ethernet networks π it joins the solicited-node multicast address on the interface, then runs Duplicate Address Detection (DAD) on its acquired link-local address by sending a solicited-node multicast message to the link. After that, it sends multicast messages to the all-routers multicast address to solicit Router Advertisements (RAs). If the host gets a valid RA with the A (autonomous address configuration) flag set, it autoconfigures an IPv6 address using the prefix advertised in that RA message. Routers also usually keep sending RAs periodically on the network, and those RAs go out to the all-nodes multicast address π‘
When a node needs to resolve the IPv6 address of a destination on the link, it sends Neighbor Solicitation/Neighbor Advertisement messages. The Neighbor Solicitation messages used for address resolution are multicast π¦ Now the lowkey catch: the DAD procedure and those periodic Router Advertisements both assume that the nodes are powered on and reachable most of the time π
In Neighbor Discovery, routers find hosts by assuming that a subnet prefix maps to one broadcast domain. So they multicast Neighbor Solicitation messages to find the host and its link-layer address π§ And the DAD use of multicast assumes that every host that autoconfigures an IPv6 address from the same prefix can be reached using link-local multicast messages. ngl that's a lot of assumptions π
Quick note on the L (on-link) bit in the Prefix Information Option (PIO) π It can be set to zero in Neighbor Discovery. When that happens, the host stops using multicast Neighbor Solicitation (NS) messages for address resolution of other hosts, but routers still use multicast NS messages to find the hosts. Not me noticing the plot twist here π
Now, wireless is messy. Because of the lossy nature of wireless communication and a changing radio environment, the IPv6-link node-set may change due to external physical factors π§οΈ So the link is often unstable, and nodes can appear to be moving without actually moving physically. Main character chaos, but make it radio πΆ
A LoWPAN can use two types of link-layer addresses: 16-bit short addresses and 64-bit unique addresses, as defined in [RFC4944] π On top of that, the available link-layer payload size is on the order of less than 100 bytes. So header compression is very useful here, no cap π«Ά
Put all of that together with the IPv6 Neighbor Discovery [RFC4861] protocol design, and it's giving: some optimizations and extensions to Neighbor Discovery are useful for the wide deployment of IPv6 over low-power and lossy networks (for example, 6LoWPAN and other homogeneous low-power networks) β¨π₯
1.2. Applicability π
So in its Section 1, [RFC4861] foresees a document that covers operating IP over a particular link type, and it defines an exception to the otherwise general applicability of unmodified [RFC4861] π This present spec improves how IPv6 Neighbor Discovery gets used for LoWPANs, so the nodes save energy and processing power. Slay π This document therefore updates [RFC4944] to specify the use of the optimizations defined here.
The applicability of this spec is limited to LoWPANs where all nodes on the subnet implement these optimizations in a homogeneous way. Some of these optimizations may be useful outside of 6LoWPANs, for example in general IPv6 low-power and lossy networks, and possibly even in combination with [RFC4861]. But those combinations are out of scope of this document π ββοΈ
Here's the core deal: this document specifies a set of behaviors between hosts and routers in LoWPANs. An implementation that adheres to this document MUST implement those behaviors π₯ It also specifies a set of behaviors (multihop prefix or context dissemination and, separately, multihop Duplicate Address Detection) that are needed in route-over configurations. An implementation of this specification MUST support those pieces, unless the implementation supports some alternative ("substitute") from some other specification π¦
The optimizations described here apply to different topologies. They're most useful for route-over and mesh-under configurations in Mesh topologies. Star topology configurations will also benefit from the optimizations, thanks to reduced signaling, robust handling of the non-transitive link, and header compression context information πΈ
1.3. Goals and Assumptions π§
okay the document has a few main goals and assumptions, bestie π
Goals:
- Optimize Neighbor Discovery with a mechanism that is minimal yet sufficient for operation in both mesh-under and route-over configurations.
- Minimize signaling by avoiding the use of multicast flooding and reducing the use of link-scope multicast messages.
- Optimize the interfaces between hosts and their default routers.
- Provide support for sleeping hosts π΄
- Disseminate context information to hosts as needed by 6LoWPAN header compression [RFC6282].
- Disseminate context information and prefix information from the border to all routers in a LoWPAN.
- Provide a multihop Duplicate Address Detection mechanism suitable for route-over LoWPANs.
Assumptions:
- 64-bit Extended Unique Identifier (EUI-64) [EUI64] addresses are globally unique, and the LoWPAN is homogeneous.
- All nodes in the network have an EUI-64 Interface ID in order to do address autoconfiguration and detect duplicate addresses.
- 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 π
- A 6LoWPAN is configured to share one or more global IPv6 address prefixes, so hosts can move between routers in the LoWPAN without changing their IPv6 addresses π¦
- When using the multihop DAD mechanism (Section 8.2), each 6LoWPAN Router (6LR) registers with all the 6LoWPAN Border Routers (6LBRs) available in the LoWPAN.
- If IEEE 802.15.4 16-bit short addresses are used, then some technique is used to ensure the uniqueness of those link-layer addresses. That could be done using DHCPv6, Address Registration Option-based Duplicate Address Detection (specified in Section 8.2), or other techniques outside of the scope of this document.
- In order to preserve the uniqueness of addresses (see Section 5.4 of [RFC4862]) not derived from an EUI-64, they must be either assigned or checked for duplicates in the same way throughout the LoWPAN. This can be done using DHCPv6 for assignment and/or using the Duplicate Address Detection mechanism specified in Section 8.2 (or any other protocols developed for that purpose).
- In order for 6LoWPAN header compression [RFC6282] to operate correctly, the compression context must match for all the hosts, 6LRs, and 6LBRs that can send, receive, or forward a given packet. If Section 8.1 is used to distribute context information, this implies that all the 6LBRs must coordinate the context information they distribute within a single LoWPAN π§
- This specification describes the operation of ND within a single LoWPAN. The participation of a node in multiple LoWPANs simultaneously may be possible but is out of scope of this document.
- Since the LoWPAN shares its prefix(es) throughout the network, mobility of nodes within the LoWPAN is transparent. Inter-LoWPAN mobility is out of scope of this document πΆββοΈ
1.4. Substitutable Features β¨
This document defines the optimization of Neighbor Discovery messages for the host-router interface, and it introduces two new mechanisms in a route-over topology π
Unless specified otherwise (in a document that defines a routing protocol that is used in a 6LoWPAN), this document applies to networks with any routing protocol. But because the routing protocol may provide good alternate mechanisms, this document defines certain features as "substitutable", meaning they can be substituted by a routing protocol specification that provides mechanisms achieving the same overall effect π
The features that are substitutable (individually or in a group) are:
- Multihop distribution of prefix and 6LoWPAN header compression context
- Multihop Duplicate Address Detection
So multihop prefix distribution (the ABRO) and the 6LoWPAN Context Option (6CO) for distributing header compression contexts go hand in hand π If substitution is intended for one of them, then both of them MUST be substituted. Guidelines for feature implementation and deployment are provided in Section 14 πΈ
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]. π
Okay so this spec expects you to already know your stuff from "Neighbor Discovery for IP version 6 (IPv6)" [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" [RFC5889]. No pressure, bestie π«Ά
It also borrows the same terminology from [RFC4861] wherever it doesn't define its own, so you're not starting from zero πΈ
- 6LoWPAN link: A wireless link determined by single IP hop reachability of neighboring nodes. These are considered links with undetermined connectivity properties as in [RFC5889]. π¦
- 6LoWPAN Node (6LN): A 6LoWPAN node is any host or router participating in a LoWPAN. This term is used when referring to situations in which either a host or router can play the role described. π§
- 6LoWPAN Router (6LR): An intermediate router in the LoWPAN that is able to send and receive Router Advertisements (RAs) and Router Solicitations (RSs) as well as forward and route IPv6 packets. 6LoWPAN routers are present only in route-over topologies. π
- 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 being a router on some interfaces and a host on other interfaces as allowed by [RFC2460]. β¨
- Mesh-under: A topology where nodes 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 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. π£οΈ
- Non-transitive link: A link that exhibits asymmetric reachability as defined in Section 2.2 of [RFC4861]. π
- IP-over-foo document: A specification that covers operating IP over a particular link type, for example, [RFC4944] "Transmission of IPv6 Packets over IEEE 802.15.4 Networks". π
- Header compression context: Address information shared across a LoWPAN and used by 6LoWPAN header compression [RFC6282] to enable the elision of information that would otherwise be sent repeatedly. In a "context", a (potentially partial) address is associated with a Context Identifier (CID), which is then used in header compression as a shortcut for (parts of) a source or destination address. ποΈ
- Registration: The process during which a LoWPAN node sends a Neighbor Solicitation message with an Address Registration Option to a router creating a Neighbor Cache Entry (NCE) for the LoWPAN node with a specific timeout. Thus, for 6LoWPAN routers, the Neighbor Cache doesn't behave like a cache. Instead, it behaves as a registry of all the host addresses that are attached to the router. This one is the plot twist π
3. Protocol Overview π·
These Neighbor Discovery optimizations 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 optimizations 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 that set of routers have become unreachable. Main character energy, honestly π
The protocol also provides for header compression [RFC6282] by carrying header compression information in a new option in Router Advertisement messages. π
In addition, there are 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. It's giving consistency β¨
3.1. Extensions to RFC 4861
This document specifies the following optimizations and extensions to IPv6 Neighbor Discovery [RFC4861]:
- Host-initiated refresh of Router Advertisement information. This removes the need for periodic or unsolicited Router Advertisements from routers to hosts. π
- No Duplicate Address Detection (DAD) is performed if EUI-64-based IPv6 addresses are used (as these addresses are assumed to be globally unique). π
- DAD is optional if DHCPv6 is used to assign addresses. π€·ββοΈ
- A new address registration mechanism using a 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. π
- A new Router Advertisement option, the 6LoWPAN Context Option, for context information used by 6LoWPAN header compression. ποΈ
- A new mechanism to perform Duplicate Address Detection across a route-over 6LoWPAN using the new Duplicate Address Request and Duplicate Address Confirmation messages. π
- New mechanisms to distribute prefixes and context information across a route-over network that uses a new Authoritative Border Router Option to control the flooding of configuration changes. π
- A few new default protocol constants are introduced, and some existing Neighbor Discovery protocol constants are tuned. ποΈ
3.2. Address Assignment
Hosts in a 6LoWPAN configure their IPv6 addresses as specified in [RFC4861] and [RFC4862] based on the information received in Router Advertisement messages. The use of the M (managed address configuration) flag in this optimization is, however, more restrictive than in [RFC4861]. When the M flag is set, a host is assumed to use DHCPv6 to assign any non-EUI-64 addresses. When the M flag is not set, the nodes in the LoWPAN support Duplicate Address Detection; thus, a host can then safely use the address registration mechanism to check non-EUI-64 addresses for uniqueness. π§
6LRs MAY 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 Unique Local Address (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 the Neighbor Unreachability Detection (NUD) of one of its default routers fails. π
Hosts receive Router Advertisement messages typically containing the Authoritative Border Router Option (ABRO) and may optionally contain one or more 6LoWPAN Context Options (6COs) in addition to the existing Prefix Information Options (PIOs) 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) in an NS message. The host chooses a lifetime of the registration and repeats the ARO periodically (before the lifetime runs out) to maintain the registration. The lifetime should be chosen in such a way as to maintain the registration even while a host is sleeping. Likewise, mobile nodes that often change their point of attachment should use a suitably short lifetime. See Section 5.5 for registration details and Section 9 for protocol constants. ποΈ
The registration fails when an ARO is returned to the host with a non-zero Status. One reason may be that the router determines that the IPv6 address is already used by another host, i.e., 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 an IEEE 802.15.4 16-bit short address. Failure can also occur if the Neighbor Cache on that router is full. π
The re-registration of an 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 needs to both perform NUD to check that the router is still reachable and refresh its registration with 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 an 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, is assigned to 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 π¦
okay so this bit is only for the route-over setup, where 6LRs are around π see also Section 1.4.
6LRs MUST act like a host during system startup and prefix configuration. That means sending Router Solicitation messages and autoconfiguring their IPv6 addresses, which is different from how routers work in [RFC4861] π«Ά they're basically hosts first, router energy later.
When multihop prefix and context dissemination are used, the 6LRs store the ABRO, 6CO, and prefix information they get (directly or indirectly) from the 6LBRs. Then they pass it along in the Router Advertisement they send to other 6LRs, or to hosts responding to a Router Solicitation πΈ The ABRO has a Version Number field (see Section 4.3), and that's what limits the flooding of updated info between the 6LRs. Smart, right? π§
A 6LR can run Duplicate Address Detection against one or more 6LBRs using the new Duplicate Address Request (DAR) and Duplicate Address Confirmation (DAC) messages. These carry the info from the Address Registration Option. The DAR and DAC messages get forwarded between the 6LR and 6LBRs, so the [RFC4861] rule for checking hop limit=255 does not apply to them π Those multihop DAD messages MUST NOT modify any Neighbor Cache Entries on the routers, because they don't get the security benefits that the hop limit=255 check provides. This part is seriously important, bestie π
3.5. Neighbor Cache Management β¨
The explicit registrations with lifetimes, plus the goal of not multicasting Neighbor Solicitation messages for hosts, mean we manage the Neighbor Cache Entries (NCEs) a bit differently than in [RFC4861]. We end up with three types of NCEs, and each type tells you how it can be removed π
- Garbage-collectible: Entries that follow the normal [RFC4861] rules, which allow garbage collection when memory is low.
- Registered: Entries with an explicit registered lifetime. They stick around until that lifetime expires or they get explicitly unregistered.
- Tentative: Short-lived temporary entries that typically get converted into Registered entries.
Note that the type of the NCE is orthogonal to the states specified in [RFC4861] π
When a host talks to a router by sending Router Solicitations, that creates a Tentative NCE. Once a router successfully gets a node to register with it, the result is a Registered NCE. When routers send RAs to hosts, and when routers receive RA messages or multicast NS messages from other routers, the result is Garbage-collectible NCEs. There can only be one kind of NCE for an IP address at a time, no exceptions π ββοΈ
Neighbor Cache Entries on routers can also be added or deleted by a routing protocol used in the 6LoWPAN. This is useful if the routing protocol carries the link-layer addresses of the neighboring routers. Depending on the details of those routing protocols, such NCEs could be either Registered or Garbage-collectible π¦
4. New Neighbor Discovery Options and Messages π§
This section defines new Neighbor Discovery message options used by this specification. The Address Registration Option is used by hosts, while the Authoritative Border Router Option and 6LoWPAN Context Option are used in the substitutable router-to-router interaction. This section also defines the new router-to-router Duplicate Address Request and Duplicate Address Confirmation messages π
4.1. Address Registration Option π
The routers need to know the set of host IP addresses that are directly reachable, plus their corresponding link-layer addresses. This has to be kept up to date as radio reachability changes. So we introduce the Address Registration Option (ARO), which can be included in unicast NS messages sent by hosts. That means it can ride along in the unicast NS messages a host sends as part of NUD to check that it can still reach a default router. The receiving router uses the ARO to reliably maintain its Neighbor Cache. The same option shows up in the matching NA messages, with a Status field that says whether the registration worked or failed. This option is always host initiated π
The info in the ARO also gets included in the multihop DAR and DAC messages used between 6LRs and 6LBRs. The option itself isn't used in those messages, though πΈ
The ARO is required for reliability and power saving β‘ The lifetime field gives the host flexibility to register an address that should stay usable (still advertised by the 6LR in the routing protocol, etc.) during its intended sleep schedule. Sleep goals, honestly iconic π΄
The sender of the NS also includes the EUI-64 [EUI64] of the interface it's registering an address from. This works as a unique ID for detecting duplicate addresses. It helps tell apart the same node re-registering its address from a different node (with a different EUI-64) registering an address that someone else is already using. The EUI-64 is also used to deliver an NA carrying an error Status code to the EUI-64-based link-local IPv6 address of the host (see Section 6.5.2) π
When hosts use the ARO, an SLLAO (Source Link-Layer Address Option) [RFC4861] MUST be included, and the address that is to be registered MUST be the IPv6 source address of the NS message. Non-negotiable, bestie π ββοΈ
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 = 2 | Status | Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | Registration Lifetime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ EUI-64 +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Fields:
Type: 33Length: An 8-bit unsigned integer giving the length of the option in units of 8 bytes. Always 2.Status: An 8-bit unsigned integer that shows the status of a registration in the NA response. MUST be set to 0 in NS messages. See below.Reserved: This field is unused. It MUST be initialized to zero by the sender and MUST be ignored by the receiver.Registration Lifetime: A 16-bit unsigned integer. The amount of time, in units of 60 seconds, that the router should retain the NCE for the sender of the NS that includes this option.EUI-64: 64 bits. This field uniquely identifies the interface of the Registered Address by including the EUI-64 identifier [EUI64] assigned to it, unmodified.
The Status values used in NAs are:
+--------+--------------------------------------------+
| Status | Description |
+--------+--------------------------------------------+
| 0 | Success |
| 1 | Duplicate Address |
| 2 | Neighbor Cache Full |
| 3-255 | Allocated using Standards Action [RFC5226] |
+--------+--------------------------------------------+
Table 1
4.2. 6LoWPAN Context Option π
The 6LoWPAN Context Option (6CO) carries prefix info for LoWPAN header compression, and it's similar to the PIO of [RFC4861]. The difference is that the prefixes can be remote as well as local to the LoWPAN, because header compression can potentially apply to all IPv6 addresses π This option lets you disseminate multiple contexts, each identified by a CID, for use as specified in [RFC6282]. A context may be a prefix of any length or an address (/128), and up to 16 6COs may be carried in an RA 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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | Valid Lifetime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
. .
. Context Prefix .
. .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: 6LoWPAN Context Option Format
Fields:
Type: 34Length: An 8-bit unsigned integer giving the length of the option (including the Type and Length fields) in units of 8 bytes. May be 2 or 3, depending on the length of the Context Prefix field.Context Length: An 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: A 1-bit context Compression flag. It shows whether 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 hasn't received the updated context info yet. This flag is used to manage the context life cycle, based on the recommendations in Section 7.2 πCID: A 4-bit Context Identifier for this prefix info. Context-based header compression uses the CID as specified in [RFC6282]. The list of CIDs for a LoWPAN is configured on the 6LBR that originates the context info for the LoWPAN.Res,Reserved: This field is unused. It MUST be initialized to zero by the sender and MUST be ignored by the receiver.Valid Lifetime: A 16-bit unsigned integer. The length of time, in units of 60 seconds (relative to when the packet is received), that the context is valid for header compression or decompression. A value of all zero bits (0x0) indicates that this context entry MUST be removed immediately π¨Context Prefix: The IPv6 prefix or address that corresponds to the CID field. The valid length of this field is included in the Context Length field. This field is padded with zeros so the option is a multiple of 8 bytes.
4.3. Authoritative Border Router Option β¨
okay so the Authoritative Border Router Option (ABRO) is needed when RA messages are used to pass prefixes and context info across a route-over topology πΈ in this case 6LRs get PIOs from other 6LRs, which means a 6LR can't just let whatever RA arrived last win π to reliably add and remove prefixes in the 6LoWPAN, we need info from the authoritative 6LBR. so there's a version number that the 6LBR sets, and the 6LRs pass it along with the prefix and context info in this ABRO π¦ when there are multiple 6LBRs, each one has its own version number space, so this option also has to carry the IP address of the 6LBR that started that set of info π
The ABRO MUST be included in all RA messages in the case when RAs 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 | Version Low |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version High | Valid Lifetime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| |
+ 6LBR Address +
| |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Fields:
Type: 35Length: an 8-bit unsigned integer. It's the length of the option in units of 8 bytes, and it's always 3 πVersion LowandVersion High: together these make up the Version Number field, a 32-bit unsigned integer. Version Low holds the least significant 16 bits and Version High holds the most significant 16 bits. It's the version number for this set of info in the RA message. The authoritative 6LBR that originates the prefix bumps this number every time its prefix or context info changes π₯Valid Lifetime: a 16-bit unsigned integer. It's the length of time in units of 60 seconds (counted from when the packet is received) that this set of border router info stays valid. A value of all zero bits (0x0) means a default value of 10,000 (~one week) πReserved: this field is unused. It MUST be initialized to zero by the sender and MUST be ignored by the receiver π6LBR Address: the IPv6 address of the 6LBR that is the origin of the version number included π«Ά
4.4. Duplicate Address Messages
okay so for the multihop DAD exchanges between a 6LR and 6LBR (as specified in Section 8.2), there are two brand new ICMPv6 message types: the Duplicate Address Request (DAR) and the Duplicate Address Confirmation (DAC) π¦ we're not reusing NS and NA for this because those messages aren't subject to the hop limit=255 check when intermediate 6LRs forward them π the info in the messages is basically what would be in an NS carrying an ARO, except the fields that are in the ARO are inlined right into the message format β¨
The DAR and DAC use the same message format with different ICMPv6 type values, and the Status field is only meaningful in the DAC 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 | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Status | Reserved | Registration Lifetime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ EUI-64 +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| |
+ Registered Address +
| |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IP fields:
IPv6 Source: a non-link-local address of the sending router πIPv6 Destination: in a DAR, a non-link-local address of a 6LBR. In a DAC, this is just the source from the DAR π§Hop Limit: set toMULTIHOP_HOPLIMITon transmit. It MUST be ignored on receipt.
ICMP fields:
Type: 157 for the DAR and 158 for the DAC πCode: set to zero on transmit. It MUST be ignored on receipt.Checksum: the ICMP checksum. See [RFC4443].Status: an 8-bit unsigned integer. It shows the status of a registration in the DAC. It MUST be set to 0 in the DAR. See Table 1 πReserved: this field is unused. It MUST be initialized to zero by the sender and MUST be ignored by the receiver πRegistration Lifetime: a 16-bit unsigned integer. It's the amount of time in units of 60 seconds that the 6LBR should keep the DAD table entry (Section 8.2.2) for the Registered Address. A value of 0 in a DAR means the DAD table entry should be removed π₯EUI-64: 64 bits. This field uniquely identifies the interface of the Registered Address by including the EUI-64 identifier [EUI64] assigned to it, unmodified π₯Registered Address: a 128-bit field. It carries the host address that was in the IPv6 Source field of the NS that had the ARO the host sent π
5. Host Behavior π§
okay so hosts in a LoWPAN use the ARO in the NS messages they send to keep the Neighbor Cache in the routers up to date, which means no more multicast NSs for address resolution π unlike in [RFC4861], hosts are the ones who start updating the info they get in RAs, by sending RSs before that info expires β° and when NUD says one or all default routers have become unreachable, the host uses RSs to find a new set of default routers π«Ά
5.1. Forbidden Actions
A host MUST NOT multicast an NS message. π«
5.2. Interface Initialization
When the interface on a host is initialized, it follows the specification in [RFC4861]. A link-local address gets formed based on the EUI-64 identifier [EUI64] assigned to the interface, as per [RFC4944] or the appropriate IP-over-foo document for the link. Then the host sends RS messages as described in [RFC4861] Section 6.3.7 πΈ
There is no need to join the solicited-node multicast address, since nobody multicasts NSs in this type of network. A host MUST join the all-nodes multicast address. β¨
5.3. Sending a Router Solicitation
The RS is formatted as specified in [RFC4861] and sent to the IPv6 all-routers multicast address (see [RFC4861] Section 6.3.7 for details). An SLLAO MUST be included to enable unicast RAs in response. An unspecified source address MUST NOT be used in RS messages. π
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 these packets to a router π¦
Since hosts don't depend on multicast RAs to discover routers, hosts need to be smart about retransmitting RSs whenever the default router list is empty, one of its default routers becomes unreachable, or the lifetime of the prefixes and contexts in the previous RA is about to expire π the RECOMMENDED rate of retransmissions is to start by sending up to 3 (MAX_RTR_SOLICITATIONS) RS messages, separated by at least 10 seconds (RTR_SOLICITATION_INTERVAL) as specified in [RFC4861], and then switch to slower retransmissions. After the initial retransmissions, the host SHOULD do truncated binary exponential backoff [ETHERNET] of the retransmission timer for each later retransmission, and the increase gets capped at 60 seconds (MAX_RTR_SOLICITATION_INTERVAL) π₯ in every case, the RS retransmissions stop once an RA is received. See Section 9 for protocol constants. π
5.4. Processing a Router Advertisement
The processing of RAs is as in [RFC4861], with the addition of handling the 6CO and triggering address registration when a new address has been configured π the SLLAO MUST be included in the RA too. Unlike in [RFC4861], the maximum value of the RA Router Lifetime field MAY be up to 0xFFFF (approximately 18 hours) π
Should the host erroneously receive a PIO with the L (on-link) flag set, then that PIO MUST be ignored. π
5.4.1. Address Configuration
Address configuration follows [RFC4862]. For an address not derived from an EUI-64, the M flag of the RA determines how the address can be configured. If the M flag is set in the RA, then DHCPv6 MUST be used to assign the address. If the M flag is not set, then the address can be configured by any other means (and duplicate detection is performed as part of the registration process) β¨
Once an address has been configured, it will be registered by unicasting an NS with an ARO to one or more routers. π
5.4.2. Storing Contexts ποΈ
okay so the host keeps a conceptual data structure for the context info it gets from the routers, and this is called the context table π each entry has the CID, the prefix (from the Context Prefix field in the 6CO), the Compression bit, and the Valid Lifetime. an entry with the Compression bit clear is used for decompression when receiving packets, but it MUST NOT be used for compression when sending packets. not the vibe to mix those up π
when a 6CO shows up in an RA, the host uses it to add or update the context table. if the CID field matches an existing entry, that entry gets updated with the info from the 6CO. if the Valid Lifetime in the 6CO is zero, the entry is immediately deleted, byeee π
if there's no matching entry and the Valid Lifetime is non-zero, a new context gets added to the table, and then the 6CO is used to update that new entry β¨
now the tea π΅: when the 6LBR changes the context info, a host might not notice right away. in the worst case, a host could end up with stale context info. so 6LBRs use the recommendations in Section 7.2 for carefully managing the context life cycle π«Ά and nodes should be careful about using header compression in RA messages that include 6COs.
5.4.3. Maintaining Prefix and Context Information β³
prefix info times out as specified in [RFC4861]. when the Valid Lifetime for a context table entry expires, the entry is placed in a receive-only mode, which is basically the same as receiving a 6CO for that context with C=0 π the entry stays in receive-only mode for twice the default Router Lifetime, and after that it's removed π§Ή
a host should look at the various lifetimes to figure out when to next start sending an RS to ask for updates. the lifetimes that matter are the default Router Lifetime, the Valid Lifetime in the PIOs, and the Valid Lifetime in the 6CO. the host SHOULD unicast one or more RSs to the router well before the shortest of those lifetimes (across all the prefixes and all the contexts) expires, and then switch to multicast RS messages if there's no response to the unicasts. the retransmission behavior for the RSs is in Section 5.3 π
5.5. Registration and Neighbor Unreachability Detection π
hosts send unicast NS messages to register their IPv6 addresses, and also to do NUD to verify that their default routers are still reachable π΅οΈββοΈ registration happens when the host includes an ARO in the NS it sends. even if the host doesn't have data to send, but it's expecting others to try to send packets to it, the host still needs to maintain its NCEs in the routers. it does this by sending NS messages with an 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 NA message with an ARO.
hosts that receive RA 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 NUD probes can be suppressed by reachability confirmations from transport protocols or applications, as specified in [RFC4861].
when a host knows it will no longer use a router it's registered to, it SHOULD de-register with that router by sending an NS with an ARO containing a lifetime of 0. to handle the case when a host loses connectivity with the default router involuntarily, the host SHOULD use a suitably low Registration Lifetime π
5.5.1. Sending a Neighbor Solicitation π¨
the host triggers sending 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 an SLLAO, since the router needs to record the link-layer address of the host. an unspecified source address MUST NOT be used in NS messages.
5.5.2. Processing a Neighbor Advertisement π¬
a host handles NA messages as specified in [RFC4861], with added logic described in this section for handling the ARO.
in addition to the normal validation of an NA and its options, the ARO (if present) is verified as follows. 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 ARO so it can 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 info about a neighbor is the same as in [RFC4861] Section 7.3, with one exception: address resolution is not performed.
the address registration procedure may fail for two reasons: no response to NSs is received (NUD failure), or an ARO with a failure Status (Status > 0) is received. in the case of NUD failure, the entry for that router is removed, so address registration is no longer a concern. when an ARO with a non-zero Status field is received, that means registration for that address has failed. a failure Status of one means a duplicate address was detected, and the procedure in [RFC4862] Section 5.4.5 is followed.
the host MUST NOT use the address it tried to register π«
if the host has valid registrations with other routers, these MUST be removed by registering with each of them using a zero ARO lifetime.
a Status code of two means the Neighbor Cache of that router is full. in this case, the host SHOULD remove this router from its default router list and attempt to register with another router. if the host's default router list is empty, it needs to revert to sending RSs as specified in Section 5.3 π
other failure codes may be defined in future documents π
5.6. Next-Hop Determination π¦
the IP address of the next hop for a destination is determined as follows. destinations in the link-local prefix (fe80::) are always sent on the link to that destination. it's assumed that link-local addresses are formed as specified in Section 5.2 from the EUI-64, and address resolution is not performed. packets are sent to link-local destinations by reversing the procedure in Appendix A of [RFC4291].
multicast addresses are considered to be on-link and are resolved as specified in [RFC4944] or the appropriate IP-over-foo document. note that [RFC4944] only defines how to represent a multicast destination address in the LoWPAN header. support for multicast scopes larger than link-local needs an appropriate multicast routing algorithm π
all other prefixes are assumed to be off-link [RFC5889]. anycast addresses are always considered off-link, so they get sent to one of the routers in the default router list.
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 SLLAO in RA messages give routers and hosts enough a priori state to resolve an IPv6 address to its associated link-layer address π§ since all prefixes except the link-local prefix and multicast addresses are always assumed to be off-link, multicast-based address resolution between neighbors is not needed.
link-layer addresses for neighbors are stored in NCEs [RFC4861]. to get LoWPAN compression, most global addresses are formed using a link-layer address. so a host can save memory by only storing link-layer address info 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) π
5.8. Sleeping π΄
it's often a big win for battery-powered hosts in LoWPANs to keep a low duty cycle π the optimizations described in this document let hosts sleep, as further described in this section. routers may want to cache traffic destined to a sleeping host, but that functionality is out of the scope of this document.
5.8.1. Picking an Appropriate Registration Lifetime β°
as all ND messages are initiated by the hosts, this lets a host sleep or otherwise be unreachable between NS/NA message exchanges. the ARO attached to NS messages tells a router to keep the NCE for that address valid for the period in the Registration Lifetime field. a host should choose a sleep time that's appropriate for its energy characteristics, and set a Registration Lifetime larger than the sleep time to make sure the registration gets renewed successfully (considering, for example, clock drift and additional time for potential retransmissions of the re-registration). external configuration of 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 requires a shorter sleep time so that routers don't keep invalid NCEs for nodes longer than necessary π¦
5.8.2. Behavior on Wakeup π
when a host wakes up from a sleep period, it SHOULD refresh its current address registrations that will time out before the next wakeup. this is done by sending NS messages with an ARO as described in Section 5.5.1. the host may also need to refresh its prefix and context info by sending a new unicast RS (the maximum Router Lifetime is about 18 hours, whereas the maximum Registration Lifetime is about 45.5 days) π§ if after wakeup the host (using NUD) determines that some or all previous default routers have become unreachable, then the host will send multicast RSs to discover new default router(s) and restart the address registration process π
6. Router Behavior for 6LRs and 6LBRs π
both 6LRs and 6LBRs maintain the Neighbor Cache [RFC4861] based on the AROs they receive in NA messages from hosts, ND packets from other nodes, and, potentially, a routing protocol used in the 6LoWPAN as outlined in Section 3.5 π
routers SHOULD NOT garbage-collect Registered NCEs (see Section 3.4), since they need to retain them until the Registration Lifetime expires. similarly, if NUD on the router determines that the host is UNREACHABLE (based on the logic in [RFC4861]), the NCE SHOULD NOT be deleted but rather retained until the Registration Lifetime expires. a renewed ARO should mark the cache entry as STALE. so for 6LoWPAN routers, the Neighbor Cache doesn't behave like a cache π ββοΈ instead, it behaves as a registry of all the host addresses that are attached to the router π
routers MAY implement the Default Router Preference (Prf) extension [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 π«
Okay so even if a router in a route-over topology can reach both a host and another target π°οΈ, radio propagation means it generally can't know whether the host can directly reach that other target π‘. So it can't just assume a Redirect will actually work from one host to another π. Therefore it SHOULD NOT send Redirect messages π«. The only potential exception to this "SHOULD NOT" is when the deployment/implementation has a way to know how the host can reach the intended target π―. Hence, it is RECOMMENDED that the implementation by default does not send Redirect messages, but it can be configurable when the deployment calls for this π§. In contrast, for mesh-under topologies, the same considerations about Redirects apply as in [RFC4861] πΈοΈ.
A router MUST NOT set the L (on-link) flag in the PIOs, since that might trigger hosts to send multicast NSs π
ββοΈ.
6.2. Interface Initialization π±
The 6LBR router interface initialization behavior is the same as in [RFC4861] π·. However, in a dynamic configuration scenario (see Section 8.1), a 6LR comes up as a non-router and waits to receive the advertisement for configuring its own interface address first, before setting its interfaces to be advertising interfaces and turning into a router β¨.
6.3. Processing a Router Solicitation π¨
A router processes RS messages as specified in [RFC4861]. The differences relate to the inclusion of ABROs in the RA messages and the exclusive use of unicast RAs. If a 6LR has received an ABRO from a 6LBR, then it will include that option unmodified in the RA messages it sends. And, if the 6LR has received RAs (whether with the same prefixes and context information or different) from a different 6LBR, then it will need to keep those prefixes and that 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. When a router has information tied to multiple ABROs, a single RS will result in multiple RAs, each containing a different ABRO π§©.
When the ABRO Valid Lifetime associated with a 6LBR times out, all information related to that 6LBR MUST be removed ποΈ. As an implementation note, it is recommended that RAs are sent sufficiently more frequently than the ABRO Valid Lifetime so that missing an RA does not result in removing all information related to a 6LBR β°.
An RS might be received from a host that has not yet registered its address with the router. Thus, the router MUST NOT modify an existing NCE based on the SLLAO from the RS. However, a router MAY create a Tentative NCE based on the SLLAO. Such a Tentative NCE SHOULD be timed out in TENTATIVE_NCE_LIFETIME seconds, unless a registration converts it into a Registered NCE π¦.
A 6LR or 6LBR MUST include an SLLAO in the RAs it sends; this is required so that the hosts will know the link-layer address of the router π. Unlike in [RFC4861], the maximum value of the RA Router Lifetime field MAY be up to 0xFFFF (approximately 18 hours) π.
Unlike [RFC4861], which suggests multicast RAs, this specification improves the exchange by always unicasting RAs in response to RSs. This is possible since the RS always includes an SLLAO, which is used by the router to unicast the RA π.
6.4. Periodic Router Advertisements π
A router does not need to send any periodic RA messages, since the hosts will solicit updated information by sending RSs before the lifetimes expire π .
However, if the routers use RAs to distribute prefix and/or context information across a route-over topology, that might require periodic RA messages. Such RAs are sent using the configurable MinRtrAdvInterval and MaxRtrAdvInterval as per [RFC4861] π.
6.5. Processing a Neighbor Solicitation π
A router handles NS messages as specified in [RFC4861], with added logic described in this section for handling the ARO. In addition to the normal validation of an NS and its options, the ARO is verified as follows (if present). If the Length field is not two, or if the Status field is not zero, then the NS is silently ignored π€«.
If the source address of the NS is the unspecified address, or if no SLLAO 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. It isn't a duplicate if (1) there is no NCE for the IPv6 source address of the NS or (2) there is such an NCE and the EUI-64 is the same. Otherwise, it is a duplicate address. Note that if multihop DAD (Section 8.2) is used, then the checks are slightly different, to take into account Tentative NCEs. In the case where it is a duplicate address, the router responds with a unicast NA message with the ARO Status field set to one (to indicate that the address is a duplicate), as described in Section 6.5.2. In this case, there is no modification to the Neighbor Cache π¨.
6.5.2. Returning Address Registration Errors π¬
Address registration errors are not sent back to the source address of the NS, due to a possible risk of L2 address collision π¬. Instead, the NA is sent to the link-local IPv6 address with the Interface ID part derived from the EUI-64 field of the ARO, as per [RFC4944]. In particular, this means that the universal/local bit needs to be inverted π. The NA is formatted with a copy of the ARO from the NS, but with the Status field set to indicate the appropriate error.
The error is sent to the link-local address with the Interface ID derived from the EUI-64. Thus, if the ARO was from and for a short address, the L2 destination address for the NA with the ARO error will be the 64-bit unique address π§Έ.
6.5.3. Updating the Neighbor Cache ποΈ
If the 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) an NCE for the IPv6 source address of the NS. If the Neighbor Cache is full and a new entry needs to be created, then the router responds with a unicast NA with the ARO Status field set to two (to indicate that the router's Neighbor Cache is full), as described in Section 6.5.2 π« .
The Registration Lifetime and the EUI-64 are recorded in the NCE. A unicast 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. A TLLAO (Target Link-Layer Address Option) [RFC4861] is not required in the NA, since the host already knows the router's link-layer address from RAs π.
If the ARO contains a zero Registration Lifetime, then any existing NCE for the IPv6 source address of the NS MUST be deleted, and an NA sent as above π.
Should the Registration Lifetime in an NCE expire, then the router MUST delete the cache entry β.
The addition and removal of Registered NCEs would result in notifying the routing protocol π£.
Note: If the substitutable multihop DAD (Section 8.2) is used, then the updating of the Neighbor Cache is slightly different due to Tentative NCEs π.
6.5.4. Next-Hop Determination π§
In order to deliver a packet destined for a 6LN registered with a router, next-hop determination is slightly different for routers than for hosts (see Section 5.6). The routing table is checked to determine the next-hop IP address. A Registered NCE determines if the next-hop IP address is on-link. It is the responsibility of the routing protocol of the router to maintain on-link information about its registered neighbors. Tentative NCEs MUST NOT be used to determine on-link status of the registered nodes π«β¨.
6.5.5. 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 ARO between each other. Otherwise, the routers SHOULD use the ARO. When routers use the ARO to register with each other and multihop DAD (Section 8.2) is in use, then care must be taken to ensure that there isn't a flood of ARO-carrying messages sent to the 6LBR as each router hears an ARO from their neighboring routers. The details for this scenario are out of scope of this document π.
Routers MAY also use multicast NSs as in [RFC4861] to resolve each others link-layer addresses. Thus, routers MAY multicast NSs for other routers, for example, as a result of receiving some routing protocol update. Routers MUST respond to multicast NSs. This implies that routers MUST join the solicited-node multicast addresses as specified in [RFC4861] π.
7. Border Router Behavior π
A 6LBR handles the sending of RAs and processing of NSs from hosts as specified above in Section 6. A 6LBR SHOULD always include an ABRO in the RAs it sends, listing itself as the 6LBR address π°. This requires that the 6LBR maintain the version number in stable storage and increase the version number when some information in its RAs changes. The information whose change affects the version is in the PIOs (the prefixes or their lifetimes) and in the 6CO (the prefixes, CIDs, or lifetimes) π’.
In addition, a 6LBR is somehow configured with the prefix or prefixes that are assigned to the LoWPAN, and advertises those in RAs as in [RFC4861] πΈ. In the case of route-over, those prefixes can be disseminated to all the 6LRs using the technique discussed in Section 8.1. However, there might be mechanisms outside of the scope of this document that can be used as a substitute for prefix dissemination in the route-over topology (see Section 1.4) π§.
If the 6LoWPAN uses header compression [RFC6282] with context, then the 6LBR needs to manage the CIDs and advertise those in RAs by including 6COs in its RAs, so that directly attached hosts are informed about the CIDs. Below, we specify things to consider when the 6LBR needs to add, remove, or change the context information. In the case of route-over, the context information is disseminated to all the 6LRs using the technique discussed in Section 8, unless a different specification provides a substitute for this multihop distribution πΊοΈ.
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 is included in the RA messages as specified in [RFC4861] π·π
7.2. Context Configuration and Management β¨
okay bestie, so if the LoWPAN uses header compression [RFC6282] with context, the 6LBR must be configured with the context info and the related CIDs π And if there are multiple 6LBRs, they MUST be configured with the same context info and CIDs, no exceptions π ββοΈ As [RFC6282] points out, keeping the context info consistent is crucial, because it's literally what makes sure packets get decompressed correctly π
The context info that rides along in RA messages starts at the 6LBRs, and it must be passed along to every router and host in the LoWPAN π¦ Each context gets its own 6CO in the RAs π¦
Now for sending out context info with 6COs, you SHOULD use a strict life cycle so everything stays in sync across the whole LoWPAN π New context info SHOULD get introduced with C=0 so every node that might need to decompress with it actually knows about it π§ Only when it's reasonable to assume it got disseminated successfully SHOULD a C=1 option be sent, which is the moment the context can actually be used for compression π
Here's the other side of the coin πͺ Nodes shouldn't keep sending packets that use old context values, because that creates ambiguity when someone gets a packet using a context that just changed π΅βπ« So old values of a context SHOULD be taken out of use for a while before new values get assigned to that same context β³ In other words, to prep for a change, its dissemination SHOULD keep going with C=0 for at least MIN_CONTEXT_CHANGE_DELAY β° Only once it's reasonable to assume everyone knows that the context is now invalid can the CID be taken out of dissemination or reused with a different Context Prefix field π«§ And if the CID does get reused like that, the dissemination of the new value SHOULD start over with C=0, same as before π
8. Substitutable Feature Behavior π
okay so normally, in a 6LoWPAN multihop network, RA messages are the ones spreading prefixes and context info to all the 6LRs in a route-over topology π‘ If every router is set up to use a substitute mechanism for that info distribution, then whatever's left of the 6LoWPAN-ND mechanisms is governed by the substitute specification π«Ά
There's also an option for a 6LR to do multihop DAD (for IPv6 addresses that aren't derived from an EUI-64) against a 6LBR in a route-over topology, using the DAR and DAC messages π This part is substitutable too, because there might be other ways to allocate a unique address, like DHCPv6 [RFC3315], or other future mechanisms for multihop DAD πΈ And once again, if this gets swapped out, any leftover 6LoWPAN-ND stuff is governed by the substitute specification π
Just to be super clear π Implementations MUST support the features described in Sections 8.1 and 8.2, unless the implementation supports some alternative ("substitute") from some other specification π
8.1. Multihop Prefix and Context Distribution π¦
the multihop distribution relies on RS messages and RA messages sent between routers, and it uses the ABRO version number to control how the info (prefixes and context info) gets propagated in the RAs π
This mechanism can handle arbitrary info from an arbitrary number of 6LBRs β¨ But here's the catch: the semantics of context info require that all the 6LNs use the same info, whether they're sending, forwarding, or receiving compressed packets π€ So the manager of the 6LBRs needs to somehow make sure the context info stays in synchrony across them π«§ There are different ways to handle that π§© One possible way is to treat the context and prefix info as coming from some logical or virtual source, which basically means it looks like the info is distributed from a single source π
If a set of 6LBRs behaves as a single one (using mechanisms that are out of scope for this document) so that the prefixes, the contexts, and the ABRO version number are the same from all of them, then those 6LBRs can pick a single IP address to use in the ABRO π
8.1.1. 6LBRs Sending Router Advertisements π£
6LBRs that support multihop prefix and context distribution MUST include an ABRO in each of their RAs π The ABRO Version Number field is what keeps prefix and context info consistent across the whole LoWPAN, along with the guidelines in Section 7.2 π Every time any info in the set of PIOs or 6COs changes, the ABRO version goes up by one β¬οΈ
This means the 6LBR has to keep the PIO, 6CO, and ABRO Version Number in stable storage πΎ Why? Because an old version number will be silently ignored by the 6LRs π
8.1.2. Routers Sending Router Solicitations π¨
In a 6LoWPAN, unless it's substituted, multihop distribution is done using RA messages π So on interface initialization, a router (6LR) MUST send RS messages, following the rules that [RFC4861] specifies for hosts πͺ That in turn makes the routers respond with RA messages, which can then be used to initially seed the prefix and context info π±
8.1.3. Routers Processing Router Advertisements π
If multihop distribution isn't done using RA messages, then the routers follow [RFC4861], which says they just do some consistency checks π§ In that case, nothing in Section 8.1 applies π ββοΈ Otherwise, the routers check and record the prefix and context info from the received RAs, and then use that info as follows π
If a received RA doesn't contain an ABRO, then the RA MUST be silently ignored π«₯
The router uses the 6LBR Address field in the ABRO to check whether it has previously received info from that 6LBR π If it finds nothing, then it just records the 6LBR address, Version, Valid Lifetime, and the associated prefixes and context info π If the 6LBR is already known, then the Version Number field MUST be compared against the recorded version number for that 6LBR π’ If the version number in the packet is less than the stored version number, the info in the RA gets silently ignored π Otherwise, the recorded info and version number get updated π
8.1.4. Storing the Information πΎ
The router keeps state for each 6LBR that it sees with an ABRO π§ That includes the version number, the Valid Lifetime, and the complete set of PIOs and 6COs π The prefixes time out based on the Valid Lifetime in the PIO β³ The Context Prefix times out based on the Valid Lifetime in the 6CO β
While the prefixes and context info are stored in the router, their valid and preferred lifetimes keep getting decremented as time passes β¬ This makes sure that when the router later advertises that info in the RAs it sends, the 'expiry time' doesn't accidentally move further into the future π ββοΈ For example, say a 6CO with a Valid Lifetime of 10 minutes is received at time T, and the router includes it in an RA it sends at time T+5 minutes π°οΈ Then the Valid Lifetime in the 6CO it sends will be only 5 minutes π«Ά
8.1.5. Sending Router Advertisements π‘
When multihop distribution is performed using RA messages, the routers MUST make sure the ABRO always stays together with the prefixes and context info received with that ABRO π So if the router has received prefix P1 with an ABRO saying it's from one 6LBR, and prefix P2 from another 6LBR, then the router MUST NOT include the two prefixes in the same RA message π« Prefix P1 MUST be in an RA that includes an ABRO from the first 6LBR, and so on π§© Note that multiple 6LBRs might advertise the same prefix and context info, but those still need to be associated with the 6LBRs that advertised them π·οΈ
The routers periodically send RAs as in [RFC4861] β° This is for the benefit of the other routers that receive the prefixes and context info π The routers also respond to RSs by unicasting RA messages π In both cases, the constraint above about keeping the ABRO together with its prefixes and context info still applies π
When a router receives new info from a 6LBR, meaning 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's useful to send out a few triggered updates β‘ The recommendation is to behave the same way as when an interface has become an advertising interface, as described in [RFC4861], which means sending up to three RA messages π¬ This makes sure the new info spreads rapidly to all the 6LRs πβ¨
8.2. Multihop Duplicate Address Detection β¨
Okay so the ARO can totally be used, on top of registering an address with a 6LR, to have that 6LR check that no other host it knows about is using the address π§. BUT that's not enough in a route-over topology (or a LoWPAN with multiple 6LBRs), because some host hanging off a different 6LR could be using the very same address π. Future ways for the 6LRs to coordinate this might show up, or addresses could come from a DHCPv6 server that checks uniqueness as part of handing them out π .
This spec offers a substitutable, simple technique for 6LRs and 6LBRs to do DAD, and it reuses the ARO info inside the DAR and DAC messages π. You don't need it when the Interface ID is based on an EUI-64, since those are assumed to be globally unique π. The technique assumes either that the 6LRs register with all the 6LBRs, or that the network uses some out-of-scope mechanism to keep the DAD tables in the 6LBRs synced π.
Multihop DAD runs synchronously the first time an address gets registered with a particular 6LR. So the ARO isn't sent back to the host until multihop DAD is done against the 6LBRs β³. For existing registrations in the 6LR, multihop DAD has to be repeated against the 6LBRs so the entry doesn't time out there, but that can happen asynchronously with the response to the hosts π. One way to do it is to track how much lifetime is left from what the 6LR registered with the 6LBRs, and re-register with the 6LBR when that lifetime is about to run out.
For synchronous multihop DAD, the 6LR does some extra checks so it has an NCE it can use to answer the host when a 6LBR responds π«Ά. That means checking for an already existing (Tentative or Registered) NCE for the Registered Address with a different EUI-64. If a Registered NCE exists, the 6LR SHOULD respond that the address is a duplicate. If a Tentative NCE exists, the 6LR SHOULD silently ignore the ARO and rely on the host retransmitting it. This is how it handles multiple hosts trying to register the same IPv6 address at the same time π―. If no NCE exists, the 6LR MUST create a Tentative NCE with the EUI-64 and the SLLAO. That entry is used to send the response to the host when the 6LBR says yes π.
When a 6LR gets an NS containing an ARO with a non-zero Registration Lifetime, and it has no existing Registered NCE, it kicks off synchronous multihop DAD with this mechanism π.
The 6LR unicasts a DAR to one or more 6LBRs, and the DAR has the host's address in the Registered Address field. The DAR gets forwarded by 6LRs until it reaches the 6LBR, so its IPv6 Hop Limit field won't be 255 when the 6LBR receives it π¦. The 6LBR answers with a DAC, which will have a hop limit less than 255 by the time it reaches the 6LR πΈ.
When the 6LR gets the DAC, it looks for a matching (same IP address and EUI-64) (Tentative or Registered) NCE π. If no such entry is found, the DAC is silently ignored. If an entry is found and the DAC had Status=0, the 6LR marks the Tentative NCE as Registered. In all cases where an entry is found, the 6LR responds to the host with an NA, copying the Status and EUI-64 fields from the DAC into an ARO in the NA. If the status is an error, the destination IP address of the NA is derived from the EUI-64 field of the DAC π.
A Tentative NCE SHOULD be timed out TENTATIVE_NCE_LIFETIME seconds after it was created, so that another host can try to register that IPv6 address π°οΈ.
8.2.1. Message Validation for DAR and DAC
A node MUST silently discard any received DAR or DAC message if even one of these validity checks isn't satisfied:
- If the message includes an IP Authentication Header, the message authenticates correctly.
- ICMP Checksum is valid.
- ICMP Code is 0.
- ICMP Length (derived from the IP length) is 32 or more bytes.
- The Registered Address is not a multicast address.
- All included options have a length that is greater than zero.
- The IP source address is not the unspecified address, nor is it a multicast address.
The contents of the Reserved field and of any unrecognized options MUST be ignored. Future backward-compatible changes to the protocol may specify the contents of the Reserved field or add new options, and backward-incompatible changes may use different Code values.
Note that due to the forwarding of the DAR and DAC messages between the 6LR and 6LBR, there is no hop-limit check on receipt for these ICMPv6 message types. π
8.2.2. Conceptual Data Structures
A 6LBR implementing multihop DAD needs to maintain some state separate from the Neighbor Cache. We call this conceptual data structure the DAD table π. It's indexed by the IPv6 address (the Registered Address in the DAR), and it contains the EUI-64 and the Registration Lifetime of the host that's using that address.
8.2.3. 6LR Sending a Duplicate Address Request
When a 6LR that implements multihop DAD receives an NS from a host, and subject to the above checks, the 6LR forms and sends a DAR to at least one 6LBR. The DAR contains the following information:
- In the IPv6 source address, a global address of the 6LR.
- In the IPv6 destination address, the address of the 6LBR.
- In the IPv6 hop limit, MULTIHOP_HOPLIMIT.
- The Status field MUST be set to zero.
- The EUI-64 and Registration Lifetime are copied from the ARO received from the host.
- 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 NCE for the host as specified in Section 6, a DAR is sent to the 6LBRs as above.
A router MUST NOT modify the Neighbor Cache as a result of receiving a DAR. π
8.2.4. 6LBR Receiving a Duplicate Address Request
When a 6LBR that implements the substitutable multihop DAD receives a DAR from a 6LR, it performs the message validation specified in Section 8.2.1. If the DAR is valid, the 6LBR goes looking 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 DAR, then it returns a DAC NA with the Status set to 1 ('Duplicate Address'). Otherwise, it returns a DAC with Status set to zero and updates the lifetime.
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 DAR are stored in that entry βοΈ.
If an entry is found in the DAD table, the EUI-64 matches, and the Registration Lifetime is zero, then the entry is deleted from the table.
In both of the above cases, the 6LBR forms a DAC with the information copied from the DAR, and the Status field is set to zero. The DAC is sent back to the 6LR, i.e., back to the source of the DAR. The IPv6 hop limit is set to MULTIHOP_HOPLIMIT.
8.2.5. Processing a Duplicate Address Confirmation
When a 6LR implementing multihop DAD receives a DAC message, it first validates the message per Section 8.2.1. For a valid DAC, if there is no Tentative NCE matching the Registered Address and EUI-64, then the DAC is silently ignored. Otherwise, the information in the DAC and in the Tentative NCE is used to form an NA to send to the host. The Status code is copied from the DAC to the ARO that's sent to the host. In the case where the DAC indicates an error (the Status is non-zero), the NA is returned to the host as described in Section 6.5.2, and the Tentative NCE for the Registered Address is removed. Otherwise, it's made into a Registered NCE π.
A router MUST NOT modify the Neighbor Cache as a result of receiving a DAC, unless there is a Tentative NCE matching the IPv6 address and EUI-64.
8.2.6. Recovering from Failures
If there is no response from a 6LBR after RETRANS_TIMER [RFC4861], then the 6LR would retransmit the DAR 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. π
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 4. π
6LBR Constants:
MIN_CONTEXT_CHANGE_DELAY+ 300 seconds
6LR Constants:
MAX_RTR_ADVERTISEMENTS 3 transmissions
MIN_DELAY_BETWEEN_RAS* 10 seconds
MAX_RA_DELAY_TIME* 2 seconds
TENTATIVE_NCE_LIFETIME+ 20 seconds
Router Constants:
MULTIHOP_HOPLIMIT+ 64
Host Constants:
RTR_SOLICITATION_INTERVAL* 10 seconds
MAX_RTR_SOLICITATIONS 3 transmissions
MAX_RTR_SOLICITATION_INTERVAL+ 60 seconds
10. Examples
10.1. Message Examples
STEP
6LN 6LR
| |
1. | ---------- Router Solicitation --------> |
| [SLLAO] |
| |
2. | <-------- Router Advertisement --------- |
| [PIO + 6CO + ABRO + SLLAO] |
Figure 2: Basic Router Solicitation/Router Advertisement Exchange between a Node and a 6LR or 6LBR π¦
6LN 6LR
| |
1. | ------- NS with Address Registration ------> |
| [ARO + SLLAO] |
| |
2. | <----- NA with Address Registration -------- |
| [ARO with Status] |
Figure 3: Neighbor Discovery Address Registration π
6LN 6LR 6LBR
| | |
1. | --- NS with Address Reg --> | |
| [ARO + SLLAO] | |
| | |
2. | | ----------- DAR ----------> |
| | |
3. | | <---------- DAC ----------- |
| | |
4. | <-- NA with Address Reg --- | |
| [ARO with Status] |
Figure 4: Neighbor Discovery Address Registration with Multihop DAD π₯
10.2. Host Bootstrapping Example β¨
okay so this one walks through how a host gets its address bootstrapped using the improved ND stuff from this doc π bestie, it's giving step by step energy. We assume the 6LN first gets secure access at the link layer of the LoWPAN and grabs a key for link-layer security π. How you set up link-layer security is out of scope here, so don't come for me about it π. In this example, an IEEE 802.15.4 6LN forms a 16-bit short IPv6 address without using DHCPv6 (aka the M flag is not set in the RAs) π¦
- Once it has link-layer security, the 6LN gives itself a link-local IPv6 address πΈ That link-local address is built from its EUI-64 link-layer address, formed as per [RFC4944].
- Next, the 6LN figures out its default routers by sending an RS to the all-routers multicast address, with the SLLAO set to its EUI-64 link-local address π§ If the 6LN already knows a router's link-layer address from its link-layer operations, then it may form a link-local destination IPv6 address for that router and send it a unicast RS instead.
The 6LR answers with a unicast RA to the IP source address, using the SLLAO from the RS (it may have created a Tentative NCE). See Figure 2.
- To talk to stuff more than one IP hop away, the 6LN sets up a global IPv6 address π It wants to save overhead, so it wants to base that address on a 16-bit short address as per [RFC4944]. Since the network is unmanaged (M flag not set in the RA), the 6LN randomly picks a 16-bit link-layer address and forms a Tentative IPv6 address from it π
- Now the 6LN registers that address with one or more of its default routers by sending a unicast NS message. That NS carries an ARO with its Tentative global IPv6 address to register, the Registration Lifetime, and its EUI-64. An SLLAO is also included, with the link-layer address that matches the address being registered π If it gets a successful (Status 0) NA, the address is good to use, and the 6LN assumes it has been successfully checked for duplicates β¨ If it gets a duplicate address (Status 1) NA, the 6LN removes the temporary IPv6 address and 16-bit link-layer address, then goes back to step 3 π If it gets a Neighbor Cache Full (Status 2) message, the 6LN tries to register with another default router or, if there are none, goes back to step 2. See Figure 3.
Note that an NA message returning an error would be sent back to the link-local EUI-64-based IPv6 address of the 6LN, not to the 16-bit (duplicate) address π«Ά
- The 6LN now does its maintenance by sending a new NS address registration before the lifetime runs out π
If multihop DAD and multihop prefix and context distribution are used, the effect of the 6LRs and hosts following the above bootstrapping process is a "wavefront" of 6LRs and hosts being configured, spreading outward from the 6LBRs π First, the hosts and 6LRs that can directly reach a 6LBR would receive one or more RAs and then configure and register their IPv6 addresses. Once that is done, they would enable the routing protocol and start sending out RAs. That would result in a new set of 6LRs and hosts receiving responses to their RSs, forming and registering their addresses, etc. That repeats until all of the 6LRs and hosts have been configured. π
10.2.1. Host Bootstrapping Messages
This section gives specific message examples for the bootstrapping process we just covered π When talking about messages, we use this notation:
LL64: Link-local address based on the EUI-64, which is also the 802.15.4 long address.GP16: Global address based on the 802.15.4 short address. This address may not be unique.GP64: Global addresses derived from the EUI-64 address as specified in [RFC4944].MAC64: EUI-64 address used as the link-layer address.MAC16: IEEE 802.15.4 16-bit short address.
Note that some implementations may use LL64 and GP16 style addresses instead of LL64 and GP64 β¨ Below, we show an example message flow for how a node uses LL64 to register a GP16 address for multihop DAD verification π¦
6LN-----RS-------->6LR
Src= LL64 (6LN)
Dst= all-router-link-scope-multicast
SLLAO= MAC64 (6LN)
6LR------RA--------->6LN
Src= LL64 (6LR)
Dst= LL64 (6LN)
Note: Source address of RA must be a link-local address (Section 4.2 of RFC 4861).
6LN-------NS Reg------>6LR
Src= GP16 (6LN)
Dst= LL64 (6LR)
ARO
SLLAO= MAC16 (6LN)
6LR---------DAR----->6LBR
Src= GP64 or GP16 (6LR)
Dst= GP64 or GP16 (6LBR)
Registered Address= GP16 (6LN) and EUI-64 (6LN)
6LBR-------DAC--------->6LR
Src= GP64 or GP16 (6LBR)
Dst= GP64 or GP16 (6LR)
Copy of information from DAR
If Status is a success:
6LR ---------NA-Reg------->6LN
Src= LL64 (6LR)
Dst= GP16 (6LN)
ARO with Status = 0
If Status is not a success:
6LR ---------NA-Reg-------->6LN
Src= LL64 (6LR)
Dst= LL64 (6LN) --> Derived from the EUI-64 of ARO
ARO with Status > 0
Figure 5: Detailed Message Address Examples
10.3. Router Interaction Example π§
okay so in the route-over topology, when a routing protocol runs across 6LRs, bootstrapping and Neighbor Cache management get handled a little differently πΈ What follows is only a guideline for an implementation, so keep that in mind π
When a 6LR initializes, it may choose to bootstrap as a host with the help of a parent 6LR, if the substitutable multihop DAD is performed with the 6LBR. The Neighbor Cache management of a router and address resolution among neighboring routers are described in Sections 6.5.3 and 6.5.5, respectively. In this example, we assume that the neighboring 6LoWPAN link is secure π
10.3.1. Bootstrapping a Router
In this scenario, the bootstrapping 6LR, 'R1', is multiple hops away from the 6LBR and surrounded by other 6LR neighbors π At first, R1 acts like a host. It sends a multicast RS and receives an RA from one or more neighboring 6LRs. R1 picks one 6LR as its temporary default router and does address resolution through that default router β¨
Note that if multihop DAD is not required (e.g., in a managed network or using EUI-64-based addresses), then it does not need to pick a temporary default router π It may still want to send the initial RS message, though, if it wants to autoconfigure its address with the global prefix disseminated by the 6LBR.
Based on the information in the RAs, R1 updates its cache with entries for all the neighboring 6LRs π Once the address registration is complete, the bootstrapping router deletes the temporary entry for the default router, and the routing protocol gets started π
Also note that R1 may refresh its multihop DAD registration directly with the 6LBR, using the next-hop neighboring 6LR that the routing protocol determines for reaching the 6LBR π«Ά
10.3.2. Updating the Neighbor Cache
In this example, there are three 6LRs: R1, R2, and R3 π When R2 boots up, it sees only R1, so R2 creates an NCE for R1. Now, say R2 receives a valid routing update from router R3. R2 doesn't have any NCE for R3 π If R2's implementation supports detecting link-layer addresses from the routing information packets, then it updates its Neighbor Cache directly using that link-layer information. If that's not possible, then R2 should perform a multicast NS with the source set to its link-local or global address, depending on the scope of the source IP address received in the routing update packet. The target address of the NS message is the source IPv6 address of the received routing update packet. The format of the NS message is as described in Section 4.3 of [RFC4861] π
More generally, any 6LR that receives a valid route update from a neighboring router for which it has no NCE is required to update its Neighbor Cache as described above π
The router (6LR and 6LBR) IP addresses learned via ND are not redistributed to the routing protocol. π ββοΈ
11. Security Considerations π¨
okay bestie, this part is serious, so read it carefully π₯Ί The security considerations of IPv6 ND [RFC4861] and address autoconfiguration [RFC4862] apply. Additional considerations can be found in [RFC3756].
There's a small change to those considerations, because in this specification the M flag in the RAs disables the use of stateless address autoconfiguration for addresses not derived from EUI-64 π That means a rogue router on the link can force the use of only DHCP for short addresses. In [RFC4861] and [RFC4862], a rogue router could only cause DHCP to be added, and it could not disable stateless address autoconfiguration for short addresses π±
This specification assumes the link layer is sufficiently protected, for instance by using MAC-sublayer cryptography π So its threat model is no different from that of IPv6 ND [RFC4861]. The first trust model listed in Section 3 of [RFC3756] applies here. However, any future 6LoWPAN security protocol that applies to ND for the 6LoWPAN protocol is out of scope of this document.
The multihop DAD mechanisms rely on DAR and DAC messages that are forwarded by 6LRs. As a result, the hop_limit=255 check on the receiver does not apply to those messages π¨ This implies that any node on the Internet could successfully send such messages. We avoid any additional security issues from this by requiring that the routers never modify the NCE due to such messages, and that they discard them unless they are received on an interface that has been explicitly configured to use these optimizations π‘οΈ
In some future deployments, one might want to use SEcure Neighbor Discovery (SEND) [RFC3971] [RFC3972]. This is possible with the ARO as sent between hosts and routers, since the address being registered is the IPv6 source address of the NS, and SEND verifies the IPv6 source address of the packet π«Ά Applying SEND to the router-to-router communication in this document is out of scope.
12. IANA Considerations πβ¨
Okay so this document registers three new ND option types under the subregistry "IPv6 Neighbor Discovery Option Formats" π
- Address Registration Option (33)
- 6LoWPAN Context Option (34)
- Authoritative Border Router Option (35)
It also registers two new ICMPv6 "type" numbers under the subregistry "ICMPv6 "type" Numbers" π
- Duplicate Address Request (157)
- Duplicate Address Confirmation (158)
IANA also made a brand new subregistry just for the Status values of the Address Registration Option, living under the ICMPv6 parameters registry. Very organized, very iconic π
Address Registration Option Status Values registry:
- Possible values are 8-bit unsigned integers (0..255).
- Registration procedure is "Standards Action" [RFC5226].
- Initial allocation is as indicated in Table 2:
+--------+--------------------------------------------+
| Status | Description |
+--------+--------------------------------------------+
| 0 | Success |
| 1 | Duplicate Address |
| 2 | Neighbor Cache Full |
| 3-255 | Allocated using Standards Action [RFC5226] |
+--------+--------------------------------------------+
Table 2
13. Interaction with Other Neighbor Discovery Extensions π«Ά
Okay, so there are two classes of ND extensions that interact with this spec, but they do it in totally different ways π
The first class is all about extensions to the DAD mechanisms in [RFC4861] and [RFC4862]. Optimistic DAD [RFC4429] is an example of this one. These extensions do not apply when this spec is in use, because it uses ARO for DAD. ARO is neither optimistic nor pessimistic. It's always one round trip to the router to check DAD, which is giving very disciplined energy π§
The second class is everything else (non-DAD) πΈ That covers path selection types like default router preferences [RFC4191], configuration types like DNS configuration [RFC6106], and other types like Detecting Network Attachment [RFC6059]. These are completely orthogonal to this spec and will work as is. No drama, no conflicts, just vibes π
14. Guidelines for New Features π
This section is all about guidelines for the new protocol features defined in this document. It also sets some expectations for how these features get implemented and deployed π¦
Quick heads up: this section is informative. It does not override the detailed specs in the previous sections. It just summarizes them in a compact form so you can use them as checklists π The checklists are there to show how important a feature might be for a deployment, based on the info available when the document was written.
Also, in some cases the deployment is 'SHOULD' where the implementation is a 'MUST'. That happens because of substitutable features: the deployment can use alternative methods for those. So implementing a configuration knob is recommended for the substitutable features π§ And yes, the lists go for conciseness over completeness, so they're not the whole story β¨
Table 3 is the checklist for hosts:
+----------+-----------------------------------+--------+-----------+
| Section | Description | Deploy | Implement |
+----------+-----------------------------------+--------+-----------+
| 3.1 | Host-initiated RA | MUST | MUST |
| 3.2 | EUI-64-based IPv6 address | MUST | MUST |
| | 16-bit MAC-based address | MAY | SHOULD |
| | Other non-unique addresses | MAY | MAY |
| 3.3 | Host-initiated RS | MUST | MUST |
| | ABRO processing | SHOULD | MUST |
| 4.1 | Registration with ARO | MUST | MUST |
| 4.2, 5.4 | 6CO | SHOULD | SHOULD |
| 5.2 | Joining solicited-node multicast | N/A | N/A |
| | Joining all-nodes multicast | MUST | MUST |
| | Using link-layer indication for | MAY | MAY |
| | NUD | | |
| 5.5 | 6LoWPAN-ND NUD | MUST | MUST |
| 5.8.2 | Behavior on wakeup | SHOULD | SHOULD |
+----------+-----------------------------------+--------+-----------+
Table 3: Guideline for 6LoWPAN-ND Features for Hosts
Table 4 is the checklist for 6LR features:
+---------------+-------------------------+------------+------------+
| Section | Description | Deploy | Implement |
+---------------+-------------------------+------------+------------+
| 3.1 | Periodic RA | SHOULD NOT | SHOULD NOT |
| 3.2 | Address assignment | SHOULD | MUST |
| | during startup | | |
| 3.3 | Supporting EUI-64-based | MUST | MUST |
| | MAC hosts | | |
| | Supporting 16-bit MAC | MAY | SHOULD |
| | hosts | | |
| 3.4, 4.3, | ABRO processing/sending | SHOULD | MUST |
| 8.1.3, 8.1.4 | | | |
| 8.1 | Multihop prefix storing | SHOULD | MUST |
| | and redistribution | | |
| 3.5 | Tentative NCE | MUST | MUST |
| 8.2 | Multihop DAD | SHOULD | MUST |
| 4.1, 6.5, | ARO support | MUST | MUST |
| 6.5.1 - 6.5.5 | | | |
| 4.2 | 6CO | SHOULD | SHOULD |
| 6.3 | Process RS/ABRO | MUST | MUST |
+---------------+-------------------------+------------+------------+
Table 4: Guideline for 6LR Features in 6LoWPAN-ND
And Table 5 is the checklist for 6LBR features:
+--------------+--------------------------+------------+------------+
| Section | Description | Deploy | Implement |
+--------------+--------------------------+------------+------------+
| 3.1 | Periodic RA | SHOULD NOT | SHOULD NOT |
| 3.2 | Address autoconf on | MUST NOT | MUST NOT |
| | router interface | | |
| 3.3 | EUI-64 MAC support on | MUST | MUST |
| | 6LoWPAN interface | | |
| 8.1 - 8.1.1, | Multihop prefix | SHOULD | MUST |
| 8.1.5 | distribution | | |
| 8.2 | Multihop DAD | SHOULD | MUST |
+--------------+--------------------------+------------+------------+
Table 5: Guideline for 6LBR Features in 6LoWPAN-ND
15. Acknowledgments π
Big shoutout to the authors' crew π«Ά They thank Pascal Thubert, Jonathan Hui, Richard Kelsey, Geoff Mulligan, Julien Abeille, Alexandru Petrescu, Peter Siklosi, Pieter De Mil, Fred Baker, Anthony Schoofs, Phil Roberts, Daniel Gavelle, Joseph Reddy, Robert Cragie, Mathilde Durvy, Colin O'Flynn, Dario Tedeschi, Esko Dijk, and Joakim Eriksson for useful discussions and comments that helped shape and improve this document π
The authors also want to give special recognition to a few people. Pascal Thubert contributed the original registration idea and did extensive work on earlier versions of the document. Jonathan Hui had original ideas on prefix/context distribution and also did extensive work on earlier versions. Colin O'Flynn gave useful "Error-to" suggestions (Section 6.5.2) and contributed to the Examples section. Geoff Mulligan suggested using address registration as part of existing IPv6 ND messages. Mathilde Durvy helped clarify router interaction π
16. References π
16.1. Normative References
- [ETHERNET] "IEEE Standard for Information technology - Telecommunications and information exchange between systems - Local and metropolitan area networks - Specific requirements - Part 3: Carrier Sense Multiple Access with Collision Detection (CSMA/CD) Access Method and Physical Layer Specifications", IEEE Std 802.3-2008, December 2008, <http://standards.ieee.org/getieee802/download/802.3-2008_section1.pdf>.
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
- [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.
- [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 4291, February 2006.
- [RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification", RFC 4443, March 2006.
- [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.
- [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 5226, May 2008.
- [RFC6282] Hui, J. and P. Thubert, "Compression Format for IPv6 Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, September 2011.
16.2. Informative References β¨
okay so these are the "good to know" reads, not the must-reads. they're background for the whole spec π and i'm literally obsessed with how many of them are about 6LoWPAN and IPv6 privacy π¦
[EUI64]IEEE, "Guidelines for 64-bit Global Identifier (EUI-64(TM)) Registration Authority",<http://standards.ieee.org/regauth/oui/tutorials/EUI64.html>. π[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. π§Ύ[RFC4429]Moore, N., "Optimistic Duplicate Address Detection (DAD) for IPv6", RFC 4429, April 2006. β[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. π[RFC5889]Baccelli, E. and M. Townsley, "IP Addressing Model in Ad Hoc Networks", RFC 5889, September 2010. π§[RFC6059]Krishnan, S. and G. Daley, "Simple Procedures for Detecting Network Attachment in IPv6", RFC 6059, November 2010. π[RFC6106]Jeong, J., Park, S., Beloeil, L., and S. Madanapalli, "IPv6 Router Advertisement Options for DNS Configuration", RFC 6106, November 2010. π
Authors' Addresses π
these are the people who wrote it, so bestie, say thank you π«Ά
Zach Shelby (editor)
Sensinode
Konekuja 2
Oulu 90620
Finland
Phone: +358407796297
EMail: zach@sensinode.com
Samita Chakrabarti
Ericsson
EMail: samita.chakrabarti@ericsson.com
Erik Nordmark
Cisco Systems
EMail: nordmark@cisco.com
Carsten Bormann
Universitaet Bremen TZI
Postfach 330440
Bremen D-28359
Germany
Phone: +49-421-218-63921
EMail: cabo@tzi.org
and that's the whole spec, periodt πππ
π¦ where this page comes from
- ietf: rfc6775 2012-11
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms