967  6LoWPAN Routing with RPL

967.1 Learning Objectives

By the end of this chapter, you will be able to:

  • Explain RPL Architecture: Describe DODAG topology and how RPL builds routes
  • Compare Mesh-Under vs Route-Over: Choose between Layer 2 and Layer 3 forwarding
  • Configure RPL Metrics: Use ETX and other metrics for parent selection
  • Understand Neighbor Discovery: Apply 6LoWPAN-ND optimizations for low-power networks
  • Design Multi-Hop Networks: Plan routing for large-scale 6LoWPAN deployments

967.2 Prerequisites

Before diving into this chapter, you should be familiar with:

967.3 Mesh-Under vs Route-Over Forwarding

6LoWPAN supports two forwarding paradigms with different trade-offs:

967.3.1 Mesh-Under Forwarding (Layer 2)

Forwarding happens at Link Layer using 802.15.4 addresses
Compressed packet stays compressed through intermediate hops
Entire mesh appears as single IP subnet

Example packet flow:
  Node A -> [L2 forward to B using MAC] -> Node B -> [L2 forward to C] -> Node C
  IPv6 header remains compressed at all hops
  Routing decision based on 802.15.4 addresses

Advantages: - Lower per-hop overhead (no IPHC decompress/recompress) - Faster forwarding (no IP layer processing at intermediate nodes) - Lower power consumption per hop (~50-100 us processing) - Simpler routing tables (L2 next-hop only)

Disadvantages: - Requires proprietary L2 routing protocol - Limited hop count (typically max 15 hops) - IP management tools don’t see internal topology - No standard for mesh routing (vendor lock-in risk)

Artistic visualization of 6LoWPAN mesh-under forwarding showing Layer 2 packet forwarding using 802.15.4 MAC addresses, with compressed IPv6 headers maintained through intermediate hops for lower latency and power consumption

6LoWPAN Mesh-Under Forwarding
Figure 967.1: Mesh-under forwarding operates at Layer 2, using IEEE 802.15.4 MAC addresses for routing decisions. This approach keeps IPv6 headers compressed throughout the multi-hop path, reducing processing overhead at intermediate nodes.

967.3.2 Route-Over Forwarding (Layer 3 with RPL)

Forwarding happens at Network Layer using IPv6 addresses
Each node decompresses, routes, recompresses
Every node is an IP router with its own address(es)

Example packet flow:
  Node A -> [Decompress, consult RPL table, recompress] -> Node B ->
  [Decompress, route, recompress] -> Node C

Advantages: - Standard routing protocol (RPL - RFC 6550) - Works with IP tools (ping, traceroute, SNMP) - Intelligent routing (ETX, link quality metrics) - Firewall/ACL rules can inspect IP addresses - Better scalability (hierarchical addressing)

Disadvantages: - Higher per-hop overhead (decompress/recompress) - More CPU cycles per hop (~200-500 us) - Higher power consumption at intermediate nodes - Larger routing tables (IPv6 prefix-based)

967.3.3 Performance Comparison (3-Hop Path)

Metric Mesh-Under Route-Over
Per-hop latency 50-100 us 200-500 us
3-hop latency 150-300 us 600-1500 us
Energy per hop 13.5 mAus 54-135 mAus
Routing table size 10-50 bytes 100-500 bytes
IP management Limited Full

967.3.4 When to Use Each

Choose Mesh-Under if: - Ultra-low latency critical (<10 ms end-to-end) - Power budget extremely tight - Network topology simple and static - No IP management tools needed - Single-vendor deployment acceptable

Choose Route-Over if: - Standard protocols important - IP tools needed (SNMP, ping, traceroute) - Multi-vendor interoperability required - Dynamic topology (nodes join/leave frequently) - Integration with existing IP infrastructure

Hybrid Approach: Some implementations use mesh-under for local cluster (5-10 nodes) and route-over between clusters.

967.4 RPL: Routing Protocol for LLNs

RPL (RFC 6550) is the standard routing protocol for 6LoWPAN networks.

967.4.1 Key Concepts

  • DODAG: Destination-Oriented Directed Acyclic Graph
  • Rank: Distance metric to root (hop count, ETX, latency)
  • DIO: DODAG Information Object (routers advertise)
  • DAO: Destination Advertisement Object (nodes advertise reachability)
  • DIS: DODAG Information Solicitation (request DIO)

6LoWPAN routing considerations for low-power lossy networks

6LoWPAN Routing Considerations
Figure 967.2: 6LoWPAN routing considerations showing RPL DODAG structure with border router as root.

967.4.2 Traffic Patterns

  • Upward (to internet): Follow parent pointers toward root (default)
  • Downward (to sensors): Use DAO routing tables
  • Point-to-point: Route through common ancestor

967.4.3 ETX-Based Parent Selection

RPL uses Expected Transmission Count (ETX) to select the best parent:

ETX Calculation:

ETX = 1 / (PRR_forward x PRR_reverse)

Where:
  PRR_forward = Packet Reception Rate (delivery success)
  PRR_reverse = ACK Reception Rate (acknowledgment success)

Example: | Metric | Router A | Router B | |——–|β€”β€”β€”-|β€”β€”β€”-| | Packets sent | 100 | 100 | | Successful deliveries | 95 | 75 | | ACKs received | 98 | 55 | | PRR forward | 0.95 | 0.75 | | PRR reverse | 0.98 | 0.55 | | ETX | 1/(0.95 x 0.98) = 1.07 | 1/(0.75 x 0.55) = 2.42 |

Interpretation: - ETX 1.07: Expect ~1 transmission per successful delivery (excellent) - ETX 2.42: Expect ~2.5 transmissions per successful delivery (poor)

967.4.4 Rank Calculation

NewRank = ParentRank + RankIncrease x ETX

Where:
- ParentRank: Parent's advertised Rank
- RankIncrease: Step per hop (typically 256)
- ETX: Expected Transmission Count to parent

967.5 Knowledge Check: RPL Routing

Question: A smart building has 120 6LoWPAN temperature sensors forming an RPL DODAG. The border router (BR) uses ETX as the routing metric with RankIncrease = 256 per hop. Node N discovers three potential parent routers:

  • Router A: ETX = 1.2 (good link), Current Rank = 512, Advertises Rank = 768
  • Router B: ETX = 2.5 (poor link), Current Rank = 256, Advertises Rank = 512
  • Router C: ETX = 1.5 (medium link), Current Rank = 768, Advertises Rank = 1024

Which router should Node N select, and what will N’s resulting Rank be?

Calculation:

For each parent option:

Router A:

NewRank = 768 + (256 x 1.2) = 768 + 307 = 1075

Router B:

NewRank = 512 + (256 x 2.5) = 512 + 640 = 1152

Router C:

NewRank = 1024 + (256 x 1.5) = 1024 + 384 = 1408

Selection: - Router A: Rank 1075 (lowest) - Router B: Rank 1152 - Router C: Rank 1408 (highest)

Node N selects Router A because it gives the lowest total path cost (1075), despite Router B having a lower parent rank. The poor link quality to Router B (ETX 2.5) makes it a worse choice overall.

Key insight: RPL selects based on total path cost, not just parent rank. A good link to a farther parent often beats a poor link to a closer one.

967.6 Neighbor Discovery Optimization (6LoWPAN-ND)

Standard IPv6 Neighbor Discovery is too chatty for low-power networks: - Multicast messages drain battery - Router advertisements every few seconds - Address resolution requires broadcasts

6LoWPAN-ND Improvements (RFC 6775):

  • Host-initiated registration: Hosts register with router (no periodic RAs)
  • No multicast DAD: Duplicate Address Detection done by router
  • Efficient address resolution: Router maintains address table
  • Sleep-friendly: Hosts can sleep, router buffers packets

967.6.1 Registration Flow

%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#16A085', 'secondaryColor': '#E67E22', 'tertiaryColor': '#7F8C8D'}}}%%
sequenceDiagram
    participant H as Host (Sensor)
    participant R as 6LBR (Router)

    Note over H: Wake from sleep
    H->>R: NS with ARO (Address Registration Option)
    Note over R: Check DAD, update table
    R->>H: NA with ARO (Registration status)
    Note over H: Address registered, can sleep

    Note over R: Buffers packets for H
    Note over H: Sleeping...

    H->>R: Poll for buffered packets
    R->>H: Deliver buffered data

967.7 Summary

This chapter explored 6LoWPAN routing mechanisms:

  • Mesh-Under vs Route-Over represent different trade-offs: L2 forwarding is faster/lower-power, L3 forwarding provides IP management and standards compliance
  • RPL (RFC 6550) builds DODAG topology optimized for upward traffic to border router
  • ETX-based routing selects parents based on link quality, not just hop count
  • Rank calculation combines parent rank with link metric for path cost optimization
  • 6LoWPAN-ND reduces Neighbor Discovery overhead through host-initiated registration and sleep-friendly buffering

967.8 What’s Next

Continue to: