470 likes | 782 Views
multihop wireless networks (mobile) ad-hoc networks sensor networks mesh networks delay/disruption tolerant networks determine “good” path (sequence of wireless nodes) from source to destination “good” path: typically minimum cost path link cost: delay, congestion level, ….
E N D
multihop wireless networks (mobile) ad-hoc networks sensor networks mesh networks delay/disruption tolerant networks determine “good” path (sequence of wireless nodes) from source to destination “good” path: typically minimum cost path link cost: delay, congestion level, … Routing in wireless networks
dynamic topology node mobility frequent link up/down (transmission range) dynamic/poor link quality interference, node mobility, wireless nature network not always connected sometimes no path between two nodes new performance metrics energy consumption, route stability broadcast nature good and bad Unique challenges
reactive & proactive approaches being standardized optimization approach provably optimal properties routing for delay/disruption tolerant networks a different paradigm other approaches cross-layer design, network coding, … Approaches
Assumptions • Unicast • Symmetric network (no infrastructure) • Nodes have similar capabilities • Node can overhear neighboring nodes • Addressing given
Many protocols A lot are invented for MANET (mobile ad hoc networks) Proactive protocols Determine routes independent of traffic pattern Examples: traditional link-state and distance-vector routing protocols Reactive protocols Discover & maintain routes only if needed Hybrid protocols Reactive & proactive approaches
Reactive & proactive protocols • Reactive protocols • Dynamic Source Routing (DSR) [Johnson96] • Ad Hoc On-Demand Distance Vector Routing (AODV) [Perkins99Wmcsa] • Link reversal algorithm [Gafni81] • Proactive protocols • Optimized Link State Routing (OLSR) [Jacquet00ietf,Jacquet99Inria] • Destination-Sequenced Distance-Vector (DSDV) [Perkins94Sigcomm]
Dynamic Source Routing (DSR) • Reactive • On-demand route recovery • Only maintain active routes • Source routing • Source specifies routes
Basic operation • When S wants to send a packet to D, but does not know a route to D, S initiates a route discovery • Source node S floods Route Request (RREQ) • Each node appends own identifier when forwarding RREQ
Route discovery in DSR Y Z S E F B C M L J A G H D K I N Represents a node that has received RREQ for D from S
Route discovery in DSR Y Broadcast transmission Z [S] S E F B C M L J A G H D K I N Represents transmission of RREQ [X,Y] Represents list of identifiers appended to RREQ
Route discovery in DSR Y Z S [S,E] E F B C M L J A G [S,C] H D K I N • Node H receives packet RREQ from two neighbors: • potential for collision
Route discovery in DSR Y Z S E F [S,E,F] B C M L J A G H D K [S,C,G] I N • Node C receives RREQ from G and H, but does not forward • it again, because node C has already forwarded RREQ once
Route discovery in DSR Y Z S E F [S,E,F,J] B C M L J A G H D K I N [S,C,G,K] • Nodes J and K both broadcast RREQ to node D • Since nodes J and K are hidden from each other, their • transmissions may collide
Route discovery in DSR Y Z S E [S,E,F,J,M] F B C M L J A G H D K I N • Node D does not forward RREQ, because node D • is the intended target of the route discovery
Route reply in DSR • Destination D on receiving the first RREQ, sends a Route Reply (RREP) • Route of RREP • reversing the route in received RREQ • RREP includes the route from S to D on which RREQ was received by node D
Route reply in DSR Y Z S RREP [S,E,F,J,D] E F B C M L J A G H D K I N Represents RREP control message
Route reply in DSR • Reverse route assumes bi-directional links • To ensure this, node only forward RREQ if its link is bi-directional • If allow unidirectional (asymmetric) links, then may need a route discovery for S from node D • Unless node D already knows a route to node S • If discover route from D to S, Route Reply is piggybacked on Route Request from D.
Data delivery in DSR • Node S on receiving RREP, caches the route included in the RREP • When node S sends a data packet to D, the entire route is included in the packet header • hence the name source routing • Intermediate nodes use the source route included in a packet to determine to whom a packet should be forwarded
Data delivery in DSR Y Z DATA [S,E,F,J,D] S E F B C M L J A G H D K I N Packet header size grows with route length
When perform route discovery? • When S wants to send data to D, but does not know a valid route to D
DSR optimization: route caching • Each node caches a new route it learns by any means • S finds route [S,E,F,J,D] to D, S also learns route [S,E,F] to F • K receives Route Request [S,C,G], K learns route [K,G,C,S] to S • F forwards Route Reply [S,E,F,J,D], F learns route [F,J,D] to D • E forwards Data [S,E,F,J,D], E learns route [E,F,J,D] to D • node may also learn a route when overhears data packets
Using route cache • Discover route from S to D • Look up cache • If route broken, find another route from cache, or initiates route discovery • Node X receives a Route Request • Look up cache • if X knows a route, send a Route Reply • Using route cache • can speed up route discovery • can reduce propagation of route requests
Using route cache [S,E,F,J,D] [E,F,J,D] S E [F,J,D],[F,E,S] F B [J,F,E,S] C M L J A G [C,S] H D K [G,C,S] I N Z [P,Q,R] Represents cached route at a node (DSR maintains the cached routes in a tree format)
Route cache speeds up route discovery [S,E,F,J,D] [E,F,J,D] S E [F,J,D],[F,E,S] F B [J,F,E,S] C M L [G,C,S] J A G [C,S] H D K [K,G,C,S] I N RREP RREQ Z • Z sends a route request for C • K sends back a route reply [Z,K,G,C] to Z using a locally cached route
Route cache reduces propagation of route requests Y [S,E,F,J,D] [E,F,J,D] S E [F,J,D],[F,E,S] F B [J,F,E,S] C M L [G,C,S] J A G [C,S] H D K [K,G,C,S] I N RREP RREQ Z • Assume no link between D and Z. • Route Reply (RREP) from node K limits flooding of RREQ. • In general, the reduction may be less dramatic.
Route error (RERR) Y Z RERR [J-D] S E F B C M L J A G H D K I N • Link J-D fails • J sends a route error to S along route J-F-E-S • Nodes hearing RERR update their route cache to remove link J-D
Route caching: beware! • cached routes may become invalid • stale caches can adversely affect performance • sender may try several stale routes (obtained from local cache, or replied from cache by other nodes), before finding a good route • adverse impact on TCP [Holland99]
DSR advantages • Only maintain routes for nodes who need to communicate • reduces overhead of route maintenance • Route caching can further reduce route discovery overhead • Redundant routes • route discovery may yield many routes to destination (intermediate nodes reply from local caches)
DSR disadvantages • Packet header size grows with route length • Flood of route requests • collisions between route requests propagated by neighboring nodes • insert random delays before forwarding RREQ • contention when many route replies come back (when nodes reply using their local cache) • node does not send RREP if it hears another RREP with a shorter route • intermediate node may send Route Reply using a stale cached route • purge (potentially) invalid cached routes
Flooding of control packets • How to reduce the scope of the route request flood ? • LAR [Ko98Mobicom] • Query localization [Castaneda99Mobicom] • How to reduce redundant broadcasts ? • The Broadcast Storm Problem [Ni99Mobicom]
Ad Hoc On-Demand Distance Vector Routing (AODV) • Reactive • On-demand route recovery • Only maintain active routes • Intermediate nodes maintain routing tables • data packets do not have to contain routes
AODV basic operation • Route Requests (RREQ) are forwarded in a manner similar to DSR • When a node re-broadcasts a Route Request, it sets up a reverse path pointing towards the source • assumes symmetric (bi-directional) links • When destination receives a Route Request, it replies by sending a Route Reply • Route Reply travels along the reverse path set-up when Route Request is forwarded
Route requests in AODV (I) Y Z S E F B C M L J A G H D K I N Represents a node that has received RREQ for D from S
Route requests in AODV (II) Y Broadcast transmission Z S E F B C M L J A G H D K I N Represents transmission of RREQ
Route requests in AODV (III) Y Z S E F B C M L J A G H D K I N Represents links on Reverse Path
Reverse path setup in AODV (I) Y Z S E F B C M L J A G H D K I N • Node C receives RREQ from G and H, but does not forward • it again, because node C has already forwarded RREQ once
Reverse path setup in AODV (II) Y Z S E F B C M L J A G H D K I N
Reverse path setup in AODV (III) Y Z S E F B C M L J A G H D K I N • Node D does not forward RREQ, because node D • is the intended target of the RREQ
Route reply in AODV Y Z S E F B C M L J A G H D K I N Represents links on path taken by RREP
Forward path setup in AODV Y Z S E F B C M L J A G H D K I N Forward links are setup when RREP travels along the reverse path Represents a link on the forward path
Data delivery in AODV Y DATA Z S E F B C M L J A G H D K I N Routing table entries used to forward data packet. Route is not included in packet header.
Timeouts • A routing table entry maintaining a reverse path is purged after a timeout interval • timeout should be long enough to allow RREP to come back • A routing table entry maintaining a forward path is purged if not used for a active_route_timeout interval • even if the route may actually still be valid
Destination sequence number • specifies freshness of a route to destination • Contained in RREQ, RREP, routing table • To avoid using old routes • To prevent loops • Assume A does not know link C-D fails (because RERR sent by C is lost) • Now C performs a route discovery for D. Node A receives the RREQ (say, via path C-E-A) • Node A will reply since A knows a route to D via node B • Results in a loop (C-E-A-B-C ) A B C D E
Route error • X unable to forward packet P (from node S to node D) on link (X,Y) • generate a RERR message • RERR destination sequence number N: greater than previous destination sequence # • Upstream nodes propagate RERR • S receives RERR • initiates a new route discovery for D • RREQ destination sequence #: at least as large as N
Link failure detection • Hello messages: Neighboring nodes periodically exchange hello message • Absence of hello message: link failure • Alternatively approach • failure to receive several MAC-level ACK
Optimization: expanding ring search • Route Requests are initially sent with small Time-to-Live (TTL) field, to limit their propagation • DSR also includes a similar optimization • If no Route Reply is received, then larger TTL tried
Summary: AODV • Routes not included in packet headers • Nodes maintain routing tables • Only contain entries for active routes • Single path • each node maintains at most one next-hop per destination • DSR may maintain several routes for a single destination • Unused routes expire even if topology does not change