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
The following example describes the address bootstrapping scenarios using the improved ND mechanisms specified in this document. It is assumed that the 6LN first performs a sequence of operations in order to get secure access at the link layer of the LoWPAN and obtain a key for link-layer security. The methods of how to establish link-layer security are out of scope of this document. In this example, an IEEE 802.15.4 6LN forms a 16-bit short IPv6 address without using DHCPv6 (i.e., the M flag is not set in the RAs).
-
After obtaining link-layer security, a 6LN assigns a link-local IPv6 address to itself. A link-local IPv6 address is configured based on the 6LN's EUI-64 link-layer address formed as per [RFC4944].
-
Next, the 6LN determines one or more default routers in the network by sending an RS to the all-routers multicast address with the SLLAO set to its EUI-64 link-local address. If the 6LN was able to obtain the link-layer address of a router through its link-layer operations, then the 6LN may form a link-local destination IPv6 address for the router and send it a unicast RS.
The 6LR responds 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.
-
In order to communicate more than one IP hop away, the 6LN configures a global IPv6 address. In order to save overhead, this 6LN wishes to configure its IPv6 address based on a 16-bit short address as per [RFC4944]. As the network is unmanaged (M flag not set in the RA), the 6LN randomly chooses a 16-bit link-layer address and forms a Tentative IPv6 address from it.
-
Next, the 6LN registers that address with one or more of its default routers by sending a unicast NS message with an ARO containing its Tentative global IPv6 address to register, the Registration Lifetime, and its EUI-64. An SLLAO is also included with the link-layer address corresponding to the address being registered. If a successful (Status 0) NA message is received, the address can then be used, and the 6LN assumes that it has been successfully checked for duplicates. If a duplicate address (Status 1) NA message is received, the 6LN then removes the temporary IPv6 address and 16-bit link-layer address and goes back to step 3. If a Neighbor Cache Full (Status 2) message is received, the 6LN attempts to register with another default router or, if 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 instead of the 16-bit (duplicate) address.
-
The 6LN now performs maintenance by sending a new NS address registration before the lifetime expires.
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 to receive responses to their RSs, form and register their addresses, etc. That repeats until all of the 6LRs and hosts have been configured.
10.2.1. Host Bootstrapping Messages
This section provides specific message examples related to the bootstrapping process described above. When discussing messages, the following notation is used:
- 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. In the following, we will show an example message flow as to 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
In the route-over topology, when a routing protocol is run across 6LRs, the bootstrapping and Neighbor Cache management are handled a little differently. The description in this paragraph provides only a guideline for an implementation.
At the initialization of a 6LR, 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 the 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. Initially, R1 behaves as 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 performs address resolution via this 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; however, it may still want to send the initial RS message if it wants to autoconfigure its address with the global prefix disseminated by the 6LBR.
Based on the information received in the RAs, R1 updates its cache with entries for all the neighboring 6LRs. Upon completion of the address registration, the bootstrapping router deletes the temporary entry of the default router, and the routing protocol is started.
Also note that R1 may refresh its multihop DAD registration directly with the 6LBR (using the next-hop neighboring 6LR determined by the routing protocol for reaching the 6LBR).
10.3.2. Updating the Neighbor Cache
In this example, there are three 6LRs: R1, R2, and R3. Initially, when R2 boots, it sees only R1, and accordingly R2 creates an NCE for R1. Now assume that R2 receives a valid routing update from router R3. R2 does not have any NCE for R3. If the implementation of R2 supports detecting link-layer addresses from the routing information packets, then it directly updates its Neighbor Cache using that link-layer information. If this is not possible, then R2 should perform multicast NS with the source set with 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 does not have any 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.