260  Ad-Hoc Routing Visualizer

Explore Dynamic Routing Protocols

260.1 Ad-Hoc Network Routing Protocols

This interactive visualizer demonstrates how different ad-hoc routing protocols discover and maintain routes in mobile networks. Compare proactive (table-driven), reactive (on-demand), and hybrid approaches to understand their trade-offs in control overhead, latency, and adaptability.

260.2 Understanding Ad-Hoc Routing

NoteWhat are Ad-Hoc Networks?

Ad-hoc networks are self-organizing wireless networks where devices communicate directly without fixed infrastructure. Each node can act as both a host and a router, forwarding packets for other nodes. This is essential for:

  • Disaster recovery when infrastructure is damaged
  • Military communications in the field
  • Sensor networks in remote areas
  • Vehicle-to-vehicle communication
  • IoT mesh networks for extended coverage

260.3 Protocol Categories

260.3.1 Proactive (Table-Driven) Protocols

Proactive protocols maintain routing tables continuously through periodic updates.

DSDV (Destination-Sequenced Distance-Vector): - Every node maintains a routing table with all destinations - Periodic updates broadcast routing information - Sequence numbers prevent routing loops - Low latency for route lookup - High overhead in large/mobile networks

260.3.2 Reactive (On-Demand) Protocols

Reactive protocols discover routes only when needed.

DSR (Dynamic Source Routing): - Source determines complete route - Route stored in packet header (source routing) - Route cache reduces rediscovery - No periodic updates needed - Header overhead grows with path length

AODV (Ad-hoc On-demand Distance Vector): - Combines DSR and DSDV features - On-demand discovery like DSR - Hop-by-hop routing like DSDV - Sequence numbers for freshness - Local route repair capability

260.3.3 Hybrid Protocols

ZRP (Zone Routing Protocol): - Divides network into overlapping zones - Proactive routing within zones (IARP) - Reactive routing between zones (IERP) - Zone radius is configurable - Balances overhead and latency

260.4 Route Discovery Process

%% fig-alt: Sequence diagram showing route discovery process with RREQ flooding from source through intermediate nodes to destination, followed by RREP returning along discovered path to establish the route.
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#FFFFFF', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22', 'secondaryColor': '#ECF0F1', 'tertiaryColor': '#FFFFFF'}}}%%
sequenceDiagram
    participant S as Source
    participant A as Node A
    participant B as Node B
    participant D as Destination

    Note over S,D: Route Request (RREQ) Flooding
    S->>A: RREQ (src=S, dest=D, seq=1)
    S->>B: RREQ (src=S, dest=D, seq=1)
    A->>B: RREQ (path: S->A)
    A->>D: RREQ (path: S->A)
    B->>D: RREQ (path: S->B)

    Note over S,D: Route Reply (RREP) - Unicast
    D->>A: RREP (path: S->A->D)
    A->>S: RREP (route established)

    Note over S,D: Data Transmission
    S->>A: Data packet
    A->>D: Data packet

%% fig-alt: Quadrant chart comparing four ad-hoc routing protocols on axes of control overhead versus route discovery latency, showing DSDV in high overhead low latency quadrant, DSR and AODV in low overhead high latency quadrant, and ZRP balanced in the middle.
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#FFFFFF', 'primaryBorderColor': '#16A085', 'lineColor': '#7F8C8D', 'secondaryColor': '#ECF0F1', 'tertiaryColor': '#FFFFFF'}}}%%
graph TB
    subgraph OVERHEAD["Control Overhead"]
        direction LR
        HIGH_OH["HIGH<br/>Constant updates"]
        MED_OH["MEDIUM<br/>Zone-based"]
        LOW_OH["LOW<br/>On-demand only"]
    end

    subgraph PROTOCOLS["Protocol Comparison"]
        DSDV["<b>DSDV</b><br/>━━━━━━━━<br/>Proactive<br/>━━━━━━━━<br/>Overhead: HIGH<br/>Latency: INSTANT<br/>━━━━━━━━<br/>Best: Static networks"]

        ZRP["<b>ZRP</b><br/>━━━━━━━━<br/>Hybrid<br/>━━━━━━━━<br/>Overhead: MEDIUM<br/>Latency: FAST local<br/>━━━━━━━━<br/>Best: Large networks"]

        AODV["<b>AODV</b><br/>━━━━━━━━<br/>Reactive<br/>━━━━━━━━<br/>Overhead: LOW<br/>Latency: ON-DEMAND<br/>━━━━━━━━<br/>Best: Mobile nodes"]

        DSR["<b>DSR</b><br/>━━━━━━━━<br/>Reactive<br/>━━━━━━━━<br/>Overhead: LOW<br/>Latency: ON-DEMAND<br/>━━━━━━━━<br/>Best: Sparse traffic"]
    end

    HIGH_OH -.-> DSDV
    MED_OH -.-> ZRP
    LOW_OH -.-> AODV
    LOW_OH -.-> DSR

    style DSDV fill:#3498DB,stroke:#2C3E50,stroke-width:2px,color:#fff
    style ZRP fill:#9B59B6,stroke:#2C3E50,stroke-width:2px,color:#fff
    style AODV fill:#27AE60,stroke:#2C3E50,stroke-width:2px,color:#fff
    style DSR fill:#E67E22,stroke:#2C3E50,stroke-width:2px,color:#fff
    style HIGH_OH fill:#E74C3C,stroke:#2C3E50,stroke-width:1px,color:#fff
    style MED_OH fill:#F1C40F,stroke:#2C3E50,stroke-width:1px,color:#000
    style LOW_OH fill:#27AE60,stroke:#2C3E50,stroke-width:1px,color:#fff

This comparison helps select the right protocol based on network characteristics. DSDV trades high bandwidth overhead for instant route availability. DSR and AODV minimize overhead but require route discovery time. ZRP provides a balanced approach with fast local routing and on-demand inter-zone discovery.

260.5 Key Metrics Comparison

Comparison of Ad-Hoc Routing Protocol Characteristics
Metric DSDV DSR AODV ZRP
Route Discovery Latency None (instant) High (flooding) Medium Low (local) / Medium (remote)
Control Overhead High (periodic) Low (on-demand) Low Medium (zone-based)
Storage Requirements High (all routes) Medium (cache) Medium Medium
Mobility Handling Slow (full update) Good (route repair) Good (local repair) Best (zone-aware)
Scalability Poor Good Good Best
Loop Freedom Yes (seq nums) Yes (source route) Yes (seq nums) Yes

260.6 Implementation Considerations

TipChoosing the Right Protocol
  1. Small, static networks: DSDV provides instant routing
  2. Large, sparse traffic: DSR minimizes overhead
  3. Mobile networks: AODV handles mobility well
  4. Large, varied traffic: ZRP offers best balance
  5. IoT sensor networks: Consider traffic patterns and node density
WarningCommon Challenges
  • Broadcast storms: RREQ flooding can overwhelm network
  • Stale routes: Cached routes may become invalid
  • Energy consumption: Frequent updates drain batteries
  • Scalability: Table size grows with network
  • Hidden terminal: Nodes may not hear each other

260.7 What’s Next

Now that you understand ad-hoc routing protocols, explore these related topics:


Animation created for the IoT Class Textbook - ADHOC-001