Architectures and Applications for Wireless Sensor Networks (01204525) Routing Chaiporn Jaikaeo chaiporn.j@ku.ac.th Department of Computer Engineering Kasetsart University Materials taken from lecture slides by Karl and Willig Overview Unicast routing in MANETs Energy efficiency & unicast routing Multi-/broadcast routing Geographical routing 2 Unicast, ID-Centric Routing Given: a network/a graph Goal: Send a packet from one node to another Each node has a unique identifier (ID) The routing & forwarding problem Routing: Construct a table telling how can reach a given destination Forwarding: Consult this table to forward a given packet to its next hop Challenges 3 Challenges in WSNs/MANETs Nodes may move around, neighborhood relations change C B A Optimization metrics may be more complicated Not just “smallest hop count” 4 Ad hoc Routing Protocols Because of challenges, standard routing approaches not really applicable Too big an overhead, too slow in reacting to changes Examples: Dijkstra, Bellman-Ford Simple solution: Flooding No routing table needed Packets are usually delivered to destination But: overhead is prohibitive Usually not acceptable in most cases 5 Gossiping Needs no routing table Similar to flooding Nodes forward packets with some probability Haas et al. studies gossiping behavior and found that There is a critical probability, x p < x: gossip dies out very quickly p > x: gossip reaches most nodes 6 Routing Protocol Classification Main question: When does the routing protocol operate? Option 1: Always tries to keep routing data up-to-date Option 2: Route is only determined when actually needed Protocol is proactive / table-driven Protocol operates on demand Option 3: Combine these behaviors Hybrid protocols 7 Routing Protocol Classification Which data is used to identify nodes? An arbitrary identifier? The position of a node? Can be used to assist in geographic routing protocols Identifiers that are not arbitrary, but carry some structure? As in traditional routing Structure akin to position, on a logical level? 8 Proactive Protocols – Example Fisheye State Routing (FSR) Basic observation: When destination is far away, details about path are not relevant Look at the graph as if through a fisheye lens Regions of different accuracy of routing information LS information about closer nodes is exchanged more frequently 9 Reactive Protocols – Example Recall reactive routing protocols Initially, no information about next hop is available at all One possibility: Send packet to everyone 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 Examples Ad hoc On-demand Distance Vector (AODV) Dynamic Source Routing (DSR) 10 DSR Dynamic Source Routing protocol 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 11 DSR Route Discovery Search for route from 1 to 5 [1] [1,7] 2 1 [1] 7 5 4 3 6 7 [1,7] 5 4 2 1 3 6 [1,4] [1,7,2] 7 [1,4,6] 4 6 2 1 2 1 5 3 [1,7,3] 7 5 4 6 3 [5,3,7,1] Node 5 uses route information recorded in RREQ to send back, via source routing, a route reply 12 AODV Ad hoc On-demand Distance Vector Very popular routing protocol Same basic idea as DSR for discovery procedure Nodes maintain routing tables instead of source routing 13 Alternative - Rumor Routing Think of an “agent” wandering through the network, looking for data/events Agent initially perform random walk Leave “traces” in the network Later agents ? can use these traces to find data 14 Overview Unicast routing in MANETs Energy efficiency & unicast routing Multi-/broadcast routing Geographical routing 15 Energy-Efficient Unicast: Goals Minimize energy/bit Eg., A-B-E-H A 3 2 1 Maximize network "lifetime" 4 1 2 3 B D Time until first node failure loss of coverage partitioning 2 1 2 3 C E 1 2 2 4 4 2 F G 2 H Example: Send data from node A to node H 16 Basic options for path metrics Max total available battery capacity Sum of reciprocal battery levels Example: A-D-H A 3 2 1 Largest reciprocal level of all nodes in path 1 2 3 D 2 1 2 3 C B E Min-Max batt. cost Sum of batt. levels without needless detours Example: A-C-F-H Min battery cost 4 1 2 2 4 4 2 F G 2 H Minimize variance in power levels 17 Overview Unicast routing in MANETs Energy efficiency & unicast routing Multicast/broadcast routing Geographical routing 18 Broadcast & Multicast Distribute a packet to all reachable nodes (broadcast) or to a subgroup (multicast) Basic options Source-based tree: one tree per source Minimize total cost Minimize maximum cost to each destination Shared, core-based trees Mesh Provides redundancy in data transfer 19 Goals for Source-Based Trees For each source, minimize total cost Steiner tree Src 2 The Steiner tree problem 2 For each source, minimize maximum cost to each destination Dest 2 Obtained by overlapping the individual shortest paths 1 Dest 1 Shortest-path tree Src Dest 2 2 2 1 Dest 1 20 Broadcast/Multicast Classification Broadcast Multicast One tree per source Minimize total cost (Steiner tree) Minimize cost to each node (e.g., Dijkstra) Shared tree (core-based tree) Single core Mesh Multiple core 21 Wireless Multicast Advantage Wires Locally distributing a packet to n neighbors n times the cost of a unicast packet Wireless: sending to n neighbors can incur costs = tx to a single neighbor – if receive costs are ignored = One tx, n rx – if receives are correctly tuned = send n unicasts – if multicast not supported by MAC If local multicast is cheaper, then wireless multicast advantage is present Can be assumed realistically 22 Steiner Tree Approximations Computing Steiner tree is NP complete A simple approximation Pick some arbitrary order of all destination nodes + source node Successively add these nodes to the tree For every next node, construct a shortest path to some other node already on the tree Performs reasonably well in practice 23 Steiner Tree Approximations Takahashi Matsuyama heuristic Similar, but let algorithm decide which is the next node to be added Start with source node, add that destination node to the tree which has shortest path Iterate, picking that destination node which has the shortest path to some node already on the tree Problem: Wireless multicast advantage not exploited! And does not really fit to the Steiner tree formulation 24 Broadcast Incremental Power Or BIP Exploits multicast wireless advantage Goal: use as little transmission power as possible Based on Prim's MST algorithm Once a node transmits and reaches some neighbors, it becomes cheaper to reach additional neighbors 25 BIP – Example Round 1: Round 2: A 5 S 10 D 3 4 3 B 1 B 9 2 7 Round 4: A C 2 B 7 7 7 Round 5: 1 D A C 3 3 B S (3) 3 S (3) 1 D A 2 3 S (1) 1 C Round 3: A B S (5) 7 10 6 D 7 D C (1) C (1) 26 Multicast Incremental Power Or MIP Start with broadcast tree construction, then prune unnecessary edges out of the tree A A 3 3 B S B S 10 10 7 D 7 D C C 27 Mesh-Based Multicast Example – ODMRP (On-Demand Multicast Routing Protocol) Sender NextHop Sender NextHop H C A D Sender NextHop H D H C H H E B I F G 28 Overview Unicast routing in MANETs Energy efficiency & unicast routing Multi-/broadcast routing Geographical routing Position-based routing Geocasting 29 Geographic Routing Implicitly infer routing information from physical placement of nodes E.g., position of current node, current neighbors, destination known Send to a neighbor in the right direction as next hop Geographic routing Position-based routing Use position information to aid in routing Geocasting Send to any node in a given area 30 Overview Unicast routing in MANETs Energy efficiency & unicast routing Multi-/broadcast routing Geographical routing Position-based routing Geocasting 31 Position-Based Routing “Most forward within range r” strategy Nearest node with forward progress Send to that neighbor that realizes the most forward progress towards destination Idea: Minimize transmission power Directional routing Choose next hop that is angularly closest to destination Choose next hop that is closest to the connecting line to destination Problem: Might result in loops! 32 Problem: Dead Ends Simple strategies might send a packet into a dead end 33 Right Hand Rule Basic idea to get out of a dead end: Put right hand to the wall, follow the wall Does not work if on some inner wall – will walk in circles Need some additional rules to detect such circles 34 Right Hand Rule – GPSR Greedy Perimeter Stateless Routing Use greedy, “most forward” routing as long as possible If no progress possible: Switch to “face” routing Face: largest possible region of the plane that is not cut by any edge of the graph Send packet around the face using right-hand rule Use position where face was entered and destination position to determine when face can be left again, switch back to greedy routing Requires: planar graph! (topology control can ensure that) 35 Face Routing Example 36 GPSR – Example Route packet from node A to node Z Leave face routing I E B F H K Z D A Enter face routing J C L G 37 GEM – Graph EMbedding Geographical routing without positions Construct virtual polar coordinates for nodes Assign “virtual angle range” to neighbors of a node, bigger radius Angles are recursively redistributed to children nodes 38 Overview Unicast routing in MANETs Energy efficiency & unicast routing Multi-/broadcast routing Geographical routing Position-based routing Geocasting 39 Location-based Multicast (LBM) Geocasting by geographically restricted flooding Define a “forwarding” zone – nodes in this zone will forward the packet to make it reach the destination zone Packet is always forwarded by nodes within the destination zone itself 40 Determining Next Hops Use Voronoi diagram B Destination Zone C S D A 41 Determining Next Hops Use convex hulls Destination Zone C B D S A E 42 Trajectory-Based Forwarding (TBF) Source routing + geocasting 43 Conclusion Routing exploit various sources of information to find destination of a packet Routing can make some difference for network lifetime Non-standard routing tasks (multicasting, geocasting) require adapted protocols 44