ELECTRICAL AND COMPUTER ENGINEERING DEPA

MEKELLE UNIVERSITY
ETHIOPIAN INSTITUTE OF TECHNOLOGY
ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT

Mini–thesis
On application development for mobile and ubiquitous computing
Title
Performance comparison of AODV and DSR routing protocols in mobile
ad-hoc network (MANET)

By
Mebratu Fana

Mekelle, Ethiopia

Submitted
To
Henoc Mulugeta

November, 2006


i

Acknowledgment
First I would like to take this opportunity to thank my teacher Henoc Mulugeta for giving this
assignment to me .It help me to detail understanding for my future thesis. I am also very
thankful for all my colleagues who gave me materials and helpful ideas. Finally I give thank to
the almighty God as, without His help one can finish nothing.

ii

Abstract
A Mobile Ad-hoc Network (MANET) is a collection of wireless nodes that can dynamically
form a network to exchange information without using any pre-existing fixed network
infrastructure. MANET is a self organized and self configurable network where the mobile nodes
move arbitrarily. The mobile nodes can receive and forward packets as a router. Each node
operates not only as an end system, but also as a router to forward packets. The nodes are free to
move about and organize themselves into a network. These nodes change position frequently.
MANET does not require any fixed infrastructure, such as a base station; therefore, it is an
attractive option for connecting devices quickly and spontaneously. In this three routing
protocols AODV (Ad- Hoc On-Demand Distance Vector) and DSR (Dynamic Source Routing

Protocol) are compared. Most of the previous research on MANET routing protocols have
focused on simulation study by varying various parameters, such as network size, pause times
etc. The performance of these routing proto-cols is analyzed in terms of their Packet Delivery
Fraction, Average End-to-End Delay and dropped packets and their results are shown in
graphical forms. The comparison analysis will be carrying out about these protocols and in the
last the conclusion will be presented, that which routing protocol is the best one for mobile ad hoc networks.

iii

Table of Contents

Page

Acknowledgment .......................................................................................................................................... ii
Abstract ........................................................................................................................................................ iii
1. Introduction ............................................................................................................................................... 1
1.1
Background ................................................................................................................................... 2
1.2
Problem Statement ........................................................................................................................ 3

1.3
Motivation and Contribution ......................................................................................................... 3
1.4
Aims and Objectives ..................................................................................................................... 4
1.5
Scope of the work ......................................................................................................................... 5
2 Related works........................................................................................................................................ 6
3 Methodology ......................................................................................................................................... 8
3.1
Review .......................................................................................................................................... 8
3.2
Simulation tool .............................................................................................................................. 8
3.3
Simulation ..................................................................................................................................... 8
3.4
Framework of the work ................................................................................................................. 8
4. Routing protocols in ad hoc mobile networks..................................................................................... 10
4.1
Ad-hoc on Demand Distance Vector (AODV) ........................................................................... 10
4.1.1 Working of AODV..................................................................................................................... 11

4.1.2 Characteristics of AODV ........................................................................................................... 12
4.1.3
Advantages of AODV ......................................................................................................... 12
4.1.4 Disadvantages of AODV ......................................................................................................... 12
4.2
Dynamic State Routing (DSR) .................................................................................................... 13
4.2.1 Working of DSR ........................................................................................................................ 14
4.2.2 Advantage of DSR .................................................................................................................... 15
4.2.3 Disadvantages of DSR ............................................................................................................... 15
5. Simulation results and performance comparisons............................................................................... 16
5.1 performance metrics.......................................................................................................................... 16
5.2 Simulation environment .................................................................................................................... 17
5.3 Experimental results.......................................................................................................................... 18
5.4 Number of nodes and connections .................................................................................................... 18
5.5 Results and discussion ...................................................................................................................... 20
6. Conclusion .......................................................................................................................................... 27
7. References ............................................................................................................................................... 28
Appendix 1: Sample code ........................................................................................................................... 29
Appendix 2: Awk files ................................................................................................................................ 33


iv

CHAPTER 1
1. Introduction
A mobile ad hoc network is a collection of wireless mobile nodes that dynamically establishes
the network in the absence of fixed infrastructure [1]. One of the distinctive features of MANET
is, each node must be able to act as a router to find out the optimal path to forward a packet. As
nodes may be mobile, entering and leaving the network, the topology of the network will change
continuously. MANETs provide an emerging technology for civilian and military applications.
Since the medium of the communication is wireless, only limited bandwidth is available.
Another important constraint is energy due to the mobility of the nodes in nature.
One of the important research areas in MANET is establishing and maintaining the ad hoc
network through the use of routing protocols. Though there are so many routing protocols
available, this research considers AODV and DSR for performance comparisons due to it
familiarity among all other protocols. These protocols are analyzed based on the important
metrics such as dropped data (packets), packet delivery ratio and average end-to-end delay and is
presented with the simulation results obtained by NS-2 simulator. In particular, Section 2
presents the related works with a focus on the evaluation of the routing protocols. Section 3
briefly discusses the MANET routing protocols and the functionality of the two familiar routing
protocols AODV and DSR. The simulation results and performance comparison of the two above

said routing protocols are discussed in Section 4. Finally, Section 5 concludes with the
comparisons of the overall performance of the two protocols AODV and DSR based on the
dropped data, packet delivery ratio and average end-to-end delay metrics.

1

1.1 Background
The use of wireless technology has become a ubiquitous method to access the Internet or making
connection to the local network due to its easier and inexpensive deployment with a possibility
of adding new devices to the network at no or lower cost. Devices equipped with wireless
adapters together with a wireless access point constitute Wireless Local Area Networks
(WLANs). Wireless access points, representing a fixed infrastructure, allow devices equipped
with wireless adapters to be linked together in a Local Area Network (LAN) and to get access to
the Internet. However, the reliance upon an existing infrastructure and its potential limitations on
mobility can be a major drawback. Therefore, wireless-capable devices may operate as
autonomous entities, communicating via multiple wireless hops without a pre-established fixed
infrastructure. In the discussion that follows, such wireless-equipped devices are referred to as
nodes and function as both clients and servers in the network to forward the data packets. Such
network is called a Mobile Ad-hoc Network (MANET) [3], where the nodes employed in the
network can change their location from time to time. Nodes can also join or leave the network

freely and arbitrarily without any restriction.
The idea of mobile ad-hoc networking is sometimes also known as infrastructure-less networking
as it does not require any servers, routers, access-points or cables. Instead, a MANET is
comprised of a set of autonomous mobile nodes where the nodes must work together in a
distributed manner to enable routing among them. Because of the lack of centralized control and
frequent changes of network topology, routing becomes a vital issue and a major challenge in
these types of networks.
A routing protocol is mainly used to discover the shortest, most efficient and correct path(s)
while providing the data transmissions between different wireless devices in ad-hoc network. In
recent times, MANETs are found to be able to insert the routing functionality into the mobile
nodes, which save energy for other nodes by bringing down the routing overhead in the network.
Moreover, this routing algorithm establishes the communications and formalizes agreement
among nodes, which is essential to the overall performance of a MANET. Routing protocols for
ad-hoc networks have been of great interest for many years as the underlying Internet routing
protocols are mainly intended to support the permanent infrastructure network; eventually, the
properties of those protocols are found to be inappropriate for MANETs. Consequently, a variety

2

of MANET routing protocols has evolved over recent time. Examples of such routing protocols

are, among others, Optimized Link State Routing (OLSR) protocol, Wireless Routing
Protocol (WRP), Ad-hoc On-Demand Distance Vector (AODV) routing protocol, Dynamic
Source Routing (DSR) protocol and Temporally Ordered Routing Algorithm (TORA).

1.2 Problem Statement
Today, the routing protocols are extensively tuned to provide high-quality performance in the
conventional mobile ad hoc network. In fact, the routing protocols are responsible for providing
reliable data packets in mobile ad hoc networks. However, since these protocols have limitations
of high power consumption, network scalability, low bandwidth, high error rates, and arbitrary
movements of nodes sometimes packet losses occur due to the broken routes between the nodes ,
collision of data packets was happen and source nodes may suffer from long delays for route
searching before they forward data packets. Hence, it is now widely recognized that determining
the specific routing protocols that can perform better in a given MANET scenario would be an
important contribution to contemporary research. In addition, due to the dynamic nature of
MANETs, the routing mechanism experiences a host of problems by being more susceptible to
errors. In particular, member nodes can be affected by churn leading to routes disappearing and
reappearing, which in turn leads to sudden packet losses and higher message delays in the
network. Similarly, there are other factors like network size, network load, and bandwidth and
signal strength that affect the performance of the MANET routing protocols. Therefore, a
detailed analysis is required in order to gain an insight of these factors that determine the

performance of the routing protocol. More specifically, it would be important to study how the
different network parameters and protocols interact, and to what extent each of the individual
factors affects the routing performance.

1.3 Motivation and Contribution
Since their inception within the past decade, MANET has received significant attention in the
world of computer research. A MANET is an evolving technology, which offers a cost-effective
and scalable method to connect wireless devices. Lately, this technology has become
increasingly popular due to its potential application in many domains. For instance, such a
network can be helpful in rescue operations where there is not sufficient time or resource to

3

configure a wired network. MANETs are also very useful in military operations where the units
are moving around the battlefield in a random way and a central unit cannot be used for
synchronization .Although MANET has been considered as a convincing candidate for better
wireless services, research to enhancing its functionality is still in its infancy. Currently, research
has been undertaken with regard to the task of identifying more suitable routing protocols. This
thesis has subjected two routing protocols (of the same categories) in order to assess their
performance in a few realistic MANET scenarios, which will eventually help to better

understand their comparative merits and suitability for deployment under different network
scenarios. Among several routing protocols I select two reactive routing Protocols [4], such as
AODV and DSR. I choose these as my candidate protocols since they cover a range of design
choices, including source routing, hop-by-hop routing, periodic advertisement, and on-demand
route discovery. Even though many MANET routing protocols have been proposed in recent
years, current literature reports only a limited amount of performance study between them. More
specifically, very few researches had previously been attempted to contrast their performance in
a realistic manner. This research therefore provides a quantitative performance analysis of
AODV and DSR routing protocols in the same framework within the MANETs. In order to
evaluate such performance, average end-to-end delay, packet delivery ratio and dropped data
(packets) are considered as performance metrics. In my thesis, a number of important system
parameters such as number of nodes, packet size, traffic type and bandwidth are taken into
consideration. In my study, all these scenarios are simulated and analyzed using ns-2 simulator
(ns-2allinone-2.35 version). The motivation behind using the ns-2 simulator as the selected
simulator is presented in the research methodology section.

1.4 Aims and Objectives
Following the above background and problem statement, one of the major aims of the thesis is to
gain a thorough understanding AODV and DSR performance comparison in MANET routing
protocols.

The particular goals of this thesis work are to:






Perform a simulation with different metrics.
Analysis of the results.
Deriving a conclusion on basis of performance evaluation.
4

1.5 Scope of the work
This research focuses on performance comparison of AODV and DSR routing protocols in
the mobile ad hoc networks.
The work includes:
 Compare AODV and DSR average end –to- end delay with number of connection by
varying number of nodes using simulation

 Compare AODV and DSR dropped data (packets) with number of connection by varying
number of nodes using simulation

 Compare AODV and DSR packer delivery ratio with number of connection by varying
number nodes using simulation

 Analyze the results of simulation and give the conclusion

5

CHAPTER 2
2 Related works
Johansson et al [5] and Broch et al [6] proposed new mobility metric, which measures mobility
in terms of relative speeds of the nodes rather than absolute speeds and pause times. This metric
is intended to capture and quantify the kind of node motion relevant for an ad hoc routing
protocol. Throughput, Delay and routing load were examined for 50-node network for three
routing protocols namely AODV, DSDV and DSR. They used ns-2 based simulation
environment. Their findings reveal that DSR was more effective at low load while AODV was
more effective at higher loads. They kept small packet size (64bytes).
In their simulation, a network size of 50 nodes, 10 to 30 traffic sources, seven different pause
times and various movement patterns were chosen. They used ns-2 discrete event simulator.
Through simulation, they reached the conclusion that performance of DSR was good at all
mobility rates and speeds. AODV produces more routing overhead than DSR at high rates of
node mobility. Jorg [7] studied the behavior of different routing protocols on network topology
changes resulting from link breaks, node movement, etc.
Parul Sharma, Arvind Kalia, and Jawaahar Thakur ; they compared the performance analysis of
AODV and DSR routing protocols in mobile ad hoc networks. They analyzed the routing
protocols in terms of packet delivery ratio and end to end delay parameters versus pause time and
they generate the data packets by CBR.
Results and conclusion made by the authors:
1. Increase in the density of nodes yields to an increase in the mean End-to-End delay.
2. Increase in the pause time leads to a decrease in the mean End-to-End delay.
3. AODV has the best all round performance. It has an improvement of DSR.
4. DSR is suitable for networks with moderate mobility rate. It has low overhead that makes it
suitable for low bandwidth and low power network.
Rachit Jain [8], Laxmi Shrivastava [8] : they study and performance comparison of AODV and
DSR on the basis of path loss propagation models. They compare the two routing protocols in
terms of packet delivery ratio, average end to end delay, and average jitter and throughput with
varying pause time in free space and two way ground model .they generate data packet by
constant bit rate.

6

Results and conclusion made by the authors can be summarized as:
The overall performance of DSR is better in both of the propagation models, whereas AODV
perform better in average end-to-end delay in two ray ground model.
In this thesis the performance comparison of the two routing protocols (AODV and DSR) in the
same category was evaluated by varying number of connections versus average end to end delay,
dropped data (packets) and packet delivery ration.
Ajay Kumar and Ashwani Kumar Singln ( asingla_123@yahoo.co.in
singla_ash2001@yahoo.co.in): They proposed the performance evaluation of manet routing
protocols on the basis of tcp traffic pattern and they conclude that the performance of AODV
and DSR protocols is more affected while subject to change in pause time as compared to change
in number of connections.

7

CHAPTER 3
3 Methodology
The general steps which were performed to achieve the objectives of this thesis work.

3.1 Review
In this step any published work or surveying of the literature of the research work done relevant
about the study area is gathered for assessment.

3.2 Simulation tool
NS-2allinone-2.35 version is software used in this study. NS-2 is a useful tool in research.




















NS-2 is a discrete event simulator for networking research
Simulates at packet level
Substantial support to simulate many protocols
Simulate wired and wireless network
Is primarily UNIX based
NS-2 is the de facto experiment environment in research community
Easy to use friendly simulator
Well documented easy to understand programming environment
Well designed software
Supports protocols

3.3 Simulation
After detail discussion of routing protocols for mobile ad hoc networks necessary evaluation
preparation for the two routing protocol and analyzing its performance with the help of different
parameters is done. These parameters are average end-to-end delay, packet delivery ratio and
dropped packets.

3.4 Framework of the work
This work consists of five chapters which are organized as follows. In the first section an
Introduction on the work is described under the sub topics of problem of statement, scope of the
work, objectives of the thesis, methodology and its report outline. In particular, section2 presents
the related works with a focus on the evaluation of the routing protocols, section 3 discusses the
methodology used in the research Section 4 briefly discusses the MANET routing protocols and
the functionality of the two familiar routing protocols AODV and DSR. The simulation results
8

and performance comparison of the two above said routing protocols are discussed in section 5.
Finally, section 6 concludes with the comparisons of the overall performance of the two
protocols AODV and DSR based on the dropped data, packet delivery ratio and average end-toend delay metrics.

9

CHAPTER 4
4. Routing protocols in ad hoc mobile networks
For mobile ad hoc networks, the issue of routing packets between any pair of nodes becomes a
challenging task because the nodes can move randomly within the network. A path that was
considered optimal at a given point in time might not work at all a few moments later. Moreover,
the stochastic properties of the wireless channels add to the uncertainty of path quality.
Traditional routing protocols are proactive in that they maintain routes to all nodes, including
nodes to which no packets are being sent. They react to any change in the topology even if no
traffic is affected by the change, and they require periodic control messages to maintain routes to
every node in the network. An alternative approach involves establishing reactive routes, which
dictates that routes between nodes are determined solely when they are explicitly needed to route
packets. This prevents the nodes from updating every possible route in the network, and instead
allows them to focus either on routes that are being used, or on routes that are in the process of
being set up.
The routing protocols are proactive in that they maintain routes to all nodes, including nodes to
which no packets are sent. They react to topology changes, even if no traffic is affected by the
change. They are based on either link-state or distance vector principles and require periodic
control messages to maintain routes to every node in the network. An alternative approach is
reactive route establishment, where routes between nodes are determined only when explicitly
needed to route packets. Two routing protocols are studied in this work, namely Ad-hoc on
Demand Distance Vector (AODV) and Dynamic State Routing (DSR) protocols

4.1 Ad-hoc on Demand Distance Vector (AODV)
The AODV routing protocol is based on DSDV and DSR algorithm. It uses the periodic
beaconing and sequence numbering procedure of DSDV and a similar route discovery procedure
as in DSR. However, there are two major differences between DSR and AODV. The most
distinguishing difference is that in DSR each packet carries full routing information, whereas in
AODV the packets carry the destination address. This means that AODV has potentially less
routing overheads than DSR. The other difference is that the route replies in DSR carry the
address of every node along the route, whereas in AODV the route replies only carry the

10

destination IP address and the sequence number. The advantage of AODV is that it is adaptable
to highly dynamic networks. However, node may experience large delays during route
construction, and link failure may initiate another route discovery, which introduces extra delays
and consumes more bandwidth as the size of the network increases

Table 4.1: basic characteristic of AODV and DSR

Protocol

Multiple routes

Route
method

metric Route
maintained in

DSR

YES

AODV

NO

Shortest path or Route cache
next
path
available
Freshest
and Route table
shortest path

Route
reconfiguration
strategy
Erase route then
source
notification
Erase route then
source
notification
or
local route repair

4.1.1 Working of AODV
Each mobile host in the network acts as a specialized router and routes are obtained as needed,
thus making the network self starting. Each node in the network maintains a routing table with
the routing information entries to its neighboring nodes, and two separate counters: a node
sequence number and a broadcast-id. When a node (say, source node „S‟) has to communicate
with another (say, destination node „D‟), it increments its broadcast-id and initiates path
discovery by broadcasting a route request packet RREQ to its neighbors. The (source-addr,
broadcast-id) pair is used to identify the RREQ uniquely. Then the dynamic route table entry
establishment begins at all the nodes in the network that are on the path from S to D. As RREQ
travels from node to node, it automatically sets up the reverse path from all these nodes back to
the source. Each node that receives this packet records the address of the node from which it was
received. This is called Reverse Path Setup. The nodes maintain this info for enough time for the
RREQ to traverse the network and produce a reply to the sender and time depends on network
size. If an intermediate node has a route entry for the desired destination in its routing table, it
compares the destination sequence number in its routing table with that in the RREQ. If the
destination sequence number in its routing table is less than that in the RREQ, it rebroadcasts the

11

RREQ to its neighbors. Otherwise, it unicasts a route reply packet to its neighbor from which it
was received the RREQ if the same request was not processed previously (this is identified using
the broadcast-id and source address).
Once the RREP is generated, it travels back to the source, based on the reverse path that it has set
in it until traveled to this node. As the RREP travels back to source, each node along this path
sets a forward pointer to the node from where it is receiving the RREP and records the latest
destination sequence number to the request destination. This is called Forward Path Setup. If an
intermediate node receives another RREP after propagating the first RREP towards source it
checks for destination sequence number of new RREP. The intermediate node updates routing
information and propagates new RREP only, If the Destination sequence number is greater, OR
If the new sequence number is same and hop count is small, OR Otherwise, it just skips the new
RREP. This ensures that algorithm is loop-free and only the most effective route is used.
4.1.2 Characteristics of AODV
 Unicast, Broadcast, and Multicast communication.






On-demand route establishment with small delay.
Multicast trees connecting group members maintained for lifetime of multicast group.
Link breakages in active routes efficiently repaired.



All routes are loop-free through use of sequence numbers.



Use of Sequence numbers to track accuracy of information.





Only keeps track of next hop for a route instead of the entire route.
Use of periodic HELLO messages to track neighbors.

4.1.3 Advantages of AODV
Because of its reactive nature, AODV can handle highly dynamic behavior of Vehicle Ad-hoc
networks. Used for both unicasts and multicasts using the ‟J‟ (Join multicast group) flag in the
packets.
4.1.4 Disadvantages of AODV


Requirement on broadcast medium: The algorithm expects/ requires that the nodes in the
broadcast medium can detect each others‟ broadcasts.

12



Overhead on the bandwidth: Overhead on bandwidth will be occurred compared to DSR,
when an RREQ travels from node to node in the process of discovering the route info on
demand, it sets up the reverse path in itself with the addresses of all the nodes through





which it is passing and it carries all this info all its way.
No reuse of routing info: AODV lacks an efficient route B maintenance technique. The
routing info is always obtained on demand, including for common cause traffic.
It is vulnerable to misuse: The messages can be misused for insider attacks including
route disruption, route invasion, node isolation, and resource consumption.
AODV lacks support for high throughput routing metrics: AODV is designed to support
the shortest hop count metric. This metric favors long, low bandwidth links over short,



high bandwidth links.
High route discovery latency: AODV is a reactive routing protocol. This means that
AODV does not discover a route until a flow is initiated. This route discovery latency
result can be high in large-scale mesh networks.

4.2 Dynamic State Routing (DSR)
The DSR protocol requires each packet to carry the full address (every hop in the route), from
source to the destination. This means that the protocol will not be very effective in large
networks, as the amount of overhead carried in the packet will continue to increase as the
network diameter increases. Therefore, in highly dynamic and large networks the overhead may
consume most of the bandwidth. However, this protocol has a number of advantages over other
routing protocols, and in small to moderately size networks (perhaps up to a few hundred nodes),
this protocol performs better. An advantage of DSR is that nodes can store multiple routes in
their route cache, which means that the source node can check its route cache for a valid route
before initiating route discovery, and if a valid route is found there is no need for route
discovery. This is very beneficial in network with low mobility, because the routes stored in the
route cache will be valid for a longer period of time. Another advantage of DSR is that it does
not require any periodic beaconing (or hello message exchanges), therefore nodes can enter sleep
node to conserve their power. This also saves a considerable amount of bandwidth in the
network.

13

4.2.1 Working of DSR
The key distinguishing feature of DSR is the use of source routing. That is, the sender knows the
complete hop-by-hop route to the destination. These routes are stored in a route cache. The data
packets carry the source route in the packet header. When a node in the ad hoc network attempts
to send a data packet to a destination for which it does not already know the route, it uses a route
discovery process to dynamically determine such a route. Route discovery works by flooding
the network with route request (RREQ) packets. Each node receiving an RREQ re-broadcasts it
unless it is the destination or it has a route to the destination in its route cache. Such a node
replies to the RREQ with a route reply (RREP) packet that is routed back to the original source.
RREQ and RREP packets are also source routed. The RREQ builds up the path traversed across
the network. The RREP routes itself back to the source by traversing this path backward. The
route carried back by the RREP packet is cached at the source for future use. If any link on a
source route is bro-ken, the source node is notified using a route error (RERR) pack-et. The
source removes any route using this link from its cache. A new route discovery process must be
initiated by the source if this route is still needed. DSR makes very aggressive use of source
routing and route caching.
The protocol is composed of two main operations:
Route Discovery: Route Discovery is used whenever a source node desires a route to a
destination node. First, the source node looks up its route cache to determine if it already
contains a route to the destination. If the source finds a valid route to the destination, it uses this
route to send its data packets. If the node does not have a valid route to the destination, it initiates
the route discovery process by broadcasting a route request message. The route request message
contains the address of the source and the destination, and a unique identification number. An
intermediate node that receives a route request message searches its route cache for a route to the
destination. If no route is found, it appends its address to the route record of the message and
forwards the message to its neighbors. The message propagates through the network until it
reaches either the destination or an intermediate node with a route to the destination. Then a
route reply message, containing the proper hop sequence for reaching the destination, is
generated and unicast back to the source node.

14

Route maintenance: Route Maintenance is used to handle route breaks. When a node
encounters a fatal transmission problem at its data link layer, it removes the route from its route
cache and generates a route error message. The route error message is sent to each node that has
sent a packet routed over the broken link. When a node receives a route error message, it
removes the hop in error from its route cache. Acknowledgment messages are used to verify the
correct operation of the route links [10].
4.2.2 Advantage of DSR
 Routes maintained only between nodes who need to communicate






reduces overhead of route maintenance
Route caching can further reduce route discovery overhead
A single route discovery may yield many routes to the destination, due to
intermediate nodes replying from local caches

4.2.3 Disadvantages of DSR
 Routes get old: Efficiency can decrease , Cache routes may return invalid routes












Nodes may try different invalid routes before trigger a new route discovery
procedure
Packet length grow with the number of hops of a route
One RREQ can reach all nodes of a network
Potential collisions on RREQ frames sent by neighbor nodes
RREP storm if many neighbor nodes know routes
One intermediate node may send a RREP with and invalid (old) route

15

CHAPTER 5
5. Simulation results and performance comparisons
A simulation study was carried out to evaluate the performance of MANET routing protocols
AODV and DSR based on the metrics packet delivery ratio, average end-to-end delay and
dropped packets with the following parameters.

5.1 performance metrics
The thesis focuses on 3 performance metrics which are quantitatively measured. The
performance metrics are important to measure the performance and activities that are running in
NS-2 simulation. The performance metrics are:
Packet delivery fractions (PDF): also known as the ratio of the data packets delivered to the
destinations to those generated by the CBR sources. The PDF shows how successful a protocol
performs delivering packets from source to destination. The higher for the value give use the
better results. This metric characterizes both the completeness and correctness of the routing
protocol also reliability of routing protocol by giving its effectiveness.

Figure 5.1: Formula for packet delivery fraction
Average end to end delay of data packets: There are possible delays caused by buffering
during route discovery latency, queuing at the interface queue, retransmission delays at the
MAC, and propagation and transfer times. The thesis use Average end-to-end delay.
Average end-to-end delay is an average end-to-end delay of data packets. It also caused by
queuing for transmission at the node and buffering data for detouring. Once the time difference
between every CBR packet sent and received was recorded, dividing the total time difference
over the total number of CBR packets received gave the average end-to-end delay for the
received packets. This metric describes the packet delivery time: the lower the end-to-end delay
the better the application performance.
16

Figure 5.2: Formulas for average end to end delay performance metric
Data packet loss: Mobility-related packet loss may occur at both the network layer and the
MAC layer. In the thesis packet loss concentrate for network layer. When a packet arrives at the
network layer, the routing protocol forwards the packet if a valid route to the destination is
known. Otherwise, the packet is buffered until a route is available. A packet is dropped in two
cases: the buffer is full when the packet needs to be buffered and the time that the packet has
been buffered exceeds the limit.

Figure 5. 3: Formulas for packet loss performance metric

5.2 Simulation environment
Table5.1: Parameter values for simulation
Parameters
Maximum simulation time
Area
Number of nodes
Mobility model
Routing protocol
MAC layer protocol
Traffic type
Pause time
Seed
Number of connection
Max speed
Packet size
Propagation ray mode

Values
100.0 seconds
500*500
20/40/60
Random
AODV, DSR
MAC/802_11
CBR
0.0
1
5/10/15
20.00 seconds
512bytes
Two way ground

17

5.3 Experimental results
The following table indicates that the results of packet delivery ratio, average end to end delay
and dropped data calculated on different number of connection with different number of nodes
for both AODV and DSR routing protocol.
Table 5.2: Experimental results of AODV and DSR for different metrics
Number of Number
connection of nodes
5

10

15

20
40
60
20
40
60
20
40
60

Protocols
PDF
98.64
97.84
94.14
97.75
98.57
97.66
99.20
98.50
98.46

AODV
EED
10.15
27.17
16.90
9.41
12.24
183.21
13.80
14.85
18.25

PLoss
7
11
12
25
15
26
12
22
22

PDF
99.41
98.6
97.05
99.73
97.92
95.65
99.46
98.81
99.33

DSR
EED
10.95
15.35
14.82
76.21
19.73
93.79
12.47
55.74
13.17

PLoss
2
7
15
4
23
49
8
18
9

5.4 Number of nodes and connections
The models were generated for 20, 40 and, 60 nodes with number of connection 5, 10, 15.
The following figures are some of the number of mobile nodes created for different number of
nodes.

18

Figure5. 4: Numbers of mobile nodes created for 20 nodes for both AODV and DSR

Figure 5. 5: Number of mobile nodes created for 40 nodes for both AODV and DSR

19

Figure5.6: Number of mobile nodes created for 60 nodes for both AODV and DSR

5.5 Results and discussion
I evaluated the performance of AODV and DSR protocols under CBR traffic pattern by varying
number of connections and number of nodes. Trace files produced by applying scenarios and
awk scripts for evaluation of AODV and DSR protocols based on average Packet Delivery Ratio,
average end to end delays and dropped data (packets).

Figure 5.7: Packet delivery ratios for connection 5 versus varying number of nodes
20

As I observed from figure 4.7 when the number of nodes are minimum i.e. 20, DSR has highest
PDF; while AODV has lowest PDF than DSR. When the number of nodes is increases the PDF
for both decreases. Now as the numbers of nodes are increased further up to 60, the PDF for
both of them decreases. For connection 5 the DSR has highest PDF than AODV.

Figure 5.8: Average end to end delays for connection 5 versus varying number of nodes
As I observed from figure 4.8 when DSR has shortest average end to end delay and the AODV
has highest average end to end delay. For minimum number of nodes the two protocols AODV
and DSR have shortest average end to end delay for node 40 both protocols average end to end
delay increase and for node 60 average end to end delay for both of them decreases. For
connection 5 the DSR has shortest average end to end delay than AODV.

Figure 5.9: Packet losses for connection 5 versus varying number of nodes
21

It is observed from the figure 4.9 when the number of nodes is varied from 20 to 60, Packet Loss
for AODV is highest; while it is lowest for DSR. And when the nodes are increased further up to
60 the packet loss for DSR increases while packet loss AODV first increases and then decreases.
Overall, DSR performs better in terms of packet loss than AODV. For connection 5 DSR has
lowest packet loss while it is high in case of AODV.

Figure 5.10: Packet delivery ratios for connection 10 versus varying number of nodes
As I observed from figure 4.10 when the number of node is minimum, DSR has highest PDF;
while AODV has lowest PDF than DSR. When the number of nodes is increases the PDF for
both decreases. Now as the numbers of nodes are increased further up to 60, the PDF for both
of them decreases. But for AODV when the number of nodes increased further it decreased
slowly while DSR linearly decreased when number of nodes increases. Therefore AODV has
better performance while the number of nodes increases. For connection 10 DSR has highest
PDF than AODV.

22

Figure 5.11: Average end to end delays for connection 10 versus varying number of nodes
As I observed from figure 4.11 when DSR has highest average end to end delay and the AODV
has lowest average end to end delay. For minimum number of nodes the protocol AODV has
shortest average end to end delay for node 40 both protocols average end to end delay decreased
and for node 60 average end to end delays for both of them increased but AODV has high
average end to end delay when the number of nodes increases. For connection 10 the AODV has
better performance of average end to end delay than DSR routing protocol.

Figure 5.12: Packet losses for connection 10 versus varying number of nodes
23

It is observed from the figure 4.12 when the number of nodes is varied from 20 to 60, Packet
Loss for AODV is highest; while it is lowest for DSR. And when the nodes are increased further
up to 60 the packet loss for DSR increases while packet loss AODV first increases and then
decreases. In DSR the packet losses lowest for minimum number of nodes and the packet loss
increases in case of DSR with number of nodes. So the DSR has lowest packet loss in lowest
number of nodes. But AODV more better then DSR for highest number of nodes. For connection
10 AODV has better performance of packet loss when the number of nodes increases.

Figure 5.13: Packet delivery ratios for connection 15 versus varying number of nodes
It is observed from figure 4.13 when the number of nodes is lowest and the number of
connection is increased, DSR has highest PDF; while AODV has lowest PDF than DSR. When
the number of connection increases, the AODV packet delivery ratio will be decreased.
Therefore DSR has better performance than AODV when number of connection increases.

24

Figure 5.14: Averages end to end delays for connection 15 versus varying number of nodes
As it is observed from figure 4.14 when DSR has lowest average end to end delay for minimum
node i.e. 20 and the AODV has highest average end to end delay at minimum node. Generally
for minimum number of nodes the two protocols AODV and DSR have shortest average end to
end delay for node 40 both protocols average end to end delay increase and for node 60 averages
end to end delay for DSR decreases while average end to end to delay for AODV increased with
number of nodes. So when the number of connection is increased the AODV end to end delay
increased.

Figure 5.15: Packet losses for connection 15 versus varying number of nodes
25

It is observed from the figure 4.15 when the number of nodes is varied from 20 to 60, Packet
Loss for AODV is highest; while it is lowest for DSR. And when the nodes are increased further
up to 60 the packet loss for DSR decrease while packet loss for AODV first increases and then
constant for both 40 and 60 nodes. Overall, DSR performs better in terms of packet loss than
AODV. When number of connection is increased the DSR performs lowest packet losses while it
is constant for AODV.

26

CHAPTER 6
6. Conclusion
This thesis was conducted to study the behavior of the two routing protocols (AODV and DSR)
of the same categories of MANET and to compare the performance of the two routing protocols
of MANET based on CBR traffic pattern. These routing protocols are studied in terms of Packet
delivery ratio, average end to end delay and dropped packets with varying number of nodes and
number of connections. It is concluded that DSR protocol performs better than compared to
AODV protocols for packet delivery ratio (PDF) when number of nodes is lowest with varying
number of connections and DSR less performs when number of nodes increased but by
increasing number of connection it performs better in large number of nodes but not as better as
AODV in very large number of nodes. It is also concluded that performance of these protocols is
more affected while subject to change in number of nodes as compared to change in number of
connections. In both routing protocols packet delivery ratio decreases and average end to end
delay and dropped packets increasing with increasing number of nodes. Average end to end
delay increases with number of nodes in AODV and it is better performs in average end to end
delay than DSR routing protocol. In small number of nodes packet loss is lowest in both routing
protocols and packet loss is increases in both routing protocols when number of nodes goes
further. DSR routing protocol is better performs than AODV routing protocols in case of
dropped packets. Finally I concluded that when number of connection is increases the AODV
performs better packet delivery ratio (PDF) and DSR generate high dropped packet with
increasing number of connections.

27

7. References
[1]. C.Sivaram murthy, B.S.Manoj, Adhoc wireless networks:Architectures, and protocols,
Pearson Education, 2004
[2]

Rolf Ehrenreich Thorup, "Implementing and evaluating the DYMO routing protocol," in

Master Dissertation, Department of Computer Science at University of Aarhus , Denmark, 2007,

pp. 1-133.
[3]. J. Macker and S. Corson, Mobile Ad hoc Networks (MANET), IETF Working Group
Charter , 1997.

[4] C. Mbarushimana and A. Shahrabi, "Comparative study of reactive and proactive routing
protocols performance in mobile ad hoc networks," in 21st International Conference on
Advanced Information Networking and Applications Workshops, 2007, AINAW '07 , vol. 2, pp.

679-684, August 2007.
[5]. D. Johnson, D. Maltz, and J. Jetcheva, “The Dynamic Source Routing Protocol for Mobile
Ad Hoc Networks “, Internet Draft, draft-ietf-manet-dsr-07.txt, work in progress,
2002.
[6]. J. Broch, D. A. Maltz, D. B. Johnson, Y. C. Hu, and J. Jetcheva”, A Performance
Comparison of Multi-Hop Wireless Network Routing n Protocols,” Proceedings of the Fourth
Annual ACM/IEEE International Conference on Mobile Computing and Networking

(MobiCom’98), October 25-30, 1998, Dallas, Texas, USA, pp. 25-30.
[7]. D. O. Jorg, “Performance Comparison of MANET Routing Protocols in Different Network
Sizes”, Computer Networks & Distributed Systems, 2003
[8]. Casaravilla J., Dutra G., Pignataro N. & Acuña J. “Propagation Model for Small Macro cells
in Urban Areas”2009.
[9]. Magnus Frodigh, Per Johansson and Peter Larsson “Wireless ad hoc networking-The art of
networking without a network” Ericsson Review No. 4, 2000
[10]. A.K.Vatsa, Prince Chauhan, Meenakshi Chauhan and Jyothi Sharma, “Routing Mechanism
for MANET in Disaster Area”, International Journal of
Networking and Mobile Technologies, Vol 2 / ISSUE 2/ MAY 2011.
28

Appendix 1: Sample code
I used the following tcl code for generating traffic pattern in the routing protocols by
changing number of nodes and number of connection in both DSR and AODV routing
protocols

if {$argc !=3} {

Puts "Usage: ns adhoc.tcl Routing_Protocol Traffic_Pattern Scene_Pattern "
Puts "Example:ns adhoc.tcl AODVcbr-20-5-2 scene-20-0-20"

exit
}

set par1 [lindex $argv 0]
set par2 [lindex $argv 1]
set par3 [lindex $argv 2]

set val(chan)

Channel/WirelessChannel

;# channel type

set val(prop)

Propagation/TwoRayGround ;# radio-propagationmodel

set val(netif)

Phy/WirelessPhy

set val(mac)

Mac/802_11

;# network interface type
;# MAC type

if { $par1=="AODV"} {
set val(ifq)

CMUPriQueue

}
else {
set val(ifq)

Queue/DropTail/PriQueue ;# interface queue type

}
29

set val(ll)

LL

set val(ant)

;# link layer type

Antenna/OmniAntenna

set val(ifqlen)
set val(rp)

;# antenna model

50

;# max packet in ifq

$par1

;# routing protocol

set val(x)

500

set val(y)

500

set val(seed)

0.0

set val(tr)

aodv.tr

set val(nn)

20

set val(cp)

$par2

set val(sc)

$par3

set val(stop)

100.0

set ns_

[new Simulator]

set tracefd

[open $val(tr) w]

$ns_ trace-all $tracefd
$ns_ use-newtrace
set namtrace

[open aodv.nam w]

$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)

set topo

[new Topography]

$topo load_flatgrid $val(x) $val(y)

set god_ [create-god $val(nn)]

set chan_1_ [new $val(chan)]

30

$ns_ node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channel [new $val(chan)] \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace OFF \
-movementTrace OFF

for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]

$node_($i) random-motion 0

;# disable random motion

}

puts "Loading connection pattern..."
source $val(cp)

puts "Loading scenario file..."
source $val(sc)

for {set i 0} {$i