Analyzing the parameters of AODV, DSDV And DSR in WSN Using NS-2 S. Parvathy P. Pavithra A. R. Priyanka M. Sandhya Dept. of ECE Dept. of ECE Dept. of ECE Dept. of ECE Panimalar Engineering College, Poonamallee, Chennai. Panimalar Engineering College, Poonamallee, Chennai. Panimalar Engineering College, Poonamallee, Chennai. parvathy180@gmail.co m pavithra.ponnurangam @gmail.com Panimalar Engineering College, Poonamalee, Chennai. sandhyamoorthy6594@ gmail.com Abstract- Nowadays, Wireless Sensor Networks (WSNs) are widely exploited in many application. To design a reliable and efficient network under fading channel is one of the major challenges in WSNs. There are various routings available to provide significant benefits to the WSNs. Some of the most popular routing protocols are AODV, DSDV and DSR. The main focus of this paper is to evaluate the performance of these protocols and hence compare the same using a network tool. The network tool here used to simulate the performances of these protocols is Network Simulator-2 (ns-2). The parameters analyzed for comparison are Packet Drop, Throughput and Bit Error Rate(BER). Keywords- AODV, DSDV, DSR, BER, ns-2. I. INTRODUCTION Wireless Sensor networks are rapidly replacing the traditional wired communication systems [1]. A WSN consists of spatially distributed autonomous sensors to monitor physical or environmental conditions, such as temperature, sound, pressure, etc. using radio signals. Since the nodes are autonomous, it becomes easy to deploy many numbers of nodes and hence used in many applications such as military, industrial process monitoring and control, machine health monitoring, etc. Each sensor node has a radio transceiver, a microcontroller and an energy source like battery [2]. Sensor nodes can also derive energy by energy harvesting from renewable resources. In general the sensor networks are divided into two categories [3]. In the first category, almost invariably mesh based systems with multi-hop radio connectivity among or between WNs, utilizing dynamic routing in both wireless and wired portions of the network. Military-theater systems typically belong to this category. It supports highly distributed high node count applications (e.g., environmental monitoring, national security systems). In the second category point-topoint or multipoint-to-point, (star based) systems generally with single-hop radio connectivity to WNs, utilizing static routing over the wireless network; typically, there will be only one root from the WNs to the companion terrestrial or wired priyankaraghupathy94@g mail.com forwarding node (WNs are pendant nodes). Residential control systems belong to this category. It supports confined short range spaces such as a home, a factory, a building or human body. In any WSN, the transmission failure can result in missing or delaying of data packets which may require unnecessary retransmissions, thus increasing the end-to-end delay between source node and destination node and making the network become sluggish. To improve the robustness of the network many routing protocols such as AODV [4], DSDV [6] and DSR [7] are implemented and their performances for various parameters are compared and the results are simulated using ns-2. The rest of the work is organized as follows. Section II elaborates the related work. Section III describes the proposed method of the work. Section IV deals with the characteristics of the mentioned routing protocols. Section V provides the simulation details and results. Finally, Section VI concludes the work. II. RELATED WORK Wireless Sensor Network is a collection of selforganizing mobile nodes that communicates with each other through radio links. Such networks play a vital role in civilian and military applications, process control and monitoring applications, surveillance applications. To implement these applications, various routing protocols such as Ad-hoc On demand Distance Vector Routing (AODV) protocol, Destination Sequenced Distance Vector Routing (DSDV) protocol and Dynamic Source Routing (DSR) were proposed. In the previous works, researchers considered 300 m x 300 m, 300 m x 500 m, 500 m x 500 m terrain areas and illustrate the average performance of the mentioned routing protocols. In our work, we are trying to prove that DSR performs better than DSDV and AODV. III. PROPOSED METHOD Wireless Sensor Networks are very much prone to Interference and Delay due to its behavior of dynamic topology. This has to be reduced by choosing efficient routing protocol that provides better performance under cases that interrupts the proper working of wireless sensor networks. The best one is elected on comparing the respective protocols say AODV, DSR, and DSDV. IV. ROUTING PROTOCOLS In general, there are two types of routing protocolsPROACTIVE (Table-driven) and REACTIVE (On-demand) Protocols. In Proactive routing fresh lists of destinations and their routes are maintained by periodically distributing routing tables throughout the network [3]. Here routing information is computed and shared and the path is set prior to the actual transfer of data packets between the source and destination. Example of Proactive routing is DSDV. In reactive routing routes are found on demand by flooding the network with route request packets (RREQ). Here the source initiates the data transfer process by issuing a route request, the most relevant immediate neighbor issues a route reply to this request and takes forward the data transfer process. This happens till the destination is reached and the data packet received [3]. Examples of Reactive routing are AODV and DSR [16]. 1)AD HOC ON DEMAND DISTANCE VECTOR ROUTING PROTOCOL (AODV):Being a reactive routing protocol AODV uses traditional routing tables, one entry per destination and sequence numbers are used to determine whether routing information is up-to-date and to prevent routing loops. It helps in both multicasting and unicasting. [4] AODV makes use of (RREQ, RREP) pair to find the route. The source node broadcast the RREQ i.e. Route Request message to its neighbors to find the route to destination. The RREQ message [5] contains the source and destination address, lifespan of message, sequence numbers of source and destination and request ID as unique identification. Destination Sequence Number is the latest sequence number received in the past by the source for any route towards the destination and Source Sequence Number is the current sequence number to be used in the route entry pointing towards the source of the route request [14]. The DSDV routing algorithm is based on the classical Bellman-Ford Routing Algorithm (BFRA) with certain improvement [6]. Every mobile station maintains a routing table with all available destinations along with information like next hop, the number of hops to reach to the destination, sequence number of the destination originated by the destination node, etc. DSDV uses both periodic and triggered routing updates to maintain table consistency. Triggered routing updates are used when network topology changes are detected, so that routing information is propagated as quickly as possible. Routing table updates can be of two types – “full dump” and “incremental”. “Full dump‟ packets carry all available routing information and may require multiple Network Protocol Data Units (NPDU); “incremental‟ packets carry only information changed since the last full dump and should fit in one NPDU in order to decrease the amount of traffic generated. Mobile nodes cause broken links when they move from place to place. When a link to the next hop is broken, any route through that next hop is immediately assigned infinity metric and sequence number is updated. This is the only situation when any mobile node other than the destination node assigns the sequence number. Sequence numbers assigned by the destination nodes are even numbers, and sequence numbers assigned to indicate infinity metrics are odd numbers. When a node receives infinity metric, and it has an equal or later sequence number with a finite metric, it triggers a route update broadcast, and the route with infinity metric will be quickly replaced by the new route [14]. When a mobile node receives a new route update packet; it compares it to the information already available in the table and the table is updated based on the following criteria: i) If the received sequence number is greater, then the information in the table is replaced with the information in the update packet. ii) Otherwise, the table is updated if the sequence numbers are the same and the metric in the update packet is better. NODE 1 G RREQ RREQ RREP Dest. RREP RREQ S H D RREQ 2 3 . . . NODE 4 Next hop If any node from a list of neighbors is destination or knows the route to destination, it can send RREP message to source. 2)DESTINATION-SEQUENCED DISTANCE VECTOR ROUTING PROTOCOL (DSDV): DSDV is one of the most well-known table-driven routing algorithms for MANETs. 3 …… 1 5 . . . H S-source node, D-destination node G-guide node, H-helper node Fig.1 Illustration of AODV 5 NODE 5 Fig.2 Illustration of DSDV 3)DYNAMIC SOURCE ROUTING (DSR):In DSR, when a mobile (source) needs a route to another mobile (destination), it initiates a route discovery process which is based on flooding. The source originates a RREQ packet that is flooded over the network. The RREQ packet contains a list of hops which is collected by the route request packet as it is propagated through the network. Once the RREQ reaches either the destination or a node that knows a route to the destination, it responds with a RREP along the reverse of the route collected by the RREQ [7]. This means that the source may receive several RREP messages corresponding, in general, to different routes to the destination. DSR selects one of these routes (for example the shortest), and it maintains the other routes in a cache. The routes in the cache can be used as substitutes to speed up the route discovery if the selected route gets disconnected. To avoid that RREQ packets travel forever in the network, nodes, that have already processed a RREQ, discard any further RREQ bearing the same identifier. The main difference between DSR and AODV is in the way they keep the information about the routes; DSR stores information in the source node while AODV stores in the intermediate nodes [16]. However, the route discovery phase of both is based on flooding. This means that all nodes in the network must participate in every discovery process, regardless of their potential in actually contributing to set up the route or not, thus increasing the network load. The performances of three protocols are compared and simulated using NS-2. We have considered the following parameters for the analysis: Throughput, Bit Error Rate (BER) and Packet Drop [10, 11, 12, and 13]. 1) THROUGHPUT:It is defined as the number of packets received for the number of packets transmitted. Here we have considered the transmission time Vs throughput. The overall throughput of DSR is better than AODV and DSDV in all cases. V. SIMULATION AND RESULTS The simulation of these three protocols is obtained using Network Simulator-2. In 1996-97, ns version 2 (ns-2) was initiated based on a refactoring by Steve McCanne. Use of Tcl was replaced by MIT's Object Tcl (OTcl), an objectoriented dialect Tcl. The core of ns-2 is also written in C++, but the C++ simulation objects are linked to shadow objects in OTcl and variables can be linked between both language realms. Simulation scripts are written in the OTcl language, an extension of the Tcl scripting language. Presently, ns-2 consists of over 300,000 lines of source code, and there is probably a comparable amount of contributed code that is not integrated directly into the main distribution (many forks of ns-2 exist, both maintained and unmaintained). It runs on GNU/Linux, FreeBSD, Solaris, Mac OS X and Windows versions that support Cygwin. It is licensed for use under version 2 of the GNU General Public License. Fig.2 Throughput comparison 2) BIT ERROR RATE (BER): The bit error rate (BER) is the number of bit errors per unit time. The BER is the number of bit errors divided by the total number of transferred bits during a time interval.The BER of DSDV,DSR is very low when compared to AODV,which indicates AODV performs lesser than DSDV,DSR. TABLE I: Specifications Parameter type Parameter value Protocols AODV, DSDV, DSR Simulation time 200ms Number of nodes 80 Packet type TCP packet Queue type Environment size Traffic type Platform Simulator MAC protocol Propagation model Antenna type Priority queue 1800m*840m Constant Bit Rate Windows NS2 IEEE 802.11 Two ray Omni antenna The simulation is performed after a thorough study of various papers and is implemented using the Network Simulator-2. Simulation is followed by the working of all the protocols in the Network Animator (NAM). NAM is a TCL based animation tool used to view simulation and packet traces [8, 9]. Fig.3 BER comparison 3) PACKET DROP: Packet drop is the discarding of packets in a network when a router or other network device is overloaded and cannot accept additional packets at a given moment.Here we have considered transmission time Vs number of packets dropped. Incase of packet drop,the performance of DSR is best when compared to AODV,DSDV. Fig.4 Packet Drop comparison VI. CONCLUSION In this paper, the performances of various routing protocols are performed. The three protocols AODV, DSDV and DSR were compared on the basis of throughput, packet drop and bit error rate using NS-2. From the overall performance for various numbers of nodes, we conclude that DSR performs better than DSDV and AODV in all the aspects. But in the case of packet drop alone DSR performance tend to decrease on increasing the transmission time,where packet drop occurs. The results depend on the parameters and vary accordingly. Here transmission time Vs throughput, packet drop and BER are considered. Also parameters such as network life-time, jitter, energy consumption, etc. can be obtained. Thus from the above work, we can understand that routing protocols are important for better performance of the WSNs and its applications. We are trying to extend our work on mobile nodes and by increasing the simulation environment. REFERENCES [1] S. john, “Wireless Sensor Networks,” Department Of Computer Science, University Of Virginia, June 19, 2006. [2] T. P.Lambrou and C. G. Pamayiotou, “Collaborative Area Monitoring Using Wireless Sensor Networks with Stationary and Mobile Nodes,” Department of Electrical and Computer Engineering, University of Cyprus, Cyprus, Vol. 2009, Mar. 2009 [3] Kazem Sohraby, Daniel Minoli, Taieb Znati, A book on “Wireless Sensor Networks- Technology, Protocols and Applications”, published by ‘A John Wiley & sons, Inc., Publication’, 2007. [4] M. Marina and S. Das, “On-demand multipath distance vector routing in ad hoc networks”, Mobile computing, pp. 153-181, 1996. [5] Mobile Ad Hoc Networking working group- AODV, http://www.ietf.org/rfc/rfc3561.txt [6] D. Loganathan, P. Ramamoorthy, “Performance Analysis of Enhanced DSDV Protocol for Efficient Routing in Wireless Ad Hoc Networks”, Research Inventy: International Journal Of Engineering And Science Vol.2, Issue 10 (April 2013), Pp01-08 Issn(e): 2278-4721, Issn(p):2319-6483, www.researchinventy.Com. [7] D. B. Johnson, D. A. Maltz, and Y-C. Hu, “The dynamic source routing (DSR) protocol for mobile ad hoc network”, IETF MANET Working Group, Internet Draft, July 2004. [8] Network simulator [online]. Available: http://www.isi.edu/nsnam/ns/ [9] Sukumar Panda, Rahul Mohapatra, “Implementation and comparison of Mobility models in NS-2”, National Institute of Technology, Rourkela 2009. [10] Anu Arya, Jagtar Singh, “Comparative Study of AODV, DSDV and DSR Routing Protocols in Wireless Sensor Network Using NS-2 Simulator”, International Journal of Computer Science and Information Technologies, Vol. 5(4), 2014, pp. 5053-5056. [11] Kapang Lego et. al. . “Comparative study of Adhoc Routing Protocol AODV, DSR and DSDV in Mobile Adhoc NETwork”, Indian Journal of Computer Science and Engineering, Vol. 1 No. 4, pp. 364-371. [12] S. A. Ade, P.A. tijare, “Performance Comparison of AODV, DSDV, OLSR, and DSR Routing Protocols in Mobile Ad Hoc Networks”, International Journal of Information Technology and Knowledge Management, July-December 2010, Vol. 2, No. 2, pp. 545-548. [13] Sultan Singh Saini, Vipin Jain, “Performance Evaluation of AODV and DSDV Routing Protocols in Wireless Sensor Network Using Different Network Parameters”, International Journal of Advanced Research in Computer Science and Software Engineering, Vol. 4, Issue 1, January 2014, ISSN: 2277 128X, pp. 730-735. [14] Sachin Kumar Gupta, R. K. Saket, “Performance metric Comparison of AODV and DSDV Routing Protocols in MANETs using NS-2”, IJRRAS 7(3), June 2011. [15] Mina Vajed Khiavi, Shahram Jamali, Sajjad Jahanbakhsh Gudakahriz, “Performance Comparison of AODV, DSDV, DSR and TORA Routing Protocols in MANETs”, International Research Journal of Applied and Basic Sciences. Vol., 3 (7), 1429-1436, 2012. Available online at http://www.irjabs.com ISSN 2251-838X ©2012. [16] Akshai Aggarwal, Savita Gandhi, Nirbhay Chaubey, “Performance Analysis of AODV, DSDV and DSR in MANETS”, International Journal of Distributed and Parallel Systems (IJDPS) Vol.2, No.6, November 2011.