17  Routing Convergence

In 60 Seconds

Routing convergence is the time for all routers to agree on network topology after a change. Distance-vector protocols (RIP) converge in minutes using periodic updates, while link-state protocols (OSPF) converge in seconds via triggered flooding. TTL prevents packets from looping forever during convergence – critical for battery-powered IoT mesh networks.

This chapter covers two critical routing concepts:

  1. Convergence - How long it takes routing information to spread through a network after a change
  2. Loop Prevention - How TTL (Time-To-Live) prevents packets from circling forever

These concepts are especially important for IoT networks where: - Battery-powered devices can’t afford excessive routing updates - Mesh networks may have many hops between sensors and gateways - Network changes (node failures, interference) happen frequently

If you need foundational routing concepts first, see: - Routing Fundamentals - What routers do, routing table structure - Routing Review: Longest Prefix Matching - Route selection basics

“Convergence is the scariest time in a network,” said Sammy the Sensor. “When a link fails, all the routers need to agree on new routes. Until they converge, packets can get lost or go in circles.”

“Distance-vector protocols like RIP are the slowest,” explained Max the Microcontroller. “They send updates every 30 seconds and it takes multiple rounds for changes to propagate. A 10-hop network might take 5 minutes to converge – an eternity for critical IoT data!”

“Link-state protocols like OSPF are much faster,” added Lila the LED. “They flood topology changes immediately to all routers, so convergence happens in seconds. But they use too much memory and processing power for tiny IoT devices.”

“That is why TTL is so important during convergence,” said Bella the Battery. “While routers are still figuring out new routes, some packets might end up in loops. TTL ensures those looping packets get destroyed after 64 or 128 hops instead of circling forever. Without TTL, a routing loop during convergence could crash the entire network!”

17.1 Learning Objectives

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

  • Calculate convergence time for distance-vector protocols propagating routes across multi-hop topologies
  • Predict TTL exhaustion by computing how many loop cycles occur before packet termination
  • Justify loop prevention mechanisms explaining why TTL is critical for network stability
  • Evaluate protocol trade-offs between convergence speed and battery life in IoT networks

17.2 Prerequisites

Required Chapters:

Technical Background:

  • Distance vector vs link-state algorithms
  • Network topology concepts
  • IP packet structure (TTL field)

Routing Protocol Comparison:

Protocol Type Convergence IoT Suitability
RIP Distance Vector Slow (hop-by-hop) Legacy
OSPF Link-State Fast (flooding) Too heavy for IoT
RPL Distance Vector Slow (optimized for power) Primary IoT protocol

Estimated Time: 35 minutes

17.3 Distance Vector Convergence

17.3.1 Convergence Time Calculator

Explore how topology depth and update interval affect how long routing changes take to propagate:

Scenario: You’re deploying a wireless sensor network (WSN) along a remote agricultural irrigation pipeline. Due to the linear geography, sensors are arranged in a chain topology using RPL (a distance-vector routing protocol):

Gateway-R1-R2-R3-R4-Endpoint Sensor
(Root)                    (5th device, monitors water pressure at pipeline end)

The gateway (root) connects to a newly installed backup cloud server (10.0.0.0/8). It needs to advertise this new route to all sensors. The network sends routing updates every 30 seconds.

Think about:

  1. How many update rounds before the endpoint sensor learns about the new backup server?
  2. How long will the endpoint wait before it can use the backup server (in seconds)?
  3. Why does linear topology affect convergence time in distance-vector protocols?

Key Insight: Distance-vector protocols propagate routing information hop-by-hop. Convergence rounds = number of hops from source to destination. Here: Gateway -> R1 (1 hop) -> R2 (2 hops) -> R3 (3 hops) -> R4 (4 hops) -> Endpoint = 4 rounds. With 30-second update intervals, convergence takes 120 seconds (2 minutes). This is why deep tree topologies in IoT can suffer slow failover times.

Distance Vector Update Propagation:

Network topology:  Gateway - R1 - R2 - R3 - R4 - Endpoint

Round 0 (Initial):
  Gateway learns new network 10.0.0.0/8 (backup cloud server)

Round 1 (t = 30 seconds):
  Gateway -> R1: "I can reach 10.0.0.0/8 at cost 0"
  R1 learns: 10.0.0.0/8 via Gateway, cost 1

Round 2 (t = 60 seconds):
  R1 -> R2: "I can reach 10.0.0.0/8 at cost 1"
  R2 learns: 10.0.0.0/8 via R1, cost 2

Round 3 (t = 90 seconds):
  R2 -> R3: "I can reach 10.0.0.0/8 at cost 2"
  R3 learns: 10.0.0.0/8 via R2, cost 3

Round 4 (t = 120 seconds):
  R3 -> R4: "I can reach 10.0.0.0/8 at cost 3"
  R4 learns: 10.0.0.0/8 via R3, cost 4

Round 5 (t = 150 seconds):
  R4 -> Endpoint: "I can reach 10.0.0.0/8 at cost 4"
  Endpoint learns: 10.0.0.0/8 via R4, cost 5

CONVERGED after 4 rounds (120 seconds total)

Why This Matters for IoT:

Failover Time = Convergence Time:

Scenario: Primary cloud server fails at t=0

For endpoint sensor:
- Distance-vector (RPL): 120 seconds to learn alternate route
- Link-state (theoretical): 30-40 seconds (floods updates immediately)

Impact on agricultural monitoring:
X 2-minute data gap for water pressure readings
X Pipeline leak detection delayed by 120 seconds
X Potential crop damage if pressure anomaly undetected

Topology Depth vs Convergence:

Shallow topology (3 hops):
Gateway - R1 - R2 - Endpoint
Convergence: 2 rounds x 30s = 60 seconds

Deep topology (10 hops):
Gateway - R1 - R2 - R3 - R4 - R5 - R6 - R7 - R8 - R9 - Endpoint
Convergence: 9 rounds x 30s = 270 seconds (4.5 minutes!)

Mesh topology with alternate paths:
Gateway - R1 - R2 - Endpoint
     \     x     /
      \   / \   /
       R3 - R4
Convergence: Best case 2 rounds (via R1-R2)
             Alternate paths provide redundancy

Verify Your Understanding:

  • If R2’s battery dies, how long before R4 learns R2 is unreachable? (Same convergence time - 4 rounds to propagate failure)
  • Why do link-state protocols converge faster? (Flood topology changes immediately to all routers, not hop-by-hop)
  • How does RPL optimize this for IoT? (Fewer routing updates to conserve battery, accepts slower convergence)
Show Convergence Formula and Trade-offs

Convergence Formula:

def convergence_time(num_hops, update_interval_seconds):
    """
    Calculate distance-vector convergence time.

    Args:
        num_hops: Number of router hops from source to destination
        update_interval_seconds: Time between routing updates

    Returns:
        Convergence time in seconds
    """
    convergence_rounds = num_hops
    convergence_time = convergence_rounds * update_interval_seconds
    return convergence_time

# Agricultural WSN example
hops = 4  # Gateway to endpoint sensor
update_interval = 30  # RPL default update interval

convergence = convergence_time(hops, update_interval)
print(f"Convergence time: {convergence} seconds ({convergence/60:.1f} minutes)")
# Output: Convergence time: 120 seconds (2.0 minutes)

# Deep topology example
deep_hops = 10
deep_convergence = convergence_time(deep_hops, update_interval)
print(f"Deep topology: {deep_convergence} seconds ({deep_convergence/60:.1f} minutes)")
# Output: Deep topology: 300 seconds (5.0 minutes)

Let’s calculate the exact battery impact of fast convergence (10-second updates) versus slow convergence (30-second updates) for a 4-hop sensor network running RPL.

Energy per routing update:

  • Wake from sleep: \(5 \mu\text{A} \times 0.1 \text{ sec} = 0.0005 \text{ mAs}\) (negligible)
  • RX (receive neighbor updates): \(15 \text{ mA} \times 0.5 \text{ sec} = 7.5 \text{ mAs}\)
  • TX (send own update): \(30 \text{ mA} \times 0.2 \text{ sec} = 6.0 \text{ mAs}\)
  • Processing: \(8 \text{ mA} \times 0.1 \text{ sec} = 0.8 \text{ mAs}\)
  • Total per update: \(7.5 + 6.0 + 0.8 = 14.3 \text{ mAs}\)

Fast convergence (10-second updates):

  • Updates per day: \(\frac{86{,}400}{10} = 8{,}640\) updates
  • Daily energy: \(8{,}640 \times 14.3 = 123{,}552 \text{ mAs} = 34.3 \text{ mAh}\)
  • Annual energy: \(34.3 \times 365 = 12{,}520 \text{ mAh}\)
  • Battery capacity (2 × AA lithium): 3,000 mAh
  • Battery lifetime: \(\frac{3{,}000}{12{,}520} \times 365 = 87 \text{ days}\) (2.9 months)

Slow convergence (30-second updates):

  • Updates per day: \(\frac{86{,}400}{30} = 2{,}880\) updates
  • Daily energy: \(2{,}880 \times 14.3 = 41{,}184 \text{ mAs} = 11.4 \text{ mAh}\)
  • Annual energy: \(11.4 \times 365 = 4{,}161 \text{ mAh}\)
  • Battery lifetime: \(\frac{3{,}000}{4{,}161} \times 365 = 263 \text{ days}\) (8.8 months)

Key insight: Reducing update interval from 30s to 10s (3x faster convergence) uses 3x more energy, reducing battery life from 9 months to 3 months. This is why RPL accepts slow convergence - battery life matters more than failover speed for most IoT applications.

Protocol Comparison:

Protocol Type Convergence Mechanism Typical Time IoT Suitability
Distance Vector (RPL) Hop-by-hop propagation 1-5 minutes Good for static networks
Link State (OSPF) Immediate flooding 5-10 seconds Too resource-intensive for IoT
Hybrid (EIGRP) Fast hello + partial updates 10-30 seconds Medium-power devices
Proactive (OLSR) Precomputed routes 1-2 seconds High overhead

RPL Optimization Strategies:

Strategy 1: Reduce Update Interval
-- Default: 30 seconds
-- Aggressive: 10 seconds -> 40-second convergence (4 rounds x 10s)
-- Cost: 3x more control packets = battery drain

Strategy 2: Reduce Topology Depth
-- Linear: 4 hops -> 120 seconds
-- Star: 1-2 hops -> 30-60 seconds
-- Cost: More powerful gateway required, reduced scalability

Strategy 3: Multiple Roots (DAG)
-- Primary root: Main cloud connection
-- Secondary root: Backup gateway with faster failover
-- Cost: More complex routing logic

Strategy 4: Accept Slow Convergence
-- Critical data: Use store-and-forward at each hop
-- Tolerate data gaps during convergence
-- Benefit: Maximize battery life (RPL's design choice)

Real-World IoT Trade-off:

Smart Agriculture Deployment Decision:

Option A: Fast convergence (OSPF-like protocol)
-- Convergence: 10 seconds
-- Battery life: 3 months (frequent updates)
-- Cost: $2,000/year for battery replacements
-- Use case: Critical infrastructure (safety systems)

Option B: Slow convergence (RPL with 30s updates)
-- Convergence: 120 seconds
-- Battery life: 2 years (infrequent updates)
-- Cost: $300/year for battery replacements
-- Use case: Agricultural monitoring (tolerate delays)

Option C: Ultra-slow convergence (RPL with 5-minute updates)
-- Convergence: 20 minutes
-- Battery life: 5 years (minimal updates)
-- Cost: $120/year for battery replacements
-- Use case: Environmental sensing (non-critical)

Most agricultural IoT deployments choose Option B:
 Acceptable failover time (2 minutes tolerable for irrigation)
 Reasonable battery life (2 years between maintenance)
 Cost-effective over 10-year deployment lifecycle

Key Takeaway: Distance-vector convergence time = (number of hops) x (update interval). Deep linear topologies converge slowly - acceptable for IoT when battery life matters more than instant failover. For critical systems requiring sub-second failover, use star topologies with 1-2 hops or invest in higher-power link-state protocols.

17.4 TTL and Routing Loop Prevention

Scenario: A smart building’s mesh network suffers a routing misconfiguration during a firmware update. Three Zigbee routers form an accidental routing loop:

R1 (Floor 2) -> R2 (Floor 3) -> R3 (Floor 4) -> R1 (back to Floor 2)

A temperature sensor on Floor 1 sends a reading (IP packet with TTL=64) that enters the loop at R1. The packet circulates endlessly between the three routers until TTL reaches 0.

Think about:

  1. How many times will the packet traverse the complete 3-router loop?
  2. At which router will the packet finally be dropped?
  3. What prevents the loop from consuming bandwidth indefinitely?

Key Insight: TTL (Time-To-Live) is the safety mechanism that prevents routing loops from consuming network resources forever. Each router decrements TTL by 1. When TTL reaches 0, the router drops the packet and sends an ICMP “Time Exceeded” message. Calculation: 64 TTL / 3 routers = 21 complete loops + 1 hop (dropped at R2 when TTL hits 0). Without TTL, a single misconfigured route could saturate the entire mesh network indefinitely.

TTL Decrement Calculation:

initial_ttl = 64
routers_in_loop = 3  # R1, R2, R3

# Each router decrements TTL by 1
# Complete loop = 3 router hops = 3 TTL decrements

complete_loops = initial_ttl // routers_in_loop
remaining_hops = initial_ttl % routers_in_loop

print(f"Complete loops: {complete_loops}")  # 21
print(f"Remaining hops: {remaining_hops}")  # 1
print(f"Packet dropped at: R{remaining_hops + 1}")  # R2

# Packet path:
# R1 -> R2 -> R3 (21 complete loops)
# R1 -> R2 (TTL becomes 0, dropped)

Detailed TTL Trace:

TTL  Router  Action                    Network Impact
----------------------------------------------------------------
64   R1      Forward to R2 (TTL -> 63)  Packet enters loop
63   R2      Forward to R3 (TTL -> 62)  Loop continues...
62   R3      Forward to R1 (TTL -> 61)  1st complete loop
61   R1      Forward to R2 (TTL -> 60)
...  ...     ... (loop continues for 21 complete cycles)
4    R1      Forward to R2 (TTL -> 3)   21st complete loop
3    R2      Forward to R3 (TTL -> 2)
2    R3      Forward to R1 (TTL -> 1)
1    R1      Forward to R2 (TTL -> 0)
0    R2      DROP! Send ICMP Time Exceeded message to sensor

Why This Matters for IoT Mesh Networks:

Bandwidth Consumption:

Scenario: 10 sensors send readings every 10 seconds during loop

Without TTL (theoretical):
-- Each packet loops forever
-- 10 packets x 3 hops/loop x infinite loops = INFINITE bandwidth consumed
-- Network saturated, all traffic blocked

With TTL=64:
-- Each packet loops 21 times = 63 hops total
-- 10 packets x 63 hops = 630 total transmissions
-- After 210ms (63 x 3.3ms/hop), packets dropped
-- Network recovers when firmware fix deployed

Battery Impact:

What is the exact battery drain from a routing loop with TTL protection? Let’s calculate the energy consumed by one looping packet versus normal operation.

Normal packet forwarding (single hop):

  • RX (receive): \(15 \text{ mA} \times 3 \text{ ms} = 0.045 \text{ mAs}\)
  • Processing: \(8 \text{ mA} \times 1 \text{ ms} = 0.008 \text{ mAs}\)
  • TX (transmit): \(30 \text{ mA} \times 3 \text{ ms} = 0.090 \text{ mAs}\)
  • Total per hop: \(0.045 + 0.008 + 0.090 = 0.143 \text{ mAs}\)

Looping packet (TTL=64, 3-router loop):

  • Complete loops: \(\lfloor 64 / 3 \rfloor = 21\) loops
  • Total hops: \(21 \times 3 = 63\) hops (packet dropped at hop 64)
  • Energy per router: \(63 \times 0.143 = 9.0 \text{ mAs}\) per looping packet
  • 21x more energy than normal single-hop forwarding

Daily energy impact (10 sensors, 1 packet/sensor in loop):

  • Normal operation: \(100 \text{ packets/hour} \times 24 \times 0.143 = 343 \text{ mAs} = 0.095 \text{ mAh/day}\)
  • With 10 looping packets: \(0.095 + (10 \times 9.0 / 1000) = 0.095 + 0.09 = 0.185 \text{ mAh/day}\)
  • Increase: 95% temporary spike

Battery lifetime impact (3,000 mAh battery):

  • Normal: \(\frac{3{,}000}{0.095 \times 365} = 86.5 \text{ years}\) (forwarding energy alone; real lifetime limited by self-discharge)
  • During 1-day loop event: \(\frac{3{,}000}{0.185 \times 365} = 44.4 \text{ years}\) (forwarding energy alone)
  • Actual practical lifetime: ~2 years (dominated by battery self-discharge at ~4%/month for lithium-AA cells under typical temperature cycling)

Key insight: TTL prevents catastrophic battery drain. Without TTL, the 10 looping packets would circulate forever, forwarding infinitely and draining batteries in hours. With TTL=64, each packet dies after 63 hops, causing only a temporary 1-day energy spike that has negligible impact on the 2-year practical battery lifetime.

Zigbee router battery consumption:

Normal operation:
- Receive + forward 100 packets/hour
- Battery life: 2 years

During routing loop (without TTL):
- Receive + forward INFINITE packets (loop never ends)
- Battery drained in hours (not years!)
- All routers in loop die simultaneously

During routing loop (with TTL=64):
- Each trapped packet forwarded 21x before drop
- Temporary 21x increase in forwarding
- Battery life reduced to ~1.9 years (minimal impact)
- Firmware fix applied before significant battery drain

Loop Behavior Summary:

TTL routing loop prevention flowchart showing packet with initial TTL of 64 entering a three-router loop, decrementing TTL by 3 each cycle through R1, R2, and R3, completing 21 cycles before TTL reaches zero at R2 which drops the packet and sends an ICMP Time Exceeded message back to the source sensor

TTL-based routing loop prevention
Figure 17.1: TTL routing loop prevention flowchart showing packet with initial TTL=64 entering 3-router loop at R1, traversing R1-R2-R3 repeatedly while decrementing TTL by 3 each cycle, checking if TTL>0 at decision point (orange diamond), continuing loop for 21 complete cycles (teal boxes), then dropping packet when TTL reaches 0 at R2 (navy box) and sending ICMP Time Exceeded message back to sensor (orange box). Arrows show cyclical flow until TTL exhaustion.

This variant shows TTL decrement as a step-by-step countdown, making the math more intuitive:

Diagram showing LOOP1

This countdown visualization shows exactly how TTL decrements at each hop, making the 64 / 3 = 21 loops calculation intuitive.

This variant compares routing loop behavior with and without TTL protection:

Diagram showing WITH

Green boxes show the controlled failure with TTL (recoverable), while navy boxes show catastrophic failure without TTL (unrecoverable without intervention).

Verify Your Understanding:

  • If TTL starts at 32 instead of 64, how many complete loops? (32 / 3 = 10 complete loops + 2 hops)
  • What happens to packets if you remove TTL entirely? (Infinite looping, network saturates until physical link failure)
  • Why does R2 drop the packet, not R1 or R3? (64 mod 3 = 1 remaining hop, packet reaches R2 with TTL=0)
Show Loop Analysis and Prevention

TTL Calculation for Different Loop Sizes:

def calculate_loop_behavior(initial_ttl, routers_in_loop):
    """
    Calculate how many times packet traverses loop before drop.

    Args:
        initial_ttl: Starting TTL value (typically 64 or 128)
        routers_in_loop: Number of routers in the loop

    Returns:
        dict with complete_loops, remaining_hops, drop_router
    """
    complete_loops = initial_ttl // routers_in_loop
    remaining_hops = initial_ttl % routers_in_loop

    # Drop occurs at router index = remaining_hops (if >0), else last router
    if remaining_hops == 0:
        drop_router_index = routers_in_loop
    else:
        drop_router_index = remaining_hops

    return {
        "complete_loops": complete_loops,
        "remaining_hops": remaining_hops,
        "drop_router_index": drop_router_index,
        "total_hops": initial_ttl
    }

# Smart building scenario
result = calculate_loop_behavior(64, 3)
print(f"3-router loop with TTL=64:")
print(f"  Complete loops: {result['complete_loops']}")
print(f"  Remaining hops: {result['remaining_hops']}")
print(f"  Drop at router: R{result['drop_router_index']}")
print(f"  Total hops: {result['total_hops']}")

# Output:
# 3-router loop with TTL=64:
#   Complete loops: 21
#   Remaining hops: 1
#   Drop at router: R2
#   Total hops: 64

# Other scenarios
print("\n2-router loop with TTL=64:")
print(calculate_loop_behavior(64, 2))
# Complete loops: 32, Drop at router: R2

print("\n5-router loop with TTL=128:")
print(calculate_loop_behavior(128, 5))
# Complete loops: 25, Remaining: 3, Drop at router: R3

Loop Prevention Mechanisms:

Mechanism How It Works Effectiveness IoT Applicability
TTL (Time-To-Live) Hop count limit Prevents infinite loops Universal (all IP networks)
Split Horizon Don’t advertise routes back to source Prevents simple 2-node loops Distance-vector protocols
Route Poisoning Advertise failed routes with infinite metric Speeds convergence RIP, RPL
Hold-Down Timers Delay accepting worse routes Reduces flapping Slows convergence (IoT trade-off)
Path Vector Include full path in updates Detects loops before formation Too much overhead for IoT

TTL Values by Protocol:

Common TTL defaults:

IPv4 default TTL:
-- Windows: 128
-- Linux/Unix: 64
-- Cisco routers: 255
-- IoT devices: 64 (typical)

Maximum hops supported:
-- Internet backbone: 30-40 hops typical
-- Enterprise network: 10-20 hops typical
-- IoT mesh network: 5-15 hops typical
-- Deep WSN: up to 30 hops (battery-constrained)

RPL TTL considerations:
-- Shallow tree (root + 3 levels): TTL=16 sufficient
-- Deep tree (root + 10 levels): TTL=64 required
-- Very deep (root + 30 levels): TTL=128 needed

Key Takeaway: TTL is the “safety valve” for routing misconfigurations. In IoT mesh networks with hundreds of routers, misconfigurations are inevitable during firmware updates or topology changes. TTL ensures a single routing loop causes temporary congestion (seconds) rather than complete network failure (hours/days). The calculation is simple: complete loops = TTL / routers_in_loop. Without TTL, a 3-router loop would consume bandwidth infinitely - with TTL=64, it’s limited to 21 cycles before automatic termination.

17.5 TTL Loop Quiz

## Key Concepts

  • Convergence: The process by which all routers in a network agree on topology after a change
  • Convergence Time: Time required for routing information to propagate through the entire network
  • Distance Vector: Routing algorithm where routers share routing tables with neighbors hop-by-hop
  • TTL (Time-To-Live): Counter in IP header decremented at each hop; prevents routing loops by discarding packets at TTL=0
  • ICMP Time Exceeded: Error message sent when a router drops a packet due to TTL reaching 0
  • Routing Loop: Packets cycling indefinitely between routers due to misconfiguration
  • Split Horizon: Loop prevention technique where routes are not advertised back to their source
  • Route Poisoning: Advertising failed routes with infinite metric to speed convergence

17.6 Worked Example: Convergence Impact on a Smart Grid Mesh Network

Scenario: A power utility operates a 6LoWPAN mesh network of 150 smart meters across a suburban neighborhood. The mesh is 8 hops deep from the furthest meters to the data concentrator (gateway). During a thunderstorm, a relay node at hop 3 fails due to a power surge. How long does the network take to converge under different routing protocols, and how much sensor data is lost during convergence?

Step 1: Convergence Time Calculation

Protocol Update Mechanism Convergence Time Calculation
RIP Periodic updates every 30s 4 minutes 8 hops x 30s = 240s worst case
OSPF Triggered LSA flooding 2-5 seconds SPF delay (1s) + propagation (0.5s/hop x 8) = 5s
RPL (Trickle, Imin=1s, Imax=2^10) Adaptive DIO messages 10-60 seconds Trickle resets to Imin on topology change; children detect missing parent after 1-2 DIO intervals
Static No convergence Infinite (manual fix) Requires technician dispatch

Step 2: Data Loss During Convergence

Smart meters report 15-minute interval readings. During convergence, meters behind the failed node cannot reach the gateway:

Protocol Convergence Meters Affected Readings Lost Data Impact
RIP 240 seconds 45 meters (hops 4-8) 0-1 per meter (15-min interval > convergence) 0-45 readings
OSPF 5 seconds 45 meters 0 (convergence < reporting interval) None
RPL 60 seconds 45 meters 0 (convergence < reporting interval) None
Static Until repair 45 meters All readings until technician arrives Severe – hours of data loss

Step 3: Why RPL Wins Over OSPF Here

OSPF converges faster (5s vs 60s), but both complete well within the 15-minute reporting interval. The critical difference is ongoing energy cost:

OSPF daily control traffic per node:
  Hello packets: every 10s x 40 bytes = 345,600 bytes/day
  LSA refreshes: every 30 min x 200 bytes = 9,600 bytes/day
  Total: ~355 KB/day

RPL daily control traffic per node (stable network):
  DIO (Trickle-suppressed): ~4/day x 40 bytes = 160 bytes/day
  DAO: ~2/day x 30 bytes = 60 bytes/day
  Total: ~0.22 KB/day

Ratio: OSPF uses 1,600x more control traffic than RPL in steady state

For battery-powered meters, OSPF’s hello packets alone would consume more energy than the actual meter readings. RPL’s Trickle algorithm reduces control overhead to near zero during stable periods, making the 55-second convergence penalty an excellent trade-off.

Step 4: TTL Protection During Convergence

During the 60 seconds of RPL convergence, routing loops can form temporarily. With TTL=64 and a 3-node loop:

Loop iterations before TTL expiry: 64 / 3 = 21 complete loops
Time per loop: 3 hops x 5 ms/hop = 15 ms
Total loop duration: 21 x 15 ms = 315 ms
Wasted energy: 315 ms x 17.4 mA = 1.52 uAh (negligible)

TTL prevents looping packets from consuming significant energy. Without TTL, a single loop during convergence could circulate packets indefinitely, draining batteries within hours.

Key Insight: For IoT mesh networks with periodic reporting, convergence speed matters far less than steady-state control overhead. RPL converges 12x slower than OSPF but uses 1,600x less control traffic daily. Since data loss depends on whether convergence completes within the reporting interval (not on absolute convergence time), RPL is optimal for any reporting interval above 2 minutes.

Common Pitfalls

During routing convergence (typically 1–60 seconds after a topology change), packets may be dropped or routed suboptimally. Applications must handle this convergence window with appropriate timeouts and retry logic.

More aggressive hello intervals and dead timers reduce convergence time but increase control plane traffic — a significant overhead on constrained IoT devices. Balance convergence speed with protocol overhead for your traffic requirements.

A router may update its own routing table quickly but take longer to propagate changes to the rest of the network. Local convergence (seconds) differs from global convergence (tens of seconds to minutes in large networks).

17.7 Summary

Convergence and loop prevention are critical for reliable routing:

Convergence:

  • Distance-vector protocols propagate information hop-by-hop
  • Convergence time = (number of hops) x (update interval)
  • Deep topologies converge slowly - acceptable trade-off for battery life in IoT
  • RPL accepts slower convergence to conserve energy

TTL Loop Prevention:

  • Each router decrements TTL by 1
  • Packets dropped when TTL reaches 0
  • Complete loops = TTL / routers_in_loop
  • TTL=64 in a 3-router loop = 21 cycles before automatic termination
  • Without TTL, single misconfiguration would saturate entire network

17.8 What’s Next

Previous Up Next
Longest Prefix Matching Routing Fundamentals Advanced Routing Config

Now that you understand convergence timing and loop prevention, the next chapter explores redundant path configuration and advanced routing decisions - including floating static routes for automatic failover.

This chapter builds upon:

This chapter connects to:

Real-world applications:

  • Estimating network recovery time after failures
  • Designing IoT networks with acceptable convergence delays
  • Choosing between RIP, OSPF, and RPL based on convergence requirements
  • Battery life optimization via update interval tuning

Protocol Specifications:

Convergence Analysis:

Tools:

  • Wireshark - Capture routing protocol messages
  • GNS3 - Simulate convergence scenarios
  • Contiki-NG - Test RPL convergence

Related Topics:

Continue to: Routing Review: Advanced Configuration