S4: Small State and Small Stretch Routing Protocol for                    Large Wireless Sensor Networks                Yu...
each node. Consequently, routing in large-scale wire-         perimeter nodes. However, perimeter nodes need to storeless ...
and for beacon nodes. Moreover, the algorithm in [26]         d, c can directly route to d using the shortest path from cr...
√proved that when O( N ) nodes are randomly selected            is to use scoped flooding. That is, each node d floodsas bea...
by constructing a spanning tree rooted from each bea-           We further exploit broadcast nature of wireless mediumcon ...
// Priorities from highest to lowest: 1, 2, 3, 4         in [29, 4] for estimating link quality. When a node re-       if(...
• Control traffic: the amount of traffic transmitted for                                                               Figur...
control traffic per node (# of packets)control traffic per node (Byte)                                  3000              ...
chosen out of the total K beacons as the routing beacons                                     1-hop as a baseline compariso...
Single Flow, Lossless Links                                              5 Flows, Lossy Links                     1       ...
23. s4 small state and small stretch compact routing protocol for large static wireless networks
23. s4 small state and small stretch compact routing protocol for large static wireless networks
23. s4 small state and small stretch compact routing protocol for large static wireless networks
23. s4 small state and small stretch compact routing protocol for large static wireless networks
Upcoming SlideShare
Loading in...5
×

23. s4 small state and small stretch compact routing protocol for large static wireless networks

764

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
764
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

23. s4 small state and small stretch compact routing protocol for large static wireless networks

  1. 1. S4: Small State and Small Stretch Routing Protocol for Large Wireless Sensor Networks Yun Mao+ Feng Wang∗ Lili Qiu∗ Simon S. Lam∗ Jonathan M. Smith+ The University of Texas at Austin∗ University of Pennsylvania+ Abstract route quality, and affects global resource consump- tion, delay, and reliability. Routing protocols for wireless sensor networks mustaddress the challenges of reliable packet delivery at in- • Resilience: Wireless networks often experience fre-creasingly large scale and highly constrained node re- quent topology changes arising from battery outage,sources. Attempts to limit node state can result in unde- node failures, and environmental changes. Rout-sirable worst-case routing performance, as measured by ing protocols should find efficient routes even in thestretch, which is the ratio of the hop count of the selected presence of such changes.path to that of the optimal path. Existing routing protocols either achieve small worst- We present a new routing protocol, Small State and case routing stretches with large routing state (e.g., short-Small Stretch (S4),which jointly minimizes the state and est path routing) or achieve small routing state at the coststretch. S4 uses a combination of beacon distance-vector of large worst-case routing stretches (e.g., geographicbased global routing state and scoped distance-vector routing and hierarchical routing). In this paper, webased local routing state to achieve a worst-case stretch √ present the design and implementation of Small State andof 3 using O( N ) routing state per node in an N-node Small Stretch (S4), a new addition to the routing proto-network. Its average routing stretch is close to 1. S4 col design space. S4 achieves a desirable balance amongfurther incorporates local failure recovery to achieve re- these characteristics, and is well suited to the wirelesssilience to dynamic topology changes. We use multiple sensor network setting.simulation environments to assess performance claims at We make the following contributions.scale, and use experiments in a 42-node wireless sen- 1. S4 is the first routing protocol that achieves a worst-sor network testbed to evaluate performance under real- case routing stretch of 3 in large wireless networks.istic RF and failure dynamics. The results show that S4 Its average routing stretch is close to 1.achieves scalability, efficiency, and resilience in a widerange of scenarios. 2. S4’s distance guided local failure recovery scheme significantly enhances network resilience, and is1 Introduction portable to other settings.Routing finds paths in a network along which to send 3. S4’s scalability, effectiveness of resource use, anddata. It is one of the basic network functionalities. The resilience are validated using multiple simula-effectiveness of routing protocols directly affects net- tion environments and a 42-node sensor networkwork scalability, efficiency, and reliability. With con- testbed.tinuing growth of wireless network sizes, it is increas- The rest of the paper is organized as follows. In Sec-ingly important to develop routing protocols that simul- tion 2, we discuss the limitations of previous work. Wetaneously achieve the following design goals. present the S4 routing protocol in Section 3. We evalu- ate its performance using high-level simulation in Sec- • Small routing state: Using small amounts of rout- tion 4, to study the performance under ideal wireless ing state is essential to achieving network scalabil- environment with no wireless medium losses or colli- ity. Many wireless devices are resource constrained. sions. In Section 5, we present evaluation results using For example, mica2 sensor motes have only 4KB TOSSIM, a packet-level simulator that models wireless RAM. Limiting routing state is necessary for such medium and collisions, to study the performance in more devices to form large networks. Moreover, limiting realistic large-scale wireless networks. In Section 6 we routing state also helps to reduce control traffic used describe testbed evaluation. We conclude in Section 7. in route setup and maintenance, since the amount of routing state and control traffic is often correlated. 2 Related Work • Small routing stretch: Routing stretch is defined as Routing is a well-studied problem, but wireless sen- the ratio between the cost of selected route and the sor networks have introduced new challenges. Short- cost of optimal route. Small routing stretch means est path routing protocols (e.g., DSR [10], AODV [22], that the selected route is efficient compared to the DSDV [21]) can find good routes, but are limited in scale optimal route. It is a key quantitative measure of by both control traffic and the amount of state required at
  2. 2. each node. Consequently, routing in large-scale wire- perimeter nodes. However, perimeter nodes need to storeless networks has focused on minimizing storage and O(N ) pair-wise distance amongst them, which is notexchange of routing state, and can be divided into ge- scalable in large wireless networks with limited mem-ographic routing and hierarchical routing approaches. ory space per node. GEM [20] achieves greater scala- In geographic routing, each node is assigned a coor- bility by using triangulation from a root node and twodinate reflecting its position in the network. Upon re- other reference nodes. However, the routing stretch isceiving a packet, a node selects a next hop closer to the larger than that typical of geographic routing algorithms,destination in the coordinate space. Some geographic and there is the additional cost of recomputing routingrouting protocols use geographic locations as node co- labels resulting from network failures. Fonseca, et al. [4]ordinates, while others use virtual coordinates based on have proposed Beacon Vector Routing (BVR) which se-network proximity. As connectivity in the coordinate lects a few beacon nodes, and uses flooding to constructspaces is not complete, these schemes must address get- spanning trees from the beacons to all other nodes. Ating “stuck” in a local minimum, where no neighbor is node’s coordinate is a vector of distances from the nodecloser to the destination than the current node. Some to all beacons, and each node maintains the coordinatesproposals such as GFG [1], GPSR [11], GOAFR+ [14], of its neighbors. BVR defines a distance metric overGPVFR [17] and variants use face traversal schemes that these beacon vectors, and a node routes packets to theroute packets on a planar graph derived from the original one that minimizes the distance. When greedy routingconnectivity graph. Their delivery guarantees [5] depend stalls, it forwards the packet towards the beacon closeston the assumption that the planarization algorithms (e.g. to the destination. If the beacon still fails to make greedyGG [6] and RNG [27]) can successfully planarize any progress, scoped flooding is used. None of the virtualnetwork graph. These planarization algorithms typically coordinate-based routing algorithms provide worst-caseassume a unit disk or quasi-unit disk model. However, routing stretch guarantees.these models can be inadequate for real wireless environ- Hierarchical routing is an alternative approach toments due to obstacles and multi-path fading. Kim, et. achieving scalability. Example protocols in this categoryal [13] have shown that model failures in real radio en- include landmark routing [28], LANMAR [7], ZRP [8]vironments can cause routing pathologies and persistent and Safari [23]. Hierarchical routing protocols providerouting failures. CLDP [12] addresses the imperfect RF no guarantee on the routing stretch due to boundary ef-propagation problem using a right-hand probing rule to fects: two nodes that are physically close may belong todetect link-crossings and remove them to re-planarize the different clusters or zones, and hence the route betweengraph. GDSTR [16] provides delivery guarantee with- them has to go through cluster heads, which can be arbi-out requiring planarization by avoiding routing across the trarily longer than their shortest path.face of planar graphs and instead routing packets through Caesar et al. develop VRR [2], a scheme for layer-3a spanning tree. any-to-any routing based on distributed hash tables. To The geographic coordinate-based routing schemes route to its successors on the virtual ring, a node setshave at least three difficulties for wireless sensor net- up and maintains forwarding entries to its successors andworks. First, accurate geolocation either requires care- predecessors along multi-hop physical paths. As a result,ful static setting or access to GPS, with consequences for a node has both routing table entries towards its neigh-cost and need for line-of-sight to satellites. Second, geo- bors in the ring and also entries for the nodes on thegraphic distances may lack predictive value for network paths in between. VRR greedily forwards a packet to-performance (e.g., loss rate). This may result in paths ward the node in the routing table with the closest ID towith poor performance. Third, even with GPS and ideal the√ destination ID. The routing state per node is roughlyradios, the best routing stretch for geographic routing is O( N ). Unlike S4, VRR does not provide worst-caseO(c2 ) in GOAFR+ [14] and ARF [15], where c is the routing stretch guarantee.length of the optimal path, and example topologies exist Theoretical work [3, 26] on achieving scalable and ef-where this bound is tight [15]. ficient routing has developed compact routing algorithms Virtual coordinates reflecting underlying network con- that provide a worst-case routing stretch of 3 while using √nectivity address the first two difficulties, but still face at most O( N log N ) state in an N -node network. Thisthe challenge of “dead ends”, for which a recovery worst-case routing stretch is provably optimal when eachscheme is required. In addition, the overhead of com- node uses less than linear routing state [3, 26]. Whileputing and storing virtual coordinates is not negligible. √ compact routing seems to be a promising direction forFor example, NoGeo [24] uses O( N ) perimeter nodes large-scale networks, it cannot be directly translated intoto flood the N -node network so that every node can learn a routing protocol in a distributed network. In particular,its distances to all the perimeter nodes. Each node deter- the proposed algorithms do not specify how each nodemines its virtual coordinate based on the distances to the should build and maintain routing state for local clusters
  3. 3. and for beacon nodes. Moreover, the algorithm in [26] d, c can directly route to d using the shortest path from crequires choosing beacon nodes offline, considers only to d. According to the triangle inequality, the “shortcut”initial route construction, and cannot cope with topology strictly improves routing stretch. We give the followingchanges, which precludes realization in our network set- theorem as an extension to the proof in [3, 26], in whichting. The implications of compact routing for average a special case k = 1 is proved. Refer to our technicalrouting stretch also remain unclear. report [19] for the proof.3 S4 Routing Protocol Theorem 1 Let Ck (s) = {c ∈ V |δ(c, s) < k ∗S4 uses the theoretical ideas of the compact routing al- δ(c, L(c))}, where k ≥ 1. If each node s maintains next-gorithm [26] as a basis, refined by the addition of new hop for the shortest path to every beacon and every node 2techniques needed to obtain a practical routing protocol in Ck (s), the worst-case routing stretch is 1 + k .for large-scale wireless networks. We first describe the As a special case, when k = 1, a local cluster of nodebasic routing algorithm and note challenges for routing s consists of all nodes whose distances to s are closerprotocol design, and then present the S4 routing proto- than their distances to their closest beacons. This specialcol. Throughout this paper, our metric for the cost of a case is called compact routing [3, 26]. It is particularlyroute is the number of links traversed (i.e., hop count). interesting, since it has low worst-case storage cost of √3.1 Basic Routing Algorithm O( N log N ) and provides a worst-case routing stretchIn S4, a random set of nodes, L, are chosen as beacons. of 3. In the remaining paper we consider k = 1, since itFor a node d, let L(d) denote the beacon closest to node gives small routing state.d, and let δ(s, d) denote the shortest path distance from s Practical concerns dictate three changes to the TZto d. Each node s constructs the following local cluster, compact routing scheme [26] to achieve S4. First, thedenoted as Ck (s). boundary conditions of the cluster definitions are slightly different. In S4, C(s) = {c ∈ V |δ(c, s) ≤ δ(c, L(c))}, Ck (s) = {c ∈ V |δ(c, s) ≤ k ∗ δ(c, L(c))}, k ≥ 1. but in the TZ scheme, C(s) = {c ∈ V |δ(c, s) < δ(c, L(c))}. That is, node c is in the cluster of s in S4where V is the set of all nodes in the network. A local but not in the TZ scheme, if δ(c, s) = δ(c, L(c)). Thiscluster of node s consists of all nodes whose distances to change does not affect the worst-case routing stretch, ands are within k times their distances to their closest bea- reduces average-case routing stretch at the cost of in-cons. Each node s then maintains a routing table for all creasing routing state.beacon nodes and nodes in its own cluster Ck (s). Second, to route towards node d, only L(d) should be carried in the packet header as the location informa- tion in S4. In comparison, the TZ scheme requires a label(d) = (L(d), port(L(d), d)) for each packet, where port(L(d), d) is the next hop at L(d) towards d. Only with the label carried in the packet header, a beacon node can forward a packet towards d using next hop port(L(d), d). It is necessary in the TZ scheme because the beacon nodes do not store routing state. However, in S4, as a result of the boundary condition change, each beacon node L stores routing state to all the nodes that have L as its closest beacon node. Given that the to- tal storage cost of the additional field port(L(d), d) inFigure 1: S4 routing examples. Every node within the the labels is the same as the total number of routing en-circle of d has d in its local cluster. The route s′ → d is tries at beacon nodes in S4 (i.e., both are N), we favorthe shortest path; the route s → d takes a shortcut at c storing routing state at beacon nodes since it reducesbefore reaching L(d); the route s → d′ is through L(d′ ) packet header length and the frequency of updating la-without shortcut. bels. The frequency of label updates is reduced because As shown in Figure 1, when routing from node s to labels are updated only when L(d) changes but not whennode d, if d ∈ Ck (s), we can directly use the short- port(L(d), d) changes.est path to route from s to d. Otherwise, s first takes Finally, the TZ scheme proposes a centralized bea-the shortest path towards L(d), and then use the short- con node selection algorithm to meet expected worst √est path to route towards d. In the second case, the route case storage bound O( N logN ) in an N -node network.does not have to always reach L(d) before routing to d. Since practicality is our main design goal, in S4 we ran-Whenever data reaches a node c whose cluster contains domly select beacon nodes in a distributed fashion. It is
  4. 4. √proved that when O( N ) nodes are randomly selected is to use scoped flooding. That is, each node d floodsas beacon√ nodes, the average storage cost on each node the network up to δ(d, L(d)) hops away from d, whereis still O( N ) [25]. As our evaluation results show, the δ(d, L(d)) is the distance between d and its closest bea-storage cost is still low even for the worst cases. Note con L(d). Scoped flooding works fine when the networkthat the worst-case routing stretch of 3 still holds under is initialized, or when there are new nodes joining therandom beacon node selection. network. But it is costly to send frequent scoped flood- ings to reflect constant topology changes, which often3.2 Design Challenges arises in wireless networks due to battery outage, nodeDesigning a routing protocol to realize the algorithm pro- failures, and environmental changes.posed in Section 3.1 poses the following challenges: Scoped distance vector: To provide cheap incremental First, how to construct and maintain routing state for routing updates, we propose using scoped distance vec-a local cluster? Frequent topology changes in wireless tor (SDV) for constructing routing tables for local clus-networks make it necessary to support incremental rout- ters. SDV is attractive because it is fully distributed,ing updates. Unlike traditional hierarchical routing, each asynchronous, and supports incremental routing updates.node has its own cluster in compact routing. Therefore SDV is more efficient than scoped flooding especiallynaive routing maintenance could incur significant over- under small changes in a network topology, because ahead. node in SDV propagates routing update only when its Second, how to construct and maintain routing state distance vector changes while in scoped flooding a nodefor beacon nodes? Knowledge of next-hops and shortest propagates a flooded packet regardless of whether its dis-path distances to beacon nodes is important to the perfor- tance and next hop to a destination have changed.mance of S4. When beacon packets are lost, the routing In S4, each node s stores a distance vector for eachstate could be inaccurate, which could substantially de- destination d in its cluster as the following tuple:grade the performance. Third, how to provide resilience against node/link fail- < d, nexthop(s, d), δ(s, d), seqno(d), scope(d), updated >ures and environmental changes? Maintaining up-to-date where d and nexthop(s, d) are both node IDs, seqnorouting state could be expensive especially in a large net- is the latest sequence number for destination d, andwork. Moreover routing changes take time to propagate. scope(d) is the distance between d and d’s closest bea-During the transient period (e.g., the period from the time con, and updated is whether the distance vector has beenwhen failure occurs to the time when the routing tables updated since the last routing update.at all nodes are updated to account for the failure), many A node s exchanges its distance vectors with its neigh-packets could be lost without a failure recovery scheme. bors either synchronously or asynchronously. Node s To address the above challenges, S4 consists of the fol- initializes δ(s, c) = 1 for only c ∈ neighbor(s), andlowing three major components: (i) scoped distance vec- ∞ otherwise. Upon receiving a distance vector, a nodetor for building and maintaining routing state to nodes c uses the newly received distance vectors to update itswithin a cluster, (ii) resilient beacon distance vector for routing state. Node c further propagates the update for sefficient routing towards beacon nodes and facilitating only when its current distance from s is below scope(s)inter-cluster routing, and (iii) distance guided local fail- and its distance vector to s has changed.ure recovery for providing high quality routes even un-der dynamic topology changes. Below we will describe Benefits of SDV: SDV supports incremental routing up-these three components in turn. dates. This allows a wireless network to dynamically adapt to routing changes. Moreover, unlike traditional3.3 Intra-Cluster Routing: Scoped Dis- distance vector protocols, SDV does not suffer from the tance Vector (SDV) count-to-infinity problem,1 because the scope is typically small (e.g., We evaluate a 1000-node network with 32In S4, node s uses the shortest paths to route towards beacons, and its average scope is 3.35 and maximumnodes in the cluster of s. Unlike the traditional hierarchi- scope is 13. This implies routing loops can be detectedcal routing, in S4 each node s has its own cluster, which within 13 hops).consists of nodes close to node s. This clustering is es-sential for providing a routing stretch guarantee, since 3.4 Inter-Cluster Routing: Resilient Bea-it avoids boundary effects. In comparison, hierarchical con Distance Vector (RBDV)routing cannot provide routing stretch guarantee due to To support routing across clusters, each node is requiredboundary effects, where two nearby nodes belong to dif- to know its distances to all beacons. This can be achievedferent clusters and the hierarchical route between them 1 The count-to-infinity problem is that when a link fails, it may take a longcould be much longer than their direct shortest path. time (on the order of network diameter) before the protocol detects the failure. A natural approach to building a local routing table During the interim routing loops may exist.
  5. 5. by constructing a spanning tree rooted from each bea- We further exploit broadcast nature of wireless mediumcon nodes to every other node in the network. Flooding to avoid implosion of recovery responses.beacon packets reliably is important to the routing per- Distance guided local failure recovery: Our goal is toformance, because loss of beacon packets may introduce prioritize neighbors based on their distances to the des-errors in estimating the closest beacon and its distance, tination so that the nodes closest to the destination canand degrade the performance of S4. We develop a sim- take over the forwarding. The problem is non-trivial, be-ple approach to enhance resilience of beacon packets. cause the distance to the destination is not always avail-Routing state construction and maintenance: To con- able. When the destination is outside the local cluster,struct routing state for beacon nodes, every beacon pe- a neighbor only knows the distance to the destination’sriodically broadcasts beacon packets, which are flooded closest beacon, but not the distance from that beacon tothroughout the network. Every node then keeps track of the destination.the shortest hop count and next-hop towards each bea- To address the issues, each node computes its prioritycon. using the algorithm in Figure 2. It involves two main sce- Since beacon packets are broadcast and typical MAC narios. In the first scenario, s’s local cluster contains theprotocols (e.g., CC1000 used in sensor motes) do not destination d. This information is available in s’s failureprovide reliability for broadcast packets, it is essential recovery request. Then s’s neighbor is assigned one ofto enhance the resilience of beacon packets at the net- the four priorities using the following rules. The neigh-work layer. Our idea is to have a sender retransmit the bors that have d in their clusters are assigned the top 3broadcast packet P until T neighbors have forwarded P priorities, since they can directly route towards destina-or until the maximum retry count Retrymax is reached. tion using the shortest path. In this case, each neighborT and Retrymax provide a tradeoff between overhead knows its distance to the destination, and assigns itself aand reliability. In our evaluation, we use Retrymax = 3, priority based on the difference between δ(self, d) andT = 100% for beacon nodes, and T = 1/3 for non- δ(s, d). Neighbors whose local clusters do not containbeacon nodes. T = 100% for a beacon node is used be- the destination are assigned the fourth priority, which iscause all neighbors of the beacon nodes should forward the lowest.the beacon packet. In comparison, for a non-beacon node In the second case, when s’s cluster does not containc, only a subset of c’s neighbors are farther away from the destination d, only the neighbors that have d in theirthe beacon than c and need to forward the beacon packet clusters are assigned the highest priority, since they canreceived from c. Therefore we use a smaller T for non- directly route towards the destination. The other nodesbeacon nodes. are assigned priorities by comparing their distances to the beacon with δ(s, L(d)).3.5 Distance Guided Local Failure Recov- A sender s selects the neighbor from which it receives ery (DLF) the response first as the new next-hop. By assigningWireless networks are subject to bursty packet losses and each neighbor i with a timer priority(i ) × m + rand ,frequent topology changes. To provide high routing suc- a higher priority node sends the response earlier and iscess rate and low routing stretch even in the presence of thus favored as the new next-hop node. To avoid colli-frequent topology changes and node/link failures, we de- sions, we add a small random timer rand to the priority-velop a simple and effective local failure recovery based based timer so that different nodes are likely to respondon distance vectors. at different times even when assigned the same priority.Overview: A node s retransmits a packet when it does To avoid response implosion, upon hearing a failure re-not receive an ACK within a retransmission timeout. sponse to s from someone else, the current node cancelsWhen R retransmissions fail, s broadcasts a failure re- its own pending recovery response if any. Our evaluationcovery request, which contains (i) the next hop s used, uses m = 50ms, and rand ranges from 0 to 49ms.(ii) whether destination d is included in s’s local cluster, Node failures vs. link failures: The above schemeand (iii) the distance to d if s’s cluster includes d, or the works well for link failures. When a node fails, all thedistance to d’s beacon otherwise. Upon hearing the fail- links to and from the failed nodes are down. Thereforeure requests, s’s neighbors attempt to recover the packet we need to avoid using nodes that use the failed nodes aslocally. Our goal is to select the neighbor that is the clos- next hop. This can be done by letting the sender spec-est to the destination as s’s new next-hop; meanwhile the ify the failed node. Only the nodes that use differentselection process should be cheap and easily distributed. next hop from the failed node will attempt to recover. S4 uses distance guided local failure recovery to prior- In practice, it is difficult to distinguish between a linkitize neighbors’ responses based on their scoped distance failure and a node failure. Always assuming a node fail-vectors. Each node uses its priority to determine the time ure may unnecessarily prune out good next-hops. So weit needs to wait before sending failure recovery response. first optimistically assume that the next hop does not fail,
  6. 6. // Priorities from highest to lowest: 1, 2, 3, 4 in [29, 4] for estimating link quality. When a node re- if(d ∈ C(s)) if(d ∈ C(self )) // d is in s’s and self ’s clusters ceives a beacon packet or SDV update, it first checks if priority = δ(self, d) − δ(s, d) + 2; both the forward and reverse link qualities of the sender else // d is only in s’s cluster priority = 4; are above a threshold (30% is used in our current imple- end mentation). Only those updates from a sender with good else if(d ∈ C(self )) // d is only in self ’s cluster priority = 1; link quality in both directions will be accepted. else // self is outside s’s and d’s clusters priority = δ(self, L(d)) − δ(s, L(d)) + 3; 4 Simulation end In this section, we evaluate the efficiency and scalabilityFigure 2: Computing priority using scoped distance vec- of S4 by simulation. We compare S4 with BVR [4], be-tors and beacon distance vectors cause BVR is one of the latest scalable routing protocols and also among the few that have been implemented inonly the link is down. Therefore we allow nodes with the real sensor networks. We use BVR with scoped floodingsame next hop to recover the packet. When the number since it provides delivery guarantee and offers a fair base-of failed attempts pass a threshold, we prevent the nodes line comparison. We use three evaluation methodologies:from using the same next hop to recover the packet. (i) MATLAB simulation based on the unit disk graph ra- dio model (presented in this section), (ii) TOSSIM simu-3.6 Other Design Issues lation, a packet-level simulator with more detailed wire-Location directory: So far we assume that the source less model (presented in Section 5), and (iii) testbed eval-knows which beacon node is closest to the destination. uation (presented in Section 6). Our MATLAB simula-In practice, such information may not be directly avail- tion results can be directly compared with many previ-able. In such situation, the source can apply the location ous work on geographic routing, in which the unit diskdirectory scheme described in BVR [4] to lookup such model is used. TOSSIM simulations allow us to study theinformation. More specifically, beacon nodes are respon- performance in more realistic large-scale wireless net-sible for storing the mapping between non-beacon nodes works. Having both levels of simulations also revealsand their closest beacons. The closest beacon informa- how underlying wireless models may affect the routingtion for node i is stored at H(i), where H is a consis- performance. For BVR, we validate our matlab imple-tent hash function that maps nodeid to beaconid. The mentation of BVR by comparing with the original BVRsource contacts the beacon node whose ID is H(dest) to simulation code, and we directly use the original BVRobtain the closest beacon to dest. The storage cost of lo- implementation in TinyOS for TOSSIM evaluation.cation directory is much smaller in S4 than that in BVR 4.1 Simulation Methodology(as shown in Section 4), because the source in S4 onlyneeds to know the closest beacon to its destination while To study the protocols in an ideal wireless environment,the source in BVR needs to know the distance between N nodes are randomly placed in a square rectangle re-its destination and all beacon nodes. Moreover, in S4 gion of size A2 in the simulator. The packet deliverywhen destination d is in s’s cluster, no location lookup rates among nodes are derived from the unit disk graphis required since s knows the shortest path to d, whereas model. That is, each node has a fixed communicationBVR as well as other geographic routing schemes always range R. A node can communicate with all the nodes in-require location lookup on a new destination. Such prop- side R, but cannot communicate with any node outsideerty is especially beneficial when traffic exhibits locality R. It is also assumed that there is no packet loss, col-(i.e., nodes close to each other are more likely to com- lision, or network congestion. In the following descrip-municate). tion, we let N denote the number of nodes, K denoteBeacon maintenance: When a beacon fails, S4 ap- the number of beacon nodes, R denote communicationplies distance guided local failure recovery to temporar- range, and A2 denote the size of the area.ily route around the failure. If the failure persists, we can We use the following performance metrics to quantifyapply the beacon maintenance protocol proposed in [4] the efficiency and robustness of S4:to select a new beacon. Beacon maintenance is not the • Routing stretch: the ratio of the route length usingfocus of this paper. Instead, we focus on the routing per- the selected routing protocol to that using the opti-formance during the transient period after failures occur. mal shortest path routing protocol. • Transmission stretch: the ratio of the total num-Link quality: Link quality significantly affects routing ber of packets transmitted using the selected rout-performance. We define link quality as the delivery rate ing protocol to that using the optimal shortest pathof packet on the link in a given direction. In S4, each routing protocol.node continuously monitors its links to/from its neigh-bors. We adopt a passive link estimator layer developed • Routing state: the amount of state required to main- tain at each node.
  7. 7. • Control traffic: the amount of traffic transmitted for Figure 3(b) compares transmission stretch among setting up the routing state and location directory. the three routing protocols. The average transmission Unless specified otherwise, our default simulation sce- stretches of S4 are consistently below 1.1 under all valuesnario uses a 3200-node network with nodes uniformly of K. However, both BVR 1-hop and BVR 2-hop havedistributed in an area of 25 × 25 square units. The com- much higher stretches when K is small. To achieve com-munication range R is 1 unit. On average each node has parable transmission stretches to S4 (though still higher),15.4 immediate neighbors. Beacon nodes are randomly the least numbers of beacons required is 56 for BVRselected. In BVR, all or a subset of beacon nodes serve 1-hop and 30 for BVR 2-hop. Such high transmissionas routing beacons; a node’s coordinate is defined as its stretch in BVR is due to its scoped flooding, which isdistances to the routing beacons. The number of routing necessary for its guaranteed delivery.beacons KR is fixed to 10 for all simulations, because it routing state per node (# of entries) 10000 800is reported to offer a good balance between routing per- routing state per node (Byte) S4 S4 BVR BVR 8000formance and overhead [4]. For each configuration, we BVR 2hop 600 BVR 2hopconduct 10 random runs and report the aggregate statis- 6000 400tics. 4000 2004.2 Simulation Results 2000 0 0 0 50 100 0 20 40 60 80 1004.2.1 Varying the number of beacons (K): number of beacons K number of beacons K (a) # bytes (b) # routing table entries 1.3 3.5 √ average transmission stretch S4 S4 Figure 4: Routing state comparison: When K = N ,average routing stretch 1.25 BVR 1−hop BVR 1−hop 3 BVR 2−hop BVR 2−hop 1.2 the routing state in S4 is half of routing state in BVR. 2.5 1.15 2 Routing state: Figure 4 compares routing state per node 1.1 1.5 under the three routing protocols. The routing state 1.05 in S4 include route entries for beacon nodes and for 1 1 0 20 40 60 number of beacons K 80 100 0 20 40 60 number of beacons K 80 100 nodes within local clusters, whereas the routing state in (a) Routing stretch (b) Transmission stretch BVR are determined by the number of neighbors and the length of their beacon vectors K. 2 We make theFigure 3: S4 has routing and transmission stretches close following observations. First, in BVR the average rout-to 1, which is consistently smaller than those of BVR ing table size proportionally increases with the numberalgorithms across all numbers of beacons. of beacons, while the number of entries remains closeRouting and transmission stretches: First we compare to the number of neighbors. In comparison, the rout-the routing and transmission stretches of S4 and two vari- ing state in S4 first decreases and then slightly increasesants of BVR by varying the number of beacons K. BVR with the number of beacon nodes. The routing state in √1-hop refers to the default BVR algorithm. BVR 2-hop S4 reaches minimum for K ≈ N since it gives a goodis an on-demand 2-hop neighbor acquisition. In this ap- balance between global routing state (for beacon nodes)proach, when a node cannot use greedy forwarding to and local routing state (for nodes in the clusters). Thesemake progress, it fetches its 1-hop neighbors’ neighbors trends also hold for maximum routing state in BVR andto its routing table. BVR 2-hop reduces the routing fail- S4. Second, recall that to achieve a relatively small trans-ure rate of BVR 1-hop at the cost of higher routing state mission stretch, 56 beacon nodes are required in BVR.and control traffic. In this case, the average and maximum routing state in Figure 3(a) compares the routing stretches under S4, BVR is twice or more than those of S4. Third, BVR 2-BVR 1-hop, and BVR 2-hop. The stretches are com- hop has significantly higher upper bound of routing stateputed based on 32,000 routes between randomly selected than BVR 1-hop due to the requirement of holding 2-hoppairs of nodes. We observe that S4 has the lowest average neighbor information.routing stretch. A closer examination of the simulation Control traffic: Figure 5 shows initial control trafficresults shows that the worst stretches in S4 are bounded for setting up routing state. The bandwidth overhead ofby 3. This is consistent with the worst-case guaran- BVR 1-hop increases linearly with the number of bea-tee provided by S4. In comparison, the average rout- cons, because the main overhead is the beacon floodinging stretches in BVR 1-hop and 2-hop are substantially messages. In BVR 2-hop, other than beacon flooding,higher especially for small K. Moreover their worst-case the control traffic also includes the overhead of fetchingrouting stretches are even higher (e.g., the worst routing 2 The size of a routing table entry in S4 is 5-byte long in our implementation.stretch of BVR 1-hop in the simulation is 6 for K = 56, The routing state of BVR is estimated based on the relevant data structures foundand much larger for smaller K). in the BVR implementation code.
  8. 8. control traffic per node (# of packets)control traffic per node (Byte) 3000 S4 400 S4 updates incur lower overhead. Since the typical number 2500 BVR BVR of node failures between consecutive routing updates is BVR 2 hop 300 BVR 2 hop 2000 likely to be low, incremental routing updates are useful 1500 200 in real networks. 1000 DHT and control traffic per node(Byte) 100 3000 4000 500 S4 S4 DHT traffic per node (Byte) 2500 BVR 1 hop BVR 1 hop 0 0 BVR 2 hop 3000 BVR 2 hop 0 20 40 60 80 100 0 20 40 60 80 100 number of beacons K number of beacons K 2000 (a) # bytes (b) # packets 1500 2000 1000Figure 5: Initial control traffic to set up routing state: 1000 500the errorbars show minimum, mean, and maximum traf- 0 0fic across all nodes. The control traffic of S4 decreases 0 20 40 60 80 number of beacons K 100 0 20 40 60 80 number of beacons K 100gracefully as the number of beacons increases. When √ (a) Location directory setup traffic (b) Overall control trafficK = N , the overhead of S4 is 65% higher than that ofBVR 1-hop, but much less than BVR 2-hop. Figure 7: Control traffic overhead comparison The control traffic to set up the routing table is not2-hop neighbor coordinates for the required nodes. We the only overhead. The source should be able to lookupcan see the overhead of on-demand 2-hop neighbor ac- the location information of the destination. Therefore,quisition is significant, which is a big disadvantage of each node should store its location to a directory duringBVR 2-hop even though its routing stretch is lower than the setup phase. We study such directory setup overheadBVR 1-hop. In S4, control traffic includes beacon flood- by using the location directory scheme described in 3.6:ing and SDV. As K increases, the size of the local clus- each node v periodically publishes its location to a bea-ter of each node decreases, so the number of scoped DV con node bv by using a consistent hashing mechanism. bvpackets is reduced. When K = 56, the overhead of S4 then sends a confirmation back to v if the publishing isis 65% higher than that of BVR 1-hop. However since successful. We simulate the initial directory setup over-SDV can be updated incrementally after the initial setup, head, in which every node publishes its location to theits amortized overhead over the long run is reduced. In distributed directory. The results are shown in Figure 7terms of the number of packets, S4 is less than twice of √ (a), and they include traffic to and from beacon nodes forthe BVR 1-hop when K ≥ N . Note that the number of publishing the locations. S4 has the following three ad-packets in S4 can be reduced by grouping SDV packets. vantages over the BVR. First, the size of location infor-On the other hand, BVR demands large packet size when mation in S4 is significantly smaller than that of BVR,the number of beacons is large, and large packets could because in BVR a node’s coordinate is proportional tobe forced to split in order to achieve high delivery rates the number of beacons, while in S4 a node’s coordinate isunder unreliable links. its closest beacon ID. Second, the transmission stretch of traffic per node (# of packets) 600 incremental DV 150 incremental DV BVR is higher than that of S4. Therefore, it incurs more traffic per node (Byte) oblivious DV oblivious DV traffic in routing a confirmation packet from the beacon beacon flooding beacon flooding 400 100 node back to the node publishing its location. Third, it is more likely that a node changes its coordinates in BVR 200 50 than it changes its closest beacon in S4. Therefore, S4 in- curs a lower overhead in setting up and maintaining the 0 0 0 0.05 0.1 0.15 0.2 0 0.05 0.1 0.15 0.2 location directory. failure percent failure percent Figure 7(b) shows the overall traffic overhead incurred (a) # bytes (b) # packets in setting up both routing state and directory. We observeFigure 6: Control traffic overhead of updating routing that compared with both variants of BVR, S4 has smallerstate due to topology changes overall control traffic, including traffic in setting up both To evaluate the overhead of incremental SDV in route and location directory.S4, we randomly select non-beacon nodes to fail be- Per data packet header overhead: Aside from the con-tween two consecutive routing updates to create topol- trol traffic, routing protocols also have overhead in theogy changes. There are two ways of updating the routing data packet headers. The overhead of S4 includes thestate after the initial round: either incrementally update closest beacon ID to the destination and its distance. Forbased on the current routing state (incremental DV), or BVR, the overhead mainly depends on the number ofbuilds new routing tables starting from scratch (regular routing beacons KR . The packet header of BVR in-DV). As shown in Figure 6, when the number of node cludes a KR -long destination coordinate, which has at Kfailures is small (e.g., within 5%), incremental routing least ⌈log2 KR ⌉ bits indicating which KR nodes are
  9. 9. chosen out of the total K beacons as the routing beacons 1-hop as a baseline comparison.for the destination. For example, a rough estimation sug-gests that with K = 56 and KR = 10, BVR requires 5 TOSSIM Evaluation15-byte packet headers, which is significant compared We have implemented a prototype of S4 in nesC lan-to the default packet payload size of 29 bytes in mica2 guage for TinyOS [9]. The implementation can be di-motes, while S4 only takes 3 bytes in the packet header. rectly used both in TOSSIM simulator [18] and on real4.2.2 Under obstacles: sensor motes. In this section, we evaluate the perfor- 8 mance of S4 using extensive TOSSIM packet-level sim- S4, obstacle len=1.25 ulations. By taking into account actual packet transmis- 95th percentile transmission stretch 7 S4, obstacle len=2.5 6 BVR, obstacle len=1.25 BVR, obstacle len=2.5 sions, collisions, and losses, TOSSIM simulation results 5 are more realistic. 4 Our evaluation considers a wide range of scenarios by 3 varying the number of beacon nodes, network sizes, net- 2 work densities, link loss rates, and traffic demands. More 1 0 20 40 60 80 specifically, we consider two types of network densities: number of obstacles a high density with an average node degree of 16.6 and aFigure 8: Transmission stretch comparison between S4 low density with an average node degree of 7.6. We useand BVR in the presence of obstacles. both lossless links and lossy links that are generated by We now study the performance of S4 and BVR in the LossyBuilder in TOSSIM. Note that even when links arepresence of obstacles using the same methodology as in lossless, packets are still subject to collision losses. In[4]. The obstacles are modeled as horizontal or vertical addition, we examine two types of traffic: a single flowwalls, which completely block wireless signals. (They and 5 concurrent flows. The request rate is one flow perdo not reflect wireless signals.) We vary the number and second for single-flow traffic, and 5 flows per second forlength of those randomly placed obstacles. We find that 5-flow traffic. The simulation lasts for 1000 seconds. Sothe median transmission stretches of S4 and BVR are the total number of routing requests is 1000 for single-1.00 and 1.04, respectively. They are both insensitive flow traffic, and 5000 for 5-flow traffic. We compare S4to the obstacles. However, as shown in Figure 8, the 95th with BVR, whose implementation is available from thepercentile of the transmission stretches of S4 and BVR public CVS repository of TinyOS.are quite different: S4 has a constant 95th percentile 5.1 Routing Performancestretch around 1.2 regardless the existence of obstacles,while the transmission stretch of BVR increases with the First we compare S4 with BVR in stable networks. Tonumber of the obstacles and the length of the obstacles. achieve stable networks, we let each node periodicallyFor example, when there are 75 obstacles with length 2.5 broadcast RBDV and SDV packets every 10 seconds.times of the transmission range, 12.9% of the links are Data traffic is injected into the network only after routeblocked by them. As a result, the 95th percentile trans- setup is complete. BVR uses scoped flooding after amission stretch of BVR increases up to 7.9 due to the packet falls back to the closest beacon to the destina-irregular topology, while the stretch of S4 stays around tion and greedy forwarding still fails, whereas S4 uses1.2. This is because S4’s worst-case routing stretch guar- the distance guided failure recovery scheme to recoverantee is independent of network topologies. failures. To make a fair comparison, in both BVR and S4 beacon nodes periodically broadcast and build spanning4.2.3 Summary trees, and RBDV is turned off in S4.Our evaluation shows that S4 provides a worst-case rout- 5.1.1 Varying the number of beaconsing stretch of 3 and an average routing stretch around√1.1 - 1.2 in all evaluation scenarios. When K = N We vary the number of beacon nodes from 16 to 40 while(a favorable operating point for both S4 and BVR), S4 fixing the total number of nodes to 1000.has significantly smaller routing state than BVR. While Routing success rate: We study 4 configurations: a sin-the initial route setup traffic in S4 is higher than that of gle flow with lossless links, a single flow with lossy links,BVR, due to its compact location representation, its total 5 flows with lossless links, and 5 flows with lossy links.control traffic including location setup is still compara- In the interest of space, Figure 9 only shows the results ofble to that of BVR. Furthermore S4 can efficiently adapt the first and last configurations. “HD” and “LD” curvesto small topology changes using incremental routing up- represent results under high and low network densities,date. Finally, BVR 1-hop is more scalable than BVR respectively.2-hop due to its lower control traffic and routing state. We make the following observations. First, under loss-So in the following evaluation, we only consider BVR less links with 1 flow, S4 always achieves 100% success
  10. 10. Single Flow, Lossless Links 5 Flows, Lossy Links 1 1 Transmission Stretch: As shown in Figure 11(a), the 0.99 0.9 transmission stretch of S4 is close to its routing stretch, S4−HD−Lossless 0.98 S4−LD−Lossless 0.8 while the transmission stretch of BVR is much largerSuccess Rate Success Rate BVR−HD−Lossless 0.97 BVR−LD−Lossless 0.7 S4−HD−Lossy S4−LD−Lossy than its routing stretch due to its scoped flooding. Fig- 0.96 0.6 BVR−HD−Lossy BVR−LD−Lossy ure 11(b) shows CDF of transmission stretches under 32 0.95 beacon nodes. We observe that the worst-case transmis- 0.94 0.5 sion stretch in S4 is 3, and most of the packets have trans- 0.93 0.4 15 20 25 30 Number of Beacons 35 40 15 20 25 30 Number of Beacons 35 40 mission stretch very close to 1. (a) Lossless links w/ 1 flow (b) Lossy links w/ 5 flows Single Flow, Lossless Links Single Flow, Lossless Links 3.5 1 Figure 9: Compare routing success under different num- BVR−LD−Lossless BVR−HD−Lossless bers of beacons, network densities and traffic patterns. 3 S4−HD−Lossless 0.8 Transmission Stretch S4−LD−Lossless 2.5 0.6 CDF rate. In comparison, BVR achieves close to 100% suc- 2 0.4 cess only in high-density networks, but its success rate S4−LD−Lossless reduces to 93% under low network density with 16 bea- 1.5 0.2 S4−HD−Lossless BVR−LD−Lossless cons. Why BVR does not provide delivery guarantee 1 0 BVR−HD−Lossless 15 20 25 30 35 40 1 1.5 2 2.5 3 even under perfect channel condition? After a packet Number of Beacons Transmission Stretch is stuck at the fallback beacon, scoped flooding is used, (a) Average transmission stretch (b) CDF of transmission stretch which could cause packet collisions and reduce packet Figure 11: Transmission stretch comparison delivery rate. Second, under lossy links with 5 flows, packet losses are common, and the performance of both Control traffic overhead: Compared with BVR, S4 in- S4 and BVR degrades. Nevertheless, S4 still achieves troduces extra control traffic of SDV to construct routing around 95% routing success rate in high-density net- tables for local clusters. To evaluate this overhead, we works, while success rate of BVR drops dramatically. count the average control traffic (in bytes and number The large drop in BVR is because its scoped flooding of packets) that each node generates under lossless links uses broadcast packets, which have no reliability support and a single flow. We separate the global beacon traffic from MAC layer; in comparison, data packets are trans- and local SDV traffic. The results are shown in Figure 12. mitted in unicast under S4, and benefit from link layer Note that beacon traffic overhead is the same for both S4 retransmissions. Third, the success rate is lowest under and BVR. low-density networks, with lossy links and 5 flows. Even Single Flow, Lossless Links Single Flow, Lossless Links 450 80 in this case S4 achieves 70% - 80% success rate, while Beacon−HD−Lossless Beacon−HD−Lossless 400 DV−HD−Lossless 70 DV−HD−Lossless the success rate of BVR is reduced to below 50%. Control Overhead (Packets) Beacon−LD−Lossless Beacon−LD−Lossless Control Overhead (Bytes) 350 DV−LD−Lossless DV−LD−Lossless 60 Single Flow, Lossless Links 5 Flows, Lossy Links 300 50 1.5 1.8 BVR−HD−Lossless 250 BVR−LD−Lossless 1.7 40 200 1.4 S4−HD−Lossless S4−LD−Lossless 1.6 BVR−HD−Lossy 30 150 BVR−LD−Lossy Routing Stretch Routing Stretch 1.3 1.5 S4−HD−Lossy 20 100 s4−LD−Lossy 1.4 50 10 1.2 15 20 25 30 35 40 15 20 25 30 35 40 1.3 Number of Beacons Number of Beacons 1.2 1.1 (a) Control traffic in Bytes (b) Control traffic in number of packets 1.1 1 15 20 25 30 35 40 1 15 20 25 30 35 40 Figure 12: Control traffic overhead under different num- Number of Beacons Number of Beacons bers of beacons and network densities (a) Lossless links w/ 1 flow (b) Lossy links w/ 5 flows We can see that when the number of beacons is small, Figure 10: Compare routing stretch under different num- the SDV traffic dominates, since the cluster sizes are rel- bers of beacons, network densities, and traffic patterns. atively large in such case. As the number of beacons Routing stretch: Figure 10 compares the average rout- increases, the amount of SDV traffic decreases signif- ing stretch of S4 and BVR. The average routing stretch icantly. In particular, when there are 32 beacons (≈ √ is computed only for the packets that have been success- 1000), the amount of SDV traffic is comparable to the fully delivered. Although the worst stretch of S4 is 3, amount of global beacon traffic. Moreover, if we include its average stretch is only around 1.1 - 1.2 in all cases. In control traffic for setting up location directory, the total comparison, BVR has significantly larger routing stretch: control traffic in S4 would be comparable to that of BVR, its average routing stretch is 1.2 - 1.4 for 1 flow, and 1.4 as shown in Figure 7. - 1.7 for 5 flows. Moreover its worst routing stretch (not Routing state: We compare routing state of S4 and BVR shown) is 8. as follows. For S4, the routing state consists of a bea-

×