%%{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 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:
- 6LoWPAN Overview: Basic understanding of 6LoWPANβs purpose
- 6LoWPAN Header Compression: IPHC compression mechanics
- Routing Fundamentals: Basic routing concepts
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)
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)

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
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
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:
- 6LoWPAN Deployment: Real-world deployment scenarios and decision frameworks
- 6LoWPAN Pitfalls: Common mistakes and troubleshooting