Table-driven, on-demand and hybrid routing
Comparison and workings of table-driven (proactive), on-demand (reactive) and hybrid routing for wireless sensor networks, with definitions, formulas, examples, common exam mistakes and quick-check questions.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Routing decides how sensor data moves from nodes to sinks or between nodes. Choosing between table-driven (proactive), on-demand (reactive) and hybrid routing affects energy use, latency, control overhead and therefore network lifetime — the primary engineering trade-offs in Wireless Sensor Networks (WSNs).
Key ideas
Start from first principles: energy is scarce, links are lossy, and nodes may sleep. Routing must discover paths and keep them usable while spending little energy.
- Routing: the process of selecting paths in a network along which to send packets.
- Routing metric: any numeric measure used to compare paths (hop-count, energy, link-quality). Define before use.
Definitions of the three styles (bold when defined):
Table-driven (proactive) routing: each node maintains up-to-date routing information (a routing table) to every other node or to destinations of interest. Routes are updated periodically or when topology changes.
- Exact behaviour: nodes exchange control messages periodically (or on change) so that each node has next-hop entries for destinations. Example protocols: DSDV (Destination-Sequenced Distance-Vector), OLSR (Optimized Link State Routing). OLSR reduces overhead via multipoint relays (MPRs).
- Assumptions: control messages are delivered often enough to maintain routes; cost paid continuously even if data traffic is low.
On-demand (reactive) routing: nodes discover routes only when needed. A route discovery procedure is triggered when an application has data to send and no valid route exists.
- Exact behaviour: a node broadcasts a route request (RREQ); nodes forward requests, create reverse pointers; destination (or intermediate node with route) sends a route reply (RREP). Routes are maintained until broken. AODV often limits flooding by an expanding-ring search using a TTL field.
- Example protocols: AODV (Ad hoc On-demand Distance Vector), DSR (Dynamic Source Routing).
- Assumptions: route discovery can add non-negligible latency; control overhead is proportional to route discovery frequency, not network size alone (each discovery flood still scales with network size/topology).
Hybrid routing: combines proactive and reactive features. Typically, nodes maintain proactive routes inside a local zone and use on-demand discovery for distant destinations. Example idea: ZRP (Zone Routing Protocol).
- Exact behaviour: split network into zones of radius r hops. Inside zone use proactive routing; outside use reactive discovery. Here r is an integer hop-count TTL.
- Assumptions: locality of traffic — many flows are local so proactive maintenance within zones pays off.
Key protocol mechanisms and definitions used in quiz/exams:
- Route discovery: process to find a path (RREQ/RREP in AODV; source route collection in DSR).
- Route maintenance: keeping a discovered route valid (periodic HELLOs, link-layer feedback, route error messages).
- Sequence number: a monotonically increasing number used in some protocols (DSDV/AODV) to avoid routing loops and to prefer fresh routes—define as an integer increasing with originator transmissions.
What to draw (diagram instructions):
- For AODV route discovery: draw 5 nodes in a rough line or cross; label source S and destination D; draw arrows for RREQ flooding from S to neighbors (mark as RREQ, list sequence number and ID), show reverse path creation, show RREP returning along reverse path.
- For hybrid zone diagram: draw a node, draw ring around it representing zone radius r (in hops), show proactive links inside ring and reactive discovery beyond ring.
Derivation commonly asked: amortised control cost of on-demand route discovery when a source sends N_data packets per route and route discovery costs C_rd (energy or messages). Average control cost per data packet = C_rd / N_data. If proactive maintenance cost per unit time is C_pro and data sending rate is R_data, choose on-demand when C_rd / N_data < C_pro / R_data (derive step-by-step in exam).
Assumptions to state in exam answers: symmetric links (or state otherwise), nodes can broadcast without collision-free guarantee (mention MAC layer will affect performance), nodes sleep/wake duty-cycle is not considered unless specified. In AODV, bidirectional links are required so RREPs can traverse the reverse path.
Formulas
E_total = E_data + E_control — total energy consumed in forwarding data and control per node per period. Symbols: E_total (J), E_data (J), E_control (J). Applies generally.
E_data,total = N_pkt * L_bits * h * (E_tx + E_rx) — network total energy to send N_pkt packets over an h-hop path (there are h transmissions and h receptions). For a single node on the path: source costs N_pktL_bitsE_tx; each intermediate costs N_pktL_bits(E_rx+E_tx); sink costs N_pktL_bitsE_rx. Symbols: N_pkt (packets), L_bits (bits/packet), E_tx (J/bit), E_rx (J/bit), h (hop count). SI units: packets (count), bits, J/bit, dimensionless h.
E_control,local = N_tx_ctrl * L_ctrl_bits * E_tx + N_rx_ctrl * L_ctrl_bits * E_rx — approximate local control energy per node (separate the number of control packets this node transmits, N_tx_ctrl, from the number it receives, N_rx_ctrl). For a single broadcast heard by n_neighbors, the network energy is L_ctrl_bits * (E_tx + n_neighbors*E_rx). Symbols: N_tx_ctrl, N_rx_ctrl (counts), L_ctrl_bits (bits), n_neighbors (average neighbors). Applies to broadcast-heavy proactive protocols.
E_rd_per_pkt = C_rd / N_data — route-discovery control cost amortised per data packet. Symbols: C_rd (J or control messages) for a single discovery, N_data (number of data packets sent before route breaks).
Lifetime ≈ E_node_initial / E_node_rate — coarse estimate of node lifetime. Symbols: E_node_initial (J), E_node_rate (J/s). Applies when energy consumption is roughly steady.
Note: E_tx and E_rx are often modelled from sensor literature as E_elec ≈ 50e-9 J/bit and E_amp ≈ 100e-12 J/bit/m^2 (verify numbers below).
Worked examples
Example 1 — Numerical: compare control cost (energy) per minute for proactive vs reactive for one node. Given (assumptions): network average degree = 8 neighbors; periodic table update size = 128 bytes; update interval = 10 s; route discovery (broadcast) size = 128 bytes and happens once every 200 seconds for this node; data traffic negligible (we compare pure control energy). Use radio model constants: E_elec = 50 nJ/bit, E_amp*d^2 contribution assumed included in E_tx per bit for broadcast = 100 nJ/bit (use combined E_tx = 150e-9 J/bit) and E_rx = 50e-9 J/bit. (See verify list.) Steps:
- Convert sizes: 128 bytes = 1024 bits.
- Proactive: updates every 10 s → 6 updates per minute. Energy per update: node transmits one broadcast and 8 neighbors receive it — energy for local node: transmit cost = 1024 * 150e-9 = 153.6e-6 J; plus receptions of neighbors do not cost this node; but node will also receive updates from 8 neighbors: receive energy per neighbor update = 1024 * 50e-9 = 51.2e-6 J, times 8 = 409.6e-6 J. Total per update seen by node ≈ 153.6e-6 + 409.6e-6 = 563.2e-6 J. For 6 updates per minute: 6 * 563.2e-6 = 3379.2e-6 J = 3.3792 mJ per minute.
- Reactive: route discovery once every 200 s → 0.3 discoveries per minute. Energy per discovery: node transmits broadcast 1024 * 150e-9 = 153.6e-6 J and receives from neighbors when they rebroadcast: assume it receives 8 rebroadcasts → 8 * 51.2e-6 = 409.6e-6 J. Total per discovery = 563.2e-6 J. Multiply by 0.3 gives ~168.96e-6 J per minute = 0.169 mJ per minute.
- Compare: proactive 3.3792 mJ/min vs reactive 0.169 mJ/min. Conclusion: when route discoveries are infrequent, reactive control energy is far lower. Bold final: Proactive ≈ 3.38 mJ/min, Reactive ≈ 0.17 mJ/min (with the stated assumptions).
Example 2 — Algorithm trace: AODV route discovery on small topology Nodes: S — A — B — C — D (linear). S wants to reach D.
- S broadcasts RREQ (id=1, seq=S_seq). A receives, records reverse entry S→A, rebroadcasts RREQ.
- B receives from A, records reverse entry S→B (next-hop=A), rebroadcasts.
- C receives, records reverse entry, rebroadcasts.
- D receives RREQ; it sees itself is destination, sends RREP back along reverse path to C, then B, then A, then S (unicast RREP). Each intermediate node updates forward route to D pointing to next hop from which RREP came.
- After RREP reaches S, S sends data along S→A→B→C→D. If a link breaks (say between B and C), C/B detect link failure and send RERR to affected upstream nodes which invalidate routes. Show in exam: draw the linear nodes, mark arrows for RREQ (flood) and RREP returns, and show route table excerpts at each node after discovery: Destination D, Next-hop = neighbor, Hop-count.
Example 3 — Hybrid zone sizing argument (short model answer) Given node degree and traffic locality, optimal zone radius r balances proactive cost inside zone (grows roughly with zone size ~ O(r^2) in 2D) vs reactive cost for distant queries (decreases as r increases). Show calculus-style reasoning: pick r minimizing TotalCost(r)=C_pro(r)+C_reac(r) and state qualitative trade-off.
Common mistakes
- For AODV vs DSR: mixing up source routing (DSR) with hop-by-hop next-hop (AODV). DSR carries full route in packet header; AODV uses routing tables and RERR messages.
- Ignoring neighbor count when estimating broadcast cost; broadcast cost scales with average degree.
- In hybrid zone diagrams, drawing overlapping zones incorrectly — zones are per-node and can overlap; state this clearly.
For your exam
Typical question types: definitions, short notes comparing schemes, derivations of amortised cost, numerical energy comparisons, step-by-step traces of route discovery (AODV/DSR), and diagrams of hybrid zone. What full-marks answers include:
- Definitions of terms (proactive/reactive/hybrid) with bold labels in your answer.
- Correct protocol mechanism details (e.g., RREQ/RREP, sequence numbers, source routes vs next-hop entries).
- Stated assumptions (symmetric links, radio model constants, neighbor count).
- For numericals: list given values, convert units, show each arithmetic step, give final value with units and a short interpretation.
- For diagrams: clear node layout, labelled messages (RREQ, RREP, HELLO), and final route table snippets.
Quick check
- What does a sequence number prevent in AODV/DSDV?
- Give one advantage and one disadvantage of table-driven routing in WSNs.
- In a hybrid zone protocol, what is the effect of increasing the zone radius r on proactive and reactive costs? Answers: 1) Prevents routing loops and allows choosing fresher routes (freshness ordering). 2) Advantage: low route-setup latency (routes readily available); Disadvantage: continuous control overhead wasting energy. 3) Proactive cost increases (larger area to maintain), reactive cost decreases (fewer remote discoveries); trade-off depends on traffic locality.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?