Signal Strength based Service Discovery (S3D) in Mobile Ad Hoc Networks Jinshan Liu ValeĢrie Issarny INRIA - Rocquencourt Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay Cedex, France Email:jinshan.liu@inria.fr INRIA - Rocquencourt Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay Cedex, France Email:valerie.issarny@inria.fr Abstract— Service discovery is an important part of realization towards ubiquitous computing with self-configurable mobile ad hoc networks. However, it is faced by the challenge of network dynamics due to node mobility. In this paper, we propose a signal strength based service discovery framework in mobile ad hoc networks. Service discovery is carried out selectively along reliable links by monitoring the qualities of wireless connections to neighbor nodes. We show by simulation that, compared to non-selective distributed service discovery, our approach achieves higher service success ratio, less message overhead and shorter service discovery latency. I. I NTRODUCTION Service discovery in Mobile Ad hoc NETworks (MANET) is an important part of realization towards service access anytime, anywhere. However, it poses greater challenges than in traditional distributed systems, since service failure more often results from disconnection due to host migration [1]. Therefore, transient wireless medium and device roaming require a dedicated service discovery approach in MANET. The basic criteria for evaluating a service discovery scheme is the effectiveness with which: (1) service clients are able to find a service provider and (2) the service provider will successfully deliver the requested service. Since connections can be broken with nodes moving, the most important factor affecting service delivery success is the qualities of wireless connections along the service path between service provider and requester. Connectivity can be determined according to the relative distance (e.g., Euclidean distance) of the geographical positions of the nodes. For instance, physical proximity of service providers to service seekers has been proposed as a metric for service selection [2]. However, position acquiring is luxury and comes at a price. From current state of the art, one way to obtain (geographical) position is by using GPS. But GPS is an extra hardware and suffers from poor signals in indoor environments. Another way is by measuring relative locations from fixed, position-known base stations [3]. But it requires the coordination of multiple base stations (e.g., Angle of Arrival [4]) and thus does not fit MANET. Therefore, “geographical proximity” is an inefficient and insufficient means for deriving connectivity. Two factors affecting link quality are signal strength (SS) and signal to noise ratio (SNR). Thus, instead of trying to obtain geographical locations of moving nodes, we resort to the measured wireless connection metrics and their variation tendency to identify reliable services in mobile ad hoc networks. We propose in this paper a simple, yet efficient, service discovery framework, based on signal quality. To our knowledge, our approach is the first effort to select mobile services in MANET based on link quality. The rest of this paper is organized as follows. Section II examines the wireless communication background and surveys related work. Section III proposes and elaborates our service discovery framework based on signal quality. And then Section IV presents simulation-based evaluation results. Finally, the paper finishes with concluding remarks and future work. II. BACKGROUND AND R ELATED W ORK A. Background The radio wave (signal) propagation is generally modeled by the combination of large scale and small scale propagation models [5]. Node movement over short distances (e.g., a few wavelengths) may cause the received signal strength, which is the sum of contributions of multiple components, to fluctuate rapidly, giving rise to small scale fading. As the node moves over longer distance, the local signal strength average (i.e., average of signals measured over a distance from 5λ to 40λ – about from 0.6m to 5m for 802.11b) gradually decreases. We call the distance locality distance and large-scale propagation model estimates the average signal over the locality distance. Large scale is of interest here because the aim of our work is to capture the movement tendency of the nodes, and thus to discover services that are less likely to fail because of movement-induced network disconnection. However, small scale fading makes it difficult to recognize the node’s moving tendency and cannot be simply ignored. Small scale fading can be modeled by Ricean fading (with line of sight) or Rayleigh fading (with no line of sight) [5]. During signal transmission, the transmitter sends the signal with certain transmission power. Subject to large-scale and small-scale fading, the signal arrives at the receiver with certain power, along with the interference from background noise and other parties who share the same band. Each receiver has a receiver sensitivity, which is the power of the weakest signal that can be reliably heard and demodulated by the receiver, and a threshold Signal to Noise Ratio (SNR), defined as the minimum received power difference between signal and noise for the receiver to be able to receive successfully. Therefore, signal transmission succeeds only if the received signals satisfy both the receiver sensitivity and the SNR threshold. Both SS and SNR of a received packet can be obtained from the wireless card driver. In order to observe the variation (i.e., both large-scale and short-scale fading) of SS and SNR, we conduct experiments to measure the two metrics, between two laptops equipped with Lucent WaveLAN IEEE Silver cards, both of which implement 802.11b standard and have omni-directional antennas. The two laptops are running on Linux (RedHat) with 2.4.26 kernel and connecting with each other via a wireless link. The experiments are all carried out indoors in the day. The measurement of signal and noise level was performed every 1 second for a period of 50 seconds, by consecutively sending “HELLO” message and measuring the signal and noise power from the returned replies. Variation of signal and noise power -50 signal power noise power average signal power over locality distance -55 -60 Power level (in dBm) -65 -70 -75 -80 -85 -90 -95 -100 0 10 20 30 40 50 Time Fig. 1. Signal and noise power when one node is moving The experiment is carried out by having one of the laptop move away from the other at human walking speed (Fig. 1). It can be seen that the average signal strength over locality distance (as shown with dotted line) clearly drops with longer distance, in spite of fluctuation in a short distance. It proves that node movement can be detected by observing the variation tendency of average received SS over the locality distance. After elaborating and observing SS and SNR in wireless communication, we survey the related work on signal qualities and service discovery. B. Related Work Existing wireline network oriented service discovery solutions, including Sun’s Jini, Microsoft’s UPnP as well as IETF’s SLP [6], do not suit MANET well [7]. Although they do not rely solely on centralized service registry (e.g., SLP and UPnP), and service registry adopts time to live (e.g., Jini) to counter node dynamics in MANET, they lack service selection based on context information such as link quality. More recent services (or resource) discovery in mobile ad hoc networks have been proposed in [8]–[11]. Helal et al. propose a service discovery and delivery protocol for ad http://folk.uio.no/paalee/ hoc networks based on a distributed discovery manager [8], which, however, does not distinguish reliable from unreliable links in service discovery. Other solutions such as allia [9] or GSD [10] are based on peer-to-peer caching of service advertisements with service queries simply forwarded to peers, or resource-rich peers if indicated so in service advertisements. This might not be helpful because resource-rich terminals are not surely reliably connected to the service seeker and steering service queries preferably to rich terminals does not increase chances of successful service discovery and delivery. Liu et al. propose a distributed resource discovery in MANET using dynamically generated directory agents [11], which provide lookup service, and collect and predict QoS information. However, the resource/service provider selection focuses on metrics such as path delay, instead of path reliability. Since communication in MANET is carried out via wireless medium, we resort to signal strength (SS) and signal to noise ratio (SNR) for server/service selection. SS and SNR are widely used in WLAN access points deployment, as well as positioning system to track mobile users or sensors [3]. These proposals utilize the mobile radio propagation model to determine user location. Our approach does not use signal strength to derive distance between two nodes. Instead, we exploit the variation tendency of signal strength to detect the relative movement between nodes, which is utilized to identify leaving and thus unreliable service providers. Signal strength has also been proposed as a metric for selecting reliable routes in routing protocols for mobile ad hoc networks [1], [12], [13]. The metrics used by [13] is the average signal strength and route stability, while in [12], the authors suggest a SNR-based neighbor selection for handling unreliable links. These approaches utilize SS to indicate strong or weak channels, without deriving any movement tendency. With no link reliability information readily available from the underlying layer, we resort to an inter-layer design by exploiting the link quality of physical layer at application layer, as detailed in the next section. III. S IGNAL S TRENGTH BASED S ERVICE D ISCOVERY (S3D) As stated, because of signal strength fluctuation due to small scale fading, the SS collected at one time can be in a large range, without clear indication of the link quality. But if a neighbor is moving further, the average of SS over locality distance (e.g., 40λ) is decreasing [5]. Here, neighbors refer to the nodes reachable in one hop. Therefore, by keeping the history of recent consecutive beacons from neighbors, the neighbor’s tendency to leave can be detected by observing whether the average SS over consecutive locality distances is decreasing. Neighbor’s departure or failure can be indicated by absence of beacons from this neighbor for some threshold length (e.g, three times the beacon interval in OLSR [14]). In addition, a wireless link is possibly asymmetric, with signal quality probably much different from two ends of a link due to difference in transmission power, interference extent and other factors. Hence, a wireless link is considered reliable only when: (1) the signal qualities (i.e., SS and SNR) from both ends are above receiver-specific threshold values, (2) the average SS over consecutive locality distance is not decreasing, and (3) the link is active (i.e., exchange of beacon messages occurs recently enough). The neighbor on the other end of a reliable link is named strongly connected neighbor (SCN). Our signal strength based service discovery (S3D) framework performs on-demand service discovery only along reliable links, so that the path between service requester and provider is strongly connected. The underlying method of our framework is that by regularly broadcasting beacon packets to neighbors, each terminal derives the reliability of its neighbors from the signal quality and its variation tendency. Then each node can selectively send service queries only to strongly connected neighbors (SCNs), which may in turn forward service queries to their SCNs. In other words, the service discovery and delivery are only carried out on reliable links by avoiding those weak, obsolete and diminishing links. Concretely, each node tracks the signal information of wireless connection to its neighbors, by keeping a neighbor table (NT), which contains a list of its (one-hop) neighbors. Each entry contains a neighbor’s Id (NID), multiple samples of SS and SNR from the node’s end, along with the timestamp of the node’s signal measurement (SS, SNR, TS), average SS and SNR from the neighbor’s end (NSS and NSNR), the timestamp of the neighbor’s signal measurement (NTS), and the services provided by the neighbor (PServices). Note that NT does not incur large storage overhead because of the limited number of one node’s one-hop neighbors. service. If so, it requests the service from that SCN. If multiple SCNs provide the service, further selection can be done either by signal strength, link longevity, or other QoS metrics. If no SCN provides the service, it multicasts a serv disc to SCNs, which includes: (i) a unique sequence number; (ii) a service path with the first address filled with its own address and (iii) SCNs’ addresses along with their signal information. To avoid unnecessary remulticasting, each node keeps a cache of queries it has already handled. Note that service path in serv disc contains the intermediate nodes the service query has traversed to prevent looping. On receiving a serv disc packet, a node (1) extracts signal information of both ends, similar to serv beacon handling; (2) checks whether it has already handled the query from the sequence number. If it has, it discards the packet and does nothing; (3) checks locally whether it (or one of its SCNs) provides the service. If that is the case, it appends its address (or its address and that SCN’s address) and sends back a serv resp. (4) If neither it or any SCN provides that service, appends its address to the end of the service path and multicasts the serv disc to its SCNs that are not already in the service path, with signal information of links to all the destination neighbors’ piggybacked. Then it adds the query sequence number into its handled service query cache. C. Service Path Selection and Service Delivery A. Beacon Packets For every beacon interval, a node broadcasts to its (onehop) neighbors a UDP packet serv beacon, in which it announces its provided services and informs the neighbors about the average link qualities over the most recent locality distance at its end. On receiving a serv beacon, a node extracts SS and SNR of its end, and updates in NT the signal quality of the link (i.e., both ends) to the beacon sender. In this way, both nodes can obtain the link quality from both ends. After sending a serv disc, a client may receive multiple replies with different service paths. Therefore, a client-side service path selection scheme needs to be in place to select the best candidate. Service path selection is followed by service delivery, which is carried out along the selected service path. From the client’s perspective, service response time (T) is the sum of service discovery time, service selection time and service delivery time. Service path selection can be based on metrics of: hop count, geographical proximity, round trip latency [15], among others. We select the path with the least service discovery time, by always choosing the first service discovery reply because: (1) It is simple and requires no service path selection time; (2) Geographical proximity requires extra hardware like GPS and is inefficient; (3) Smallest hop count approach incurs waiting time for all responses to arrive and does not necessary lead to shorter latency [16]; and (4) The measured service discovery time, which is the round trip time between the service seeker and a SCN of the service host1 , serves a decent estimation because it is a “probing” value – the path has experienced the shortest delay and is probably shorter and less congested than later arriving service responses. It is surely possible that the traffic along the selected service path becomes heavier after the service discovery or the traffic along another path turns lighter which makes it a better choice, but we argue that it is unavoidable price paid for prediction. B. Service Discovery When a node looks up for a service, it first looks into its Neighbor Table (NT) to see if one of its SCNs provides the 1 There might be very small difference since service discovery also involves service and neighbor lookup, but it is negligible because those information is stored locally. NID SS [0..n] SN R[0..n] T S [0..n] NSS NSNR NTS PServices To monitor link qualities, discover and deliver services, the following five types of packets are defined and used in our framework: • serv beacon is for exchanging signal and service information among neighbors. • serv disc is a discovery request for service. • serv resp is a response message for service discovery. • serv data carries the data from the service client to service provider during the service. • serv ack contains the returned service results. After receiving the first serv resp, the service seeker initializes the service using the embedded service path. IV. P ERFORMANCE E VALUATION In this section, we present the simulation results of our proposed approach. Our main objective is to investigate whether our solution for service discovery and selection improves service reliability, and whether the solution exhibits satisfactory performance in terms of message overhead and service discovery latency. A. Performance Metrics From the user’s perspective, the first concern is whether the service request is served successfully. A failure can result from two reasons: (i) Failure to find a service which satisfies its request; (ii) Success in finding the service, but failed service delivery because of broken connection attributed to node mobility (as this is the dominant reason for service failure). We use service delivery success ratio, which is the number of successful service deliveries to the total number of service invocations (i.e., after successful service discovery), to quantify the service reliability. The second concern for the user is the experienced service discovery latency, which equals the length of the interval between when the user issues a service discovery request and when a service discovery reply is received. To evaluate a service discovery scheme, it is also necessary to investigate its message overhead. Therefore, overall, we are interested in the performance metrics of our framework as follows: (1) service delivery success ratio; (2) total number of sent messages for each service discovery; and (3) service discovery latency. Because it takes time for the random waypoint model to reach a stable distribution of mobile nodes [19], the initial part of the simulation is not representative of the reality and is discarded. At the end of the simulation, because the service lasts some time and the service client needs some time to wait for arrival of acknowledgments, no queries are sent at the end of the simulation. Therefore, we choose to skip the first 200 seconds of the simulation result. From 200s to 450s, for each second, there is a node sending service discovery in a roundrobin way. Each simulation setting is executed 30 times, thus there are totally 250 × 30 = 7500 service discovery attempts for each setting and the average performance is presented. Multicast is simulated by specifying in the packet header a list of destination addresses. A node does not handle (except checking if it is one of the destinations) the packet if its address is not in the destination list. For the sake of comparison, we also simulate a distributed service discovery framework without beacons (e.g., the distributed query-based architecture in [20]). For simplicity of presentation, we name it DIST. Like S3D, DIST implements a limited-scope flooding approach for on-demand service discovery, but it does not distinguish strongly connected neighbors from weakly connected neighbors. Nodes in DIST also cache handled service queries to avoid unnecessary rebroadcasting, and traversed nodes are included in the packet header to avoid looping. C. Service Delivery Success Ratio Service success/failure with S3D and DIST (out of 250 requests) 200 S3D success DIST success S3D failure DIST failure 180 B. Simulation Environment 140 Number We evaluate our solution with ns-2 with CMU wireless extensions [17]. Our simulated network consists of 50 mobile nodes in an area of from 250m × 250m to 610m × 610m (increasing by 40m for each simulation setting), with each node having a transmission range of 100m with a Ricean propagation model [18]. We use the Random Waypoint mobility model with each node moving at walking speed, i.e., between 0.5m/s and 2m/s, with pause time of 0, i.e., nodes are always in motion. The Distributed Coordination Function (DCF) of IEEE 802.11 protocol is used as the MAC layer protocol. Each wireless channel has bandwidth of 2 Mbps. We do not use any routing protocol, and multi-hop transmission is done by intermediate nodes’ forwarding at the application layer. We assume that each node can host up to 10 services, out of 50 service types. Each node randomly demands a service that it does not host, and every service is served as a Constant Bit Rate (CBR) streaming application of 56 Kbps over 10 seconds. The service discovery range is 5 hops. Beacons are sent every 2 seconds, and locality distance is set to 5 meters, i.e., about 40 λ for IEEE 802.11b. The whole simulation lasts 500 seconds. 160 120 100 80 60 40 250 300 350 400 450 500 550 600 Area Fig. 2. Service success and failure number of S3D and DIST (out of 250 queries) The performance of S3D and DIST with respect to service success and failed number is compared in Fig. 2. It can be observed that S3D outperforms DIST by having more successful service delivery and much less failed service delivery for all areas, attributed to the link quality based path selection. And it is easy to derive the service delivery success ratio from the graph, and after calculation, it can be found that S3D always has an advantage of at least 10% over DIST in terms of service delivery success ratio. D. Message Overhead link quality aware service discovery as shown in the results of evaluation. Future research will focus on investigating the effect of enlarging the range of service advertisement, i.e., service advertisement is propagated to multi-hop peers. Recently there has been approaches of directory based service discovery in MANET [11], [21], [22]. Future work will incorporate these approaches into S3D to improve scalability for employment in large mobile ad hoc networks. Average Message Overhead 200 Average Message Overhead with S3D Average Message Overhead with DIST 180 160 Message number 140 120 100 80 ACKNOWLEDGEMENT 60 This research is partially supported by the European IST UBISEC Project (IST-2002-506926). 40 20 0 250 300 Fig. 3. 350 400 450 Simulation area 500 550 600 Message overhead of S3D and DIST Message overhead of each service discovery framework measures the number of sent packets, incurred by service discovery. For S3D, the overhead includes the packets of serv beacon, serv disc and serv resp, while the overhead for DIST only includes the later two. As shown in Fig. 3, S3D incurs less message overhead because of selective multicast instead of blind broadcast. The earned advantage clearly surpasses the overhead brought by periodic beacons. E. Service Discovery Latency Service Discovery Latency 0.14 S3D Service Discovery Latency DIST Service Discovery Latency 0.12 Second 0.1 0.08 0.06 0.04 0.02 0 250 Fig. 4. 300 350 400 450 Simulation area 500 550 600 Service Discovery Latency of S3D and DIST Service discovery latency for S3D and DIST are presented in Fig. 4. S3D clearly outperforms DIST, because each node caches the service information of its strong connected neighbors, and is likely to answer the query one hop earlier. The gain evidently surpasses the overhead brought by beacon packets. V. C ONCLUDING R EMARKS AND F UTURE W ORK Service discovery and selection in mobile ad hoc networks pose unique challenges because of possible service failures resulting from node mobility. In this paper, we propose a signal strength based service discovery (S3D) framework as a solution by steering the service discovery over reliable links. Our approach improves service delivery success ratio based on R EFERENCES [1] T. Goff, N. B. Abu-Ghuzaleh, D. S. Phatak, and R. Kahvecioglu, “Preemptive routing in ad hoc networks,” in Proc. ACM MobiCom, 2001. [2] V. Azondekon, M. Barbeau, and R. Liscano, “Indoor ad hoc proximitylocation sensing for service provider selection,” Telecomm. Systems, vol. 22, no. 1, 2003. [3] J. J. Caffery and G. L. Stuber, “Overview of radiolocation in CDMA cellular systems,” IEEE Communications Magazine, April 1998. [4] D. Niculeascu and B. Nath, “Ad hoc positioning system (APS) using AOA,” in Proc. of IEEE INFOCOM, 2003. [5] T. S. Rappaport, Wireless Communications: Principles and Practice. Prentice Hall, 2002. [6] Guttman, C. Perkins, J. Veizades, and M. day, “Service location protocol, version 2,” RFC 2608, 1999. [7] S. Helal, “Standards for service discovery and delivery,” IEEE Pervasive computing, vol. 1, no. 3, 2002. [8] S. Helal, N. Desai, V. Verma, and C. Lee, “Konark - a service discovery and delivery protocol for ad hoc networks,” in Proc. of 3rd IEEE Conf. on WCNC, 2003. [9] O. Ratsimor, D. Chakraborty, A. Joshi, and F. Finin, “Allia: Alliancebased service discovery for ad-hoc environments,” in Proc. of ACM mobile Commerce Workshop, 2002. [10] D. Chakraborty, A. Joshi, T. Finin, and Y. Yesha, “GSD: a novel group based service discovery protocol for MANETs,” in Proc. of 4th IEEE MWCN, 2002. [11] J. Liu, K. Sohraby, Q. Zhang, B. Li, and W. Zhu, “Resource discovery in mobile ad hoc networks,” The handbook of ad hoc wireless networks, 2003. [12] K. W. Chin, J. Judge, A. Williams, and R. Kermode, “Implementation experience with manet routing protocols,” ACM SIGCOMM Comp. Comm. Review, vol. 32, no. 5, 2002. [13] R. Dube, C. D. Rais, K. Y. Wang, and S. K. Tripathi, “Signal stability based adaptive routing (SSA) for ad-hoc mobile networks,” IEEE Personal Communications, vol. 4, no. 2, 1997. [14] T. Clausen and P. Jacquet, “Optimized link state routing protocol,” IETF RFC 3626, 2003. [15] R. L. Carter and M. E. Crovella, “Server selection using dynamic path characterization in wide-area networks,” in Proc. of IEEE Infocom, 1997. [16] D. D. Couto, D. Aguayo, B. A. Cambers, and R. Morris, “Performance of multihop wireless networks: Shortest path is not enough,” in Proc. of 1st workshop on Hot Topics in Networking, 2002. [17] LBNL, “Network simulator ns-2,” http://www.isi.edu/nsnam/ns, 2001. [18] R. J. Punnoose, P. V. Nikitin, and D. D. Stancil, “Efficient simulation of ricean fading with a packet simulator,” in Proc. of IEEE VTC, 2000. [19] T. Camp, J. Boleng, and V. Davies, “A survey of mobility models for ad hoc network research,” Wireless Communication and Mobile Computing (WCMC), vol. 2, no. 5, 2002. [20] P. E. Engelstad and Y. Zheng, “Evaluation of service discovery architecture for mobile ad hoc networks,” in Proc. of 2nd Annual Conf. on Wireless on-demand Network Systems and Services (WONS), 2005. [21] U. C. Kozat and L. Tassiulas, “Network layer support for service discovery in mobile ad hoc networks,” in Proc. of IEEE Infocom, 2003. [22] F. Sailhan and V. Issarny, “Scalable service discovery in MANET,” in Proc. of IEEE PerCom, 2005.