Performance Comparison and Analysis of Proactive, Reactive and Hybrid Routing Protocols for Wireless Sensor Networks

Wireless Sensor networks are a challenging task due to the lack of resources in the network as well as the frequent changes in network topology. Various routing protocols are designed basically to establish correct and efficient paths between source and destination. In the recent years, several routing protocols have been proposed in literature and many of them studied through extensive simulation at different network characteristics. In this paper, we compare the performance of three most common routing protocols of wireless sensor networks i.e. AODV, DSDV and ZRP. These protocols have been simulated using NS2 Package. This study investigates the routing protocols corresponding to packet delivery ratio, packet loss ratio, average throughput, dropped packets and end-to-end delay. Hence, evaluation and comparison between routing protocols is required because performance of any routing protocol can be changed with various parameters such as speed of nodes, pause times and number of nodes.


INTRODUCTION
Wireless sensor networks have become increasingly popular in the computing industry and are widely available in our everyday life. A wireless sensor network (WSN) consists of a large number of sensors which are spatially distributed and makes any node in the network as a potential router [34]. A wireless sensor network (WSN) is a decentralized network that requires no infrastructure. Wireless Sensor Networks (WSNs) are characterized by multi-hop wireless connectivity, frequently changing network topology and efficiently need routing protocols. Sensor nodes are densely deployed either within the sink or very close to it and have restricted power, computational capacity and memory [20]. Sensor nodes are connected to wireless radio frequency link. The basic task of sensor networks, is to sense the events, collect data and then send it to their requested destination. Civilian application domain of wireless sensor networks has been considered later on, such as environmental, healthcare and production, smart home etc. Their applications range from simple wireless low data rate transmitting sensors to high data rate real time systems like those used for monitoring large retail outlets [1]. All nodes of these networks behave as routers and take part in discovery and maintenance of routes to other nodes in the network [20]. A wireless sensor network architecture is illustrated in figure 1. An Ad-Hoc routing protocol must be able to decide the best path between the nodes, minimize the bandwidth overhead to enable proper routing, minimize the time required to converge after the topology changes [26,35]. Further, it is worth mentioning that node density, speed of nodes and pause time will have significant effect in the performance of the any routing policy due to the fact that an increase in node density will tend to increase the hop count thus changing the topology significantly. Pause time indicates the mobility of the nodes in the network. Therefore, it is imperative to state that high pause time implies a stable network topology while low pause time indicates that the topology changes frequently [34]. The primary goal of this paper is to evaluate performances of AODV, DSDV and ZRP protocols in different scenarios of variable density of nodes and mobility using NS-2 network simulator. The rest of this paper is organized as follows: In the next section brief overviews of three routing protocols (AODV, DSDV and ZRP) have been discussed. Section 3 describes parameters metrics used to analysis performances routing protocols. Section 4 includes analysis of the performance of the three routing protocols under a first scenario by varying speed of nodes and a second one by varying pause times for a fixed node density environment with respect to performance metrics such as Average Throughput, Average End-to-End delay and Packet Delivery Ratio. Section 5 describes the limitations of NS2 tool. Finally, section 6 and section 7 provide conclusion and future research directions.

OVERVIEW OF ROUTING PROTOCOLS
As shown in Figure.2, routing protocols for Wireless Sensor Networks can be classified into three main categories: proactive or table-driven routing protocols, reactive or on-demand routing protocols and hybrid routing protocols [3]. The areas in which these protocols differ are the way the routing information is updated, detected and the type of information kept at each routing table [37]. Proactive protocols update route information periodically, while reactive ones establish routes only when needed [35]. This section highlights the features of DSDV, AODV and ZRP routing protocols. A great deal of work has been produced comparing the performance of these three main routing protocols, namely DSDV, AODV and ZRP, that were designed to provide routes in connected networks [33].

Proactive Routing Protocols
Table Driven Protocols can be named as proactive protocols [22,23,25]. The proactive routing protocols attempt to minimize the message latency induced by route discovery, by maintaining up-to-date routing information at all times from each node to every other node. This is obtained by broadcasting control packets that contain routing table information. These protocols provoke a large signalling overhead to establish routes for the first time. In addition, when the network topology is modified due to node mobility or node failures, the updated topology information has to be propagated to all the nodes in the network [32]. Examples of proactive routing protocols are Destination Sequence Distance Vector (DSDV), Optimized Link State Routing Protocol (OLSR), Fisheye State Routing (FSR), and Source-Tree Adaptive Routing protocol (STAR) [8,11,12]. The selected protocol in this study is DSDV.

Destination Sequenced Distance Vector (DSDV)
Destination-Sequenced Distance-Vector Routing (DSDV) [3] DSDV [2], an enhanced version of the distributed Bellman-Ford algorithm, belongs to the proactive or table-driven family where a correct route to any node in the network is always maintained and updated [1,7,19,21,34]. The improvement made to the Bellman-Ford algorithm includes freedom from loops in routing tables by using sequence numbers [2,34]. In wireless sensor network, using of DSDV protocol assumes that each participating node as a router [34]. Every node always maintains a routing table that consists of all the possible destinations. Each entry of the routing table contains the address identifier of a destination, the shortest known distance metric to that destination measured in hop counts and the address identifier of the node that is the first hop on the shortest path to the destination. Each mobile node in the system maintains a routing table in which all the possible destinations and the number of hops to them in the network are recorded [34]. Meanwhile, each host broadcasts routing updates periodically in order to achieve the latest and the most accurate routing table. Each route or path is marked with a sequence number assigned by the destination node. The route with the highest sequence number is always used and this sequence number helps to identify the stale routes from the new ones and thus it avoids the formation of loops. To minimize the traffic there are two types of packets in the system. One is known as "full dump" [12,24,34], which carries all the information about a change. However, when occasional movement occurs in the network, "incremental" [12,24,34] packets is used, which carries just the changes and this increases the overall efficiency of the system. DSDV requires a regular update of its routing tables, which uses up battery power and a small amount of bandwidth even when there is no change in the network topology. Whenever the topology of the network changes, a new sequence number is necessary before the network re-converges; thus, DSDV is not scalable in Ad hoc networks, which have limited bandwidth and whose topologies are highly dynamic [34]. Routes availability to all destinations implies that much less delay is involved in route setup process [35]. Figure 2 shows the routing table of DSDV.

Implementation Decision
The absence of a standard makes some parameters of the algorithm be without clear definition [29,20]. The constants and parameters which were used in the implementation of the algorithm are shown in Table 1.

Reactive Routing Protocols
In reactive routing protocols, a node initiates a route discovery process only when a route to a destination is required. On-demand routing protocols were designed to reduce the overheads in Table-Driven protocols by maintaining information for active routes only [37]. When a node requires a route to a destination, it initiates a route discovery process within the network. This process is completed once a route is found or all possible route permutations have been examined. Once a route has been established, it is maintained by a route maintenance procedure until either the destination becomes inaccessible along every path from the source or until the route is no longer desired. Route discovery usually occurs by flooding a route request packets through the network. When a node with a route to the destination (or the destination itself) is reached a route reply is sent back to the source node using link reversal if the route request has traveled through bidirectional links or by piggy-backing the route in a route reply packet via flooding [37].These protocols are more suitable for dynamic environments but incur a higher latency and still require source-initiated flooding of control packets to establish paths [32]. Examples of reactive routing protocols are, Dynamic State Routing protocol (DSR), Ad hoc On-Demand Distance Vector Routing protocol (AODV), Ad-hoc on Demand Multipath Distance Vector (AOMDV), associativity-based routing (ABR) and Location-Aided Routing (LAR) [8,6,12]. The protocol considered in this work is AODV.

AODV
Ad hoc On Demand Distance Vector Routing Protocol (AODV) is a reactive routing protocol designed for Ad hoc wireless network and it is capable of both unicast as well as multicast routing [20,34]. It is an on-demand algorithm, meaning that it builds routes between nodes only as desired by source nodes so it initiates route request only when needed [6,14]. It maintains these routes as long as they are needed by the source. AODV is an improvement on DSDV because it minimizes the number of the required broadcasts by creating routes on demand basis [6]. It carries out the route discovery by using on-demand mechanism [32]. Ad hoc On-demand Distance Vector routing (AODV) protocol enables dynamic, self-starting, multi-hop routing between mobile nodes to establish the ad hoc network [1,2,3]. The Route Discovery process in this protocol is performed using control messages Route-Request (RREQ) and Route-Reply (RREP) whenever a node wishes to send packet to destination. Traditional routing tables is used, one entry per destination [34,20]. During a route discovery process, the source node broadcasts a Route-Request packet to its neighbours. This control packet includes the last known sequence number for that destination. If any of the neighbours has a route to the destination, it replies to the query with Route-Reply packet; otherwise, the neighbours rebroadcast the Route-Request packet. Finally, some of these query control packets reach the destination, or nodes that have a route to the destination. At this point, a reply packet is generated and transmitted tracing back the route traversed by the query control packet. In the event when a valid route is not found or the query or reply packets are lost, the source node rebroadcasts the query packet if no reply is received by the source after a time-out [34]. Figure 3 and figure 4 show the propagation of the RREQ and RREP across the network, respectively. In order to maintain freshness node list, AODV normally requires that each node periodically transmit a HELLO message, with a default rate of one per second [34]. When a node fails to receive three consecutive HELLO messages from its neighbour, the node takes is as an indication that the link to its neighbour is down. If the destination with this neighbour as the next hop is believed not to be far away (from the invalid routing entry), local repair mechanism may be launched to rebuild the route towards the destination [34]. Once the RREQ reaches the destination or an intermediate node with a fresh enough route, this node responds by unicasting a route reply (RREP) packet back to the neighbour from which it received the RREQ packet. The path which follows the RREP message is shown in Figure 4. As long as the route remains active, it will continue to be maintained. A route is considered active as long as there are data packets periodically traveling from the source to the destination along that path. Once the source stops sending data packets, the links will time out and eventually be deleted from the intermediate node routing tables. If a link break occurs while the route is active, the node upstream of the break propagates a route error (RERR) message to the source node to inform it of the now unreachable destination(s). After receiving the RERR, if the source node still desires the route, it can reinitiate route discovery process [20].

Hybrid Routing Protocols
These protocols combine characteristics of proactive and reactive protocols and are mostly used for hierarchal routing [22,23]. In this protocol intermediate nodes have information about network and its closest node. Zone radius is used to define the zone size that is defined by number of hops [14,10,16,17,19,25]. Hybrid routing protocols cartels the advantages of proactive as well as reactive routing protocols and at the same time hybrid routing protocols overcome disadvantages of proactive and reactive routing protocols [23]. The limitation of these protocols is that nodes consume more memory and power as they have to maintain high-level topological information. Some examples of these protocols are Zone Routing Protocol (ZRP) and ZHLS (Zone Based Hierarchical Link State Routing Protocol) [25]. Figure 1, illustrates different classes of ad-hoc routing protocols.

Zone Routing Protocol (ZRP)
ZRP is the first hybrid category protocol which effectively combines best features of reactive and proactive routing protocols. It employs concept of proactive routing scheme within limited zone (within the r-hop neighbourhood of each node), and uses reactive approach beyond that zone [26,31,36]. ZRP is proposed to cut down the control overhead of proactive routing protocols and drop off the latency provoked by routing discover in reactive routing protocols. These protocols are designed to increase scalability by allowing nodes with close proximity to work together as a zone or cluster [1]. The minimum distance of respective nodes in a zone is always according to the radius of zone. A node keeps routes to all the destinations in the routing zone. In this, a network is divided into zones. The two routing schemes used by ZRP are IntrA-zone Routing Protocol (IARP) and Inter-zone Routing Protocol (IERP) [26,31].
The first protocol to be part of ZRP is IARP, which is a pro-active, table-driven protocol. The protocol is used when a node wants to communicate with the interior nodes of its zone. It allows local route optimization by removal of redundant routes and the shortening the routes if a route with fewer hops has been detected, as well as bypassing link failures through multiple hops, thus leveraging global propagation. IARP is used to maintain routing information and provides route to nodes within zone [36].
The second protocol which is the part of ZRP is IERP. It uses the route query (RREQ)/ route reply (RREP) packets to discover a route in a way similar to typical on-demand routing protocols.
In ZRP, a routing zone consists of a few nodes within one, two, or a couple of hops away from each other. It works similar to a clustering with the exception that every node acts as a cluster head and a member of other clusters. Each zone has a predefined zone centred at itself in terms of number of hops. Within this zone a table-driven-based routing protocol is used. This implies that route updates are performed for nodes within the zone. Therefore, each node has a route to all other nodes within its zone. If the destination node resides outside the source zone, then an ondemand search-query routing method can be used [36].
ZRP also uses Bordercast Resolution Protocol (BRP). When intended destination is not known, RREQ packet is broadcast via the nodes on the border of the zone. Route queries are only broadcast from one node's border nodes to other border nodes until one node knows the exact path to the destination node. ZRP limits the proactive overhead to only the size of the zone, and the reactive search overhead to only selected border nodes. The IARP in ZRP must be able to determine a node's neighbours itself. This protocol is usually a proactive protocol and is responsible for the routes to the peripheral nodes [36]. Figure 6 illustrates the operation of ZRP protocol. We deduce that if the destination is not inside the zone, then the source broadcasts Route Request message to the peripheral nodes. Electronic copy available at: https://ssrn.com/abstract=3694426

PERFORMANCE METRICS
Various Quality of Service parameters used for analysis routing protocols are defined as follows.
We focused our analysis in four main metrics. The following performance metrics are considered for evaluation:

Packet Delivery Ratio (PDR)
The ratio of the data packets delivered to the destinations to those generated by the sources [37]. When packet delivery ratio is high then performance is better [5,30]. Mathematically, it can be written as in this equation: PDR is calculated in % (percentage). Higher values of PDR carry better performance.

Average Throughput
Throughput is the number of packets that are passing through the channel in a particular unit of time. This performance metric shows the total number of packets that have been successfully delivered from source node to destination node per amount of time [33,34]. Factors that affect throughput include frequent topology changes, unreliable communication, limited bandwidth and limited energy [34]. The throughput is usually measured in bits per second (bit/sec), and sometimes in data packets per second or data packets per time slot. Higher throughput is always desirable in a communication system [30,26,34]. The average throughput is given as follows:

End to End Delay
A specific packet is transmitting from source to destination node and calculates the difference between send times and received times. This metric includes all possible delays caused by buffering during route discovery latency, queuing at the interface queue, retransmission delays at the MAC, and propagation and transfer times [26,34,37]. It is derived in ms (mille second). Smaller values of End-to-end delay carries improved performance [35]. The End-to-end delay is described as:

Packet Loss Ratio
Packet loss ratio is the number of packets that never reached the destination to the number of packets originated by the source [3,13]. We aim to decrease the packet loss ratio. The packet loss ratio is given as:

SIMULATION RESULTS AND DISCUSSION
In this section, the performance analysis is carried out on DSDV as proactive candidate and AODV as reactive representative and ZRP as hybrid protocol. Different network scenario for different numbers of node, pause time and speeds are generated. In the first scenario, the average speed of nodes varies from 10 to 90 Km/h with 100 nodes. We created a second scenario by varying the pause time from 20 seconds to 200 seconds for each fixed density of nodes. The node mobility model is set up as Random Waypoint Mobility where a node is allowed to move in any direction arbitrarily. Each run of the simulator accepts an input scenario file which describes the exact motion of each node. Since protocols were challenged with the same scenario file and during the same time (500 seconds), we can directly compare the performance results of the three protocols. Figure 6 shows a scenario with a topology of 75 nodes. Node 0 is the source which transmits data. Node 75 is the sink or the destination for the entire network.

SCENARIO 1
We model 100 nodes in a square area 1200 m × 1200 m during the simulation time 500 seconds. The parameters for simulating the first scenario are given in Table 3 in detail. The traffic sources are CBR (continuous bit-rate). Nodes are generated randomly in an area and move according to the well-known Random Waypoint mobility model. The simulation results are shown in the following section in the form of line graphs. Graphs show comparison between the two protocols by varying different numbers of sources on the basis of the above-mentioned metrics as a function of pause time and speed. The first interesting aspect that we analyse is the packet delivery ratio, a characterizing aspect of routing protocols for wireless sensor networks. The throughput is analysed with CBR (Constant Bit Rate) data traffic under the FTP (File Transfer Protocol) application. From this plotted result, we conclude that the Average Throughput in general increases steadily over the entire speed of nodes for all routing protocols. ZRP outperforms the other two protocols but AODV attains the highest throughput and shows efficient behaviour in all mobility scenarios. Based on figure 8, it is shown that AODV attains the highest Average Throughput and shows efficient behaviour in all mobility scenarios. AODV produces more sent packet as it recovers from average throughput due to broken links in a higher node speed. ZRP performs a smaller number of packets delivered compared to the other two protocols. Figure 9. Packet Delivery Ratio vs Speed of nodes for 100 nodes model Figure 9 shows a comparison between the three routing protocols on the basis of Packet Delivery Ratio as a function of speed of nodes. For DSDV, Packet Delivery Ratio decreases as speed of nodes increases, since finding the route requires more and more routing traffic as speed increases thus making a lesser portion of the channel useful for data transfer. In case of AODV The Packet Delivery Ratio is almost the same with respect to node speed. As the node speed increases, a source node will have to generate more route requests to find a fresh enough route to destination node. DSDV's Packet Delivery Ratio decreases in a steeper and more rapid fashion. This is due to excessive channel used by regular routing table updates. Furthermore, as mobility speed increases, more event-triggered updates are generated, resulting in even more Packet Delivery Ratio decrease. This problem is not present in AODV since routes are only generated on-demand. As expected, Packet delivery fraction for ZRP decreases as speed increases, since finding the route requires more and more routing traffic. Therefore, less and less of the channel will be used for data transfer, thus decreasing the packet deliver. The result plotted for the three routing protocols named AODV, DSDV and ZRP respectively for a WSN topology having 100 nodes. AODV performs constantly when speed of nodes changes, whereas DSDV performs better than both AODV and ZRP in terms of Packet Loss Ratio. Routes availability to all destinations implies that much less Packet Loss Ratio is involved in DSDV route setup process. It is still of interest to consider the average end-to end delay to find out how much time it makes a message to be delivered. These graphical results from Figure 11 are measurement of end to end delay for all protocols. AODV and DSDV perform better than ZRP in terms of End-to-End delay. When speed of nodes is 50 m/s, DSDV presents the better End-to-End delay than both AODV and ZRP protocols. Based on figure above, for varying speed of nodes, AODV produces less End to End Delay, but the performance of DSDV is slightly better than ZRP. ZRP renounces bad Packet Loss Ratio or End to End Delay values. It shows that for delay-sensitive application, AODV protocol with IEEE 802.11 standard performs efficient for wireless sensor networks. AODV routing protocol tries to drop the packets, if it is not possible to deliver them which, means less delay. Here we notice that as the speed of nodes increases, the value of mean Dropped Packets for AODV, DSDV and ZRP goes increasing. On the other hand, it is observed that ZRP protocol improves much better Dropped Packets in high mobility environments compared to AODV and DSDV protocols. So overall, we can say that ZRP is the most preferred routing protocol under high speed of nodes in terms of Dropped Packets. As resulting of that much Dropped Packets are occurred with AODV because the IEEE 802.11 protocol not enabled large packets transmission. On the other side, reactive protocols must first determine the route, which may result in considerable Dropped Packets; moreover, the reactive route search procedure may involve significant control traffic due to the global flooding.

Scenario 2 4.2.1. Mobility Model
Random Way Point (RWP) mobility model is used in our simulation which is characterized by a pause time. In this mobility model, each node starts its journey from a random chosen location to a random chosen destination. Node remains stationary for a certain period of time (known as pause time). Once the destination is reached, another random destination is chosen after a pause time. At the end of that time node choose for a random destination in (1200m × 1200m) simulation space area. The node moves to the destination at a speed in the range [0, max]. When node reaches the destination, it waits for time equal to pause time and starts moving for another destination. It repeats this behavior for the entire given simulation time. We simulate with 10 different pause times: 20s, 40s, 60s, 80s, 100s, 120s, 140s, 160s, 180s and 200s. When the chosen pause time is 0 second, it means that the nodes are in continuous motion and do not stop. On the contrary, if the pause time is 200 seconds, this indicates there is no node mobility. So, these varying pause times affect the average speed of mobile nodes. In this simulation we wanted to investigate how the routing protocols behave with increasing Pause Time. The Throughput is calculated as the average number of packets received per amount of time. During the simulation we have increased the pause time gradually while keeping the network size constant in terms of number of nodes and recorded the performance of the protocols. Figure 13. Averarge Throughput vs Pause Time for the 10 nodes model Figure 13 shows a comparison between the three routing protocols on the basis of Average Throughput as a function of pause time. Pause times varies from 20 seconds to 200 seconds and number of nodes is fixed at 10 nodes. From the results it is evident that as the pause time increases the Average Throughput increases gradually. This is intuitive, since a larger pause time means that nodes are closer to static and the networks are more stable.
As expected, reactive routing protocol AODV is giving better Throughput as compared to ZRP and DSDV routing protocols. AODV performs constantly for both high and low mobility (high mobility when pause time is zero and low mobility when pause time is maximum). At low mobility, all the methods deliver a greater percentage of originated data packets. At low pause time (high mobility) the network topology will change frequently; more broken links will occur and the discovery process will be needed more. As a consequence, there will be a greater routing overhead and packets will be dropped resulting less throughput.
DSDV performance is worst when mobility is high. This poor performance is because of the reason that DSDV is not a on demand protocol and it keeps only one route per destination, therefore lack of alternate routes and presence of stale routes in the routing table when nodes are moving at higher rate leads to packet drop. At low mobility, all the methods deliver a greater percentage of originated data packets. In case of ZRP the Average Troughput is almost the same with respect to pause time.

Scenario 3
In this scenario, number of nodes connected in a network at a time is varied and thus varying the number of connections, through which a comparison graphs of AODV, DSDV and ZRP protocols, is made. All nodes are fixed at one place. Table 3 shows the main characteristics used for scenario 3. The required graphs were saved as the bitmap image for statistical analysis. In this figure, we estimate the Packet Delivery Ratio for these three routing protocols named AODV, DSDV and ZRP. In Figure 13 we see the performance illustration of Packet Delivery Ratio depending on the number of nodes. DSDV and ZRP routing protocols are almost close to each other for varying number of nodes and we notice that the value of Packet Delivery Ratio remains constant and AODV shows variation. As the number of nodes increases, more nodes will be flooding the network with route request and consequently more nodes will be able to send route reply as well. AODV performance dropped as number of nodes increase because more packets dropped due to link breaks. When we analyse where these lost packets are in AODV, we notice that AODV has not only more packets in buffers waiting for a route; but also, more packets are lost because they were sent following old routes. So AODV, suffers in part from its lack of periodic update information but maintaining reasonably good delivery ratio. In addition, ZRP improved the Packet Delivery Ratio since it finds new route to destination when link breaks existed. DSDV is slightly better than ZRP especially when the number of nodes is high. This graph demonstrates the simulation results of End-to-End delay depending on the number of nodes. AODV didn't produce so much delay when the number of nodes increased. It performs better than the other two protocols. In addition, it shows that, the AODV protocol improved the DSDV when the number of nodes is over 50. The End-to-End Delay of AODV is less because it has reduced routing overhead and queuing delay. However, DSDV presents considerably less End to End delay than ZRP except at network size 50. Again, this shows that for delay-sensitive applications, DSDV protocol with a reduced density of nodes is remarkably well suitable. This attribute can be explained by the fact that DSDV is a proactive routing protocol and in these types of protocols the path to a destination is immediately available. Furthermore, DSDV routing protocol tries to drop the packets, if it is not possible to deliver them which means less delay. ZRP has higher delay than both DSDV and AODV routing protocols. With increasing number of sensor nodes AODV shows worst performance. AODV seems to be more sensitive to the effect of density of nodes. Once more AODV suffers from not always up-todate information. For all smaller number of sensor nodes, performance of ZRP is better than AODV and DSDV, but for 100 sensor nodes ZRP shows maximum Packet Loss Ratio. For DSDV protocol, the Packet Loss Ratio is not so affected as generated in ZRP. Since proactive routing maintains information that is immediately available, the Packet Loss Ratio before sending a packet is minimal in cost. So, overall, we can say that DSDV is the most preferred routing protocol for larger networks.

LIMITATIONS OF NS 2 SIMULATOR
NS-2 [27] is an object-oriented discrete event simulator targeted at networking research. It is an open source network simulator originally designed for wired, IP networks. The NS-2 simulation environment offered great flexibility in studying the characteristics of WSNs because it includes flexible extensions for WSNs. NS-2 has a number of limitations: (1) It puts some restrictions on the customization of packet formats, energy models, MAC protocols, and the sensing hardware models, which limits its flexibility; (2), the lack of an application model makes it ineffective in environments that require interaction between applications and the network protocols. (3) It does not run real hardware code; (4) It has been built by many developers and contains several inherent known and unknown bugs. (5) The performance of NS-2 is good for 100 nodes, which decreases significantly as the number of nodes increase. It does not scale well for WSNs due to its object-oriented design; (6) Using C++ code and OTCL scripts makes it difficult to use.
To overcome the above drawbacks the improved NS-3 simulator [27] was developed. NS-3 supports simulation and emulation. It is totally written in C++, while users can use python scripts to define simulations. Hence, transferring NS-2 implementation to NS-3 require manual intervention. Besides the scalability and performance improvements, simulation nodes have the ability to support multiple radio interfaces and multiple channels. Furthermore, NS-3 supports a real-time schedule that makes it possible to interact with a real system [27]. For example, a real network device can emit and receive NS-3 generated packets.

CONCLUSION
As each protocol has its own merits and demerits, none of them can be claimed as absolutely better than others. In this research work, three mobile routing protocols, the Destination Sequenced Distance Vector (DSDV), the table-driven protocol, the Ad hoc On-Demand Distance Vector routing (AODV), an On-Demand protocol and the Zone Routing Protocol (ZRP) the hybrid protocol are selected for study.With the help of NS2 simulator programme, DSDV, AODV and ZRP are evaluated in respect of Packet Delivery Ratio, End to End Delay, Packet Loss Ratio, Dropped Packet and Average Throughput. We have considered three wireless sensor network scenarios, the first is by varying speed of nodes, the second is by varying pause times and the last is by varying density of nodes. Based on our practical results it is concluded that the AODV performs better in WSNs and gives better output and performance in all mobility scenarios, with its ability to maintain connection by periodic exchange of information required for TCP network. By comparing the data collected from these three routing protocols, we analysed and proved that AODV is a more reliable protocol in terms of Delay and Average Throughput than DSDV and ZRP routing protocols. Network size has no considerable effect on AODV performance with respect to Throughput but it does affect ZRP. The results can vary according to the metrics parameters. For some scenarios, DSDV has also performed good even than AODV is more reliable protocol in terms of End-to-End Delay and Throughput. At higher node mobility, AODV is worst in case of Packet Loss and Dropped Packets but it performs best for packet delivery ratio, DSDV performs better than AODV for higher node mobility, in case of Packet Delivery Ratio and Packet Loss Ratio but ZRP performs best in case of Dropped Packets. However, not all of these protocols are efficient enough to fulfil all desired features of WSNs applications. From the conducted study on selected protocols, we have proved that there is no best solution for a general mobile wireless sensor network. The performance of one protocol may be far better in terms of delay other may be superior in terms of throughput. Secondly, network size also influences for protocols performance. Therefore, choice for selecting particular routing protocol will depend on application type and intended use of wireless sensor network. Finally, from the above research work performance of AODV is considered best for real-time and TCP applications. Therefore, the most successful applications of WSN technology will be those oriented to applications including large number of nodes. As we could see in section 4, each routing technique has specific advantages and disadvantages that make it suitable for certain types of scenario. In sensor networks, routing is an emerging area of research and who are becoming an increasingly popular wireless networking concept lately. Consequently, more and more research, is being conducted to find optimal routing algorithms that would be able to accommodate for such networks.

FUTURE RESEARCH DIRECTIONS
In wireless sensor networks, routing is a challenge due to various characteristics that distinguish them from existing communication and wireless ad-hoc networks. New techniques of Hierarchical routing are a hot topic in this field for research. Due to the time limitations, our focus was only on some of the routing protocols during our study. DSDV was one of the early algorithms available. It is quite suitable for creating ad hoc networks with small number of nodes [20]. Since no formal specification of this algorithm is present. There is no commercial implementation of this algorithm [20]. Many improved forms of this algorithm have been suggested. Though, there are many other routing protocols that are needed to be analyzed. There are different design issues in WSN, like energy, heterogeneity, localization and synchronization which need to be explored further. Also, protocols security should be investigated with respect to various natures of attacks to which wireless communication is considered as an attractive target average throughput than DSDV and ZRP. Furthermore, performance comparison with other routing protocols in different classes could be done. In future, a mixture of two or more protocols can be used to give rise to a new type of WSN network satisfying more and more criteria. New techniques of Hierarchical routing are a hot topic in this field for research.