"Department of Computer Science Southern Illinois University Carbondale"
Department of Computer Science Southern Illinois University Carbondale CS441-Mobile & Wireless Computing Routing Protocols for MANETs Dr. Kemal Akkaya E-mail: email@example.com Adapted from: Northeastern University, Iowa State University, Intel Wireless Lectures Multi-hop Tutorial 610jw Class Kemal Akkaya Mobile & Wireless Computing 1 MANET vs. Traditional Routing (1) Every node is potentially a router in a MANET, while most nodes in traditional wired networks do not route packets Nodes transmit and receive their own packets and, also, forward packets for other nodes Topologies are dynamic in MANETs due to mobile nodes, but are relatively static in traditional networks Routing in MANETs must consider both Layer 3 and Layer 2 information, while traditional protocols rely on Layer 3 information only Link layer information can indicate connectivity and interference MANET topologies tend to have many more redundant links than traditional networks Kemal Akkaya Mobile & Wireless Computing 2 MANET vs. Traditional Routing (2) A MANET “router” typically has a single interface, while a traditional router has an interface for each network to which it connects Routed packet sent forward when transmitted, but also sent to previous transmitter Channel properties, including capacity and error rates, are relatively static in traditional networks, but may vary in MANETs Interference is an issue in MANETs, but not in traditional networks For example, a forwarded packet from B-to-C competes with new packets sent from A-to-B Channels can be asymmetric with some Layer 2 technologies Note that the IEEE 802.11 MAC assumes symmetric channels Kemal Akkaya Mobile & Wireless Computing 3 MANET vs. Traditional Routing (3) Power efficiency is an issue in MANETs, while it is normally not an issue in traditional networks MANETs may have gateways to fixed network, but are typically “stub networks,” while traditional networks can be stub networks or transit networks There is limited physical security in a MANET compared to a traditional network Increased possibility of eavesdropping, spoofing, and denial-of- security attacks Traditional routing protocols for wired networks do not work well in most MANETs MANETs are too dynamic Wireless links present problems of interference, limited capacity, etc. Kemal Akkaya Mobile & Wireless Computing 4 MANET Routing Need dynamic routing Frequent topological changes possible. Very different from dynamic routing in the Internet. Potential of network partitions. Routing overhead must be kept minimal Wireless low bandwidth Mobile low power Minimize # of routing control messages Minimize routing state at each node Nodes must determine how to forward packets Source routing: Routing decision is made at the sender Hop-by-hop routing: Routing decision is made at each intermediate node Difficult to achieve good performance Routes change over time due to node mobility Best to avoid long delays when first sending packets Best to reduce overhead of route discovery and maintenance Want to involve as many nodes as possible – to find better paths and reduce likelihood of partitions Kemal Akkaya Mobile & Wireless Computing 5 MANET Routing Approaches Proactive protocols Determine routes independent of traffic pattern Traditional link-state and distance-vector routing protocols are proactive Examples: DSDV (Dynamic sequenced distance-vector) OLSR (Optimized Link State Routing) Reactive protocols Maintain routes only if needed Examples: DSR (Dynamic source routing) AODV (On-demand distance vector) Hybrid protocols Combines both approaches Example: Zone Routing Protocol (intra-zone: proactive; inter-zone: on-demand) Kemal Akkaya Mobile & Wireless Computing 6 Protocol Types MANET Routing Protocols Proactive Reactive Hybrid Example: Example: OLSR AODV Example: ZRP Kemal Akkaya Mobile & Wireless Computing 7 Common Features MANET routing protocols must… Discover a path from source to destination Maintain that path (e.g., if an intermediate node moves and breaks the path) Define mechanisms to exchange routing information Reactive protocols Discover a path when a packet needs to be transmitted and no known path exists Attempt to alter the path when a routing failure occurs Reduce routing overhead Increased delay Proactive protocols Find paths, in advance, for all source-pair destinations Periodically exchange routing information to maintain paths Reduced delay, increased routing overhead Kemal Akkaya Mobile & Wireless Computing 8 IETF MANET Working Group http://www.ietf.org/html.charters/manet-charter.html “The purpose of this working group is to standardize IP routing protocol functionality suitable for wireless routing application within both static and dynamic topologies. The fundamental design issues are that the wireless link interfaces have some unique routing interface characteristics and that node topologies within a wireless routing region may experience increased dynamics, due to motion or other factors.” Kemal Akkaya Mobile & Wireless Computing 9 Dynamic Source Routing J. Broch, D. Johnson, and D. Maltz, “The dynamic source routing protocol for mobile ad hoc networks,” Internet-Draft Version 03, IETF, October 1999. When node S wants to send a packet to node D, but does not know a route to D, node S initiates a routing process DSR does not assume bi-directional links The protocol is able to adapt quickly to dynamic network topology Loop freedom is guaranteed Large overhead in data packets Flexible implementation Runs in three phases Route Discovery Route Reply Path Establishment Route Discovery Source node S floods Route Request (RREQ) Each node appends own identifier when forwarding RREQ Kemal Akkaya Mobile & Wireless Computing 10 Route Discovery: at source A A need to send to G Lookup Cache for route A to G Start Route no Buffer Route Discovery found? packet Protocol yes Continue normal yes wait processing Write route in packet header Route Packet Discovery in buffer? Send finished no packet to done next-hop Kemal Akkaya Mobile & Wireless Computing 11 Route Discovery: At an intermediate node <src,id> in Accept route Discard recently yes request seen route packet requests request list? no Host’s yes Discard address already in route partial request route no Append myAddr to no myAddr partial route =target yes Store <src,id> Send route in list reply packet Broadcast packet done Kemal Akkaya Mobile & Wireless Computing 12 Route Discovery in DSR RREQ Y Initiator ID Initiator seq# Z Target ID S E Partial route F B C M L J A G H D K I N Represents a node that has received RREQ for D from S Kemal Akkaya Mobile & Wireless Computing 13 Route Discovery in DSR Y Broadcast transmission [S] Z 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 Kemal Akkaya Mobile & Wireless Computing 14 Route Discovery in DSR Y Z S [S,E] E F B C M L J A [S,C] G H D K I N Kemal Akkaya Mobile & Wireless Computing 15 Route Discovery in DSR Y Z S E F [S,E,F,J] B C M L J A G H D K I [S,C,G,K] N Kemal Akkaya Mobile & Wireless Computing 16 Route Reply 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 Kemal Akkaya Mobile & Wireless Computing 17 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 Kemal Akkaya Mobile & Wireless Computing 18 Route Reply 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 Kemal Akkaya Mobile & Wireless Computing 19 Data Delivery in DSR Y DATA [S,E,F,J,D] Z S E F B C M L J A G H D K I N Packet header size grows with route length Kemal Akkaya Mobile & Wireless Computing 20 Route Maintenance Route maintenance performed only while route is in use Error detection: Monitors the validity of existing routes by passively listening to data packets transmitted at neighboring nodes Lower level acknowledgements If a packet cannot be forwarded, the upstream node will send a ROUTE ERROR message back to the sender The ROUTE ERROR message contains: Address of the node which could not forward the packet Which link is broken Kemal Akkaya Mobile & Wireless Computing 21 Example B RERR RERR G D G A Route Cache (A) G: A, B, D, G H G: A, C, E, H, G E F: B, C, F C F Kemal Akkaya Mobile & Wireless Computing 22 Optimizations Full use of route cache An intermediate (IN) node also has knowledge of the entire path when forwarding packets If an IN node receives a RREQ for a DST for which it caches the route, it can send RREP back to SRC without further propagating RREQ Further restriction: RREQ discarded if the partial route in the RREQ and cached route at the IN node contains a loop A slight reply delay is introduced to avoid simultaneous replies from multiple nodes Piggybacking on Route Discoveries Allowing some data to be piggybacked in RREQ packets Care taken in case the intermediate node with cached route to DST sends a RREP to SRC without further propagating the piggybacked RREQ Handling Errors Exponential backoff used in route discoveries when network is partitioned Use of promiscuous mode to eavesdrop on RERR packets sent to other nodes Kemal Akkaya Mobile & Wireless Computing 23 Conclusion Evaluation Results Higher nodal density leads to better overhead efficiency Overhead higher with more dynamic mobility Discovered route very close to optimal route length (if perfect routing info available) No direct relation between mobility and nodal density Pros Entirely on-demand, potentially zero control message overhead Trivially loop-free with source routing Conceptually supports unidirectional links as well as bidirectional links Cons High packet delays/jitters associated with on-demand routing Space overhead in packets and route caches Promiscuous mode operations consume excessive amount of power Kemal Akkaya Mobile & Wireless Computing 24 AODV AODV: Ad hoc On-demand Distance Vector routing protocol References C. E. Perkins, E. M. Belding-Royer, and S. R. Das, “Ad hoc On-Demand Distance Vector (AODV) Routing,” IETF Internet Draft, draft-ietf-manet-aodv- 13.txt, Feb. 17, 2003 (work in progress). C. E. Perkins and E. M. Royer, “Ad hoc On-Demand Distance Vector Routing,” Proceedings 2nd IEEE Workshop on Mobile Computing Systems and Applications, February 1999, pp. 90-100. Pure on-demand routing protocol A node does not perform route discovery or maintenance until it needs a route to another node or it offers its services as an intermediate node Nodes that are not on active paths do not maintain routing information and do not participate in routing table exchanges Uses a broadcast route discovery mechanism Uses hop-by-hop routing Routes are based on dynamic table entries maintained at intermediate nodes Similar to Dynamic Source Routing (DSR), but DSR uses source routing Kemal Akkaya Mobile & Wireless Computing 25 AODV Route Request Initiated when a node wants to communicate with another node, but does not have a route to that node Source node broadcasts a route request (RREQ) packet to its neighbors Sequence numbers are assigned to routes and routing table entries Used to supersede stale cached routing entries Source sequence indicates “freshness” of reverse route to the source Destination sequence number indicates freshness of route to the destination type flags resvd hopcnt (source_addr, broadcast_id) uniquely broadcast_id identifies the RREQ • broadcast_id is incremented for every dest_addr RREQ packet sent dest_sequence_# source_addr • Receivers can identify and discard duplicate RREQ packet source_sequence_# Kemal Akkaya Mobile & Wireless Computing 26 AODV Route Request (2) Every neighbor receives the RREQ and either … Returns a route reply (RREP) packet, or Forwards the RREQ to its neighbors If a node cannot respond to the RREQ The node increments the hop count The node saves information to implement a reverse path set up (AODV assumes symmetrical links) Neighbor that sent this RREQ packet Destination IP address Source IP address Broadcast ID Source node’s sequence number Expiration time for reverse path entry (to enable garbage collection) Kemal Akkaya Mobile & Wireless Computing 27 Route Table Management Dest Next Hops Seq# Exp. T Route Table entry 7 4 3 4 3 Destination 2 1 2 6 4 Next Hop Number of hops (metric) Sequence numbers of Destination Destination Active Neighbors for this route Expiration time for the route table entry Route expiration timer To Purge reverse path routing RREQ entries (not lie on the path from RREP the source to the destination, not used for some time) Time out source Kemal Akkaya Mobile & Wireless Computing 28 AODV: Use Sequence Numbers Each node X maintains a sequence number acts as a time stamp incremented every time X sends any message) Each route to X (at any node Y) also has X’s sequence number associated with it, which is Y’s latest knowledge of X’s sequence number. Sequence number signifies ‘freshness’ of the route – higher the number, more up to date is the route. S Y ? D Dest seq. no. = 10 Has a route to D with seq. no = 7 Seq. no. = 15 RREQ carries 10 Y does not reply, but forwards the RREQ Intermediate node replies with a route (instead of forwarding request) only if it has a route with a higher associated sequence number. Kemal Akkaya Mobile & Wireless Computing 29 AODV Example (1) 4 1 6 5 7 3 2 Node 1 needs to send a data packet to Node 7 Assume Node 6 knows a current route to Node 7 Assume that no other route information exists in the network (related to Node 7) Kemal Akkaya Mobile & Wireless Computing 30 AODV Example (2) 4 1 6 5 7 3 2 Node 1 sends a RREQ packet to its neighbors source_addr = 1 dest_addr = 7 broadcast_id = broadcast_id + 1 source_sequence_# = source_sequence_# + 1 dest_sequence_# = last dest_sequence_# for Node 7 Kemal Akkaya Mobile & Wireless Computing 31 AODV Example (3) 4 1 6 5 7 3 2 Nodes 2 and 4 verify that this is a new RREQ and that the source_sequence_# is not stale with respect to the reverse route to Node 1 Nodes 2 and 4 forward the RREQ Update source_sequence_# for Node 1 Increment hop_cnt in the RREQ packet Kemal Akkaya Mobile & Wireless Computing 32 AODV Example (4) 4 1 6 5 7 3 2 RREQ reaches Node 6, which knows a route to 7 Node 6 must verify that the destination sequence number is less than or equal to the destination sequence number it has recorded for Node 7 Nodes 3 and 5 will forward the RREQ packet, but the receivers recognize the packets as duplicates Kemal Akkaya Mobile & Wireless Computing 33 AODV Route Reply (1) If a node receives an RREQ packet and it has a current route to the target destination, then it unicasts a route reply packet (RREP) to the neighbor that sent the RREQ packet type flags rsvd prsz hopcnt dest_addr dest_sequence_# source_addr lifetime Kemal Akkaya Mobile & Wireless Computing 34 AODV Route Reply (2) Intermediate nodes propagate the first RREP for the source towards the source using cached reverse route entries Other RREP packets are discarded unless… dest_sequence_# number is higher than the previous, or destination_sequence_# is the same, but hop_cnt is smaller (i.e., there’s a better path) RREP eventually makes it to the source, which can use the neighbor sending the RREP as its next hop for sending to the destination Cached reverse routes will timeout in nodes not seeing a RREP packet Kemal Akkaya Mobile & Wireless Computing 35 AODV Example (5) 4 1 6 5 7 3 2 Node 6 knows a route to Node 7 and sends an RREP to Node 4 source_addr = 1 dest_addr = 7 dest_sequence_# = maximum(own sequence number, dest_sequence_# in RREQ) hop_cnt = 1 Kemal Akkaya Mobile & Wireless Computing 36 AODV Example (6) 4 1 6 5 7 3 2 Node 4 verifies that this is a new route reply (the case here) or one that has a lower hop count and, if so, propagates the RREP packet to Node 1 Increments hop_cnt in the RREP packet Kemal Akkaya Mobile & Wireless Computing 37 AODV Example (7) Dest Next Hops 4 1 6 7 4 3 5 7 3 2 Node 1 now has a route to Node 7 in three hops and can use it immediately to send data packets Note that the first data packet that prompted path discovery has been delayed until the first RREP was returned Kemal Akkaya Mobile & Wireless Computing 38 AODV Route Maintenance Route changes can be detected by… Failure of periodic HELLO packets Failure or disconnect indication from the link level Failure of transmission of a packet to the next hop (can detect by listening for the retransmission if it is not the final destination) The upstream (toward the source) node detecting a failure propagates an route error (RERR) packet with a new destination sequence number and a hop count of infinity (unreachable) The source (or another node on the path) can rebuild a path by sending a RREQ packet Kemal Akkaya Mobile & Wireless Computing 39 AODV Example (8) 4 1 6 5 7 3 2 7 Assume that Node 7 moves and link 6-7 breaks Node 6 issues an RERR packet indicating the broken path The RERR propagates back to Node 1 Node 1 can discover a new route Kemal Akkaya Mobile & Wireless Computing 40 Summary: AODV At most one route per destination maintained at each node After link break, all routes using the failed link are erased. Not the case in DSR (multiple routes) Expiration based on timeouts. No expiration timer in DSR Use of sequence numbers to prevent loops and ensure freshness of the routes. Optimizations Routing tables instead of storing full routes. Control flooding (incrementally increase ‘region’) Ring based approach Similar Performance with DSR Works well with large networks (around 1000 nodes) DSR is for small networks (at most ~200 nodes) Kemal Akkaya Mobile & Wireless Computing 41 Proactive Protocols Different than Reactive Protocols Traditional distributed shortest path routing protocols link-state or distance-vector protocol Continuously update the “reachability” information at all the network nodes Lower route request latency and higher overhead DSDV is the best example Destination Sequence Distance Vector Routing Proactive Table-Driven C. E. Perkins and P. Bhagwat, “Highly dynamic DestinationSequenced Distance-Vector routing (DSDV) for mobile computers”, In Proceedings of third Conference on Communications Architecture, Protocols and Applications (SIGCOMM 94), August 1994 Kemal Akkaya Mobile & Wireless Computing 42 DSDV Each node maintains its own sequences number Updates (increments) at each change in neighborhood information Used for loop freedom Each node maintains routing table with entry for each node in the network Shortest path Kemal Akkaya Mobile & Wireless Computing 43 Example of Routing Table in DSDV Kemal Akkaya Mobile & Wireless Computing 44 DSDV --- full dump Full Dumps Carry all routing table information Transmitted relatively infrequently Incremental updates Carry only information changed since last full dump Fits within one network protocol data unit If can’t, send full dump Kemal Akkaya Mobile & Wireless Computing 45 DSDV --- link additions When A joins network Node A transmits routing table: <A, 101, 0> Node B receives transmission, inserts <A, 101, A, 1> Node B propagates new route to neighbors <A, 101, 1> Neighbors update their routing tables: <A, 101, B, 2> and continue propagation of information Kemal Akkaya Mobile & Wireless Computing 46 DSDV --- link breaks Link between B and D breaks Node B notices break Update hop count for D and E to be infinity Increments sequence number for D and E Node B sends updates with new route information <D, 203, infinite> <E, 156, infinite> Kemal Akkaya Mobile & Wireless Computing 47 DSDV -- Summary Routes maintained through periodic and event triggered routing table exchanges Shortest routes Incremental dumps and settling time used to reduce control overhead Lower route request latency, Higher overhead Periodic updates for Routing Tables Perform best in network with low to moderate mobility, few nodes and many data sessions Problems: Not efficient for large ad-hoc networks Nodes need to maintain a complete list of routes. Kemal Akkaya Mobile & Wireless Computing 48 Hierarchical Routing Scalability – MANET protocols often do not perform well for large networks (especially if not dense) Global topology is based on the connectivity of each mobile node Clusters can be used to provide scalability Clusters are formed (dynamically, of course) to provide hierarchy Global routing is done to clusters Local routing is done to nodes within a cluster Clusters of clusters (super-clusters) can be formed to extend hierarchy Similar in principle to IP subnets A special node, called the cluster-head, is designated in each cluster Responsible for routing data to or from other clusters May be a special node, or may be designated through a clustering algorithm Algorithms Clustering -- form clusters Cluster-head identification -- may be an integral part of the clustering algorithm Routing -- some routing algorithm is still needed Applied at each level of the hierarchy Kemal Akkaya Mobile & Wireless Computing 49 Hierarchical Algorithm Example Cluster 2 Cluster 1 Cluster 3 Kemal Akkaya Mobile & Wireless Computing 50 Cluster-head Gateway Switch Routing (CGSR) CGSR is a clustered multi-hop mobile wireless network with several heuristic routing schemes. A distributed cluster-head (CH) selection algorithm is used to elect a node as the cluster head. It modifies DSDV by using a hierarchical CH to route traffic. Gateway nodes serve as bridge nodes between two or more clusters. A packet sent by a node is first routed to its CH and then the packet is routed from the CH to a gateway of another cluster and then to the CH and so on, until the destination cluster head is reached. Frequent changes in the CH may affect the performance of the routing protocol. Kemal Akkaya Mobile & Wireless Computing 51 CGSR (Cont’d) 6 12 5 11 10 4 7 2 1 9 8 Gateway Node 3 Cluster Head Internal Node Routing in CGSR from node 1 to node 8 Kemal Akkaya Mobile & Wireless Computing 52 Zone Routing Protocol (ZRP) / Hybrid Protocol ZRP combines proactive and reactive approaches References: Z. J. Haas and M. R. Pearlman, “The Performance of Query Control Schemes for the Zone Routing Protocol”, ACM/IEEE Trans. Net., vol. 9, no. 4, Aug.2001, pp. 427–38 X. Hong, K. Xu, and M. Gerla, “Scalable Routing Protocols for Mobile Ad Hoc Networks”, IEEE Network • July/August 2002 All nodes within hop distance at most d from a node X are said to be in the routing zone of node X All nodes at hop distance exactly d are said to be peripheral nodes of node X’s routing zone Intra-zone routing: Proactively maintain routes to all nodes within the source node’s own zone. Inter-zone routing: Use an on-demand protocol (similar to DSR or AODV) to determine routes to outside zone. Kemal Akkaya Mobile & Wireless Computing 53 Zone Concept ZONE Radius of routing zone = 2 hops Kemal Akkaya Mobile & Wireless Computing 54 Routing Protocol: IARP & IERP IntrAzone Routing Protocol: IARP Neighbor Information (base) Neighbor Identification: MAC protocols Neighbor Discovery: Neighbor Discovery Protocols (‘hello’) Modified Link-State protocol: max hop exactly equal to zone radius. Nodes proactively maintain routes to all nodes within its routing zone using the IARP IntErzone Routing Protocol: IERP IERP finds routes to destinations beyond a node’s routing zone with the aid of BRP. BRP (Bordercast Resolution Protocol) multicasts route query packets towards the peripheral nodes using topology info. provided by IARP. Bordercast recipients bordercast the query toward their own peripheral nodes until a route to the destination is found. Kemal Akkaya Mobile & Wireless Computing 55 IERP • Zones may overlap Bordercast Kemal Akkaya Mobile & Wireless Computing 56 Optimal Zone Radius As zone radius is increased Proactive (IARP) traffic increases Reactive (IERP) traffic Routing Overhead decreases (or delay) The benefits provided Total by the available topology information IARP weighed against the IERP overhead determines Optimal Zone the optimal zone radius. zone radius Radius Optimization: Different zone radius can be used for different zones Kemal Akkaya Mobile & Wireless Computing 57 Geographic Routing: LAR Location-Aided Routing Exploits location information to limit scope of route request flood Location information may be obtained using GPS Expected Zone is determined as a region that is expected to hold the current location of the destination Expected region determined based on potentially old location information, and knowledge of the destination’s speed Route requests limited to a Request Zone that contains the Expected Zone and location of the sender node 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 Kemal Akkaya Mobile & Wireless Computing 58 LAR Request Zone Define an Expected Zone and a Request Zone LAR is same as flooding, except that only nodes in request zone forward route request Expected Zone Region expected to contain D Request Zone Smallest rectangle including S and expected zone for D Request Zone D Expected Zone S Kemal Akkaya Mobile & Wireless Computing 59