A Simulation and analysis of DSR Protocol in Mobile ad hoc Networks

A MANET can be treated as a network in which the nodes have the capability of self-configuring among themselves. These nodes are connected by wireless links to form an distributed topology without the help of any pre-existing infrastructure. Each node in a MANET can itself act as a router on its own. To perform effective routing operation in MANETS , several routing protocols were proposed, addressing several issues in MANETS. In this paper ,we tried to study the operation of DSDV protocol ,which is a proactive protocol and analyse the results obtained by simualting the DSDV protocol using NS-2 Simulator.


INTRODUCTION
With the recent changes and advancements in computer and communications technologies, particularly under wireless communications, there is a widespread use of mobile computing applications using the TCP/IP protocol stack. MANETS were mainly introduced to provide enhanced support for wireless networking applications by adding the routing functionality into the entities. These type of networks are composed of wireless links most of which are bandwidthconstrained, with dynamically changing multi hop topologies .The main goal of MANETS is to enhance mobility into the realm of autonomous, mobile, wireless domains, where a set of nodes themselves form the network routing infrastructure in an ad hoc fashion. MANETS provide more flexibility in the creation of a network in situations like where there is no possibility or less possibility in setting up the predefined infrastructure. The topology of the network changes unpredictably and rapidly. Less configuration, no need of a centralized authority and fast deployment features make MANETS most suitable for emergency situations like natural calamities, emergency medical situations, military applications etc., Unlike a node in an infrastructure based network, all the nodes in a MANET cooperate with each other to perform routing. All the nodes in a network are very free to move and hence change the links very easily. Because the radio transmission range is very less, there is a lot of overhead involved with respect to routing , security in particular. This is because the nodes are more prone to failures and compromises in ad hoc networks because of their mobility.

Fig1: A Mobile Ad hoc Network
In the recent days, research on MANETs has became quite popular with the widespread use of wireless networking devices.Mobile ad hoc networks became a popular for research as laptops and 802.11/Wi-Fi wireless networking became widespread from 1990s. Many researchers are evaluating the protocols with different degrees of mobility within a bounded space, usually with all nodes within a few hops of each other, and usually with nodes sending data at a constant rate. The packet drop rate, the overhead introduced by the routing protocol, and other measures are also evaluated for different protocols.

MANET Challenges
A MANET environment has to overcome certain issues of limitation and inefficiency. It includes:

Applications of MANET's
As the usage in the no of wireless and mobile devices is increasing day b day, there has been extensive scope use of MANET's in various application areas of wireless and adhoc networking.The set of applications for MANET is diverse, ranging from large-scale, mobile, highly dynamic networks, to small, static networks that are constrained by power sources. Besides the legacy applications that move from traditional infra structured environment into the ad hoc context, a great deal of new services can and will be generated for the new environment.Typical applications include:  Venkatraman and Agrawal proposed a protocol based on public key cryptography. They assume the existence of a governing authority for the distribution of public keys. A source node generates a route request and digitally signs it using its private key. When a destination node sends a route reply back to the source node, public key cryptography is used for pair-wise authentication to exclude malicious nodes. If a node does not know a forwarding node's public key, they have to exchange public keys first. This pair-wise authentication is done by challenge and response process. The purpose of this protocol is to prevent external attacks.

Destination-Sequenced Distance-Vector Routing
Destination-Sequenced Distance-Vector Routing (DSDV) is an adaption of a conventional routing protocol to ad hoc networks. DSDV is based on the Routing Information Protocol (RIP), used in parts of the Internet. Consequently, DSDV only makes use of bidirectional links. DSDV is one of the earlier ad hoc routing protocols developed. n DSDV, packets are routed between nodes of an ad hoc network using routing tables stored at each node. Each routing table, at each node, contains a list of the addresses of every other node in the network. Along with each node's address, the table contains the address of the next hop for a packet to take in order to reach the node.
In this example, a packet is being sent from node 1 to node 3 (node 3 is not shown). From node 1, the next hop for the packet is node 4 (Figure a). When node 4 receives the packet, it looks up the destination address (node 3) in its routing table (Figure b). Node 4 then transmits the packet to the next hop as specified in the table, in this case node 5 (Figure c). This procedure is repeated as required until the packet finally reaches its destination. N o v e m b e r , 2 0 1 3

Routing Table Management
The bulk of the DSDV protocol does not involve routing at all. Rather, the crux of DSDV is the generation and maintenance of the routing tables. Every time the network topology changes, the routing table in every node needs to be updated. As one might expect, this is no trivial task. The situation is further complicated by the fact that, when routing tables are out of sync (i.e. the routing protocol has not converged), routing loops may form.
To facilitate routing table maintenance, several additional pieces of information are stored in the routing tables. In addition to the destination address and next hop address, routing tables maintain the route metric and the route sequence number.
Periodically, or immediately when network topology changes are detected, each node will broadcast a routing table update packet. The update packet starts out with a metric of one. This signifies to each receiving neighbor they are one hop away from the node. The neighbors will increment this metric (in this case, to two) and then retransmit the update packet. This process repeats itself until every node in the network has received a copy of the update packet with a corresponding metric. If a node receives duplicate update packets, the node will only pay attention to the update packet with the smallest metric and ignore the rest.
To distinguish stale update packets from valid ones, each update packet is tagged by the original node with a sequence number. The sequence number is a monotonically increasing number which uniquely identifies each update packet from a given node. Consequently, if a node receives an update packet from another node, the sequence number must be equal to or greater than the sequence number already in the routing table; otherwise the update packet is stale and ignored. If the sequence number matches the sequence number in the routing table, then the metric is compared and updated as previously discussed.
Each time an update packet is forwarded, the packet not only contains the address of the eventual destination, but it also contains the address of the transmitting node. The address of the transmitting node is entered into the routing table as the next hop (unless the packet is ignored, of course). illustrates how a node processes an update packet under varying conditions. Note update packets with higher sequence numbers are always entered into the routing table, regardless of whether they have a higher metric or not.

Simulation Parameters
Simulation time 3000s No. of clusters 12

SIMULATION RESULTS
DSDV protocol was developed based on the functionality of RIP protocol, and is mainly developed for ad hoc networks.
Routing tables stored at each node are used to discover the route .Maintaining and managing these routing tables forms the main complexity of this routing protocol. It has been observed that our proposed protocol works with more lesser delays and hence more packet delivery ratios under different no.of malicious nodes.

Conclusion and Future Scope
In this paper, we have implemented the routing protocol DSDV for MANET's and compared the results obtained with our proposed protocol with different no. of malicious nodes to identify the performance of the network under different scenarios. The simulation results were shown and it is found that the proposed protocol delivers packets with lesser delays when compared to DSDV protocol. In future, more complex simulations could be carried out for different parameters and more detailed in-depth analysis of the entire network under various scenarios can be done. In DSDV, nodes has to periodically transmit the routing table updates, regardless of network traffic. These update packets are broadcast throughout the network so every node in the network knows how to reach every other node. As the number of nodes in the network grows, the size of the routing tables and the bandwidth required to update them also grows. As the topology changes dynamically, DSDV is unstable until update packets propagate throughout the network.