Issues: Routing in Ad-hoc Networks Mobility Bandwidth constraint Error-prone and shared channel Location-dependent contention Other resource constraints 1 Issues: Multicast routing ... Efficient group management Robustness Efficiency Control overhead Quality of service Scalability Security 2 3 Unicast Routing Protocols Many protocols have been proposed Some have been invented specifically for MANET Others are adapted from previously proposed protocols for wired networks No single protocol works well in all environments some attempts to develop adaptive protocols 4 The ideal protocol (p303) Distributed Localized (and scalable) Adaptive Minimal maintenance and overhead Loop free (and free from stale routes) Balance scares resources usage against performance (and/or QoS) 5 Routing protocol classification Route information mechanism Proactive (table-driven) Reactive (demand-driven) Hybrid Temporal information Past vs. Future information Routing toplogy Flat vs. hierarchical Specific resources Geography or Power 6 Routing protocols for wireless ad hoc networks Sensor networks Mobile ad hoc networks Response time, bandwidth Proactive protocols Optimized LinkDestination-Sequenced State Routing Distance-Vector (DSDV) (OLSR) Energy Reactive protocols Dynamic Ad Hoc On-Demand Source Distance-Vector Routing (AODV) (DSR) Geography- Cluster-based based routing (or hierarchical) routing GPSR 7 Routing protocol classification Route information mechanism Proactive (table-driven) Reactive (demand-driven) Hybrid Temporal information Past vs. Future information Routing toplogy Flat vs. hierarchical Specific resources Geography or Power 8 Route update mechanism Proactive (or table-drive) protocols Determine routes independent of traffic pattern Traditional link-state and distance-vector routing protocols • Destination Sequenced Distance Vector (DSDV) • Optimized Link State Routing (OLSR) Reactive (or demand-drive) protocols Route is only determined when actually needed Protocol operates on demand • Dynamic Source Routing (DSR) • Ad hoc On-demand Distance Vector (AODV) • Temporally Ordered Routing Algorithm (TORA) Hybrid Protocols Combine these behaviors (e.g., table in limited zone, and demand drive otherwise) • Zone Routing Protocol (ZRP) • Greedy Perimeter Stateless Routing (GPSR) 9 10 Some general trade-offs Latency of route discovery Overhead of route discovery/maintenance 11 Some general trade-offs Latency of route discovery Proactive protocols may have lower latency • Routes are maintained at all times Reactive protocols may have higher latency • Route from X to Y will be found only when X attempts to send to Y Overhead of route discovery/maintenance 12 Some general trade-offs Latency of route discovery Proactive protocols may have lower latency • Routes are maintained at all times Reactive protocols may have higher latency • Route from X to Y will be found only when X attempts to send to Y Overhead of route discovery/maintenance Proactive protocols can (but not necessarily) result in higher overhead due to continuous route updating Reactive protocols may have lower overhead • Routes are determined only if needed 13 Some general trade-offs Latency of route discovery Proactive protocols may have lower latency • Routes are maintained at all times Reactive protocols may have higher latency • Route from X to Y will be found only when X attempts to send to Y Overhead of route discovery/maintenance Proactive protocols can (but not necessarily) result in higher overhead due to continuous route updating Reactive protocols may have lower overhead • Routes are determined only if needed Which approach achieves a better trade-off depends on the traffic and mobility patterns 14 15 Ad hoc networks: terminology Broadcast: message sent to all neighbors within range Flooding: message sent to all nodes in the network by neighbors forwarding message to their neighbors etc. Different from wired network! 16 17 Reactive protocols – DSR In a reactive protocol, how to forward a packet to destination? Initially, no information about next hop is available at all 18 Reactive protocols – DSR In a reactive protocol, how to forward a packet to destination? Initially, no information about next hop is available at all One (only?) possible recourse: Send packet to all neighbors – flood the network 19 Reactive protocols – DSR In a reactive protocol, how to forward a packet to destination? Initially, no information about next hop is available at all One (only?) possible recourse: Send packet to all neighbors – flood the network Hope: At some point, packet will reach destination and an answer is sent pack – use this answer for backward learning the route from destination to source 20 Reactive protocols – DSR In a reactive protocol, how to forward a packet to destination? Initially, no information about next hop is available at all One (only?) possible recourse: Send packet to all neighbors – flood the network Hope: At some point, packet will reach destination and an answer is sent pack – use this answer for backward learning the route from destination to source Practically: Dynamic Source Routing (DSR) Use separate route request/route reply packets to discover route • Data packets only sent once route has been established • Discovery packets smaller than data packets Store routing information in the discovery packets 21 Dynamic Source Routing (DSR) [Johnson96] When node S wants to send a packet to node D, but does not know a route to D, node S initiates a route discovery 22 Dynamic Source Routing (DSR) [Johnson96] When node S wants to send a packet to node D, but does not know a route to D, node S initiates a route discovery Source node S floods Route Request (RREQ) Each node appends own identifier when forwarding RREQ 23 DSR: Route discovery (1) Q F A E S B G R C K H D J P M I L N 24 DSR: Route discovery (2) Q F A S (S) E B G R C K H D J P M I L N 25 DSR: Route discovery (3) (S,A) Q A E S B F (S,E) G R C K H D J P M I L N 26 DSR: Route discovery (4) Q F A E S B K H G R (S,E,G) D J P M I L C (S,B,C) N 27 DSR: Route discovery (5) Q F A H E S B G R C (S,A,F,H) J K (S,E,G,J) D P M I L N 28 DSR: Route discovery (6) Q F A E S B G R C K H (S,A,F,H,K) D J P M I L N 29 DSR: Route discovery (7) Q F A E S B G R C K H D J P (S,A,F,H,K,P) M I L N 30 Route Discovery in DSR Destination D on receiving the first RREQ, sends a Route Reply (RREP) RREP is sent on a route obtained by reversing the route appended to received RREQ RREP includes the route from S to D on which RREQ was received by node D 31 DSR: Route discovery (8) Q F A E S B G R C K H P D RREP(S,E,G,J,D) J M I L N 32 DSR: RREP Route reply by reversing the route (as illustrated) works only if all the links along the route are bidirectional If unidirectional links are allowed, then RREP may need a reverse route discovery from D to S Note: IEEE 802.11 assumes that links are bidirectional (since ACKs are used) 33 DSR: RREP (more text) Route Reply can be sent by reversing the route in Route Request (RREQ) only if links are guaranteed to be bi-directional To ensure this, RREQ should be forwarded only if it received on a link that is known to be bi-directional If unidirectional (asymmetric) links are allowed, then RREP may need a route discovery for S from node D Unless node D already knows a route to node S If a route discovery is initiated by D for a route to S, then the Route Reply is piggybacked on the Route Request from D. If IEEE 802.11 MAC is used to send data, then links have to be bi-directional (since Ack is used) 34 Dynamic Source Routing (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 35 DSR: Data delivery Q F A DATA(S,E,G,J,D) E S B G R C K H D J P M I L N 36 37 Dynamic source routing (DSR) Reactive routing protocol 2 phases, operating both on demand: Route discovery • Used only when source S attempts to send a packet to destination D • Based on flooding of Route Requests (RREQ) and replying with Route Reply (RREP) Route maintenance • Makes S able to detect, while using a source route to D, if it can no longer use its route (because a link along that route no longer works) 38 Dynamic source routing (DSR) Reactive routing protocol 2 phases, operating both on demand: Route discovery • Used only when source S attempts to send a packet to destination D • Based on flooding of Route Requests (RREQ) and replying with Route Reply (RREP) Route maintenance • Makes S able to detect, while using a source route to D, if it can no longer use its route (because a link along that route no longer works) 39 DSR: Data delivery Q F A DATA(S,E,G,J,D) E S B G R C K H D J P M I L N 40 DSR: Route maintenance (1) Q F A DATA(S,E,G,J,D) E S B G R C K H X D J P M I L N 41 DSR: Route maintenance (2) Q F A E S B RERR(G-J) G R C K H X D J P M I L N When receiving the Route Error message (RERR), S removes the broken link from its cache. It then tries another route stored in its cache; if none, it initializes a new route discovery 42 43 DSR modifications, extensions 44 DSR modifications, extensions Intermediate nodes may send route replies in case they already know a route Problem: stale route caches Promiscuous operation of radio devices – nodes can learn about topology by listening to control messages Random delays for generating route replies Many nodes might know an answer – reply storms NOT necessary for medium access – MAC should take care of it Salvaging/local repair When an error is detected, usually sender times out and constructs entire route anew Instead: try to locally change the source-designated route Cache management mechanisms To remove stale cache entries quickly Fixed or adaptive lifetime, cache removal messages, … 45 DSR: Optimization of route discovery: route caching Principle: each node caches a new route it learns by any means … When node S finds route [S,E,F,J,D] to node D, node S also learns route [S,E,F] to node F When node K receives Route Request [S,C,G] destined for node D, node K learns route [K,G,C,S] to node S When node F forwards Route Reply RREP [S,E,F,J,D], node F learns route [F,J,D] to node D When node E forwards Data [S,E,F,J,D] it learns route [E,F,J,D] to node D A node may also learn a route when it overhears Data packets 46 Use of Route Caching When node S learns that a route to node D is broken, it uses another route from its local cache, if such a route to D exists in its cache. Otherwise, node S initiates route discovery by sending a route request Node X on receiving a Route Request for some node D can send a Route Reply if node X knows a route to node D Use of route cache can speed up route discovery reduce propagation of route requests However, route caching has its downside stale caches can severely hamper the performance of the network 47 DSR: Strengths Routes are set up and maintained only between nodes who need to communicate Route caching can further reduce the effort of route discovery A single route discovery may provide several routes to the destination 48 DSR: Weaknesses Route requests tend to flood the network and generally reach all the nodes of the network Because of source routing, the packet header size grows with the route length Risk of many collisions between route requests by neighboring nodes need for random delays before forwarding RREQ Similar problem for the RREP (Route Reply storm problem), in case links are not bidirectional Note: Location-aided routing may help reducing the number of useless control messages 49 50 Destination Sequenced Distance Vector Algorithm (DSDV) DSDV is based on idea of classical BellmanFord Routing Algorithm Each node maintains a routing table listing all available destinations. The attributes of each destination are the next hop, the number of hops to reach to the destination, and a sequence number, which is originated by the destination node. Both periodic and triggered routing updates to maintain table 51 Destination Sequenced Distance Vector Algorithm (DSDV) 1. 2. Based on Bellman-Ford Next Hop Routing. Each Node Maintains Tables for : A. Next Hop on Path B. Distance (in hops) to destination. C. Sequence Number ( keep current route) 3. Nodes Exchange Updates With Neighbours • Full Routing Updates Incremental Updates 52 Problems of Distance Vector Pro-active routing based on Distance Vector Topology changes are slowly propagated Count-to-infinity problem Moving nodes create confusion: they carry connectivity data which are wrong at new place Table exchange eats bandwidth 53 DSDV How DSDV addresses the problems? Tagging of distance information: The destination issues increasing sequence number Other nodes can discard old/duplicate updates Changes are not immediately propagated Wait some setting time Incremental updates instead of full table exchange 54 55 Some general trade-offs Latency of route discovery Overhead of route discovery/maintenance 56 Some general trade-offs Latency of route discovery Proactive protocols may have lower latency • Routes are maintained at all times Reactive protocols may have higher latency • Route from X to Y will be found only when X attempts to send to Y Overhead of route discovery/maintenance 57 Some general trade-offs Latency of route discovery Proactive protocols may have lower latency • Routes are maintained at all times Reactive protocols may have higher latency • Route from X to Y will be found only when X attempts to send to Y Overhead of route discovery/maintenance Proactive protocols can (but not necessarily) result in higher overhead due to continuous route updating Reactive protocols may have lower overhead • Routes are determined only if needed 58 Some general trade-offs Latency of route discovery Proactive protocols may have lower latency • Routes are maintained at all times Reactive protocols may have higher latency • Route from X to Y will be found only when X attempts to send to Y Overhead of route discovery/maintenance Proactive protocols can (but not necessarily) result in higher overhead due to continuous route updating Reactive protocols may have lower overhead • Routes are determined only if needed Which approach achieves a better trade-off depends on the traffic and mobility patterns 59 60 GPSR Separate slides … 61 62 63 64 More stuff … 65 Route Reply in DSR Y Z S E RREP [S,E,F,J,D] F B C M J A L G H K I D N Represents RREP control message 66 Data Delivery in DSR Y DATA [S,E,F,J,D] S Z E F B C M J A L G H K I D N Packet header size grows with route length 67 Use of Route Caching [S,E,F,J,D] [E,F,J,D] S [F,J,D],[F,E,S] E F B [J,F,E,S] C J [C,S] A M L G H [G,C,S] D K I N Z [P,Q,R] Represents cached route at a node (DSR maintains the cached routes in a tree format) 68 Use of Route Caching: Can Speed up Route Discovery [S,E,F,J,D] [E,F,J,D] S [F,J,D],[F,E,S] E F B C [G,C,S] [C,S] A [J,F,E,S] M J L G H I [K,G,C,S] K When node Z sends a route request for node C, node K sends back a route reply [Z,K,G,C] to node Z using a locally cached route D RREP N RREQ Z 69 Use of Route Caching: Can Reduce Propagation of Route Requests [S,E,F,J,D] Y [E,F,J,D] S [F,J,D],[F,E,S] E F B C [G,C,S] [C,S] A [J,F,E,S] M J L G H I [K,G,C,S] K D RREP N RREQ Z Assume that there is no link between D and Z. Route Reply (RREP) from node K limits flooding of RREQ. In general, the reduction may be less dramatic. 70 Route Error (RERR) Y RERR [J-D] S Z E F B C M J A L G H K I D N J sends a route error to S along route J-F-E-S when its attempt to forward the data packet S (with route SEFJD) on J-D fails Nodes hearing RERR update their route cache to remove link J-D 71 Ad Hoc On-Demand Distance Vector Routing (AODV) As it is based on source routing, DSR includes source routes in data packet headers Large packet headers in DSR risk of poor performance if the number of hops is high AODV uses a route discovery mechanism similar to DSR, but it maintains routing tables at the nodes AODV ages the routes and maintains a hop count AODV assumes that all links are bi-directional 72 AODV 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 AODV assumes symmetric (bi-directional) links When the intended 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 73 Reactive protocols – AODV Ad hoc On Demand Distance Vector routing (AODV) Very popular routing protocol Essentially same basic idea as DSR for discovery procedure Nodes maintain routing tables instead of source routing Sequence numbers added to handle stale caches Nodes remember from where a packet came and populate routing tables with that information 74 Ad Hoc On-Demand Distance Vector Routing (AODV) [Perkins99Wmcsa] DSR includes source routes in packet headers Resulting large headers can sometimes degrade performance particularly when data contents of a packet are small AODV attempts to improve on DSR by maintaining routing tables at the nodes, so that data packets do not have to contain routes AODV retains the desirable feature of DSR that routes are maintained only between nodes which need to communicate 75 AODV : Route discovery (1) Q F A E S B G R C K H D J P M I L N 76 AODV : Route discovery (2) Q F A E S B G R C : Route Request (RREQ) K H D J P M I L N Note: if one of the intermediate nodes (e.g., knows a route to D, it responds immediately 77 t AODV : Route discovery (3) Q F A E S B G R C K H D J P M I L N : represents a link on the reverse path 78 AODV : Route discovery (4) Q F A E S B G R C K H D J P M I L N 79 AODV : Route discovery (5) Q F A E S B G R C K H D J P M I L N 80 AODV : Route discovery (6) Q F A E S B G R C K H D J P M I L N 81 AODV : Route discovery (7) Q F A E S B G R C K H D J P M I L N 82 AODV : Route reply and setup of the forward path Q F A E S B G R C K H D J P M I L N : Link over which the RREP is transmitted : Forward path 83 Route reply in AODV In case it knows a path more recent than the one previously known to sender S, an intermediate node may also send a route reply (RREP) The freshness of a path is assessed by means of destination sequence numbers Both reverse and forward paths are purged at the expiration of appropriately chosen timeout intervals 84 AODV : Data delivery Q F A S Data E B G R C K H D J P M I L N The route is not included in the packet header 85 AODV packets ROUTE REQUEST ROUTE REPLY 86 AODV : Route maintenance (1) Q F A S Data E B G R C K H X D J P M I L N 87 AODV : Route maintenance (2) Q F A RERR(G-J) E G S B R C K H X D J P M I L N When receiving the Route Error message (RERR), S removes the broken link from its cache. It then initializes a new route discovery. 88 AODV: Route maintenance 89 AODV: Destination sequence numbers If the destination responds to RREP, it places its current sequence number in the packet If an intermediate node responds, it places its record of the destination’s sequence number in the packet Purpose of sequence numbers: Avoid using stale information about routes Avoid loops (no source routing!) 90 1. AODV : Avoiding the usage of … Dtables S stale routing … S A A 2. DSN(D) = 5 DSN(D) = 5 B B DSN(D) = 8 : Forward path 3. S A RREQ B D … D 4. S DSN(D) = 5 RREP B DSN(D) = 8 D A … DSN(D) = 5 DSN(D) = 8 91 AODV : Avoiding loops A B S X D C : Forward pat • Assume there is a route between A and D; link S-D breaks; assume A is not aware of this, e.g RERR sent by S is lost • Assume now S wants to send to D. It performs a RREQ, which can be received by A via path S • Node A will reply since it knows a route to D via node B • This would result in a loop (S-C-A-B-S) • The presence of sequence numbers will let S discover that the routing information from A is • Principle: when S discovers that link S-D is broken, it increments its local value of DSN(D). In the new local value will be greater than the one stored by A. 92 AODV (unicast) : Conclusion Nodes maintain routing information only for routes that are in active use Unused routes expire even when the topology does not change Each node maintains at most one next-hop per destination Many comparisons with DSR (via simulation) have been performed no clear conclusion so far 93 Flooding of Control Packets How to reduce the scope of the route request flood ? Location Aided Routing LAR [Ko98Mobicom] Query localization [Castaneda99Mobicom] How to reduce redundant broadcasts ? The Broadcast Storm Problem [Ni99Mobicom] 94 Location Aided Routing (LAR) Advantages reduces the scope of route request flood reduces overhead of route discovery Disadvantages Nodes need to know their physical locations Does not take into account possible existence of obstructions for radio transmissions 95 Geographic Distance Routing (GEDIR) [Lin98] Location of the destination node is assumed known Each node knows location of its neighbors Each node forwards a packet to its neighbor closest to the destination Route taken from S to D shown below H A S D B E F C G obstruction 96 Geographic Distance Routing (GEDIR) [Stojmenovic99] The algorithm terminates when same edge traversed twice consecutively Algorithm fails to route from S to E Node G is the neighbor of C who is closest from destination E, but C does not have a route to E H A S D B E F C G obstruction 97 Routing with Guaranteed Delivery [Bose99Dialm] Improves on GEDIR [Lin98] Guarantees delivery (using location information) provided that a path exists from source to destination Routes around obstacles if necessary GPSR: A similar idea also appears in [Karp00Mobicom] 98 QoS: Network layer solutions MAC protocols: bandwidth reservation, real-time support only for link Network layer is host-to-host specific resource negotiation reservation reconfiguration QoS routing protocols search for routes with resources that satisfy QoS reqs find paths that consume minimum resources 99 QoS routing in ad-hoc networks 100 QoS-enabling routing protocols h Si = 1 (Li(m)), Li Additive metrics: Am = P Concave metrics: Cm = min(Li(m)), Li P Multiplicative metrics: Mm = h P i = 1(Li(m)), Li P Two examples follow: ticket-based and QoSenabled AODV 101 A distributed ticket-based QoS routing protocol for MANETs Chen and Nahrstedt (1999) Tolerates imprecise state information during QoS route computation Probes multiple paths in parallel, limited by tickets Optimality is explored Uses primary-backup-based fault tolerance to reduce service interruption 102 QoS-enabled AODV QoS extensions in routing table: Maximum delay Minimum available bandwidth List of sources requesting delay guarantees List of sources requesting bandwidth guarantess 103 QoS frameworks for MANETs Service model Routing protocol Resource reservation signaling Admission control Packet scheduling 104 QoS framework: Flexible QoS Model for Mobile ad-hoc networks (FQMM) 105