On the performance of modified flooding algorithms in an infrastructure-less timevarying radio short messaging network Clayton Tabone University of Malta ctab004@um.edu.mt Abstract In this paper the possibility of building a free radio peer-peer messaging system based on an infrastructure-less time-varying network is investigated. This task is accomplished by testing modified flooding algorithms over a simulated time-varying radio network. A physical radio model is developed to simulate an Aloha-based medium access protocol and the time-varying network is modeled with a community based mobility model. The performance of the modified flooding algorithms are studied on this time-varying network model and the algorithms are compared in terms of number of messages delay, end-to-end delay, and scalability. 1. Introduction Routing in multi-hop networks has been the subject of much research and controversy during the last decade. More than fifty algorithms have been proposed, most of which are twists and variants of a smaller set of original algorithms. Despite this effort several issues, for example maintaining a route and ensuring a certain level of QoS, still lack a satisfactory solution, and the research in ad hoc networks has now taken a different route. Another area that has lacked attention is the use of suitable mobility models. However infrastructure-less radio data networks can be very useful in providing low-cost slow-speed connectivity, given that a minimum number of such devices are deployed over a given area. Such an application is a real-time short messaging system, that can be easily added to a mobile device enabled with a suitable simple single channel radio transceiver. This service is an alternative to the SMS service without requiring the infrastructure offered by mobile network providers, thus making the transmission of these messages totally free of charge and with no central point of failure. In September 2007 a Swedish company started working on a similar project whereby it is selling modified handsets which Adrian Muscat University of Malta adrian.muscat@um.edu.mt enable free mobile telephony via an infrastructure-less network. Such a system has not been well studied and in this paper the performance of a messaging system over an infrastructure less network is investigated with a computer simulation. 2. The Physical Layer The radio propagation model chosen for the physical layer is the free-space path loss model. The transmit power of each node is set to a constant 100mW. The frequency of the wireless link being modeled is set to 2.5GHz in this paper. The system modeled makes use of a single channel, thus only simplex mode transmissions may occur since all nodes transmit and receive on the same channel. The minimum detectable signal of each receiver is assumed to be equal to -70dBm, which defines the range of these devices, 301.77m. The nodes are assumed to have an infinite queue for buffering messages. The nodes also have a list which maintains the most recent history for each node. The stored data includes the past transmissions and receptions. Elements from these lists are removed periodically during the simulation, thus their size is also limited. The Data Link Layer in the simulator performs multiple access control (MAC) over the transmission medium. The model assumes the pure Aloha MAC protocol. The radio capture effect is taken into consideration with a capture ratio of 5dB. The network layer performs the routing functions. The protocols of the network layer have the function of routing any received messages to some other node. 3. The routing protocol The basic flooding algorithm states that any receiving node will retransmit the received message to all its neighbouring nodes if the Time To Live (TTL) counter of the received message is greater than zero, and the receiving node is not the destination node. Each new message being created must be assigned an initial fixed TTL counter. Each time the message is transmitted by some node, that node is responsible for decrementing this counter. When this counter reaches zero, the message is discarded. In this paper a node will not transmit multiples of the same packet. This is done by keeping a history list. In order to reduce collisions a received packet is relayed after a random amount of time. The geographical-based protocol uses position data from the transmitting and destination node to direct the transmission towards the destination. The scope of this study is to determine whether position information improves the efficiency of the flooding protocol. The receiving nodes will have the following data available; their current position, the position of the destination node, the position of the last node. The receiving node calculates two distances: A = The distance between the receiving node and the destination node B = The distance between the last node and the destination node If A is smaller than B the message will be transmitted by the receiving node. This condition creates a limitation on the direction where the message is flooded. Received messages will only be routed if the receiving node is closer to the destination node than to the last node. gives quite a realistic mobility pattern for people moving from one town to another (e.g. to go to work). In each group location a community is formed. The Community based Mobility Model, developed by Musolesi and Mascolo [2] was chosen for this application. The model is based on the assumption that normally mobile nodes are carried by people and thus their mobility behaviour may be based on the social networks which each person belongs to. Fig.1 shows a snapshot of the node configuration in one of the simulations where the Community Based Mobility model is being used. The black lines depict the path that the node has been moving through. This figure shows clearly that the nodes move from one community to another. This process forms virtual “streets” which connect each community with all the others. Development of Computer Simulation Due to the simple air interface of the problem and also due to the fact that the problem lies mainly in the routing and mobility parts a self-developed discrete event-based simulator was used to study the problem, rather than an off the shelf simulator like OPNET or ns-2. Full details of this network simulator is given in [3]. 4. The Mobility Model The choice of mobility model can have a significant effect on the performance of an ad hoc network protocol. Thus it is important to choose a proper mobility model. If the mobility model does not model closely the mobility behaviour of the nodes in the real system, it is possible that the results obtained from the simulation do not illustrate the true performance of the system [1]. The simulation scenario in this project is that of people moving around inside different premises or towns (depending on simulated area size) forming separate groups or communities. The majority of these group members remain in the same group for a long period of time (e.g. 8hrs). Then, these people move to another group in another geographical location either by walk or by using some form of transport. They spend another long period of time in that group and then they choose another group and move to another location. This process repeats itself and Figure 1 – Components of the graphical user interface Both textual information and graphical information was outputted during the validation and verification stages of the network simulator. A GUI that displays the position and activity of each node was therefore developed. Textual Information was outputted on the console. The GUI proved to be very useful when testing networks made up of a large number of nodes and also when testing the mobility model. The GUI included features such as node identification, traces, transmission circles, a single stepping function, and a progress bar. Fig.1 shows a snapshot of the GUI. the packet delivery rate under varying traffic conditions. The nodes were positioned in the form of a grid and the neighbour count for this system is very close to 8, calculated as in [5]. Table 1 gives the parameters for this test setup. Table 1 – Network protocol validation over an idle network Number of nodes Simulation area shape Simulation area dimensions Link delay Duration of simulation Duration for the transmission of one message TTL Offered Traffic (node 0 only) 5. Model Validation The Aloha MAC protocol layer was validated with the theoretical model given in [4] and in static conditions. Fig.2 shows the simulation and theoretical results when the capture effect is switched off, while Fig.3 gives the throughput versus traffic offered with the capture threshold set at 5dB. Both results are as expected. Practical and theoretical throughput for pure Aloha Practical Theoretical 16 Throughput (%) 1,900 m × 1,900 m 1×10-9 s = 1 ns 43200 s = 12 hours 0.1 s 15 hops 0.01 packets/s – 100 packets/s Fig.4 & Fig.5 show the results. As expected, the performance of both protocols decreases as the traffic rate is increased. The smallest message delay for low channel utilisation was around 5s. This delay can be attributed to the back off duration that each node waits before routing the message to its adjacent nodes. This delay was introduced in order to reduce the number of collisions. 20 18 100 Square 14 12 10 Average Delay Vs. Interarrival time 8 6 120 4 Flooding 2 Geographical 100 0 1 2 3 4 Average Message Delay (s) 0 5 Channel Utilisation (attempts per packet time) Figure 2 – Throughput of pure Aloha protocol 80 60 40 20 0 Throughput for Aloha with capture ratio equal to 5dB 0 2 4 6 8 10 12 Interarrival time (s) 35 Throughput (%) 30 25 Figure 4 – Average message delay for both protocols over an idle network 20 15 10 5 0 0 2 4 6 8 10 Channel Utilisation Figure 3 – Throughput of Aloha protocol with a capture effect of 5dB The behaviour of the network protocols was verified by studying the transmission delay and 12 As a rule of thumb, the maximum back off duration was selected to be an order of magnitude larger than the message duration and the smallest back off duration was selected to be equal to the message duration, i.e., 0.1s. Hence the mean back off duration is 0.55s. In the gridstyle scenario being considered and under ideal conditions an average delay of 9×0.55s = 4.95s should be expected. Message Delay Vs. Network Traffic for various source packet rates 1400 1200 Message Delay (s) This delay increases for higher values of network traffic. This happens because collisions occur more frequently, thus the messages that were previously passing through the shortest path under low traffic conditions, now have a larger probability of collision. This will increase the possibility of a sub-optimal route being used. As a result of this, the message is delivered over a longer path with a larger number of hops. Thus the average message arrival delay increases. 1000 800 600 400 200 0 1280 640 15 320 213 160 Delivery rate Vs. Interarrival time 30 80 45 67 57 Interarrival time for network traffic (s) 50 120 0-200 200-400 400-600 600-800 800-1000 60 40 1000-1200 Interarrival time for source traffic (min) 1200-1400 Percentage delivery rate (%) 100 Figure 6 – Average message delay for flooding protocol over a busy network 80 60 40 20 Flooding Geographical 0 0 2 4 6 8 10 12 Interarrival time (s) Figure 5 – Delivery rate for both protocols over an idle network The delivery rate, is largely dependent on the amount of network traffic, whilst the amount of source traffic is not a strong factor towards the resulting delivery rate under these traffic conditions. See Fig.7. The same network setup is used for the validation of the geographicalbased protocol and similar results are observed. Delivery Rate Vs. Network Traffic for various source packet rates Fig.5 shows the percentage delivery rate for the system. The lower delivery rates achieved for higher traffic conditions are attributed to the increase in the number of collisions. The same network was tested for the case when nodes 0-98 were transmitting, i.e. a busy network and the flooding protocol was used. Fig.6 shows the message delay for the busy network. 90 80 Delivery rate (%) Fig.4 & Fig.5 show that the performance of both protocols is practically identical in terms of the delivery rate and the transmission delay for an idle network with node 0 as the only transmitting node. 100 70 60 50 40 30 20 10 0 1280 640 320 213 60 160 45 80 67 Interarrival time for network traffic (s) 0-10 10-20 20-30 30-40 40-50 50-60 30 57 50 60-70 15 40 70-80 80-90 Interarrival time for source traffic (min) 90-100 Figure 7 – Delivery rate for flooding protocol over a busy network 6. Results For this application the results of interest are the delay for a message and the success rate in delivering messages. These two parameters will determine the feasibility of the system. The performance of the flooding protocol when routing peer-to-peer traffic over a mobile network was studied. In this case a low packet rate was used. The reason for this is the additional network traffic generated for every new packet generated. Fig.8 shows the average message delay for various traffic intensities. The highest average message delay is five seconds at the highest traffic tested. In this case the average message delay is lower when compared to the result obtained in the protocol validation phase. The reason behind this is the fact that the average number of hops is now lower than in the previous test cases, since the distance between source and destination varies. In some cases, this distance might even be as short as a single hop. The performance of the two protocols are very close to each other. However, the results show that under certain conditions it is preferable to use one protocol over the other. Fig.8 shows the delay for the two protocols. The two protocols behave very similarly in terms of message transmission delay. This once again confirms the statement that for this particular test setup, the network size is the main factor affecting the message delay. Thus, the message delay should not be considered as a prime factor for choosing one protocol over the other. Average delay Vs. Interarrival time The reason for achieving such low delivery rates can also be attributed to the fact that the network is mobile. As previously stated, each node keeps a history of past messages. This feature was added to try and limit the amount of packets generated by the flooding protocol. However, this might pose a serious limitation on the performance of the network under mobility conditions. A node can retransmit a message in a particular location. This same node then moves to another location. The node receives the message again in its new location. This node might be the last and only hop which is in range to some cluster of nodes in another community. The node might not retransmit the message since it is in its network history. Thus the message will not be passed to the cluster of nodes to which the destination node belongs. The geographical-based flooding protocol was studied over the same peer-to-peer network. The average delay of the geographical-based protocol is comparable to that observed for the flooding protocol, i.e. 5 seconds. This shows that the delay is mainly limited by the network size, which limits the number of hops for each transmission path and the back-off time, Fig.8. The plot for the delivery rate also follows the same shape as the plot for the flooding protocol. However, the largest delivery rate seen is slightly above seventy per cent for this network setup, Fig.9. 8 Flooding 7 Average Message Delay (s) The delivery rate of the flooding protocol in this test is reasonable for very low traffic rates where each node generates a new message approximately every 8 hours. However the amount of packets generated by the flooding protocol for each new message is large, Fig.9. Geographical 6 5 4 3 2 1 0 0 20 40 60 80 100 120 Thousands Interarrival time (s) Figure 8 - Average delay for both protocols over a mobile network Fig.9 shows the delivery rates obtained for both protocols. This plot shows clearly that the geographical-based protocol behaves slightly better when the interarrival time is shorter than 12000s or 3hrs, 20mins. However both protocols have a delivery rate of less than 60% for this level of traffic. This shows that the system is not appropriate when each user sends more than 1 message every 3hrs, 20mins. The geographical-based protocol gives slightly higher performance for this higher traffic rates since it has less overhead. Despite this, the performance is still unsatisfactory. The flooding protocol gives around 15% higher delivery rates than the geographicalbased protocol for an interarrival time higher than 20000s or 5hrs, 30mins. This higher performance is due to the fact that the flooding protocol does not discard the redundant paths as the geographical-based protocol does. Delivery rate Vs. Interarrival time 100 Percentage delivery rate (%) 90 80 70 60 50 40 30 20 Flooding 10 Geographical 0 0 20 40 60 80 100 120 140 Thousands Interarriv al time (s) Figure 9 - Delivery rate for both protocols over a mobile network It is highly improbable that all users send more than an average of one message per 5hrs, 30mins. Thus, under these conditions the flooding protocol should be chosen over the geographical-based protocol. This means that the additional resources required in implementing the geographical-based protocol does not offer the expected advantages for this network, hence it is not feasible. The delay caused by the queuing time is highly dependant on the value of the back-off duration. It is worth noting that the value of the back-off duration must be chosen wisely. The choice of the back-off is a trade off between the responsiveness and the delivery ratio of the system. If further simulations are conducted with various values for the back-off duration, an optimal value for the back-off duration can be obtained for a particular set of network conditions. Several routing protocols implement some form of feedback mechanism together with an adaptive algorithm in order to obtain the best instantaneous value for the back-off duration. References [1] T. Camp, J. Boleng, and V. Davies, “A Survey of Mobility Models for Ad Hoc Network Research,” Wireless Communication & Mobile Computing (WCMC): Special issue on Mobile Ad Hoc Networking: Research, Trends and Applications, vol. 2, 2002, pp. 483-502. [2] Mirco Musolesi and Cecilia Mascolo, “A community based mobility model for ad hoc network research,” Proceedings of the 2nd international workshop on Multi-hop ad hoc networks: from theory to reality, Florence, Italy: ACM, 2006, pp. 31-38; http://portal.acm.org/citation.cfm?id=1132983. 1132990. [3] “The Network Simulator http://www.isi.edu/nsnam/ns/. [4] Yuping Zhao, “Basic MAC Protocols”; http://signal.hut.fi/geta/courses/lecture_mat/yup ing/Lecture%203%20%20MAC%20basics%20-%20ALOHA.pdf. [5] S. Kurkowski, T. Camp, and M. Colagrosso, “MANET Simulation Studies: The Incredibles,” ACM's Mobile Computing and Communications Review, vol. 9, Oct. 2005, pp. 50-61. 7. Conclusions The simulation environment which was built in this project provides a good platform to test new protocols in the future. It was designed in a modular style to permit easy integration with new protocols. Unfortunately, the flooding protocol with acknowledgement which was implemented as part of the project could not be validated due to lack of time. Hence the results for this protocol were not included in the dissertation. This protocol offers the acknowledgement feature over the standard flooding protocol. It would be a good idea to test this protocol. Position-based protocols seem to scale well for this system. Other protocols which use a position-based scheme can be implemented in the simulator and compared to the simple geographical-based protocol which was implemented as part of this project. The large message delay incurred is partly due to the re-transmit feature in the design of the relaying protocol. If this is reduced as can be done in practice then the message delay I significantly reduced. - ns-2”;