Chapters

19 Ad-Hoc Production: Readiness Checks

emerging-paradigms
adhoc
prod

19.1 Overview

This first route defines production evidence and transfers it across realistic ad-hoc scenarios.

This is part 1 of 2. Continue with Ad-Hoc Production: Routing Trade-offs for the second focused route.

19.2 Start Simple

19.2.1 Test the Network on Its Worst Day

A protocol is an agreed set of rules for how devices exchange information. That name alone cannot prove that a field network is ready.

Picture a search team carrying devices beyond fixed coverage. People move, a relay loses power, and two groups meet after a long break. The system must still carry the right report to the right place without hiding old or copied data.

Choose one mission record. Keep its source, time, location, version, and expiry with it. Break a link, remove a useful relay, fill a queue, and reunite the groups. Check what was stored, copied, dropped, delivered twice, or delivered too late. Name the safe action when current evidence is missing.

Keep the field log plain. Who made the record? When was it made? Who held it next? When did it expire? Who saw it at the end? A missing answer is a test result, not a reason to guess.

Passing this review does not prove every route will work. It proves that the team measured named failures and knows when to reduce the service claim. The deeper material compares routing methods, energy costs, mobility, and release records. Use those details only after the field decision and its evidence are clear.

Start with devices that have to pass useful data before any fixed network is guaranteed. In Ad-Hoc Production Readiness, the first question is not the protocol name; it is which neighbors, routes, failure signals, and degraded behaviors you would trust in the field.

19.3 Start With the Readiness Question

A production-readiness assessment asks a blunt question: would this ad-hoc system still serve users when the field behaves badly? Mobility, interference, battery limits, node loss, and operator mistakes all count as normal conditions.

Start with one scenario the system claims to survive. The assessment then becomes a chain of evidence: what must be measured, what threshold is acceptable, and what action follows when the evidence fails.

The mathematical gist. If transmit power really scales with hop distance as dnd^n, splitting a fixed span into NN equal hops changes ideal transmit energy by 1/Nn11/N^{n-1}. But this chapter’s fixed radio ledger charges every hop 0.5 mJ to transmit and every relay 0.2 mJ to receive, so six hops cost 6(0.5)+5(0.2)=4.06(0.5)+5(0.2)=4.0 mJ while three cost 3(0.5)+2(0.2)=1.93(0.5)+2(0.2)=1.9 mJ. Distance physics can favour shorter hops while fixed radio overhead favours fewer hops; a routing claim must state which model its evidence uses.

Math Bridge · guided foundationsWhen do shorter hops save energy?Let Packet Pete separate distance-scaled transmit power from the fixed cost paid by every relay.
In 60 Seconds

Routing protocol selection depends on measured traffic patterns, mobility, link quality, energy state, and recovery requirements. Proactive approaches fit frequent traffic when route tables can be maintained, reactive approaches fit sparse traffic when discovery delay is acceptable, and hybrid approaches fit mixed patterns. Multi-path and energy-aware routing are production claims only after recovery time, delivery loss, relay battery impact, and retest triggers are measured for the deployment.

Minimum Viable Understanding
  • Routing protocol choice depends on traffic patterns: proactive (DSDV/OLSR) for frequent traffic, reactive (AODV/DSR) for sparse traffic, hybrid (ZRP) for mixed patterns.
  • Multi-path redundancy can reduce outage duration when backup paths are prevalidated and the failover trigger is measured.
  • Energy-aware routing can extend network lifetime when relay load and battery state are measured instead of assuming the shortest path is always best.

Without multi-path: link failure detection (100 ms ACK timeout) + route discovery (8s for 4-hop RREQ/RREP) = 8.1 seconds outage. With pre-cached backup: failure detection (100 ms) + cache lookup (5 ms) + first packet on backup (62 ms for 4-hop path) = 167 ms recovery. The improvement factor is 8100ms167ms48×\frac{8100ms}{167ms} \approx 48\times faster. Worked example: For vineyard sensors transmitting every 300s, single-path loses 8.1s300s=2.7%\frac{8.1s}{300s} = 2.7\% of packets during each failure. Multi-path loses 0.167s300s=0.056%\frac{0.167s}{300s} = 0.056\%, about 48 times less data loss.

Temperature Terry needed to send an urgent temperature reading to the Gateway across the farm, but the direct path was blocked by a tractor!

“No worries!” said the microcontroller. “We have THREE different paths planned ahead of time. Think of it like knowing three different ways to get to school — if one road is blocked, you just take another!”

the battery added, “But not all paths are equal! I prefer the one where my friends along the way have plenty of energy left. If we always use the same shortcut, those friends get tired really fast.”

the LED blinked to explain: “Imagine passing a note in class. The shortest row might be fastest, but if those kids pass EVERY note, they get tired of it. Spreading notes across different rows keeps everyone happy and willing to help!”

The lesson: Smart networks plan backup routes BEFORE problems happen, and they share the work so no single helper gets worn out!

19.4 Learning Objectives

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

  • Apply Routing Knowledge: Select appropriate routing strategies for different deployment scenarios
  • Analyze Network Trade-offs: Evaluate energy vs latency vs reliability trade-offs
  • Solve Production Problems: Work through real-world multi-hop network challenges
  • Diagnose Network Issues: Identify bottlenecks, link failures, and routing inefficiencies
  • Compare Protocol Behavior: Distinguish between proactive, reactive, and hybrid approaches
  • Design Failover Strategies: Implement multi-path redundancy for reliable delivery

19.5 Prerequisites

Required Chapters:

Estimated Time: 30 minutes

This chapter tests your understanding of ad-hoc network concepts through quizzes, worked examples, and scenario-based exercises. If you are new to the topic:

  • Start with the protocol comparison table at the top to review the three routing approaches (proactive, reactive, hybrid).
  • Read the worked examples carefully — they walk through real calculations step by step with numbers you can follow.
  • Try the understanding checks by thinking about the scenarios BEFORE reading the answers. Even if you get them wrong, the explanations will deepen your learning.
  • If any concept is unfamiliar, revisit the Ad-Hoc Network Basics or Multi-hop Fundamentals chapters first.

19.6 Introduction

This chapter consolidates your understanding of production ad-hoc networks through comprehensive knowledge checks, worked examples, and understanding exercises. Follow the assessment in order: establish the routing family and link-quality evidence first, apply those choices to energy and failover scenarios next, and finish by defending the operational decision and its limits. That sequence keeps each answer tied to an observable network condition rather than protocol recall alone.

Chapter Roadmap
  • First review protocol families and link-quality thresholds.
  • Then test the basics with quick checks.
  • Next apply the same logic to failover, alert routing, range, social routing, caching, energy, and mobility.
  • After that pressure-test the shortest-path misconception.
  • Finally turn quiz answers into a release record with retest triggers.

Checkpoints recap; collapsed depth-l1 and depth-l2 sections are optional slowdowns.

19.7 Ad-Hoc Routing Protocol Comparison

Understanding the trade-offs between routing protocol types is essential for production deployments.

Ad-hoc Routing Protocol Comparison

  • Proactive: DSDV and OLSR

    • Maintains routes continuously with periodic updates.
    • Uses higher control overhead to keep route latency low.
    • Best for frequent, predictable traffic where routes are needed often.
  • Reactive: AODV and DSR

    • Discovers routes only when traffic needs a path.
    • Keeps idle overhead low but adds route-discovery delay.
    • Best for sparse or occasional traffic.
  • Hybrid: ZRP

    • Maintains proactive routes inside a local zone and discovers distant routes reactively.
    • Balances overhead and latency through the configured zone radius.
    • Best for mixed traffic patterns.

Before ad-Hoc Routing Protocol Comparison, inspect Figure 19.1 to compare “Hybrid” with “Route”. Their juxtaposition makes ad-hoc routing-family selection starts with observed mobility, traffic frequency, and control-budget evidence, then compares proactive, reactive, and hybrid candidates before a shared measurement gate visible.

Decision map for MANET routing-family selection. Observed node mobility, traffic frequency, and periodic-control budget feed proactive DSDV or OLSR, reactive AODV or DSR, and hybrid ZRP candidates. Every candidate ends at a measurement gate for delivery ratio, discovery or recovery delay, control overhead, energy, and scale under the actual mobility and link trace. RPL is explicitly outside this MANET comparison.
Figure 19.1: Ad-hoc routing-family selection starts with observed mobility, traffic frequency, and control-budget evidence, then compares proactive, reactive, and hybrid candidates before a shared measurement gate.

Read Figure 19.1 from “Hybrid” to “Route”. Taken together, “Hybrid” and “Route” express ad-hoc routing-family selection starts with observed mobility, traffic frequency, and control-budget evidence, then compares proactive, reactive, and hybrid candidates before a shared measurement gate. For ad-Hoc Routing Protocol Comparison, the observed relationship between “Hybrid” and “Route” is evidence that “Hybrid” carries into the next decision.

Protocol Selection Guidelines:

  • Connected, static, frequent traffic -> DSDV
  • Connected, mobile, sparse traffic -> DSR
  • Connected, mixed traffic -> ZRP
  • Disconnected, abundant resources -> Epidemic
  • Disconnected, constrained resources, predictable -> CAR

19.8 Link Quality Classification

Understanding how to classify and respond to link quality changes is critical for maintaining network reliability.

Before link Quality Classification, inspect Figure 19.2 to compare “EXCELLENT” with “GOOD”. Their juxtaposition makes link quality classification decision tree showing four-tier assessment: First check PDR thresholds (90%, 70%, 50%), then verify RSSI levels (-70 dBm, -80 dBm, -90 dBm) to classify links as EXCELLENT (>90% PDR, >-70 dBm RSSI, 100 ms latency) visible.

Link quality assessment classifies ad-hoc links as Excellent, Good, Fair or Poor based on PDR and RSSI thresholds. Each classification includes latency.
Figure 19.2: Link quality classification decision tree showing four-tier assessment: First check PDR thresholds (90%, 70%, 50%), then verify RSSI levels (-70 dBm, -80 dBm, -90 dBm) to classify links as EXCELLENT (>90% PDR, >-70 dBm RSSI, <20ms latency), GOOD (70-90% PDR, -70 to -80dBm, 20-50ms), FAIR (50-70% PDR, -80 to -90dBm, 50-100ms), or POOR (<50% PDR, <-90dBm, >100 ms latency)

Read Figure 19.2 from “EXCELLENT” to “GOOD”. Taken together, “EXCELLENT” and “GOOD” express link quality classification decision tree showing four-tier assessment: First check PDR thresholds (90%, 70%, 50%), then verify RSSI levels (-70 dBm, -80 dBm, -90 dBm) to classify links as EXCELLENT (>90% PDR, >-70 dBm RSSI, 100 ms latency). For link Quality Classification, the observed relationship between “EXCELLENT” and “GOOD” is evidence that “EXCELLENT” carries into the next decision.

19.9 Inline Knowledge Check

19.10 Routing Strategy Comparison

Different routing strategies optimize for different objectives. Understanding when to apply each is essential for production deployments.

Trade-offs Summary:

  • Control overhead: proactive is high, reactive is low, and hybrid is medium because the zone radius controls how much state is maintained.
  • Route latency: proactive is low because routes are ready, reactive is high because discovery happens on demand, and hybrid is configurable.
  • Scalability: proactive scales poorly in large or fast-changing networks; reactive and hybrid approaches scale better.
  • Mobility support: proactive handles moderate mobility, while reactive and hybrid approaches usually adapt better to changing links.
Blueprint BinaCheckpoint: Protocol Fit and Link Evidence

You now know:

  • Proactive, reactive, and hybrid routing differ mainly in control overhead, route latency, and how much route state they keep ready.
  • A GOOD link is not a guess: the example classifies 82% PDR, -74 dBm RSSI, and 35 ms latency against the 70-90% PDR, -70 to -80 dBm, and 20-50 ms bands.
  • A route choice is ready for production discussion only after traffic pattern, mobility, link quality, energy state, and recovery requirement are connected.

19.11 Knowledge Check

Auto-Gradable Quick Check

19.12 Worked Examples

Multi-Path Link Failure Recovery

Scenario: A smart agriculture deployment monitors 40 hectares of vineyard with soil moisture sensors. The gateway receives data from sensors via multi-hop ad-hoc network. During harvest season, vineyard workers and machinery frequently block wireless paths, causing link failures.

Given:

  • Primary path: Sensor S1 -> Node A -> Node B -> Gateway (3 hops, latency 45 ms)
  • Backup path 1: S1 -> Node C -> Node D -> Node E -> Gateway (4 hops, latency 62 ms)
  • Backup path 2: S1 -> Node F -> Node G -> Gateway (3 hops, latency 58 ms, but G has 35% battery)
  • Link A-B failure rate during harvest: 15 failures/day, average recovery time: 8 seconds
  • Data transmission frequency: every 5 minutes (288 transmissions/day)
  • Maximum acceptable packet loss: 2%

Steps:

  1. Calculate expected failures during transmission windows:

    • Transmissions per day: 288
    • Link failures per day: 15
    • Probability of failure during any transmission: 15 x 8s / (24 x 3600s) = 0.14%
    • However, failures cluster during work hours (8am-6pm): 15 failures in 10 hours
    • During work hours: 15 x 8s / (10 x 3600s) = 0.33% per transmission
  2. Evaluate single-path (no backup) packet loss:

    • Each failure blocks 8 seconds of communication
    • Transmissions during failure window: 8s / 300s x 120 (work-hour transmissions) = 3.2 blocked
    • Total blocked: 15 failures x 3.2 = 48 packets/day
    • Packet loss rate: 48/288 = 16.7% (exceeds 2% threshold)
  3. Design multi-path failover strategy:

    • Detect failure: Link-layer ACK timeout (100 ms)
    • Switch to backup: Immediate failover to pre-cached alternate path
    • Path selection priority:
      • Backup path 2 (F->G) rejected: G at 35% battery (below 40% threshold)
      • Backup path 1 (C->D->E) selected: All nodes >60% battery
  4. Calculate multi-path recovery time:

    • Failure detection: 100 ms (ACK timeout)
    • Path switch: 5 ms (cache lookup)
    • First packet on backup: 62 ms (backup path latency)
    • Total recovery: 167 ms (vs 8 seconds without backup)
  5. Calculate improved packet loss:

    • Packets lost during 167 ms recovery: 167 ms / 300s = 0.06%
    • Total failures: 15 x 0.06% = 0.9%
    • Final packet loss: <1% (meets 2% threshold)

Result: Implementing multi-path routing with automatic failover reduces packet loss from 16.7% to <1%, meeting the 2% reliability requirement. The energy-aware path selection preserves Node G’s battery for future backup duty.

Key Insight: Multi-path routing transforms link failures from minutes-long outages into sub-second blips. The key is pre-computing and caching backup paths, not discovering them after failure. Path selection should consider both latency and node energy to maintain backup availability throughout deployment lifetime.

Hop Counts for Critical Alerts

Scenario: An industrial safety monitoring system detects gas leaks and must deliver alerts to the control room within 500 ms. The default energy-aware routing uses 6-hop paths to preserve battery, but this may violate latency requirements.

Given:

  • Network topology: 25 nodes monitoring a chemical plant
  • Control room gateway: Central location
  • Current routing metric: Energy-aware (minimizes battery drain)
  • Current path: Sensor -> 6 hops -> Gateway (typical latency: 420 ms)
  • Alternative path: Sensor -> 3 hops -> Gateway (latency: 180 ms)
  • Per-hop latency: ~60 ms (transmission + propagation + processing)
  • Energy cost per hop: ~0.5mJ transmission, ~0.2mJ reception
  • Alert frequency: 2-3 per month (rare)
  • Normal telemetry: every 60 seconds

Steps:

  1. Analyze latency breakdown for 6-hop path:

    • Per-hop delay: 60 ms average
    • 6 hops x 60 ms = 360 ms transmission
    • Queueing delays at intermediate nodes: ~60 ms
    • Total: ~420 ms (within 500 ms budget, but minimal margin)
  2. Calculate worst-case latency scenarios:

    • Network congestion (2 packets queued): +120 ms
    • Retransmission (1 lost packet): +80 ms
    • Worst case: 420 + 120 + 80 = 620 ms (exceeds 500 ms!)
  3. Design priority-based hop optimization:

    • Normal telemetry: Continue using 6-hop energy-efficient path
    • Critical alerts: Switch to 3-hop minimum-latency path
    • Path selection trigger: Alert priority flag in packet header
  4. Calculate optimized alert latency:

    • 3 hops x 60 ms = 180 ms baseline
    • Worst case with congestion/retry: 180 + 120 + 80 = 380 ms
    • Guaranteed <500 ms even under adverse conditions
  5. Evaluate energy trade-off:

    • 6-hop energy: 6 x 0.5mJ + 5 x 0.2mJ = 4.0mJ per packet
    • 3-hop energy: 3 x 0.5mJ + 2 x 0.2mJ = 1.9mJ per packet
    • Surprisingly, 3-hop path uses 52% less energy!
  6. Calculate annual impact:

    • Alerts: 30/year x 1.9mJ = 57mJ (negligible)
    • Telemetry on 6-hop: 525,600 packets x 4.0mJ = 2,102,400mJ
    • Telemetry on 3-hop: 525,600 x 1.9mJ = 998,640mJ
    • 3-hop saves 1,103,760mJ (52.5%) annually

Result: Switching critical alerts to the 3-hop path reduces worst-case latency from 620 ms to 380 ms, guaranteeing compliance with the 500 ms requirement. Unexpectedly, the 3-hop path also uses 52% less energy per packet than the 6-hop “energy-optimized” path.

Key Insight: “Energy-aware” routing doesn’t always mean more hops. Longer paths consume more cumulative energy (more transmissions + receptions) even if each link is energy-efficient. For rare critical alerts, always use minimum-hop paths - they’re both faster AND more energy-efficient. Reserve complex routing optimizations for bulk data transfer where the overhead is amortized.

Blueprint BinaCheckpoint: Worked Failover Claims

You now know:

  • In the vineyard example, single-path loss reaches 16.7%, while pre-cached failover brings the recovery window down to 167 ms and final loss below 1%.
  • A backup route must pass both timing and energy checks: the 35% battery path is rejected against the 40% threshold even though it is short.
  • For critical alerts, the 3-hop path changes worst-case latency from 620 ms to 380 ms and stays inside the 500 ms budget.

19.13 Knowledge Check

Apply these concepts to real-world deployment scenarios.

Scenario: Earthquake destroys cellular infrastructure. 50 rescue workers need communication across 2km disaster zone. Each radio: 500m range, 1W transmit power, battery lasts 8 hours continuous transmission.

Think about:

  1. Calculate minimum hops for end-to-end connectivity (2000m coverage)
  2. Why not use a single 2km-range radio (4x power increase)?
  3. How does multi-hop extend battery life in energy-constrained scenarios?

Key Insight: Minimum hops = 2000m / 500m = 4 hops. Path: Source -> Node1(500m) -> Node2(1000m) -> Node3(1500m) -> Dest(2000m). Radio power follows inverse square law: doubling distance requires 4x power. Single 2km link needs 16x power (1W x 16 = 16W) vs four 500m hops at 1W each. Battery impact: 16W transmission = 30 minutes runtime vs 1W multi-hop = 8 hours. Multi-hop isn’t just about range - it’s about energy efficiency. Disaster response networks prioritize battery life over latency.

Scenario: University campus deploys delay-tolerant messaging app for 5,000 students. Epidemic routing floods 50+ message copies per message. SocialCast analyzes: contact frequency (Alice-Bob meet daily), recency (last contact 2 hours ago), location similarity (both frequent library).

Think about:

  1. Why does epidemic routing work but waste bandwidth?
  2. How does SocialCast reduce copies from 50 to 5-10 while maintaining 90% delivery?
  3. What happens when social patterns are unpredictable (random mobility)?

Key Insight: Epidemic = flood everywhere (guarantees delivery but 80% wasted bandwidth). SocialCast = forward only if carrier’s social metrics > current holder’s. Example: Message for “Bob”. Current holder “Charlie” (meets Bob monthly). Encounters “Alice” (meets Bob daily) -> transfer to Alice (higher contact frequency). Encounters “Dave” (never meets Bob) -> don’t transfer. Result: 5-10 targeted copies follow social graph toward Bob. 90% delivery ratio, 80% less bandwidth. Perfect for human mobility (predictable social patterns). Fails for random mobility (no patterns to exploit) - use epidemic instead.

Scenario: Disaster response team uses DSR routing. Command post (stationary) communicates with mobile rescue teams (3-5 m/s). Device caches 5 routes. After 10 minutes, 40% of routes have stale/broken links due to mobility.

Think about:

  1. Calculate optimal cache timeout balancing freshness vs discovery overhead
  2. Why not always perform fresh route discovery (zero cache)?
  3. How does mobility speed affect ideal timeout?

Key Insight: Static timeout fails: 10min timeout -> 40% stale routes -> packet failures. 30sec timeout -> excessive RREQ floods (high overhead). Adaptive solution: Monitor ROUTE_ERROR rate: High errors (>5/min) -> reduce timeout to 2-3min (high mobility). Low errors (<1/min) -> extend timeout to 10min (stable topology). Mobility-aware: Command post to command post: 10min cache (stationary). Rescue team to rescue team: 2min cache (mobile). Mixed: 5min cache. Why not zero cache? Discovery latency: 50-200 ms per RREQ/RREP cycle. Real-time voice needs <100 ms. Cached routes = instant forwarding. Result: Adaptive caching = DSR’s low latency + mobility resilience. Route lifetime inversely proportional to node velocity.

Scenario: 20-node ad-hoc network has 3 paths from source to gateway: Path A (3 hops, nodes at 40% battery), Path B (4 hops, nodes at 80% battery), Path C (5 hops, nodes at 95% battery). Need to route 1000 packets while maximizing network lifetime.

Think about:

  1. Why doesn’t shortest-path routing (Path A) maximize network lifetime?
  2. Calculate battery depletion if all traffic uses Path A vs distributed across all paths
  3. How does energy-aware routing trade latency for longevity?

Key Insight: Shortest-path (Path A only): 1000 packets drain 40% -> 0% battery on 3 nodes -> network partition (other nodes isolated). Energy-aware distribution: 300 packets on A (40% -> 25%), 400 packets on B (80% -> 70%), 300 packets on C (95% -> 88%). Minimum battery: 25% (vs 0% shortest-path). Network survives 3x longer. Trade-offs: Path C has 67% higher latency (5 hops vs 3) but uses nodes with abundant energy. Production strategy: Route delay-tolerant traffic on long/high-battery paths, route real-time traffic on short/low-latency paths. Prevents premature node deaths that partition network.

Scenario: Ad-hoc network link between Node A and Node B: current RSSI -65 dBm, PDR 95%, nodes approaching at 2 m/s, will separate in 30 seconds. Link quality monitor must predict when link becomes unusable (RSSI < -85 dBm, PDR < 50%).

Think about:

  1. Calculate when proactive rerouting should trigger (before link failure)
  2. Why is prediction better than reactive rerouting after failure?
  3. How does mobility speed affect prediction accuracy?

Key Insight: Path loss increases with distance: RSSI drops ~3-4 dB per doubling distance. At 2 m/s separation velocity: Distance = 2 m/s x 30s = 60m additional separation. RSSI degrades: -65 dBm (now) -> -75 dBm (15s) -> -85 dBm (30s) -> link fails. Proactive rerouting: Trigger new route discovery at 20s (RSSI -80 dBm, PDR 70%) before complete failure. Gives 10s buffer for RREQ/RREP exchange. Reactive rerouting: Wait until link fails (PDR <50%) -> buffer loss, 200 ms discovery delay, user-visible disruption. Prediction accuracy: High mobility (5 m/s+) -> prediction horizon 10-15s (short). Low mobility (1 m/s) -> horizon 60s+ (plenty of time). Use velocity-aware prediction windows.

Blueprint BinaCheckpoint: Scenario Transfer

You now know:

  • Range, delivery, cache freshness, battery distribution, and mobility prediction all change the routing answer.
  • Multi-hop range planning trades a 2km single link for four 500m hops; social routing cuts epidemic-style 50+ copies down to 5-10 targeted copies when contact patterns help.
  • Energy-aware selection can leave the weakest route at 25% battery instead of 0%, while mobility prediction reroutes around the -85 dBm failure point.

19.14 Common Misconception

19.15 Continue to Part 2

Continue with Ad-Hoc Production: Routing Trade-offs.