You are on page 1of 5

Performance Evaluation of Ad Hoc Routing Protocols Using NS2 Simulation 1

Performance Evaluation of Ad Hoc Routing Protocols


Using NS2 Simulation
Samyak Shah1, Amit Khandre 2, Mahesh Shirole3 and Girish Bhole4

Veermata Jijabai Technological Institute, Mumbai, India


E- mail: 1samyakshah@yahoo.com, 2amit_khandre@yahoo.com,
3 4
mrshirole@vjti.org.in, gpbhole@vjti.org.in

ABSTRACT: An ad hoc network is a collection of wireless mobile nodes dynamically forming a temporary network
without the use of any existing network infrastructure or centralized administration. A nu mber of routing protocols
like Dynamic Source Routing (DSR), Ad Hoc On-Demand Distance Vector Routing (AODV) and Destination-
Sequenced Distance-Vector (DSDV) have been implemented. In this project, an attempt has been made to compare
the performance of two prominent on-demand reactive routing protocols for mobile ad hoc networks: DSR and
AODV, along with the traditional proactive DSDV protocol. A simulation model with MAC and physical layer models
is used to study interlayer interactions and their performance implications. The On- demand protocols, AODV and
DSR perform better than the table- driven DSDV protocol. Although DSR and AODV share similar on-demand
behavior, the differences in the protocol mechanics can lead to significant performance differentials. A variety of
workload and scenarios, as characterized by mobility, load and size of the ad hoc network were simulated. The
performance differentials are analyzed using varying network load, mobility, and network size. These simulations
are carried out based on the Rice Monarch Project that has made substantial extensions to the ns - 2 network
simulator to run ad hoc simulations.

Keywords— Performance, Analysis, Ad Hoc Network, AODV, DSR, DSDV, NS2.

INTRODUCTION acquisition operations in inhospitable terrain. This ad-hoc


routing protocols can be divided into two categories:

W ireless networking is an emerging technology that


allows users to access information and services
electronically, regardless of their geographic position.
Table-Driven Routing Protocols: In table driven routing
protocols, consistent and up-t o-date routing information to
all nodes is maintained at each n ode.
Wireless networks can be classified in two types.
On-Demand Routing Protocols: In On-Demand routing
Infrastructure Networks protocols, the routes are created as and when required.
When a source wants to send to a destination, it invokes the
Infrastructure network consists of a network with fixed and route discovery mechanisms to find the path to the
wired gateways. A mobile host communicates with a bridge destination.
in the network (called base station) within its
communication radius. The mobile unit can move AD-HOC ROUTING PROTOCOLS
geographically while it is communicating. When it goes out DESCRIPTION
of range of one base station, it connects with new base
station and starts communicating through it. This is called Destination -Sequenced Distance -Vector
handoff. In this approach the base stations are fixed.
The Destination-Sequenced Distance-Vector (DSDV) [3]
Infrastructure Less (Ad hoc) Networks Routing Algorithm is based on the idea of the classical
Bellman-Ford Routing Algorithm with certain improvements.
In ad hoc networks [5] all nodes are mobile and can be Every mobile station maintains a routing table that lists all
connected dynamically in an arbitrary manner. As the range
available destinations, the number of hops to reach the
of each host’s wireless transmission is limited, so to
communicate with hosts outside its transmission range, a destination and the sequence number assigned by the
host needs to enlist the aid of its nearby hosts in forwarding destination node. The sequence number is used to
packets to the destination. So all nodes of these networks distinguish stale routes from new ones and thus avoid the
behave as routers and take part in discovery and formation of loops. The stations periodically transmit their
maintenance of routes to other nodes in the network. Ad routing tables to their immediate neighbors. A station also
hoc Networks are very useful in emergency search-and- transmits its routing table if a significant change has
rescue operations, meetings or conventions in which occurred in its table from the last update sent. So, the
persons wish to quickly share information, and data update is both time-driven and event-driven.
168 Mobile and Pervasive Computing (CoMPC–2008)

The routing table updates can be sent in two ways: a packets. Each node receiving an RREQ rebroadcasts it,
“full dump ” or an incremental update. A full dump sends unless it is the destination or it has a route to the destination
the full routing table to the neighbors and could span many in its route cache. Such a node replies to the RREQ with a
packets whereas in an incremental update only those entries route reply (RREP) packet that is routed back to the
from the routing table are sent that has a metric change original source. RREQ and RREP packets are also source
since the last update and it must fit in a packet. If there is routed. The RREQ builds up the path traversed across the
space in the incremental update packet then those entries network. The RREP routes itself back to the source by
may be included whose sequence number has changed. traversing this path backward. The route carried back by
When the network is relatively stable, incremental updates the RREP packet is cached at the source for future use. If
are sent to avoid extra traffic and full dump are relatively any link on a source route is broken, the source node is
infrequent. In a fast-changing network, incremental packets notified using a route error (RERR) packet. The source
can grow big so full dumps will be more frequent. removes any route using this link from its cache. A new
route discovery process must be initiated by the source if
Ad Hoc On -Demand Distance Vector Routing this route is still needed. DSR makes very aggressive use of
(AODV) source routing and route caching.

AODV [2] discovers routes on an as needed basis via a PERFORMANCE ANALYSIS


similar route discovery process. However, AODV adopts a
very different mechanism to maintain routing information.
It uses traditional routing tables, one entry per destination.
Simulation Environment
This is in contrast to DSR, which can maintain multiple The simulation experiment is carried out in LINUX
route cache entries for each destination. Without source (FEDORA 6). The detailed simulation model is based on
routing, AODV relies on routing table entries to propagate network simulator-2 (ver-2.31) [1], is used in the
an RREP back to the source and, subsequently, to route evaluation. The NS instructions can be used to define the
data packets to the destination. AODV uses sequence topology structure of the network and the motion mode of
numbers maintained at each destination to determine the nodes, to configure the service source and the receiver,
freshness of routing information and to prevent routing to create the statistical data track file and so on.
loops. All routing packets carry these sequence numbers.
An important feature of AODV is the maintenance of
Traffic Model
timer-based states in each node, regarding utilization of
individual routing table entries. A routing table entry is Continuous bit rate (CBR) traffic sources are used. The
expired if not used recently. A set of predecessor nodes is source-destination pairs are spread randomly over the
maintained for each routing table entry, indicating the set of network. Only 512-byte data packets are used. The number
neighboring nodes which use that entry to route data of source-destination pairs and the packet sending rate in
packets. These nodes are notified with RERR packets when each pair is varied to change the offered load in the
the next-hop link breaks. Each predecessor node, in turn, network.
forwards the RERR to its own set of predecessors, thus
effectively erasing all routes using the broken link. In
contrast to DSR, RERR packets in AODV are intended to Mobility Model
inform all sources using a link when a failure occurs. Route The mobility model uses the random waypoint model in a
error propagation in AODV can be visualized conceptually
rectangular field. The field configurations used is: 500 m ×
as a tree whose root is the node at the point of failure and
500 m field with 50 nodes. Here, each packet starts its
all sources using the failed link as the leaves.
journey from a random location to a random destination
with a randomly chosen speed (uniformly distributed
Dynamic Source Routing (DSR) between 0–20 m/s). Once the destination is reached,
The key distinguishing feature of DSR [4] is the use of another random destination is targeted after a pause. The
source routing. That is, the sender knows the complete hop - pause time, which affects the relative speeds of the
by-hop route to the destination. These routes are stored in a mobiles, is varied. Simulations are run for 100 simulated
route cache. The data packets carry the source route in the seconds. Identical mobility and traffic scenarios are used
packet header. When a node in the ad hoc network attempts across protocols to gather fair results. Mobility models
to send a data packet to a destination for which it does not were created for the simulations using 50 nodes, with pause
already know the route, it uses a route discovery process to times of 0, 10, 20, 40, 100 seconds, maximum speed of
dynamically determine such a route. Route discovery works 20 m/s, topology boundary of 500 × 500 and simulation
by flooding the network with route request (RREQ) time of 100 secs.
Performance Evaluation of Ad Hoc Routing Protocols Using NS2 Simulation 169

PERFORMANCE METRICS [7] evaluate the performance difference between the two by
varying the Mobility pattern and Number of traffic sources.
Packet Delivery Fraction
Packet Delivery Fraction (PDF)

The ratio of the data packets delivered to the destinations to 100

those generated by the CBR sources is known as packet 90

80
delivery fraction.

Packetdeliveryfraction(%)
70

60

AODV, 20 sources

Average End-to-End Delay 50

40 DSR, 20 sources

30 DSDV, 20 sources

Average end to end delay includes all possible delays 20

10
caused by buffering during route discovery latency, 0

queuing at the interface queue, retransmission delays at the 0 10 20 30 40 50 60


Pause time (secs)
70 80 90 100

MAC, and propagation and transfer times of data packets.


Fig 1: Packet Delivery Fraction (PDF) Vs Pause time
Normalized Routing Load
Average End-End delay

The number of routing packets transmitted per data packet 0.4


delivered at the destination. Each hop -wise transmission of 0.35

a routing packet is counted as one transmission. The first 0.3

Average delay (secs)


two metrics are the most important for best-effort traffic. 0.25
AODV, 20 sources

The routing load metric evaluates the efficiency of the 0.2 DSR, 20 sources

routing protocol. Note, however, that these metrics are not 0.15 DSDV, 20 sources

completely independent. For example, lower packet 0.1

0.05
delivery fraction means that the delay metric is evaluated
0
with fewer samples. In the conventional wisdom, the longer 0 10 20 30 40 50 60 70 80 90 100
Pause time (secs)
the path lengths, the higher the probability of a packet
drops. Thus, with a lower delivery fraction, samples are Fig 2: Average Delay Vs Pause Time
usually biased in favor of smaller path lengths and thus
have less delay. Varying Mobility and Number of Sources to
Analyze the Performance Difference
PERFORMANCE RESULTS
Now, again simulations were carried out with the number
For all the simulations, the same movement models were of traffic sources as 10, 20, 30 and 40.The pause time was
used, the number of traffic sources was fixed at 20, the varied as 0 (high mobility), 10, 20, 40, 100 (no mobility)
maximum speed of the nodes was set to 20 m/s and the and the packets were sent at a rate of 4 packets/sec.
pause time was varied as 0 s, 10 s, 20 s, 40 s and 100 s.
Packet Delivery Fraction Comparison
Packet Delivery Fraction
The packet delivery fractions [7] for DSR and AODV are
The On-demand protocols, DSR and AODV performed similar with 10 sources (Fig. 3). However, with 20, 30 and
particularly well, delivering over 85% of the data packets 40 sources, AODV outperforms DSR by about 15 percent
regardless of mobility rate. (Fig. 5 and 6) at lower pause times (higher mobility).

Average End -End Packet Delivery


PDF

The average end-to-end delay of packet delivery was higher 100

in DSDV as compared to both DSR and AODV. In 90


80
Packet delivery fraction(%)

summary, both the On-demand routing protocols, AODV 70


60
and DSR outperformed the Table-driven routing protocol; 50
AODV, 10 sources

DSDV and the reasons are discussed later. Figures 1 and 2 40


DSR, 10 sources

30
highlight the relative performance of the three routing 20
protocols. All of the protocols deliver a greater percentage 10
0
of the originated data packets when there is little node 0 10 20 30 40 50 60 70 80 90 100

mobility (i.e., at large pause time), converging to 100% Pause time (sec)

delivery when there is no node motion. Next, since both


AODV and DSR did better, an attempt was made to Fig 3: PDF for 10 Sources
170 Mobile and Pervasive Computing (CoMPC–2008)

PDF Normalized Routing Load

1
100 AODV, 10 sources

90 DSR, 10 sources
0.8
Packet delivery fraction (%)

80
70 0.6
60
AODV, 20 sources
50 0.4

40 DSR, 20 sources
30 0.2

20
0
10 0 10 20 30 40 50 60 70 80 90 100
0 Pause time(secs)
0 10 20 30 40 50 60 70 80 90 100
Pause time (secs)

Fig 7: Normalized Routing Load for 10 Sources


Fig 4: PDF for 20 Sources
Normalized Routing Load

PDF 1
AODV, 20 sources
0.8

Normalized routing load


100
DSR , 20 sources
90 0.6
80
Packetdeliveryfraction(%)

70 0.4

60
0.2
50
AODV, 30 sources 0
40
DSR, 30 sources 0 10 20 30 40 50 60 70 80 90 100
30 Pause time (secs)
20

10

0
Fig 8: Normalized Routing Load for 20 Sources
0 10 20 30 40 50 60 70 80 90 100
Pause time (secs)

Normalized Routing Load

Fig 5: PDF for 30 Sources 1 AODV, 30 sources


DSR, 30 sources
0.8
NormalizedRoutingLoad

PDF 0.6

0.4
100
90 0.2
Packet delivery fraction (%)

80
70 0
0 10 20 30 40 50 60 70 80 90 100
60
Pause time (secs)
50
40
30
AODV, 40 sources
DSR, 40 sources
Fig 9: Normalized Routing Load for 30 Sources
20
10
0
Normalized Routing Load
0 10 20 30 40 50 60 70 80 90 100
Pause time (secs) 1.4
AODV, 40 sources
DSR, 40 sources
1.2
NormalizedRoutingLoad

Fig 6: PDF for 40 Sources 1

0.8

0.6

Normalized Routing Load Comparison 0.4

0.2

In all cases, DSR demonstrates significantly lower routing 0


0 10 20 30 40 50 60 70 80 90 100
load than AODV, with the factor incr easing with a growing Pause time (secs)

number of sources. In summary, when the number of


sources is low, the performance of DSR and AODV is Fig 10: Normalized Routing Load for 40 Sources
similar regardless of mobility. With large numbers of
sources, AODV starts outperforming DSR for high - PERFORMANCE ANALYSIS
mobility scenarios. As the data from the varying sources
demonstrate, AODV starts outperforming DSR at a lower The simulation results bring out some important
load with a larger number of nodes. DSR always characteristic differences between the routing protocols.
demonstrates a lower routing load than AODV. The major The presence of high mobility implies frequent link failures
contribution to AODV’s routing over-head is from route and each routing protocol reacts differently during link
failures. The different basic working mechanism of these
requests, while route replies constitute a large fraction of
protocols leads to the differences in the performance.
DSR’s routing overhead. Furthermore, AODV has more
DSDV fails to converge below lower pause times. At
route requests than DSR, and the converse is true for route
higher rates of mobility (lower pause times), DSDV does
replies.
Performance Evaluation of Ad Hoc Routing Protocols Using NS2 Simulation 171

poorly, dropping to a 70% packet delivery ratio. Nearly all simulations. DSDV uses the proactive table-driven routing
of the dropped packets are lost because a stale routing table strategy while both AODV and DSR use the reactive On-
entry directed them to be forwarded over a broken link. As demand routing strategy. Both AODV and DSR perform
described in the earlier section, DSDV maintains only one better under high mobility simulations than DSDV. High
route per destination and consequently, each packet that the mobility results in frequent link failures and the overhead
MAC layer is unable to deliver is dropped since there are involved in updating all the nodes with the new routing
no alternate routes. For DSR and AODV, packet delivery information as in DSDV is much more than that involved
ratio is independent of offered traffic load, with both AODV and DSR, where the routes are created as and when
protocols delivering between 85% and 100% of the packets required. DSR and AODV both use on -demand route
in all cases. Since DSDV uses the table-driven approach of discovery, but with different routing mechanics. In
maintaining routing information, it is not as adaptive to the particular, DSR uses source routing and route caches, and
route changes that occur during high mobility. In contrast, does not depend on any periodic or timer-based activities.
the lazy approach used by the on-demand protocols, AODV DSR exploits caching aggressively and maintains multiple
and DSR to build the routing information as and when they routes per destination. AODV, on the other hand, uses
are created make them more adaptive and result in better routing tables, one route per destination, and destination
performance (high packet delivery fraction and lower sequence numbers, a mechanism to prevent loops and to
average end-to-end packet delays). Next the simulation determine freshness of routes. The general observation
results of Normalized Routing Load graph with 30 and 40 from the simulation is that for application-oriented metrics
sources that compare the performances of AODV and DSR such as packet delivery fraction and delay AODV,
lead us to the following conclusions. outperforms DSR in more “stressful” situations (i.e.,
smaller number of nodes and lower load and/or mobility),
with widening performance gaps with increasing stress
Effect of Mobility (e.g., more load, high er mobility). DSR, however,
consistently generates less routing load than AODV. The
In the presence of high mobility, link failures can happen poor performances of DSR are mainly attributed to
very frequently. Link failures trigger new route discoveries aggressive use of caching, and lack of any mechanism to
in AODV since it has at most one route per destination in expire stale routes or determine the freshness of routes
its routing table. Thus, the frequency of route discoveries in when mult iple choices are available. Aggressive caching,
AODV is directly proportional to the number of route however, seems to help DSR at low loads and also keeps its
breaks. The reaction of DSR to link failures in comparison routing load down.
is mild and causes route discovery less often. The reason is
the abundance of cached routes at each node. Thus, the
route discovery is delayed in DSR until all cached routes FUTURE WORK
fail. But with high mobility, the chance of the caches being In the future, extensive complex simulations could be
stale is quite high in DSR. Eventually when a route carried out using the project code, in order to gain a more
discovery is initiated, the large number of replies received in-depth performance analysis of the ad hoc routing
in response is associated with high MAC overhead and
protocols. Other new protocol performance could be
cause increased interference to data traffic. Hence, the
studied too.
cache staleness and high MAC overhead together result in
significant degradation in performance for DSR in high
mobility scenarios. In lower mobility scenarios, DSR often REFERENCES
performs better than AODV, because the chances of find [1] NS-2, The ns Manual (formally known as NS
the route in one of the caches is much higher. However, Documentation) available at http: //www. isi.edu/nsnam/
due to the constrained simulation environment (lesser ns/doc.
simulation time and lesser mobility models), the better [2] Ian D. Chakeres and Elizabeth M. Belding-Royer. AODV
performance of DSR over AODV couldn’t be observed. Routing Protocol Implementation Design
[3] Charle E. Perkins and Pravin Bhagwat. Highly Dynamic
Routing Load Effect Destination- Sequenced Distance- Vector Routing (DSDV)
for Mobile Computers.
DSR almost always has a lower routing load than AODV. [4] David B. Johnson, David A. Maltz and Josh Broch. DSR:
This can be attributed to the caching strategy used by DSR. The Dynamic Source Routing protocol for Multi-Hop
Wireless Ad Hoc networks.
By virtue of aggressive caching, DSR is more likely to find
a route in the cache, and hence resorts to route discovery [5] Magnus Frodigh, Per Johansson and Peter Larsson. Wireless
ad hoc networking—The art of networking without a
less frequently than AODV. network.
[6] Park. V and Corson. M. Temporally-Ordered Routing
CONCLUSIONS Algorithm (TORA) Version 1. Functional Specification.
[7] Gao, Fang, Lu, Yuan, Zhang, Qingshun and Li, Chunli.
This project compared the performance of DSDV, AODV Simulation and Analysis for the Performance of the Mobile
and DSR routing protocols for ad hoc networks using ns-2 A d Hoc Network Routing Protocols.

You might also like