A Simulated Behavioral Study of DSR Routing Protocol Using NS-2
A Simulated Behavioral Study of DSR Routing Protocol Using NS-2
com
ISSN : 2248-9622, Vol. 4, Issue 12( Part 2), December 2014, pp.64-71
Abstract
Mobile ad hoc network (MANETS) consists of wireless nodes communicating without any centralized
administration .thus each node acts as a host and a router. There are many routing protocols designed for
MANETS. The Dynamic Source Routing protocol (DSR) is a simple and efficient Routing protocol designed
specifically for use in multi-hop wireless mobile nodes. This paper describes the design the implementation of
DSR protocol in NS-2 simulator environment. We also analyze the performance of the DSR for various
performance matrixes such as average end to- end delay, throughput and packet delivery ratio. The analysis was
made for different number of nodes using the NS-2 simulator.
Keywords – MANETs, DSR, routing protocol, performance evaluation, NS-2
www.ijera.com 64 | P a g e
Ali El-Desoky et al.Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 12( Part 2), December 2014, pp.64-71
algorithm (TORA), Ad-hoc On-demand Multipath updates its route cache with this new learned route
Distance Vector Routing (AOMDV). Our discussion [16-20]. For route maintenance procedure; DSR uses
is limited to DSR protocol. two types of packets; route error packets and
Hybrid routing protocols area combination of both acknowledgment. When a node detects a
reactive and proactive approaches. Zone routing transmission problem on forwarding a packet, it
protocol (ZRP) is an example [8-11]. generates a route error packet while acknowledgment
packets are used to confirm the correct operation of
II. DSR protocol description the route links [21-25].
The DSR is a pure reactive routing protocol
based on the concept of source routing. it employs III. DSR implementation in NS-2
route discovery and route maintenance procedures simulator
working together in a way that that can enable nodes NS-2 is a an object oriented ,open source
to discover and maintain routes to arbitrary network simulation tool which can be used by
destinations in thenetwork [12-15]. Each node researchers working on wired or wireless networks as
maintains its route cache which is kept in the memory it supplies numerous models and source codes of
to save the discovered route for future use. The node routing protocols. There are two programming
updates entries in the route cache when it learns languages used in NS-2 otcl and C++ language. C++
about new routes.The original DSR keeps multiple is used for detailed protocol implementation where
routes to a destination ordered by hop count. It otcl language is used to write script files (simulation
selects a route having the minimal number of hops script) where users describe the model to be
between the available routes. DSR uses the route simulated then NS-2 interpret the script and output
selection based on the shortest path algorithm; it the simulation process and result to an output file
selects a route having the minimal number of hops (trace file). The simulation process and result can be
between the available routes. When a source node shown by Nam and Xgraph files [26, 27]. There are
wants to send a data packet to destination node, it two main types of NS-2 agents routing agents and
first checks its route cache for a route to the desired transport layer agents. A routing agent creates,
destination; If a route is found the node uses it to transmits and receives control packets and routing
send the packet. The route is inserted in the packet protocol commands to act accordingly, where as
header and then the packet is forwarded to its Connecting an application to a low level network, a
destination through this route. In case there is no transport layer agent controls the congestion and
route to the desired destination in the node's route reliability of a data flow based on an underling
cache, it applies a route discovery process by transport layer protocol .NS-2 implements agents in
broadcasting a route request packet (RREQ) to all its C++ [28, 29]. The DSR routing protocol is
neighbors. The source node appends source ID, implemented in NS-2as Agent (DSR Agent). This
destination ID and a unique request ID to it. The section analyses the DSR source code in NS-2. The
packet also contains a route record listing the address chart in figure 1 shows the basic functions of the
of each intermediate node it passes through. The DSR agent. When a DSR agent receives a packet it
source route initializes this record as an empty list. first arrives at recv method (basic function) which
When an intermediate node receives a RREQ packet first checks the packet header to see if it has a valid
it appends its id to the RREQ packet’s route- record source route (srh) then calls different functions to
then it rebroadcasts the RREQ again, unless it is the handle the packet as shown in flow chart described in
destination node, or it has a route to the intended figure 1. If no source route found in packet header
destination in its cache. When initiating a Route and it is not a broadcast packet, it will be handled
Discovery, the sending node saves the original packet through the method named handlePktWithoutSR
in a local buffer called the Send Buffer. Each packet which is described later in the flow chart shown in fig
in the Send Buffer is stamped with the time that it 2. If there is a valid source route then the packet is
was placed into the Buffer the packet is saved in the handled through methods handlePacketReceipt
send buffer until a route found or it reaches time out described in figure 3. If the current node is the
period. The packet is discarded in case of timeout. destination (P.dest= net_id) else it is handled either
Timeout period is necessary for preventing the Send through the method handleRouteRequest (described
Buffer from overflowing. When the route request in flowchart shown in figure 4) if it is a RREQ
reaches either the destination itself or a node that has packet, or through handleForwarding method if it is
a route to the destination, a route reply (RREP) is not a RREQ packet.
generated. The RREP is then sent back (through the
reverse path found in the route record of RREQ) to IV. Simulation
the source node. The source node then appends this In this paper the DSR is analyzed using the NS-2
path to the original packet saved in the send buffer simulator. Three performance metrics are used to
and forwards it to destination through it. It also evaluate the performance Average End-To-End
www.ijera.com 65 | P a g e
Ali El-Desoky et al.Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 12( Part 2), December 2014, pp.64-71
Delay, Throughput, and packet delivery ratio for simulated model which defines the network topology
various numbers of nodes considering TCP as the composed of nodes, routers, links, and shared media.
transport protocol and FTP as the traffic generator. Otcl language is used to write the script file.Table 1
shows a part of the tcl script containing the tcl coding
4.1. Simulation tool and parameter which specify the simulation parameters.
The simulations tool used is NS-2. Before starting the
simulation a tcl script is created that describes the
DSR end to end delay decreases with increase the number of nodes till 80 nodes. So DSR protocol good for
nodes less than 80. Increasing number of nodes Increases the number of hops in routes and in its turn increases
the time it take the packet to reach the destination.
Throughput: The throughput is defined as the total amount of received data packets divided by the simulation
time. The throughput is measured in bits per second (bps). Table3 represents the throughput for different
numbers of nodes.
DSR throughput increases with increase the number of nodes till 80 nodes. With the increase of number of
nodes than 80 the throughput decreases. This may result due to the increase of routing overhead by increasing
the number of nodes.
www.ijera.com 66 | P a g e
Ali El-Desoky et al.Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 12( Part 2), December 2014, pp.64-71
Packet Delivery Ratio: Packet delivery ratio is the ratio of number of packets received at the destination to the
number of packets sent from the source. The performance is better when packet delivery ratio is high .The
reason for having better packet delivery ratio of DSR is that allow packets to stay in the send buffer until a valid
route found then data packets are sent on that route to be delivered at the destination.
V. Conclusion
In this paper, a detailed description of DSR routing algorithm and its implementation as arouting agent
(DSR agent) in NS-2 is presented. The performance of DSR is evaluated in terms of throughput,average end-to-
end delay, and packet delivery ratio for various numbersof nodes using the NS-2 simulator. From the above
simulation result analysis, we can conclude that DSR provides good performance for routing in wireless ad hoc
networks.
References
[1.] SS. Dhenakaran, and A Parvathavarthini. An overview of routing protocols in Mobile ad-hoc network.
International journal of advanced research in computer science and software engineering, 3(2), 2013,
251-259.
[2.] M Kumar, N Geethanjali, and N. Ramesh Babu. Performance evaluation of AODV and FSR routing
protocols in MANETS. Global Journal of computer science and technology, 13(4), 2013, 29-34.
[3.] A. Odeh, E. AbdelFattah, and M. Alshwokan. Performance evaluation of AODV and DSR routing
protocols in MANET networks. International journal of distributed and parallel systems, 3(4), 2012,
13-17
[4.] K. Pandey K, and A. Swaroop. A comprehensive performance analysis of proactive, reactive and hybrid
MANETs routing protocols. International journal of computer science, 8(6), 2011, 432-436
[5.] K. Vanaja, and R. Umaram. A simulated behavioural study of prominent reactive routing protocol
AODV of MANET using NS-2. International journal of advanced research in commuter and
communication engineering, 1(3), 2012, 161-166
[6.] H. Soni, and P. Verma. Performance based survey of routing protocol in MANET. International Journal
of Advanced Research in Computer Engineering & Technology, 2(1), 2013, 145-154
[7.] K. Patel, R. Kumar, andK. Daniel. Performance analysis and behaviouralstudy of proactive and reactive
routing protocols in MANET. International journal of advanced research in computer and
communication engineering, 2(4), 2013, 1789-1796
[8.] KR. Reddy, S. Venkata Raju, and N. Venkatadri. Reactive, proactive MANET routing protocol
comparison. International journal of Video&image processing and network security, 12(5), 2012, 22-27
[9.] G. Balamurugan, P. Sakthivel, and C. Jayanavithraa. The comparative study of adhoc network routing
protocols. International Journal of Advanced Research in Computer and Communication Engineering,
3(2), 2014, 5337-5340.
[10.] A. Hinds, M. Ngulube, S. Zhu, and H. Al-Aqrabi. A review of routing protocols for mobile ad-hoc
NETworks (MANET). International journal of information and education technology,3(1), 2013, 1-5
[11.] TP. Singh, S. Dua, and V. Das. Energy-efficient routing protocols in mobile ad-hoc networks.
International journal of advanced research in computer science and software engineering, 2(1), 2012,
132-137.
[12.] R. Saleh, M Saman, and N. Rahman N. A new policy for path selection in dynamic source routing
protocol for mobile ad-hoc networks. Journal of computer science, 9(5), 2013, 551-557
www.ijera.com 67 | P a g e
Ali El-Desoky et al.Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 12( Part 2), December 2014, pp.64-71
[13.] K. Manoj, R. Kumar, and K. Arti. Analysis of delay and throughput in MANET for DSR protocol.
world academy of science, engineering and technology, 5(2), 2011, 653-656
[14.] S. sofat, and A Gupta. A Survey on Throughput Analysis of DSR Routing Protocol in
MANETs.International Journal of Multidisciplinary in Cryptology and Information Security, 2(2),
2013, 56-63
[15.] N. Khan, and N. Agarwal. Adaptive routing in mobile adhoc networks and comparison between routing
protocols aodv and dsr for apu strategy. Journal of computer science 2014 (ICAET-2014): 58-65
[16.] R. Jagannadha, K. Sreenu, and P. Kalpana. A study on dynamic source routing protocol for wireless ad-
hoc networks. International Journal of Advanced Research in Computer and Communication
Engineering, 1(8), 2012, 522-529
[17.] Y. Saravanan, and D Vijayakumar. Performance of reactive and proactive MANET routing protocols
with trajectories. International Journal of Engineering Research and Technology, 1(8), 2012, 24-29
[18.] D. NareshVadhwani, D. Kulhare, and M. Singh. Behavior analysis of DSR MANET protocol with http
traffic using opNET simulator, The International Journal of Innovative Research in Computer and
Communication Engineering, 1(3), 2013, 680-686.
[19.] S. Ali and A. Ali.Performance analysis of AODV, DSR and OLSR in MANET (LAP LAMBERT
Academic Publishing, 2011).
[20.] R. Sharma, and S. Sabharwal. Dynamic source routing protocol (DSR). International journal of
advanced research in computer science and software engineering, 3(4), 2013, 293-241
[21.] S.V. Gumaste, M.U. Kharat, and V.M. Thakare. Performance analysis of DSR protocol. International
journal of scientific and engineering research, 1(3), 2013, 62-68
[22.] R. Saleh, M. Saman, and M. Rahman. Impact of route selection metrics on the performance of DSR
protocols for MANETs. International Journal of Computer Science Issues, 10(2), 2013, 123-126
[23.] D. Goel. A new approach of route selection in DSR using time routing metric in MANET. International
Journal of Advanced Research in Computer Science and Software Engineering, 4(4), 2014, 360-363
[24.] P Rohal, R. Dahiya, and P. Dahiya. Study and analysis of throughput, delay and packet delivery ratio in
MANET for topology based routing protocols (AODV, DSR, and DSDV). International Journal of
Advanced Research in Engineering and Technology, 1(2), 2013, 54-58
[25.] D.N. Vadhwani, M. Singh, D. Kulhare. Simulation of wireless dynamic source routing protocol with IP
traffic flow analysis, memory efficiency and increased throughput. IJCom, 3(4), 2013, 136-141
[26.] S. Upadhyay, P. Joshi, N. Gandotra, and A. Kumari. Comparison and performance analysis of reactive
type DSR, AODV and proactive type DSDV routing protocol for wireless mobile ad-hoc network, using
NS-2 simulator. Journal of engineering and computer innovations, 2(10), 2012, 36-47
[27.] M. Chandrika, and N. Papanna. Performance comparison of AOMDV and POR routing protocols in
MANETs. International Journal of Engineering Research and Applications, 3(4), 2013, 37-41
[28.] T. Issariyakul, and E. Hossain, Introduction to network simulator NS2 (New York: Springer, 2012
[29.] A. Gani, Q. Han, N. B. adrulAnuar, and O. Zakaria. Enhancing DSR protocol performance in mobile ad
hoc network using ACK reply. WSEAS TRANSACTIONS On Communications, 2(2), 2009, 227-236
www.ijera.com 68 | P a g e
Ali El-Desoky et al.Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 12( Part 2), December 2014, pp.64-71
Yes Init sr No
(Give a pkt source handlePacketReceip
header) t Is RREQ No
No
P.src=net-id
(I am initiator) Yes
Done
(Iam a hop)
Error Yes handlePacketWithoutS handleForwardin
R handleRouteRequest g
(process RREQthat is not for me) (Get next hop,
sendOutBcastPkt
Forward pkt to)
Done
Done
Done Done
Begin
Yes R.REP No
Yes No
R.Req
acceptRouteReply
Seen before
Yes acceptDataPkt
(it is a data packet for me)
Update route cache
No
Ignore pkt
Done
Verify if another
packet in send buffer
waiting this Route
returnSrcRouteToRequestor
(Take the route in pkt, add my ID to end of it
then return Route to the sender of pkt)
sendOutPacketWithRoute
Done
Done
www.ijera.com 69 | P a g e
Ali El-Desoky et al.Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 12( Part 2), December 2014, pp.64-71
Begin
No Yes
Is pkt seen
before
Ignore packet
(Pkt is a request that has been Is there a Route
already processed) Yes to dest in cache
Done No
Done
Done
200
150
average end-to-end
100
delay
50
0
20
30
40
50
60
70
80
90
100
110
120
130
140
www.ijera.com 70 | P a g e
Ali El-Desoky et al.Int. Journal of Engineering Research and Applications www.ijera.com
ISSN : 2248-9622, Vol. 4, Issue 12( Part 2), December 2014, pp.64-71
throughput
590
580
570
560
550
540
530 throughput
520
510
500
490
20 30 40 50 60 70 80 90 100 110 120 130 140
0.998
0.997
0.996
packet delivery ratio
0.995
0.994
0.993
50
20
30
40
60
70
80
90
100
110
120
130
140
www.ijera.com 71 | P a g e