PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

61
i | Page PERFORMANCE EVALUATION OF MANET PROACTIVE AND REACTIVE ROUTING PROTOCOLS USING NS3 BY YAKUBU ERNEST NWUKU A00021868 SCHOOL OF IT AND COMPUTING, AMERICAN UNIVERSITY OF NIGERIA, YOLA, ADAMAWA STATE NIGERIA SPRING, 2020

Transcript of PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

Page 1: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

i | P a g e

PERFORMANCE EVALUATION OF MANET PROACTIVE AND REACTIVE

ROUTING PROTOCOLS USING NS3

BY

YAKUBU ERNEST NWUKU

A00021868

SCHOOL OF IT AND COMPUTING, AMERICAN UNIVERSITY OF NIGERIA, YOLA,

ADAMAWA STATE NIGERIA

SPRING, 2020

Page 2: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

ii | P a g e

PERFORMANCE EVALUATION OF MANET ROUTING PROACTIVE AND

REACTIVE ROUTING PROTOCOLS USING NS3

BY

YAKUBU ERNEST NWUKU

(ID. No: A00021868)

In partial fulfilment of the requirements for the award of the degree of Master of Science

(M.Sc.) in Computer Science submitted to the School of Graduate Studies (SGS), American

University of Nigeria, Yola

SPRING, 2020

Page 3: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

i | P a g e

DECLARATION

I Yakubu ERNEST NWUKU, solemnly declare that the work presented in this thesis titled

“Performance Evaluation MANET Proactive and Reactive Routing Protocols using NS3”

submitted to the School of IT and Computing, American University of Nigeria, in partial

fulfilment of the requirements for the award of Master of Science (M.Sc) in Computer Science,

is neither plagiarized nor submitted for the award of any degree. Should this undertaking be

found to be incorrect; my degree may be withdrawn unconditionally by the University.

Date: Yakubu Ernest Nwuku

Place: Yola A00021868

Page 4: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

ii | P a g e

CERTIFICATION

“I certify that the work in this document has not been previously submitted for a degree, neither

has it been submitted as part of a requirement for a degree except fully acknowledged within this

text.”

………………………………….. ………………………

Student Date

(Yakubu Ernest Nwuku)

………………………………….. ………………………

Supervisor Date

(Dr. Ajibesin A. Abel)

………………………………….. ………………………

Program Chair Date

(Dr. Goerge Thandekkattu)

………………………………….. ………………………

Graduate Coordinator, SITC Date

(Dr. Behrouz Aslani)

Page 5: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

iii | P a g e

DEDICATION

This Project work is dedicated to God Almighty, the giver of wisdom and understanding for His

love, mercies, strength and unending presence throughout my studies, and for assuring me that

the plans He has for me eyes have not seen, ears have not heard, neither has it been conceived in

the hearts of men the great things He is about to do through me.

Page 6: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

iv | P a g e

ACKNOWLEDGEMENTS

I sincerely express my gratitude to God Almighty, who gave me life, good health, wisdom, peace

of mind and the ability to carry out this research work.

I am indeed grateful to my supervisor Dr. Ajibesin A. Abel, also despite his busy schedules took

out time to provide necessary guidance and go through my research work. Also to the entire

faculties and AUN community of Postgraduate students, God bless you for playing a role in my

academic pursuit.

I want to say a big thank you to my family (the Angyu’s family), especially my parents Mr and

Mrs Yakubu I.Angyu, my siblings: Favour, Frank, Shallom, and Collins for their love, prayers,

moral and financial support which made me accomplish this orduous task. To my guardians,

Pharm and Mrs Joseph Magaji and family, Rev and Mrs Yusuf Sale God bless you all, for

always standing by and believing in me. My profound gratitude to Prof. Yusuf Ishaya Tsojon, for

taking your time to proof read my grammars God bless you and increase you greatly in wisdom.

And to my course mates of Class 2020, Simtong Danung (Sim Sim Sim), Yakubani Yakubu

(YaksB), Shehu Adamu (Sehu), you guys are just the best to work with. With gratitude to my

precious friend, my world best Zelemuga Musa, Amajiken Chris, Lemuel Yakubu, Gerrard

Emmanuel amongst other well-wishers, God bless you all for the love and friendship.

Page 7: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

v | P a g e

ABSTRACT

Mobile Ad hoc network which is known as MANET is a network communication medium that is

made up of mobile wireless node. The network operates as an infrastructure-less network that

doesn’t require an existing network infrastructure such as routers, switches or mounted access

point for network communication. MANET is a network which its setup is independent

regardless of its location, but has the problem of establishing an effective network route. As

wired network communication is governed by topologies, MANET in its application is governed

by network routing protocols which are the basis for effective network communication. In this

thesis, the routing protocols which includes DSDV, OLSR as Proactive and AOMDV as

Reactive routing protocols respectively. Simulated using NS3 at 20, 40 and 60 number of nodes

in a real-time scenario. Results obtained shows their performance based on the following

parameter metrics: Average Throughput, Average End-to-End Delay and Average Energy

Consumption. Overall, the Optimized Link State Routing (OLSR) protocol outperformed the

other two routing protocols DSDV and AOMDV for the tested metrics for small networks of 20

number of nodes. Ad hoc On-demand Multipath Distance Vector (AOMDV) performs better at

medium networks of 40 number of nodes. While Destination Sequence Distance Vector (DSDV)

performs better at larger networks of 60 number nodes. OLSR showed better performance based

on the cumulative performance on the network scenario of both small and larger networks, which

serves useful information in terms of designing a network.

Page 8: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

vi | P a g e

TABLE OF CONTENTS DECLARATION i

CERTIFICATION ii

DEDICATION iii

ACKNOWLEDGEMENTS iv

ABSTRACT v

LIST OF TABLES ix

LIST OF FIGURES x

LIST OF ABBREVIATIONS xi

CHAPTER ONE 1

INTRODUCTION 1

1.1 Research Background 1

1.2 Statement of Problem 3

1.3 Aim and Objectives 4

1.4 Scope of the Study 4

1.5 Significance of the Study 5

1.6 Thesis Structure 5

CHAPTER TWO 6

LITERATURE REVIEW 6

2.1 Background 6

2.2 Related Work 7

2.3 Overview of Routing in Mobile Ad hoc Network 10

2.3.1 Broadcasting Methods in MANETs 10

2.4 Routing Protocols Taxonomy in MANETs 11

2.5 Proactive Routing Protocol 12

2.5.1 DSDV 13

2.5.2 OLSR 13

2.6 Reactive Routing Protocol 14

Page 9: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

vii | P a g e

... 2.6.1 AOMDV 15

CHAPTER THREE 16

RESEARCH METHODOLOGY 16

3.1 Proposed Work 16

3.2 Experimentation Procedure 16

3.2.1 Experiment Network 16

3.2.2 Experimental Protocols 16

3.2.3 Experimental Metric 16

3.2.4 Experimental Environment 16

3.3 Software Environment 17

... 3.4 NS3 Programming Architecture 17

3.5 NS3 Tools 18

3.5.1 NAM 18

3.5.2 Trace File 19

3.6 Performance Parameters 19

3.6.1 Average Throughput 19

3.6.2 Average End-to-End Delay 20

3.6.3 Average Energy Consumption 20

3.7 Mobility Model 21

3.7.1 Stochastic Model 22

CHAPTER FOUR 24

SIMULATION, RESULTS AND DISCUSSION 24

4.1 Discussion of Result 24

4.2 Simulation Results and Evaluation 26

4.3 Analysis of Results 27

4.3.1 Average Throughput 27

Page 10: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

viii | P a g e

4.3.2 Average End-to-End Delay 28

4.3.3 Average Energy Consumption 30

4.3.4 Cumulative Throughput 31

4.3.5 Cumulative End-to-End Delay 32

4.3.6 Cumulative Energy Consumption 33

CHAPTER FIVE 34

SUMMARY, CONCLUSION AND RECOMMENDATION 34

5.1 Summary and Conclusion 34

5.2 Recommendation 35

REFERENCES 36

APPENDIX 1 42

APPENDIX 2 44

APPENDIX 3 46

Page 11: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

ix | P a g e

LIST OF TABLES

Table 3. 1 Simulation parameters used in performance evaluation 23

Table 4. 1 Average Throughput 27

Table 4. 2 Average End-To-End Delay 28

Table 4. 3 Average Energy Consumption 30

Table 4. 4 Cumulative performance for Throughput 31

Table 4. 5 Cumulative performance for End-to-End Delay 32

Table 4. 6 Cumulative performance for Energy Consumption 33

Page 12: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

x | P a g e

LIST OF FIGURES

Figure 2. 1 Routing Protocol Taxonomy in MANET 12

Figure 3. 1 NS3 simulator architecture in MANET 18

Figure 3. 2 Categories of Mobility Models in MANET 22

Figure 3. 3 Random Way Point Model 23

Figure 4. 1 Python Tcl command for DSDV 24

Figure 4. 2 Python Tcl command for OLSR 24

Figure 4. 3 Python Tcl command for AOMDV 25

Figure 4. 4 NetAnim 20 Nodes 25

Figure 4. 5 NetAnim 40 Nodes 26

Figure 4. 6 NetAnim 60 Nodes 26

Figure 4. 7 Throughput vs Nodes 27

Figure 4. 8 Average Throughput 28

Figure 4. 9 Average End-to-End Delay vs Node 29

Figure 4. 10 Average End-to-End Delay 29

Figure 4. 11 Average Energy Consumption vs Nodes 30

Figure 4. 12 Average Energy Consumption 31

Figure 4. 13 Cumulative performance for Average Throughput 32

Figure 4. 14 Cumulative performance for Average End-to-End Delay 32

Figure 4. 15 Cumulative performance for Average Energy Consumption 33

Page 13: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

xi | P a g e

LIST OF ABBREVIATIONS

RF Radio Frequency

MANET Mobile Ad hoc Network

LAN Local Area Network

WAN Wide Area Network

MAN Metropolitan Area Network

WSN Wireless Sensor Networks

VANET Vehicular Ad hoc Network

WMN Wireless Mesh Network

SPAN Smartphone Ad hoc Network

iMANET Internet Mobile Ad hoc Network

DSDV Destination Sequence Distance Vector

OLSR Optimized Link Source Routing

AODV Ad hoc On-demand Distance Vector

DSR Destination Source Routing

ZRP Zone Routing Protocol

WARP Wormhole Avoidance Routing Protocol

AOMDV Ad hoc On-demand Multipath Destination Vector

NS Network Simulator

PDR Packet Delivery Ratio

NRL Network Routing Load

E2E End-to-End

RPGM Random Propagation Group Model

Page 14: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

xii | P a g e

PLR Packet Loss Ratio

QoS Quality of Service

RIP Routing Information Protocol

MPR Multiple Relays

TC Topology Control

MID Multiple Interface Declaration

HNA Host and Network Association

RREQ Route Request

RREP Route Reply

OTcl Object-oriented Text Control Language

TCL Text Control Language

TCP Transport Control Protocol

NAM Network Animator

I/O Input/Output

Page 15: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

1 | P a g e

CHAPTER ONE

INTRODUCTION

1.1 Research Background

Since the mid 1990s, Mobile Ad hoc Network has been an ongoing area of research (Kumar Jha

& Kharga, 2015). A network that is not built on a mounted access point or does not require a

central control is regarded as an Ad hoc network. This type of netwrk does not require a fixed

infrastructure to be formed, which utilizes the communication capability of Radio Frequency

(RF) and interfaces such as infrared during a decentralized connection framework (Matre &

Karandikar, 2016). The network is determined by groups of devices that are referred to as nodes

with wireless transceivers (Ya-qin, Wen-yong & Lin-zhu, 2010). Transceivers are capable of

building a communication network at whatever point or location the network is being built, as

well at whatever time a particular transceiver joins or leaves the network. Numerous times, cell

phone devices connect and without mounted wire structure communication are possible. The

Wireless Ad hoc network as a network with no preexisting infrastructure has helped to achieve

network communication, with no cost of establishing a communication infrastructure or having

necessary installations. A Mobile Ad hoc Network usually is characterized by wireless channels,

which are shared by several mobile nodes without an established infrastructure of

communication or central control. MANET exhibits a dynamic nature, where nodes can move

randomly with no fixed routes. As well nodes act as routers and host simultaneously. At a point

where nodes are routers, routes to several nodes in the network are usually discovered and

maintained (Shrivastava. Vidwans & Saxena, 2013). MANET has helped in playing a major role

in the area of communication, especially when it applies to the use of wireless networks.

Wireless networks popularity has been channelled to several applications that have considered

factors that include: its ease of installation, its reliability, cost-effectiveness, bandwidth

consumption rate, its power consumption rate for each node, security and most all total network

performance (Chamkaur, Vikas & Gurmet, 2014).

Mobile networks are categorized into two types which include the infrastructure wired-based and

Ad hoc wireless-based networks. The wired-based infrastructure comprises the LAN, WAN, and

Page 16: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

2 | P a g e

MAN amongst others. But focusing more on the Ad hoc based wireless networks because of its

evolving nature, network communication are made possible even at the mobility of the network

nodes. Mobile Ad hoc Network (MANET) among other examples of Ad hoc networks such as

WSNs (Wireless Sensor Networks), VANETs (Vehicular Ad hoc Networks), WMNs (Wireless

Mesh Networks), SPANs (SmartPhone Ad hoc Networks), iMANETs (Internet-based Mobile Ad

hoc Networks) and military or tactical MANETs (Bai, Mai & Wang, 2017) are wireless,

infrastructure-less network. As a result of the self-configuring nature of MANETs, a node can

enhance communication by a group of wireless nodes (laptops, mobile phones, thin client, etc.).

MANET is a peer to peer network that carries out route discovery task of establishing network

communication between a source and destination nodes. Due to its nature of node mobility, its

paths are being changed which leads to loss or broken connection between nodes (Kochher &

Mehta, 2016). Nodes act both as a router that forwards packets at the sending end, as well it can

receive the packets at the receiving end. Within a range of communication, nodes announce their

presence to neighbours, which is possible by broadcast. That is, every communicating listens and

thereafter learns about a neighbour node.

MANET operations differ in network infrastructures like the use of routers, switches, mobile

nodes as well other supporting technologies and devices. The most challenge faced in the Ad hoc

network which includes frequent topology changes, low power and asymmetric links (Raskar &

Iyer, 2018). MANET is being categorized into three routing operations based on the manner of

topology to which the network operates on, such described as the proactive (DSDV, OLSR, etc.),

reactive (AODV, DSR, etc.) and hybrid routing (ZRP, WARP, etc.) derived from the first two

operations. The routing protocols in packet exchange between two communicating hosts play an

important role. There exist two basic categories of routing protocols, Proactive Routing Protocol

(PRP) and the Reactive Routing Protocol (RRP), despite Hybrid routing protocol which exist is

the combination of the first two. The Proactive routing protocol is referred to as the destination-

based protocol, an improved version of the Internet Link State algorithm. Proactive routing

algorithm helps in maintaining routing tables that comprise information as well as an update for

the network node. Each network node runs an update throughout the network to maintain

consistent network due to constant topology change in the network (Saeed, Abbod & Al-

Page 17: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

3 | P a g e

Raweshidy, 2012). The Reactive routing protocol is referred to as the table-driven protocol, an

improved version of the Internet Link State Distance Vector algorithm. The reactive routing

algorithm is characterized by two routing mechanisms; route discovery and maintenance. Route

discovery process comprises a route request and route reply, they differ as we move from one

protocol to another (Aggarwal, 2018; Saeed et al., 2012). This work seeks to study MANET

routing protocols, evaluate and analyze their performance using NS-3 and some other

performance metrics. The study objective is to carry out a qualitative study on the performance

of the Proactive routing protocol (DSDV and OLSR) and Reactive routing protocol (AOMDV)

to be able to establish their best performance level.

1.2 Statement of Problem

In the last few decades, the operation feature of MANET has extended beyond what a stand-

alone or client-server programs would accomplish (Ajibesin et al., 2019). Operating a network

communication or transmission of packets via infrastructure network facilities or mounted access

points has a great advantage. Mobile Ad hoc Network known for its infrastructure-less

communication has contributed to cost-effective network communication.

Routing is a mechanism that establishes a communication path from a source to a destination.

Mobile Ad hoc Network is posed with the extreme challenge due to unstable node movement,

dynamic topology, limited bandwidth, impairment in network channels, node battery life etc

make up factors that are challenges to the design of protocols in wireless Ad hoc networks

(Rahman & Abbas, 2016).

In mobile Ad hoc network aside the challenges of network topology change that occur from

broken network links, there exist a major problem of routing that involves asymmetric link,

interference and routing overhead amongst others that pose a great challenge to mobile Ad hoc

network routing operation (Anchari et al., 2017; Chauhan & Sharma, 2016).

Traditional routing protocols provide single or multiple paths that help in routing from source to

destination node. Mechanism of protocols have several disadvantages that energy consumption is

Page 18: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

4 | P a g e

considered one major challenge, due to battery life consumed by each network used in Ad hoc

networks (Agarwal et al., 2015), also attributes to network overhead when nodes communicate.

There have been several studies and research carried out in this field, to propose a better protocol

performance for routing. It is still open to research because of the non-deterministic nature of

topology, the problem of routing to which the purpose of this study is to perform an evaluation

and analyze mobile Ad hoc network routing protocol, propose to simulate three routing

protocols: DSDV, OLSR and AOMDV with varying number of nodes using Network Simulator

3.

1.3 Aim and Objectives

This study aims to evaluate the behaviour of the selected routing protocols, as when it is

simulated as a real-time scenario on a network. The objectives of this study are to:

i. design and study MANET protocols in small (20 nodes), medium (40 nodes) and

large (60 nodes) networks;

ii. simulate MANET routing protocols in a network scenario of 20 nodes as small

network, 40 nodes as medium and 60 nodes as large network;

iii. analyze the selected routing protocols;

iv. measure the performances of the protocols based on the following metrics: average

Throughput, average End-to-End delay and average Energy Consumption.

1.4 Scope of the Study

As it is well known there exist two main categories of routing protocols known as: Reactive and

Proactive, as well a Hybrid routing protocol, which is the combination of both the Reactive and

Proactive protocols. In this study, three routing protocols are considered: two which are the

proactive protocol i.e. DSDV and OLSR; the remaining which is reactive protocol i.e. AOMDV.

This thesis evaluates the behaviours of the proactive and reactive routing protocols, as when it is

simulated as a real-time scenario on a network and the effect of parameters and their behaviour

on the network simulated scenario. For this study, the algorithm design as well as analysis of the

routing protocols, effects and explanation of routing protocols on the network is discussed.

Page 19: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

5 | P a g e

1.5 Significance of the Study

Mobile Ad hoc networks have over the years gained considerable popularity. The infrastructure-

less nature of wireless Ad hoc networks has made it suitable for use in locations that mounted

central access points are not needed or relied on: Unlike the wired network infrastructure which

has boundary limits to which it can cover, as well as other scenarios that break down network

communication such as attacks, natural disasters, floods etc. MANET has been discovered by

research to overcome the limitation posed by the wired network. Findings from this study will

provide results of the best routing protocol that support MANET operation at whatever scenario.

Thus, the recommended protocol if applied to whatever network scenario will reduce packet loss

in terms node and also increase throughput in packet delivery.

1.6 Thesis Structure

This report is structured into five chapters, each comprises multiple subsections.

Chapter One: Serves as a general introduction to the concept of MANET, routing protocol

adoption and further highlights the research background, problem statement, research aim and

objectives, scope, significance, limitations of the research study. The rest of the reports are

organized in the following format:

Chapter Two: A review of related works, an overview of routing in an Ad hoc network, routing

protocol taxonomy in MANET as well as a discussion into the routing protocols that are

considered for this research.

Chapter Three: Discusses the research methodology adopted in carrying out the research,

simulation environment as well as tools that evaluate routing protocol performance based on

some performance metrics.

Chapter Four: Shows result and discusses the performance metrics which are Average

Throughput, Average End-to-End Delay and Average Energy Consumption with relations to a

varied number of nodes.

Chapter Five: Summary, conclusion on findings is drawn and possible future research

recommendations are given.

Page 20: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

6 | P a g e

CHAPTER TWO

LITERATURE REVIEW

This chapter discusses the background of MANET, related works of several researchers and their

proposed solution to MANET. Also, it gives an overview of routing in an Ad hoc network,

outlines and discusses routing taxonomy and knowledge of each routing protocol.

2.1 Background

MANET has a characteristic of a dynamic nature, where a large number of ideal applications put

it to use. MANET is of great advantage in its quick deployment and less configuration which

makes it suitable for use in terms of an emergency as well as natural disasters. The increased use

of Wi-Fi which is embedded in several portable devices has made MANET a significant tool in

terms of technological growth.

In a couple of decades, many researchers have evaluated the performance of several MANET

routing protocols and have drawn several conclusions by the result obtained. Therefore,

performance testing of MANET can be more efficient if a wide variety of parameters are

considered and tested on a very wide network range. Parameters such as throughput, end-to-end

delay and packet delivery ratio were most of the work done by various researchers considered. A

study on MANET has been extensively researched on by several authors especially using the

NS2 network simulator. Several network environment and methods were considered; varying

results of the performance of MANET protocols were analyzed and discussed. Based on research

reviews, designing a suitable routing protocol for MANET is still an open problem. This thesis

seeks to evaluate the performance of Proactive routing protocols and Reactive routing protocols

which are DSDV, OLSR and AOMDV in NS3. Performance comparison is drawn in terms of

parameters such as throughput, average end-to-end delay, and average energy consumption. An

overview of work done in this field is given in the next section.

Page 21: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

7 | P a g e

2.2 Related Work

Works of Mohsin & Woods (2014) experimented on routing protocols AODV, DSDV,

AOMDV, and DSR were simulated using NS2. A marine environment of both sparse and dense

location was considered and analysis carried out gave results based on different parameters. The

results showed that the AOMDV routing protocol is the most efficient due to its multipath route

discovery. Measuring end-to-end delay of AODV, AOMDV, DSDV and DSR against pause time

show DSDV exhibit lowest delay of all. In terms of packet delivery ratio and throughput,

AOMDV and DSR compared to DSDV are proved the highest and it is observed that AODV,

DSDV, and DSR provide insufficient packet delivery when AOMDV is put to maximum use.

In their study, Adeyemi A, Kah M.O, Ahmed T, & Caleb A. (2019), using NS2 network

simulator and AWK, performed an analysis of DSR, DSDV and AODV. Parameter metrics

which include Throughput, Packet Delivery Ratio and Jitter were put into consideration. Results

analyzed and reported from the simulation shows that a significant increase in nodes leads to an

increase in average throughput, PDR and Jitter. The report also shows an outstanding

performance of AODV in a network size of above 35 nodes; DSR is preferred to smaller

networks which show both reactive protocols have great performance over DSDV the proactive

protocol.

Lei D, Wang T, & Li J. (2015) study shows the performance of routing protocol AODV, DSDV,

DSR and AOMDV using the NS2 network simulator. Results show that the dynamic change of

network topology gives an unsatisfactory and decreased performance of the four protocols.

DSDV amongst others shows not fit for unchanging network topology. Whereas better

performance is recorded in terms of Packet Delivery Ratio, Network Route Load and End-to-End

delay for DSDV and DSR, also showing better adaptability of 95% during network change in

PDR, AODV shows lesser average end to end delay compared to DSR, but in routing, load on

DSR is lower than DSDV routing protocol. Both are suitable protocols for a frequently changing

network topology. A multi-path routing protocol which is AOMDV has a lower average E2E

delay compared to single-path protocols; which few aspects need improvement which are: update

and maintenance of backup paths, and multiple paths could at the same time transmit packets.

Page 22: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

8 | P a g e

Ali & Nand (2016) worked on the simulation of AODV and DSR routing protocols using

QualNet 5.0.2 network simulator. The analysis was based on different node mobility; simulation

was subjected to wormhole attack, results showed performance of routing protocol with and

without the presence of wormhole attacks. Two parameter metrics throughput, end to end delay

was considered. With or without wormhole attack, the throughput recorded a decrease as node

speed increased for both AODV and DSR routing protocol. It shows on average end-to-end

delay, a node speed increases compared to without attack in AODV. A drastic increase in node

speed, the result shows with wormhole attack for DSR than without wormhole attack. It is finally

observed that DSR has a better performance compared to AODV which is vulnerable to

wormhole attack and DSR has alternative paths that enable data delivery.

The research by Rahman & Abbas (2016), focused more on speed and node density on the

performance of AODV, DSR, DSDV and OLSR routing protocols, which were evaluated under

RPGM (Random Propagation Group Model) Model. Two varying results showed that first the

performance of routing protocols at a density from low to high, network performance vary

differently based on the network condition. As being observed, an increase in mobile nodes leads

to an increase in PDR which makes the communication more effective compared to nodes in

small scale-networks. Secondly, aside considering large-scale networks, the experiment showed

that speed has an associated cost where result showed that AODV has better performance, in

terms of both large-scale network and faster speed over the DSR. Considering DSDV which is a

protocol that fits end-to-end delay, which seems to have less performance compared to OLSR for

delivered packets but substantial routing overhead is generated.

Sakshi & Neha G. (2017) researched the effect of the number of packets sent and node size in a

network communication reliability. The performance of DSDV, AODV and OLSR which are

popular routing protocols were analyzed based on packet delivery ratio, throughput and total

energy consumption using Network Simulator 3. The result shows AODV with performance best

at low traffic, when traffic is medium DSDV shows the best performance and at a high traffic

rate OLSR is best rated. In terms of energy consumption, DSDV and OLSR outperform AODV.

At high traffic, OLSR shows better result than DSDV both though have the same performance.

Page 23: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

9 | P a g e

Throughput or AODV has the best performance, whereas OLSR and DSDV show quite the same

result but OLSR still shows high throughput than DSDV at high nodes and number of packets,

which still outperforms AODV.

Dugaev D, Zinov S, Siemens E, & Shuvalov V. (2015) analyzed a performance of multi-hop

wireless Ad hoc routing protocol in an outdoor network. Simulation of four routing protocols

which are AODV, DSDV, OLSR and DSR were analyzed using NS3 an open-source

implementation discrete event simulator. A simulation of 10 by 10 static grid topology scenario

was established, with ON-OFF packet traffic. The result showed DSR performance as best to the

majority of performance metrics in terms of hop count, PLR, OWD and throughput. OLSR

performs well in the same condition, unlike AODV and DSDV that have shown a 45% packet

loss rate. DSR performs well due to its route caching mechanism because a constant route

discovery is not necessary for routes to the same destination. Due to high packet loss caused by

increased route discovery, it causes a queue in the number of packets, at the process packet gets

dropped in the case of AODV. Despite DSDV’s proactive ability, results show it has the highest

average delay, which probability of high packet loss is relative which is same with OLSR, but

OLSR has an effective way of handling the problem. AODV a classical reactive approach in

intensive route breakages shows low tolerance which is inapplicable to the said model. OLSR

and DSDV are considered applicable, as delay metric is of less importance. Whereas the DSR

with its overall result at a close optimum level has a drawback of high jitter that could harm

some network applications.

Based on our review, most researchers have carried out extensive research on MANET but

haven’t looked into the concerns of this thesis: evaluating the behaviour of the proactive (DSDV

and OLSR) and reactive (AOMDV) routing protocols, putting into consideration the varying

number of mobile nodes (20, 40, and 60), performance metrics (Average Throughput, Average

End-to-End Delay and Average Energy Consumption) and a different simulation approach as

when it is simulated as a real-time scenario on a network using NS3.

Page 24: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

10 | P a g e

2.3 Overview of Routing in Mobile Ad hoc Network

Routing involves the choice of path in a given network communication scenario. Considering

routing in MANET from a source to its destination is the choice of a suitable and right path. The

term routing has been used severally in different network technologies, which are mostly

telephony, electronic data and also the internet (Anchari et al., 2017). For this study, the focus is

more on routing in mobile Ad hoc networks. As physical wired network communication is not

achieved without a guiding protocol, so also routing in mobile Ad hoc networks are guided by

protocols, the mobile nodes use to search for route or path that connects several nodes to share

data packets as shown in Figure 2.1. Protocols are said to be set of governing rules that enhance

communication between two or more devices.

Figure 2. 1 Routing process in a mobile Ad hoc network

2.3.1 Broadcasting Methods in MANETs

MANET routing operations are enhanced by methods known as broadcasting which aid periodic

broadcast of messages within a network. Several proposed methods have been looked into by

several research groups to ensure the efficient broadcasting of messages. Broadcasting methods

can as well be classified into distributed and hierarchical methods, and further subclassified into

Page 25: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

11 | P a g e

various transmission methodology (i.e packet broadcasting in nodes). The summary below are

the most existing categories of distributed network broadcast mechanisms (Saeed et al., 2012).

i. Simple Flooding: Most known routing protocols are said to operate using a general

inefficient form of broadcast known as the simple flooding. It is a mechanism a packet is

received by nodes for the first-time broadcast, transmits a packet to all nodes within the

range of transmission. It is observed that there is a waste of bandwidths in simple

flooding and also nodes resources. DSR and AODV routing protocols use this method.

ii. Probability-based Mechanism: Using the probability-based method, nodes decide if

rebroadcast is based on probability or just a simple conditional event relating to the

probability of reaching additional neighbours.

iii. Area-based Mechanism: Estimates if a transmission reaches a significant amount of

coverage areas, it uses the knowledge of sending node. LAR and DREAM are routing

protocols that implement this mechanism.

iv. Neighbour Knowledge Mechanism: This mechanism requires the use of a “Hello” type

packet to ensure nodes have explicit data with regards to their neighbourhood topology,

neighbours data are used by nodes to decide if to rebroadcast a packet. OLSR routing

protocol implements this mechanism.

2.4 Routing Protocols Taxonomy in MANETs

A node in MANET due to its dynamic environment has the possibility of joining, leaving and

moving around a network range, which has a great effect on packet routing. As posed, efficient

packet routing appears to be one of the challenging problems in MANET. The sole aim of

routing is to serve as a guide for packets communication via subnets to their final destination. As

a result, it has open doors to researches that have proposed to proffer a solution to this problem,

by designs of various routing protocols (Saeed et al., 2012). The designs of routing protocols in

MANETs are not just for routing processes alone, but routing protocols must show the capability

of handling a larger number of nodes with limited resources. For routing protocol to be effective

in performance, it must exhibit the following qualities which include: distributed operation, loop

freedom, demand-based operation, proactive operation, security and unidirectional link support

Page 26: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

12 | P a g e

(Kumar Jha & Kharga, 2015). Protocols are known to be rules guiding device communication

over a network. Routing determines or defines data packet movements from source to its

destination. Constant change to a network path in MANETs is also a major problem. For proper

packet routing, routing protocols that guard network communication in wired networks are found

not suitable for operation in MANET, therefore, special routing protocols are designed for better

suitable routing in the network. Routing protocols in MANETs could be categorized as proactive

(table-driven) or reactive (on-demand) (Ajibesin et al., 2019). Figure 2.1 shows the categories of

routing that this study puts into consideration.

Figure 2. 2 Routing Protocol Taxonomy in (Adopted from Ajibesin et al., 2019)

2.5 Proactive Routing Protocol

The proactive routing protocol can also be described as table-driven protocol, a modified version

of Bell-man Ford algorithm (Chauhan & Sharma, 2016) that uses a link-state routing algorithm,

which helps in terms of frequent information flooding about neighbouring nodes. Up-to-date

information between a pair of nodes is kept by proactive protocols; it is achieved by sending

control messages periodically in a network. In this type of protocol, routes are always ready to

use as needs demand. Overhead flooding of the route is a major disadvantage. Proactive routing

protocols include DSDV, OLSR, WRP (Kumar Jha & Kharga, 2015). The proactive algorithm

has properties which by application, it guarantees QoS and real-time communication, that

Page 27: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

13 | P a g e

include low latency route access as well as alternate path support and monitoring. Its major

drawbacks are inefficient bandwidth utilization and power usage due to the overhead produced.

Mostly due to the high rate of mobility or a large number of nodes, proactive protocols are

regarded to have low performance (Saeed et al., 2012).

2.5.1 DSDV

DSDV is known as Destination Sequenced Distance Vector routing which uses a proactive

strategy in routing, a modified version of Bell-man Ford principle. In routing from source to

destination, the Bell-man Ford principle was solely used in finding the shortest path, and also it

is not a loop-free algorithm. It overcomes a loop problem of Routing Information Protocol (RIP).

Due to topology changes in the Ad hoc network, RIP can no longer be put to use anymore

(Istikmal et al., 2013). DSDV is a table-driven routing protocol that overcomes the Bell-man

Ford algorithm problem because it is regarded as a loop-free algorithm. At each routing time,

DSDV protocol updates the table when a source wants to transmit packets to the destination

node. An update of a message which is incremented by one periodically is carried out in

sequence. In terms of node broadcasting, packets sent are usually of two types which are the

incremental dump which carries available information at each time and full dump carries only

information changed at the very last dump (Chauhan & Sharma, 2016). Route update is executed

by each node to check incoming packet serial number. Thus, if coming serial numbers are new,

the newer serial numbers with new data replace the older existing data including the new serial

numbers. Also, if there exist packages with the same serial number, it considers the one with a

smaller metric. Route information broadcast can also generate a problem, which could lead to a

busy network or continuous update with or without topology change, due to the cause of

different update time. Therefore, each node does not perform a direct update, except for

destination nodes that are unreachable to solve the problem (Istikmal et al., 2013).

2.5.2 OLSR

Optimized Link State Protocol (OLSR) is an example of a proactive routing protocol that is

available always on demand. In terms of Classic OLSR, large control packet overhead generated

by this protocol does not usually scale bandwidth requirement on wireless Ad hoc network

especially when there is broadcast in the entire network. OLSR has been an optimized version of

Page 28: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

14 | P a g e

the Classic OLSR uses Multipoint Relays also known as MPR (Alamsyah et al., 2016) which is

the only allowed to broadcast packet, thereby reducing overhead in information exchange. In

OLSR, messages such as Hello and Topology Control (TC) are used for control messages,

whereas the Hello message is used in information finding of link status, while in terms of

periodical broadcasting of information about MPR selector list the TC messages are used.

Multiple Interface Declaration (MID) is considered another class of message used by MPRs to

broadcast throughout the network, other hosts also get informed by MID that multiple OLSR

interface address can be used by announcing host. A message called Host and Network

Association (HNA) which helps in providing information about network and netmask address, it

is a version of TC message that is generalized, which only differs from HNA because HNA

handles message information is removed only after the expired time, whereas the TC informs

about route cancelling (Singla & Jain, 2014).

2.6 Reactive Routing Protocol

Reactive routing algorithm operates based on-demand, the transmission of the data packet when

a need arises. Reactive protocols help also to minimize overhead; it also saves battery power

because routes are evaluated on-demand purposes (Rahman & Abbas, 2016). It is a new version

of the Internet Link State Distance Vector algorithm. It is characterized by two mechanisms

which are Route discovery and maintenance. At the process of route discovery, it consists of a

route request and route reply, and it differs from one protocol to another (Saeed et al., 2012).

Routing activity in reactive protocols are not maintained while trying to send a packet to other

nodes, reactive protocols search for the path that is in on-demand, establish a connection so data

packets can be transmitted and received. In the process of route finding, a route request message

is flooded in the network. Because routing starts only a source node is about to transmit a data

packet to other nodes, which makes it on-demand routing protocol, route overhead and

bandwidth waste that occur in the broadcasting of routing tables are avoided by on-demand

routing. Popular known protocols are AODV, DSR and AOMDV (Araghi et al., 2013).

Page 29: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

15 | P a g e

2.6.1 AOMDV

Ad hoc On-demand Multipath Distance Vector routing protocol (AOMDV) is an extended

version AODV protocol that computes multiple loop-free and link disjoint paths (Gharge &

Valanjoo, 2014). On each entry of node routing to every destination, there are the list of next-

hops alongside hop counts, as well as having the same sequence number that helps in

maintaining route paths. For every destination, a hop count is advertised by a node, defined as

maximum hop count for all paths, that helps advertise route of the destination. For duplicate

route advertised, the node defines an alternate path to its destination. The assurance of loop

freedom is ensured for a node by the acceptance of alternate paths to the destination if it has less

hop count than advertised hop count. Due to the use of maximum hop count, advertised hop

count experiences no change for the same sequence number. A destination that has a great

sequence number receives a route advertisement, which reinitializes the list of the next-hop and

advertised hop count. An AODV routing protocol can be in finding node-disjoint or link-disjoint

route. Finding node-disjoint, duplicate RREQs are not rejected by nodes, for RREQs from

different neighbour source defines the node-disjoint route. For reasons that duplicate RREQs

cannot be broadcasted by nodes, any two arriving RREQs at an intermediate node, through a

different neighbour of the source cannot traverse the same node. Replies to duplicate RREQ by

destination resulting to get multiple link-disjoint routes, where on replies are made to arriving

RREQs by destination. RREPs usually follow a reverse path after first hops show node disjoint

and link-disjoint. Each RREP trajectory intersects at intermediate nodes, but as well takes a

different reverse path to source so as ensure link disjoint. AOMDV is of more advantage because

it allows intermediate nodes to send replies to RREQs, even while yet selecting disjoint paths.

Message overhead is more in AOMDV when carrying out route discovery, due to increased

flooding and therefore it been a multipath routing protocol, replies to multiple RREQs by

destination especially those that result in longer overhead (Shrivastava et al., 2013).

Page 30: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

16 | P a g e

CHAPTER THREE

RESEARCH METHODOLOGY

This chapter presents and explains the methodology of the study. The simulation tools used for

simulation and various metrics involved in the performance evaluation of MANET proactive and

reactive routing protocol are discussed. The performance parameters considered as well as also

the simulation setup form the contents of the chapter.

3.1 Proposed Work

The most common simulation tools been used by several authors and researchers in network

research, as regards simulation tool are NS2, NS3, OPNET and QualNet amongst others. For this

study, NS3 is the tool chosen. The routing protocols to implement and experiment in the

aforementioned simulation software tool are DSDV, OLSR and AOMDV under network

scenario of 20 nodes as small network, 40 nodes as medium and 60 nodes as large network.

3.2 Experimentation Procedure

3.2.1 Experiment Network

Mobile Ad hoc Wireless Network

3.2.2 Experimental Protocols

Destination Sequence Distance Vector (DSDV)

Optimized Link State Protocol (OLSR)

Ad hoc On-demand Multipath Destination Vector (AOMDV)

3.2.3 Experimental Metric

Average throughput

Average End-to-End Delay

Average Energy Consumption

3.2.4 Experimental Environment

Linux OS

Page 31: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

17 | P a g e

Network Simulator 3

C++/Python

3.3 Software Environment

For this study, Network Simulator 3 (NS3) software was used for simulation. NS3 is a discrete-

event network simulator which architecture is modelled after the predecessor tool network

simulator 2 (NS2) licensed GNU GPLv2, which is also available for research and development

(Atif et al., 2013; Gupta et al., n.d.). NS3 is a new simulator, a synthesis of several predecessor

tools, which include NS2, Georgia Tech Network Simulator (GTNetS), and YANS simulator.

NS3 software prioritizes the use of standard input and output file formats for packet trace

analyzers. Users are also provided links to GNU Scientific Library or IT++ as external libraries.

It provides an ease of debugging as well as better alignment with current languages. By

architecture, NS2 predecessor tool was the mixture of object-oriented Tcl (OTcl) and C++ which

proved hard to debug and Tcl became unfamiliar. The design of NS3 is purely based on C++

based models for ease of debugging and performance, and a Python-based scripting API

integrated with other Python-based programming models. NS3 allows users to freely write

simulations as either C++ main() programs or Python programs (Atif et al., 2013).

3.4 NS3 Programming Architecture

As seen in Figure 3.1, NS3 architecture shows node, application, network device, channel and

topology generator are components embedded in the simulator. Nodes are abstracts of NS3 for

basic computer devices, and are described in Node Container class, that provides several

methods to manage computing devices. Channel describes the data flow through the media, as

well as network equipment such as the Internet for hardware and network card driver. The

Application class provides several methods that help manage user-level applications as the

simulation process is carried out, developers customize and create new applications that use

object-oriented methods. Two core parts make up the NS3 simulator kernel which is time

scheduling and support system, time scheduler comprises Default scheduler and Real-time

scheduler. Attribute, Logging and Tracing are NS3 support system (Zhang & Guo, 2017).

Page 32: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

18 | P a g e

Figure 3. 1 NS3 simulator architecture in MANET (Adapted from Zhang & Guo, 2017)

3.5 NS3 Tools

The tools that support the NS3 simulation software that helps in setting up the network

environment, run the simulation and analyze the result are:

3.5.1 NAM

Defined as Network Animator, is a TCL-based animation tool that helps view network

simulation traces and real packet data traces. To use NAM, a trace file must first be generated

that contains topological information such as nodes, links, and packet trace. Once trace file is

generated, NAM reads it, creates topology, pops up a window, does some layout if necessary,

and pauses at the time trace file has the first packet in it. NAM is a tool that provides control

over many aspects of animation through its user interface, and animation is done using building

blocks: link, queue, packet, agent and monitor.

Network Component

Node Application Stack NetDevice Channel

API

Simulator Kernel

Scheduling:

Default scheduler

Realtime scheduler

SupportSystem:

Attribute

Logging

Tracing

Page 33: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

19 | P a g e

3.5.2 Trace File

The trace data is in ASCII codes that are generated at the end of the simulation. NS3 uses two

basic strategies to obtain output: pre-defined bulk output mechanisms and tracing. Using generic

pre-defined bulk output mechanisms, and their contents are parsed to extract interesting

information. Using pre-defined bulk output mechanism does not require changes to NS3 which

makes an advantage, but scripts are required to be written to parse and filter data of interest.

Most often running simulations, PCAP or NS_LLOG output messages are gathered and are

separately run through scripts that use grep, sed or awk that helps parse the message, reduce and

transform data into a manageable form. NS3 provides another mechanism, called Tracing, which

has several advantages over the bulk output mechanism. The amount of data to manage first can

be reduced by tracing only the events of interest i.e. for large simulations, dumping to disk can

result in post-processing which creates an I/O bottleneck. This method also can keep control as

well as avoid post-processing if the format is controlled with sed, AWK, Perl or Python scripts.

3.6 Performance Parameters

There are various performance metrics used in the evaluation of routing protocols. For this

study, three main performance parameters are considered which include average throughput,

average end-to-end delay and average energy consumption.

3.6.1 Average Throughput

As parameter metrics in measuring Ad hoc network performance, throughput measures the

successful average number of packets delivered per unit time over a communication path. It can

also be calculated as the number of bits delivered per second. It is measured in bits per second

(bits/sec) or kilobits per second (kbps) (Appiah, 2016). Mathematically, Throughput (S) can be

represented as shown in equation (1):

S = Number_deliveredPacket * Packet_size * 8/Total_simulationtime (3.1)

( ) ( ) (3.2)

Page 34: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

20 | P a g e

3.6.2 Average End-to-End Delay

The Average End-to-End delay is the average time including all possible delays that are

generated by queuing at interface queue, the process of buffering during routing discovery,

propagation and transfer times of data packets, and delays retransmission of data packet from

source node until packet is delivered to the destination node (Prabhakaran et al., 2013).

Mathematically, Average End-to-End Delay can be represented in equation (2):

∑ ( ) (3.3)

3.6.3 Average Energy Consumption

Antennas for wireless communication need more energy because they are usually

omnidirectional, the energy of links or communicating nodes as a basis of the amount of

calculated energy needed for modulation. The energy consumption model is defined by three

parameters: initial energy, transmission energy (txPower) and reception power (rxPower).

Computing the amount of energy consumed during transmission, transmission power (txPower)

should be multiplied by the time required to transmit packets (Er-Rouidi et al., 2016).

Energytx = txPower (packet size/bandwidth) (3.4)

And for the packet received

Energyrx = rxPower(packet size/bandwidth) (3.5)

For the calculated average energy consumption (AEC) represented mathematically, as shown in

equation (3) is the proportion sum of entire energy used by every node to an entire number of

nodes.

∑ {( ( ) ( ))}

(3.6)

Page 35: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

21 | P a g e

3.7 Mobility Model

Mobility model plays a key role in Mobile Ad hoc Network. In most cases, the problem

encountered by MANET is the issue of high mobility between communicating nodes (Sudhakar

& Inbarani, 2017). Mobility model is considered to be the movement of mobile nodes, taking

consideration of the speed and position which are controlled by the mobility model itself. The

most widely used model which is an artificial model is the random direction mobility model

(Azizi et al., 2015). It is considered a mechanism that is used for simulation and analysis Ad hoc

mobile devices on the wireless network. Nodes are always moving in nature (Naik et al., 2019),

but as in reality node mobility are often difficult to predict because node movements vary.

However, different models are adopted to check the expected mobility of mobile nodes. Thus,

both the mobility model and network topology play a vital role in MANET routing protocol

performance. Realistic simulations of nodes are needed as there exists a frequent change in node

position. Mobility models also predict node movement patterns which are a key component in

simulation mobile Ad hoc networks, and represent factors that affect wireless communication in

real-world (Amin et al., 2010). Mobility models (Naik et al., 2019) used in MANETs are

classified as Stochastic model, Detailed models and Hybrid models. Sudhakar & Inbarani (2017)

overview of mobility models that are used in protocol performance evaluation and analysis is

presented in Figure 3.2 below:

Page 36: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

22 | P a g e

Figure 3. 2 Categories of Mobility Models in MANET (Adapted from Sudhakar &

Inbarani, 2017)

3.7.1 Stochastic Model

Stochastic models are models where nodes exhibit random movement and there exist no

limitations imposed on the mobility of nodes (Naik et al., 2019). Models such as Random Way

Point (RWP), Random Direction (RD), Random Walk (RW), Manhattan Model (MM) and

Pursue Mobility Model (PMM) are all examples of a stochastic model. These models are

applicable in areas such as hospitals, campus, public places amongst others. All seem to exhibit

similar characteristics of mobility and movement pattern. In this study, our focus is more on the

stochastic model which is the Random Way Point model to simulate the movement of nodes in a

network.

Random Way Point (RWP) Mobility Model: The Random Way Point model name gives a

clear picture that nodes using this model are in random motion. Movement is usually depicted in

random nature i.e. nodes don’t have a specific path of movement; it is irregular, has no boundary

limits of movement and with pause time, nodes stay and move to other places (Nand et al.,

2016). Node speed at 9 to 16m/s is distributed uniformly, thereby speed limits of different

Page 37: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

23 | P a g e

categories are being covered during a simulation scenario. Pause time in this study is not put into

consideration, to test when nodes exhibit random movement (Khairnar & Pradhan, 2011).

Random Way Point Model is depicted as shown in Figure 3.3 below:

Figure 3. 3 Random Way Point Model

3.8 Simulation Parameter

The work was carried out using NS3 simulation tool. It attempted to compare all three routing

protocols using the same parameter set up as shown in the table below. For all the simulation, the

same movement model was used; the number of traffic sources was set to 20, 40, and 60 nodes

and at a 1000m x 1000m topology boundary. The parameters used are shown in the table below:

Table 3. 1 Simulation parameters used in performance evaluation

Parameter Value

Topology generated/Nodes 20, 40, 60

Simulation Time/Second 200sec

MAC Ad hoc WiFi Mac

MAC Standard 802.11b

Mobility Model Constant Speed Propagation Delay

Node Speed 20ms

Propagation Model Random Way Point Mobility Model

Topology Boundary Area 1000m x 1000m

Application TCP

Routing Protocol DSDV, OLSR, AOMDV

Page 38: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

24 | P a g e

CHAPTER FOUR

SIMULATION, RESULTS AND DISCUSSION

The proposed technique in Chapter 3 is simulated in this Chapter. Also, the chapter shows the

results obtained and discusses the performance metrics which are Average Throughput, Average

End-to-End Delay and Average Energy Consumption with relations to a varied number of nodes.

4.1 Discussion of Result

This chapter shows and discusses the results obtained from Tcl scripts (in appendix). The

network logics of DSDV, OLSR and AOMDV were simulated at 20, 40, and 60 number of

nodes. The simulation was run using NS3 and the python scripts to get the result of the three

protocols were run using the following commands as shown in Figure 4.1, 4.2 and 4.3 below:

1. DSDV (see Appendix 1)

Figure 4. 1 Python Tcl command for DSDV

2. OLSR (see Appendix 2)

Figure 4. 2 Python Tcl command for OLSR

Page 39: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

25 | P a g e

3. AOMDV (see Appendix 3)

Figure 4. 3 Python Tcl command for AOMDV

The Network Animator (NetAnim) for all the network topology generated is displayed in Figure

4.4, 4.5, and 4.6.

Figure 4. 4 NetAnim 20 Nodes

Page 40: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

26 | P a g e

Figure 4. 5 NetAnim 40 Nodes

Figure 4. 6 NetAnim 60 Nodes

4.2 Simulation Results and Evaluation

Simulation result generated from python trace analyzers were obtained and categorized. During

the simulation, all network activities were logged into NS3. Python scripts were used to extract

Page 41: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

27 | P a g e

useful information from trace files. The evaluation was carried out using three performance

metrics: Average Throughput, Average End-to-End Delay and Average Energy Consumption.

4.3 Analysis of Results

Tables 4.1, 4.2, and 4.3 show simulation results that compare the performance of DSDV, OLSR

and AOMDV mobile Ad hoc network routing protocols. Table 4.1 shows the result for Average

Throughput, Table 4.2 shows the result for Average End-to-End Delay whereas Table 4.3 shows

the result for Average Energy Consumption and Table 4.4 shows the cumulative average of the

three routing protocols.

4.3.1 Average Throughput

Table 4. 1 Average Throughput

Average Throughput (bits/sec)

Node DSDV OLSR AOMDV

20 1.064929549 2.099288804 1.835093767

40 1.072912982 1.063815164 0.866401337

60 1.00764548 1.223753628 1.283659553

Average 1.048496004 1.462285865 1.328384886

Figure 4. 7 Throughput vs Nodes

0

0.5

1

1.5

2

2.5

20 40 60

Thro

ugh

pu

t (b

its/

sec)

Number of Nodes

Throughput vs Nodes

AOMDV

DSDV

OLSR

Page 42: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

28 | P a g e

Figure 4. 8 Average Throughput

Table 4.1 data presents the Average Throughput of all observed routing protocols with varying

nodes (20, 40, and 60). It shows that at 20 nodes OLSR has the highest throughput performance

over the other two protocols DSDV and AOMDV, followed by AOMDVwhich is next in terms

of throughput performance and DSDV has the least average performance. At 40 nodes DSDVand

OLSR exhibit similar throughput performance except for DSDV which has a slight increase in

performance than OLSR and thus, AOMDV has the least performance. At 60 nodes, AOMDV

has the highest throughput performance then followed by the OLSR and DSDV the least

performance all shown in Figure 4.7 respectively. The throughput as presented in Figure 4.7

which was varied at several nodes shows the dominance of OLSR in terms of performance gain

over DSDV and AOMDV, which means OLSR performs better at 20 nodes but at nodes greater

than 20 there is a decrease in performance. While as shown in Figure 4.8, at an average

throughput performance OLSR has the highest throughput, then AOMDV and lastly DSDV

which is the least.

4.3.2 Average End-to-End Delay

Table 4. 2 Average End-To-End Delay

Average End-to-End Delay (sec)

Node DSDV OLSR AOMDV

20 0.000474819 0.001241479 0.287524641

40 0.030486621 0.000806558 0.208735929

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

Average

Throughput

AOMDV DSDV OLSR

Page 43: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

29 | P a g e

60 0.029817267 0.019781354 0.220438283

Average 0.020259569 0.007276463 0.238899618

Figure 4. 9 Average End-to-End Delay vs Node

Figure 4. 10 Average End-to-End Delay

Table 4.2 presents the average End-to-End Delay of all the observed protocols at a varying

number of nodes (20, 40, and 60). AOMDV shows it has the highest average End-to-End Delay

at 20 number of nodes over DSDV and OLSR, OLSR which is seen to be next in performance

and DSDV having the least End-to-End delay. At 40 nodes, AOMDV still has the highest

performance, but this time DSDV is next highly performed then OLSR. As well as at 60 nodes

AOMDV still dominates the rest, DSDV being the next and OLSR the least all shown in Figure

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

20 40 60

End

-to

-En

d D

ela

y (s

ec)

Number of Nodes

Average End-to-End Delay vs Nodes

AOMDV

DSDV

OLSR

0

0.05

0.1

0.15

0.2

0.25

0.3

Average

End-to-End Delay

AOMDV DSDV OLSR

Page 44: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

30 | P a g e

4.9 respectively. Based on the results shown in Figure 4.10, DSDV and OLSR which are

proactive perform better than AOMDV the reactive protocol in terms of average End-to-End

delay, in fewer nodes (<40) OLSR has the least End-to-End delay making it of better

performance compared to DSDV at a greater number of nodes (>20) and then AOMDV.

4.3.3 Average Energy Consumption

Table 4. 3 Average Energy Consumption

Average Energy Consumption (kj)

Node DSDV OLSR AOMDV

20 0.154973905 0.155744571 0.155606095

40 0.158768659 0.159620707 0.159442951

60 0.160088344 0.160360328 0.15982441

Average 0.157943636 0.158575202 0.158291152

Figure 4. 11 Average Energy Consumption vs Nodes

0.152

0.153

0.154

0.155

0.156

0.157

0.158

0.159

0.16

0.161

20 40 60

Ene

rgy

Co

nsu

mp

tio

n (

kj)

Number of Nodes

Average Energy Consumption vs Nodes

AOMDV

DSDV

OLSR

Page 45: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

31 | P a g e

Figure 4. 12 Average Energy Consumption

Table 4.3 presents the Average Energy consumption of all the observed protocols at varying

nodes (20, 40, and 60). Although the three routing protocols seem to have a regular increase in

energy consumption rate as the number of nodes is increased at 20 nodes DSDV has the least

average energy consumption followed by AOMDV and then OLSR which has the highest energy

consumption rate. At 40 nodes, the least energy-consuming protocol is still DSDV then AOMDV

and OLSR but at 40 nodes, the consumption rate increases. At 60 nodes, AOMDV has the least

energy consumption rate, then followed by DSDV and OLSR having the highest as the number

of nodes keep increasing. All these are shown in Figure 4.11. As clearly shown in Figure 4.12,

DSDV is regarded as the least energy-consuming routing protocol, then AOMDV as the next

least energy-consuming protocol and OLSR which has less energy consumption only at fewer

nodes due to its operation in less stressful environments, but consumes more energy at a larger

number of nodes (i.e nodes 40 and greater).

4.3.4 Cumulative Throughput

Table 4. 4 Cumulative performance for Throughput

Nodes AOMDV DSDV OLSR

20 1.835094 1.06493 2.099289

40 2.701495 2.137843 3.163104

60 3.985155 3.145488 4.386858

0.1576

0.1578

0.158

0.1582

0.1584

0.1586

0.1588

Average

Energy Consumption

AOMDV DSDV OLSR

Page 46: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

32 | P a g e

Figure 4. 13 Cumulative performance for Average Throughput

4.3.5 Cumulative End-to-End Delay

Table 4. 5 Cumulative performance for End-to-End Delay

Nodes AOMDV DSDV OLSR

20 0.287525 0.000475 0.001241

40 0.496261 0.030961 0.002048

60 0.716699 0.060779 0.021829

Figure 4. 14 Cumulative performance for Average End-to-End Delay

0

1

2

3

4

5

20 40 60

Thro

ugh

pu

t (

bit

s/se

c)

Number of Nodes

AOMDV

DSDV

OLSR

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

20 40 60

End

-to

-En

d D

ela

y (s

ec)

Number of Nodes

AOMDV

DSDV

OLSR

Page 47: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

33 | P a g e

4.3.6 Cumulative Energy Consumption

Table 4. 6 Cumulative performance for Energy Consumption

Nodes AOMDV DSDV OLSR

20 0.155606 0.154974 0.155745

40 0.315049 0.313743 0.315365

60 0.474873 0.473831 0.475726

Figure 4. 15 Cumulative performance for Average Energy Consumption

Results from Table 4.4, 4.5 and 4.6 gives a general cumulative performance of DSDV, OLSR,

and AOMDV routing protocols based on the performance parameter metrics considered. As

clearly represented in Figure 4.13, 4.14, and 4.15 OLSR shows and overall better performance in

throughput due to its application in a less stressful network of 20 numer of nodes, as well as

showing a less performance in end-to-end delay and equal energy consumption with other

protocols (i.e. DSDV and AOMDV). AOMDV is seen to have a good performance but records

show it has the highest delay amongst others, while DSDV has less performance in terms of

throughput but has almost similar performance in terms of end-to-end delay and energy

consumption compared to OLSR.

0

0.1

0.2

0.3

0.4

0.5

20 40 60

Ene

rgy

Co

nsu

mp

tio

n

(kilo

jou

les)

Number of Nodes

AOMDV

DSDV

OLSR

Page 48: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

34 | P a g e

CHAPTER FIVE

SUMMARY, CONCLUSION AND RECOMMENDATION

5.1 Summary and Conclusion

In this thesis, a study on the performance evaluation of MANET proactive and reactive routing

protocols, under a varying number of mobile nodes was carried out. From this study, we

conclude that routing protocols play a prominent role in this modern-day of telecommunications

and internet communication. Different routing protocols are characterized by their unique

attributes according to the network scenario in which they are applied. The reliability of a

particular network scenario is determined by suitable routing protocol that best fits and could

provide efficient result in terms of network operation. The proactive and reactive routing

protocols are categorically the two routing protocols that have been analyzed; therefore each

plays its unique role and has its application usage.

The simulation study adopted in this research consists of three routing protocols DSDV, OLSR

and AOMDV, which were simulated under three parameters: average throughput, average end-

to-end delay and average energy consumption. The motivation was to check the performance of

the mentioned routing protocols in MANET according to outlined performance metrics. It has

been a major issue when it comes to selecting an efficient and reliable routing protocol. In this

simulation work, results were gotten which include result tables and simulation graphs in which

the average statistical data were concluded.

The analysis of the simulation figures 4.9, 4.10, and 4.11 showed the routing protocol behaviours

at different mobile nodes ranging from 20, 40, and 60 as well as which routing protocol has

better performance over another. From the above analysis, a cumulative performance of the

routing protocols shows in Figure 4.13, OLSR outperforms the other two OLSR and AOMDV in

terms of average throughput, average end-to-end delay and energy consumption in small

networks. By interpretation, OLSR has higher throughput, less End-to-End delay, and less

energy consumption. Followed by OLSR is AOMDV which also has a high throughput, although

with more End-to-End delay than others and less energy consumption, which makes AOMDV

Page 49: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

35 | P a g e

performs better in medium networks. Finally, DSDV which is the least in ranking of

performance is seen to have also a better throughput performance, less End-to-End delay and

energy consumption.

The study shows that OLSR performs better in the scenario discussed in the Ad hoc network

compared to other routing protocols compared, which is lesser and shows that proactive

protocols have better performance in the network, although its performance may vary at other

networks. At the end of this study, simulation and analysis of routing protocol performance do

vary at different network scenarios and performance metrics.

5.2 Recommendation

The study suggests further research on analyzing the efficiency of routing protocols on higher

and larger number of nodes. Also by applying Data Envelopment Models with more performance

metric or parameters that will help test the performance rate of routing protocols in its

application to networks.

Page 50: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

36 | P a g e

REFERENCES

Agarwal, M. M., Govil, M. C., & Sinha, M. (2015). Investigation of energy efficient routing

parameters protocols. 2015 Third International Conference on Image Information

Processing (ICIIP), 168–173. https://doi.org/10.1109/ICIIP.2015.7414760

Aggarwal, R. (2018). QoS Based Simulation Analysis of EAODV Routing Protocol for

Improving Energy Consumption in Manet. 2018 International Conference on Intelligent

Circuits and Systems (ICICS), 246–250. https://doi.org/10.1109/ICICS.2018.00058

Ajibesin, A. A., Kah, M. O., Ahmed, I., & Caleb, A. (2019). Performance Analysis of Topology

and Destination Based Routing Protocols in Mobile Ad-Hoc Network Using Network

Simulator 2.

Alamsyah, Purnomo, M. H., Purnama, I. K. E., & Setijadi, E. (2016). Performance of the routing

protocols AODV, DSDV and OLSR in health monitoring using NS3. 2016 International

Seminar on Intelligent Technology and Its Applications (ISITIA), 323–328.

https://doi.org/10.1109/ISITIA.2016.7828680

Ali, S., & Nand, P. (2016). Comparative performance analysis of AODV and DSR routing

protocols under wormhole attack in mobile ad hoc network on different node’s speeds.

2016 International Conference on Computing, Communication and Automation (ICCCA),

641–644. https://doi.org/10.1109/CCAA.2016.7813800

Amin, R., Ashraf ch, S., Akhtar, M. B., & Khan, A. A. (2010). Analyzing performance of ad hoc

network mobility models in a peer-to-peer network application over mobile ad hoc

network. 2010 International Conference on Electronics and Information Engineering, 2,

V2-344-V2-348. https://doi.org/10.1109/ICEIE.2010.5559795

Page 51: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

37 | P a g e

Anchari, A. A., Amin, A., & Ashraf, S. (2017). Routing Problems in Mobile Ad hoc Networks

(MANET). International Journal of Computer Science and Mobile Computing, 6(7), 9–

15.

Appiah, M. (2016). The impact of mobility models on theperformance of mobile ad hoc network

(MANET). 2016 International Conference on Advances in Computing and

Communication Engineering (ICACCE), 208–213.

https://doi.org/10.1109/ICACCE.2016.8073749

Araghi, T. K., Zamani, M., & Mnaf, A. B. A. (2013). Performance Analysis in Reactive Routing

Protocols in Wireless Mobile Ad Hoc Networks Using DSR, AODV and AOMDV. 2013

International Conference on Informatics and Creative Multimedia, 81–84.

https://doi.org/10.1109/ICICM.2013.62

Atif, M., Faisal, S., Ahsan, L., & Muddasar, A. (2013).

Key_Features_and_Optimum_Performance_of (1).pdf. International Journal of

Computer Trends and Technology (IJCTT), 4(9).

Azizi, R., Shoja, H., & Hasanzadeh, H. (2015). Real-world investigation of mobility models in

an anycast wireless ad hoc network. 2015 6th International Conference on Computing,

Communication and Networking Technologies (ICCCNT), 1–6.

https://doi.org/10.1109/ICCCNT.2015.7395211

Bai, Y., Mai, Y., & Wang, N. (2017). Performance comparison and evaluation of the proactive

and reactive routing protocols for MANETs. 2017 Wireless Telecommunications

Symposium (WTS), 1–5. https://doi.org/10.1109/WTS.2017.7943538

Page 52: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

38 | P a g e

Chamkaur, S., Vikas, G., & Gurmeet, K. (2014). IJETT - A Review Paper on Introduction to

MANET. International Journal of Engineering Trends and Technology - IJETT, Volume

11 Number 1, 6.

Chauhan, A., & Sharma, V. (2016). Review of performance analysis of different routing

protocols in MANETs. 2016 International Conference on Computing, Communication

and Automation (ICCCA), 541–545. https://doi.org/10.1109/CCAA.2016.7813779

Dugaev, D., Zinov, S., Siemens, E., & Shuvalov, V. (2015). A survey and performance

evaluation of ad-hoc multi-hop routing protocols for static outdoor networks. 2015

International Siberian Conference on Control and Communications (SIBCON), 1–11.

https://doi.org/10.1109/SIBCON.2015.7147048

Er-Rouidi, M., Moudni, H., Mouncif, H., & Merbouha, A. (2016). An Energy Consumption

Evaluation of Reactive and Proactive Routing Protocols in Mobile Ad-Hoc Network.

2016 13th International Conference on Computer Graphics, Imaging and Visualization

(CGiV), 437–441. https://doi.org/10.1109/CGiV.2016.90

Gharge, S., & Valanjoo, A. (2014). Simulation based performance evaluation of TCP variants

and routing protocols in Mobile Ad-hoc Networks. 2014 International Conference on

Advances in Engineering Technology Research (ICAETR - 2014), 1–8.

https://doi.org/10.1109/ICAETR.2014.7012810

Gupta, S. G., Ghonge, M. M., Thakare, P. D., & Jawandhiya, D. P. M. (n.d.). Open-Source

Network Simulation Tools: An Overview. 2(4), 8.

Istikmal, Leanna, V. Y., & Rahmat, B. (2013). Comparison of proactive and reactive routing

protocol in mobile adhoc network based on “Ant-algorithm.” 2013 International

Page 53: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

39 | P a g e

Conference on Computer, Control, Informatics and Its Applications (IC3INA), 153–158.

https://doi.org/10.1109/IC3INA.2013.6819165

Khairnar, V. D., & Pradhan, S. N. (2011). Mobility models for Vehicular Ad-hoc Network

simulation. 2011 IEEE Symposium on Computers Informatics, 460–465.

https://doi.org/10.1109/ISCI.2011.5958959

Kochher, R., & Mehta, R. (2016). Performance analysis of reactive AODV and DSR with Hybrid

GRP Routing Protocols under IEEE 802.11g MANET. 2016 International Conference on

Wireless Communications, Signal Processing and Networking (WiSPNET), 1912–1916.

https://doi.org/10.1109/WiSPNET.2016.7566475

Kumar Jha, R., & Kharga, P. (2015). A Comparative Performance Analysis of Routing Protocols

in MANET using NS3 Simulator. International Journal of Computer Network and

Information Security, 7(4), 62–68. https://doi.org/10.5815/ijcnis.2015.04.08

Lei, D., Wang, T., & Li, J. (2015). Performance Analysis and Comparison of Routing Protocols

in Mobile Ad Hoc Network. 2015 Fifth International Conference on Instrumentation and

Measurement, Computer, Communication and Control (IMCCC), 1533–1536.

https://doi.org/10.1109/IMCCC.2015.325

Matre, V., & Karandikar, R. (2016). Multipath routing protocol for mobile adhoc networks. 2016

Symposium on Colossal Data Analysis and Networking (CDAN), 1–5.

https://doi.org/10.1109/CDAN.2016.7570946

Mohsin, R., & Woods, J. (2014). Performance evaluation of MANET routing protocols in a

maritime environment. 2014 6th Computer Science and Electronic Engineering

Conference (CEEC), 1–5. https://doi.org/10.1109/CEEC.2014.6958545

Page 54: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

40 | P a g e

Naik, K. C. K., Balaswamy, Ch., & Reddy, P. R. (2019). Performance Analysis of OLSR

Protocol for MANETs under Realistic Mobility Model. 2019 IEEE International

Conference on Electrical, Computer and Communication Technologies (ICECCT), 1–5.

https://doi.org/10.1109/ICECCT.2019.8869406

Nand, P., Astya, R., & Ali, A. W. (2016). Performance analysis and impact of different mobility

model on specific configured network with IEEE 802.15.4for WSNs. 2016 International

Conference on Computing, Communication and Automation (ICCCA), 405–410.

https://doi.org/10.1109/CCAA.2016.7813772

Prabhakaran, H. K., Kumar, B., & Gupta, P. (2013). Performance evaluation of MANET routing

protocols under RPGM model by varying transmission range. 2013 International Mutli-

Conference on Automation, Computing, Communication, Control and Compressed

Sensing (IMac4s), 823–826. https://doi.org/10.1109/iMac4s.2013.6526520

Rahman, M. U., & Abbas, S. (2016). Simulation-based analysis of MANET routing protocols

using group mobility model. 2016 International Conference on Inventive Computation

Technologies (ICICT), 1–5. https://doi.org/10.1109/INVENTIVE.2016.7823290

Raskar, S., & Iyer, K. (2018). Performance Comparison on Path Establishment and Recovery

algorithms in Wireless Ad-Hoc Networks. 2018 International Conference On Advances

in Communication and Computing Technology (ICACCT), 372–377.

https://doi.org/10.1109/ICACCT.2018.8529618

Saeed, N. H., Abbod, M. F., & Al-Raweshidy, H. S. (2012). MANET routing protocols

taxonomy. 2012 International Conference on Future Communication Networks, 123–

128. https://doi.org/10.1109/ICFCN.2012.6206854

Page 55: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

41 | P a g e

Sakshi, & Neha, G. (2017). MANET: Simulation Analysis and Performance Evaluation.

International Journal of Advanced Research in Computer Science and Software

Engineering, 7(4), 9.

Shrivastava, A. K., Vidwans, A., & Saxena, A. (2013). Comparison of AOMDV Routing

Protocol under IEEE802.11 and TDMA Mac Layer Protocol. 2013 5th International

Conference and Computational Intelligence and Communication Networks, 117–122.

https://doi.org/10.1109/CICN.2013.35

Singla, S., & Jain, S. (2014). Comparison of routing protocols of MANET in real world scenario

using NS3. 2014 International Conference on Control, Instrumentation, Communication

and Computational Technologies (ICCICCT), 543–549.

https://doi.org/10.1109/ICCICCT.2014.6993021

Sudhakar, T., & Inbarani, H. H. (2017). Spatial group mobility model scenarios formation in

mobile ad hoc networks. 2017 International Conference on Computer Communication

and Informatics (ICCCI), 1–5. https://doi.org/10.1109/ICCCI.2017.8117695

Ya-qin, F., Wen-yong, F., & Lin-zhu, W. (2010). OPNET-based Network of MANET Routing

Protocols DSR Computer Simulation. 2010 WASE International Conference on

Information Engineering, 4, 46–49. https://doi.org/10.1109/ICIE.2010.300

Zhang, H., & Guo, J. (2017). Application of manet routing protocol in vehicular ad hoc network

based on NS3. 2017 7th IEEE International Conference on Electronics Information and

Emergency Communication (ICEIEC), 391–394.

https://doi.org/10.1109/ICEIEC.2017.8076589

Page 56: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

42 | P a g e

APPENDIX 1

from xml.etree import ElementTree as ET

import sys

import csv

#import matplotlib.pyplot as pylab

#usage python <this file name> <flowmonitor input file> <csv input file name>

et=ET.parse(sys.argv[1]) # flowmonitor input file

csv_filename= sys.argv[2] # csv input file

bitrates=0

losses=[]

delays=0

nSink = 0

with open(csv_filename) as csv_file :

csv_reader = csv.reader(csv_file, delimiter=',')

line_count = 0

average_energy = 0

for row in csv_reader:

if line_count == 0:

line_count += 1

continue

average_energy += float(row[0])

line_count += 1

for flow in et.findall("FlowStats/Flow"):

for tpl in et.findall("Ipv4FlowClassifier/Flow"):

if tpl.get('flowId')==flow.get('flowId'):

break

if tpl.get('destinationPort')=='654':

continue

losses.append(int(flow.get('lostPackets')))

nSink +=1

Page 57: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

43 | P a g e

rxPackets=int(flow.get('rxPackets'))

if rxPackets==0:

bitrates += 0;

else:

t0=float(flow.get('timeFirstRxPacket')[:-2])

t1=float(flow.get("timeLastRxPacket")[:-2])

duration=(t1-t0)*1e-9

if duration == 0:

continue

bitrates += 8*float(flow.get("rxBytes"))/duration*1e-3

delays += float(flow.get('delaySum')[:-2])*1e-9/rxPackets

print(csv_filename)

print("Average Throughput = ", bitrates/nSink)

print("Average End-to-End Delay = ", delays/nSink)

print("Average Energy Consumed = ", average_energy/(line_count))

Page 58: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

44 | P a g e

APPENDIX 2

from xml.etree import ElementTree as ET

import sys

import csv

#import matplotlib.pyplot as pylab

#usage python <this file name> <flowmonitor input file> <csv input file name>

et=ET.parse(sys.argv[1]) # flowmonitor input file

csv_filename= sys.argv[2] # csv input file

bitrates=0

losses=[]

delays=0

nSink = 0

with open(csv_filename) as csv_file :

csv_reader = csv.reader(csv_file, delimiter=',')

line_count = 0

average_energy = 0

for row in csv_reader:

if line_count == 0:

line_count += 1

continue

average_energy += float(row[0])

line_count += 1

for flow in et.findall("FlowStats/Flow"):

for tpl in et.findall("Ipv4FlowClassifier/Flow"):

if tpl.get('flowId')==flow.get('flowId'):

break

if tpl.get('destinationPort')=='654':

continue

losses.append(int(flow.get('lostPackets')))

nSink +=1

Page 59: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

45 | P a g e

rxPackets=int(flow.get('rxPackets'))

if rxPackets==0:

bitrates += 0;

else:

t0=float(flow.get('timeFirstRxPacket')[:-2])

t1=float(flow.get("timeLastRxPacket")[:-2])

duration=(t1-t0)*1e-9

bitrates += 8*float(flow.get("rxBytes"))/duration*1e-3

delays += float(flow.get('delaySum')[:-2])*1e-9/rxPackets

print(csv_filename)

print("Average Throughput = ", bitrates/nSink)

print("Average End-to-End Delay = ", delays/nSink)

print("Average Energy Consumed = ", average_energy/(line_count))

Page 60: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

46 | P a g e

APPENDIX 3

from xml.etree import ElementTree as ET

import sys

import csv

#import matplotlib.pyplot as pylab

#usage python <this file name> <flowmonitor input file> <csv input file name>

et=ET.parse(sys.argv[1]) # flowmonitor input file

csv_filename= sys.argv[2] # csv input file

bitrates=0

losses=[]

delays=0

nSink = 0

with open(csv_filename) as csv_file :

csv_reader = csv.reader(csv_file, delimiter=',')

line_count = 0

average_energy = 0

for row in csv_reader:

if line_count == 0:

line_count += 1

continue

average_energy += float(row[0])

line_count += 1

for flow in et.findall("FlowStats/Flow"):

for tpl in et.findall("Ipv4FlowClassifier/Flow"):

if tpl.get('flowId')==flow.get('flowId'):

break

if tpl.get('destinationPort')=='654':

continue

losses.append(int(flow.get('lostPackets')))

nSink +=1

Page 61: PERFORMANCE EVALUATION OF MANET PROACTIVE AND …

47 | P a g e

rxPackets=int(flow.get('rxPackets'))

if rxPackets==0:

bitrates += 0;

else:

t0=float(flow.get('timeFirstRxPacket')[:-2])

t1=float(flow.get("timeLastRxPacket")[:-2])

duration=(t1-t0)*1e-9

bitrates += 8*float(flow.get("rxBytes"))/duration*1e-3

delays += float(flow.get('delaySum')[:-2])*1e-9/rxPackets

print(csv_filename)

print("Average Throughput = ", bitrates/nSink)

print("Average End-to-End Delay = ", delays/nSink)

print("Average Energy Consumed = ", average_energy/(line_count))