Routing in Ad Hoc Wireless Networks
PROF. MICHAEL TSAI
2011/12/15
Ad Hoc Wireless Networks
• No base station or access point to relay the packets
• Relaying is necessary to send information to destinations out of our range
• Initial application: military usage
Ad hoc Network
Infrastructure-based Network
Why do we need new protocols?
• No centralized control
• No dedicated routers
• Unpredictable network topology changes
• Time-variant wireless channel
• Link breakage is common in wireless network Connectivity problem
• Links are not always bidirectional and/or symmetric
• Power Limitation
Conventional Routing Protocols
• Not designed for highly dynamic and low bandwidth networks
• Loop formation when topology changes
• Flooding causes high control overhead
(e.g., Link State)
Count-to-infinity Problem
A
B
C
Dest Cost Next Hop
A 1 A
C 1 C
Dest Cost Next Hop
A 2 B
B 1 B
Count-to-infinity Problem
A
B
C
Dest Cost Next Hop
A Infinity Null
C 1 C
Dest Cost Next Hop
A 2 B
B 1 B
Count-to-infinity Problem
A
B
C
Dest Cost Next Hop
A 3 C
C 1 C
Dest Cost Next Hop
A 2 B
B 1 B
Routing update
Count-to-infinity Problem
A
B
C
Dest Cost Next Hop
A 3 C
C 1 C
Dest Cost Next Hop
A 4 B
B 1 B
Routing update
This continues until the cost reaches infinity (unreachable).
During the process, the packets destined for A will bounce
back and forth between B and C
S
n4
n2
D1
n8
n7
n6
D2 n3
n5
Existing Routing Protocols
S
n4
n2
n3
D
S
n4
n2
n3
D
Table-Driven:
•S and all other nodes maintain full routing information
•Require periodic table update
Hybrid Scheme
•Network is divided into multiple zones
•Use Table-Driven within the zone
•Demand-Driven across the zones through boundary nodes
Demand-Driven
•Route is discovered when S wants to talk to D
•A Route only needs to be maintained for as long as S and D are still talking
•EX: Dynamic Source Routing (DSR)
Zone A
Zone B
Proactive vs. Reactive Routing
• Proactive
• Table driven
• Rely on periodic update to keep track of the topology change
• No latency in route discovery
• Need large storage space to keep information of the entire network
• A lot of routing
information may never be used
• Reactive
• On demand
• Route Discovery by local flood or gossiping
• Additional latency during route discovery
• Not appropriate for real-time communication
• Route maintenance
• Feedback from Link Level ACK
• Issue new route discovery when link breaks
Destination Sequenced Distance Vector
(DSDV)
Proactive Routing Protocols
• Each node advertises a monotonically increasing sequence number
• Each Route entry is tagged with a sequence number generated by destination to prevent loops (count-to-infinity problem)
• Sequence number indicates the “freshness” of a route
• Routes with more recent sequence numbers are preferred for packet forwarding
• If same sequence number, one having smallest metric is used
C. E. Perkins and P. Bhagwat. “Highly dynamic Destination Sequenced Distance-Vector routing (DSDV) for mobile computers”, In Proceedings of the SIGCOMM ’94
Conference on Communication Architecture, Protocols and Applications, pages 234-244, August ‘94.
Example: DSDV
• For each reachable node in the network the routing entry contains:
• Destination Address
• Next Hop
• Distance (Metric)
• Sequence Number
Destination Next Hop Distance Sequence Number
A A 0 S205_A
B B 1 S334_B
C C 1 S198_C
D D 1 S567_D
E D 2 S767_E
F D 2 S45_F
Count-to-infinity Problem
A
B
C
Dest Cost Next Hop
Seq. #
A 1 A 1
C 1 C 1
Dest Cost Next Hop
Seq. #
B 1 B 1
C 1 C 1
Count-to-infinity Problem
A
B
C
Dest Cost Next Hop
Seq. #
A Infinity Null 2
C 1 C 1
Dest Cost Next Hop
Seq. #
B 1 B 1
C 1 C 1
Sequence Number:
• Even numbers for link updates from neighbor nodes
• Odd numbers for link updates from the
destination itself
Count-to-infinity Problem
A
B
C
Dest Cost Next Hop
Seq. #
A Infinity Null 2
C 1 C 1
Dest Cost Next Hop
Seq. #
A 2 B 1
C 1 C 1
Routing update
C’s routing update will not change
B’s routing table since the sequence
number is smaller (older).
DSDV: Topology changes
• Assign a metric of ∞ to
• A broken link
• Any route through a hop with a broken link
• “∞ routes” are assigned new sequence numbers by any host and immediately broadcast via a triggered update
• If a node has an equal/later sequence number with a
finite metric for an “∞ route”, a route update is
triggered
Dynamic Source Routing [DSR]
Route Discovery
• Source node
• Broadcasts the Route Request (RREQ) <id, target>
• Intermediate node
• Discards if the id has been seen before, or node is in the route record (header of RREQ)
• Else append address in the route record and rebroadcast
• Destination Node
• Return Route Reply (RREP)
• Use previously cached route to source node
• Call Route Discovery for source node, with route reply piggy backed
• Use reverse sequence of Route Record, in case of bidirectional links
D. B. Johnson, D.A. Maltz, and J. Broch. “DSR: The Dynamic Source Routing Protocol for Multi-Hop Wireless Ad Hoc Networks”, Ad Hoc Networking, pages 139-172, 2001.
A
B C
D
E F
G
A
H
A,B
A,B,F
A
B C
D
E F
G
A,B,F,E
H
A,B,F,E
A,B,F,E
DSR: Route Maintenance
• Monitoring the route
• Passive Acknowledgement – overhearing the next-hop node sending packet to its next-hop
• Set a bit in packet to request explicit next hop acknowledgement
• Route Error
• Rely on data link layer to report the broken links;
• Notify source of the broken link via Route Error (RERR)
• Source truncates all routes which use nodes mentioned in RERR
• Initiate new route discovery
A
B
E F
F transmits the packet I just sent to her. That means she
received my packet correctly.
A
B
E
F RERR
RERR
DSR: Optimizations for efficiency
• Use cached entries to create RREP at intermediate node
• Promiscuous mode to add more routes
• Caching overheard RREQ/RREP
• Use hop based delays to prevent RREP storms
• A lot of neighbors know the route to target and attempt to send RREP in response to RREQ
• Delay RREP for a period d = H x (h – 1 + r)
• r : random number between 0 and 1
• H : small constant delay
• h : number of hops to source from that node
I heard A said B-C-D
G H
I’m 4-hop away from
D
I’m 2-hop away from D Where is D ?
Expanding Ring Search
• Route Request Hop Limit
• Use TTL in the packet header to specify the first ring
boundary
• RREQ is initially forwarded n times (n hops)
• If destination is not within n- hop
• Increase TTL to a larger value
Hi!
This is useful if destination is close to the source
Gossiping vs. Flooding
• Gossip-Based Routing
• Node forward packets with some probability pG < 1
• How good is it?
• 35% less overhead than flooding
• What determine P
G?
S
DGossip: Probabilistic Flooding
Z. Haas, J. Halpern and L. Li, Gossip-based ad hoc routing, in: IEEE INFOCOM (2002)
Network Connectivity
Network Connectivity
• Sub-Critical
• Low connectivity
• Mobile nodes are sparsely distributed in the network
• Performance is limited !!
• Super-Critical
• High connectivity region
• Most or all the nodes can communicate
Connectivity: Fraction of nodes that is connected to the network
Ad-Hoc On Demand Distance Vector Routing (AODV)
• Protocol overview - Pure on-demand protocol
• Node does not maintain knowledge of another node unless it communicates with it
• Routes discovered on as-needed basis and maintained only as long as necessary
• Little or no periodic advertisement
C. E. Perkins and E. M. Royer. “Ad-Hoc On Demand Distance Vector Routing”, Proceedings of the IEEE Workshop on Mobile Computing Systems and Applications (WMCSA), pages 90-100, 1999.
AODV – Route Discovery
• Initiation
• Source node sends a Route Request (RREQ) when it has no information about destination node in its table
• RREQ contains
• Source and destination’s address and sequence number
• Broadcast id
• Hop count
• Source address and broadcast id uniquely identify RREQ
• Reverse Path Setup
• Neighbor increments hop count and broadcasts to neighbors
• Records address of neighbor which first sends the RREQ
AODV – Route Discovery
• Forward Path Setup
•
Intermediate node satisfies RREQ if
• Destination itself
• Has route entry in table with destination sequence number ≥ that given in RREQ
•
Unicasts RREP to neighbor which sent RREQ
• Source address
• Destination address and sequence number (updated)
• Hop count
• Lifetime
•
As RREP travels backwards, each node sets pointer to sending
node and updates destination sequence number and timeout
entry for source and destination routes
AODV – Route Discovery
• Other nodes
• RREQ times out : Route Request Expiration Timer
• Deletes corresponding pointers
• More than one RREP received
• One with greater destination number
• Lesser hop count
• Source node starts transmission - updates if a better RREP is received
C. E. Perkins and E. M. Royer. “Ad-Hoc On Demand Distance Vector Routing”, Proceedings of the IEEE Workshop on Mobile Computing Systems and Applications (WMCSA), pages 90-100, 1999.
AODV – Route Maintenance
• Nodes send hello message if it has not sent a packet in
hello_interval• Failing to receive allowed_hello_loss packets consecutively
means link is broken• In case of broken link
• unsolicited RERR sent to affected source node
• Source initiates new RREQ
• Sequence number updated
• Hop count set =
• Route Caching Timeout after the route is considered invalid
• Optional* AODV-LL uses link layer ACK instead of hello messages
Link Quality Metrics
• The protocol chooses the route with the smallest hop count
Long hops will be included
• Long hops usually have lower SNR high PER retransmission!
• Original thought: lower hop count = lower bandwidth usage
• New thought: retransmission means wasted bandwidth
A
B C
D E
(A,E,D), hop count=2
(A,B,C,D), hop count=3
SNR=3
SNR=15 SNR=15
SNR=15 SNR=2
Link Quality Metrics
• Instead of using hop count only, we need to take “link quality” into account!
• What is a good metric for link quality?
• RSSI (representing SNR)
• ETX (Expected Transmission Count)
• Then we combine hop count + link quality to choose
an optimal route
Minimize total transmissions per packet (ETX, Expected Transmission Count)
Example: ETX
Link throughput 1/ Link ETX
Delivery Ratio 100%
50%
33%
Throughput 100%
50%
33%
Link ETX 1
2
3
Measuring delivery ratios
• Each node broadcasts small link probes (134 bytes), once per second
• Nodes remember probes received over past 10 seconds
• Reverse delivery ratios estimated as
r
rev pkts received / pkts sent
• Forward delivery ratios obtained from neighbors (piggybacked
on probes)
Route ETX
Route ETX 1
2 2 3
Route ETX = Sum of link ETXs
5
Throughput 100%
50%
50%
33%
20%
Example: SNR-based Metrics
• For each link (each of a node’s neighbor), maintain a “expected”
SNR value.
• This is to eliminate the small fading effects in SNR
• Each time receiving a packet, calculate:
𝑺𝑺𝑵𝑹
𝒊= 𝜶 × 𝑺𝑵𝑹 + 𝟏 − 𝜶 × 𝑺𝑺𝑵𝑹
𝒊−𝟏• SNR: SNR value of a newly received packet
• 𝑆𝑆𝑁𝑅𝑖−1: old SSNR value before receiving the packet
• 𝑆𝑆𝑁𝑅𝑖: new SSNR value
• 𝛼: a sensitivity parameter. 0 < 𝛼 ≤ 1.
• Then set a threshold to classify the links into good and bad links
• New route discovery process:
• First try to discover routes consists of only good links
• If no route can be found, then relax the condition to include bad links as well.
References for link quality aware routing metrics
• D. Couto, D. Aguayo, J. Bicket, and R. Morris, “A high-throughput path metric for multi-hop wireless routing,” in Proc. ACM Intern.
Conf. on Mobile Comput. and Networking (MOBICOM), San Diego, CA, USA, September 2003, pp. 134–146.
• H.-M. Tsai, N. Wisitpongphan, and O. K. Tonguz, “Link-quality aware ad hoc on-demand distance vector routing protocol,” in Proc. IEEE Wireless Pervasive Computing, January 2006, pp. 6–.
• R. Dube, C. D. Rais, K. Y. Wang, and S. K. Tripathi, “Signal stability- based adaptive routing (SSA) for ad hoc mobile networks,” IEEE Wireless Personal Communications, vol. 4, no. 1, pp. 36–45, February 1997.
• C. Toh, “Associativity-based routing for ad hoc mobile network,” J.
Wireless Personal Commun., vol. 4, no. 2, pp. 103–139, March 1997.