You are on page 1of 79

DILLA UNIVERSITY

COLLEGE OF ENGINEERING AND TECHNOLOGY

SCHOOL OF COMPUTING AND INFORMATICS

M.sc Computer Science and Networking

Stable Energy-Aware Path Selection Method for Ad-hoc On-Demand

Distance Vector Routing Protocol in Non-Cooperative Nodes

By

Chimdesa Gedefa Gobena

Advisor: Dr. Ketema Adere

Dilla, Ethiopia

February 2023 G.C


DILLA UNIVERSITY

COLLEGE OF ENGINEERING AND TECHNOLOGY

SCHOOL OF COMPUTING AND INFORMATICS

M.sc Computer Science and Networking

Stable Energy-Aware Path Selection Method for Ad-hoc On-Demand Distance

Vector Routing Protocol in Non-Cooperative Nodes

By:

Chimdesa Gedefa

Advisor: Dr. Ketema Adere

This is to certify that the thesis prepared by Chimdesa Gedefa, entitled “Stable energy-aware
path selection method for Ad-hoc on-demand distance vector routing protocol in non-
cooperative nodes” and submitted in partial fulfillment of the requirements for the Degree of
Master of Science in Computer Science and Networking complies with the regulations of the
university and meets the accepted standards concerning originality and quality.

Approved by the Board of Examiner:

External Examiner: Name: ______________________ Signature: ________ Date: __________

Internal Examiner: Name: _______________________ Signature: ________ Date: __________

Advisor: Name: ______________________________ Signature: ________ Date: __________

Chairperson: Name: ___________________________Signature: _________ Date: __________


DEDICATION

To my beloved Family!!
ACKNOWLEDGMENTS

In every begging praise to the Almighty God who gave us endurance and courage from the
beginning up to this phase and I would like to thank my advisor, Dr. Ketema Adere, for his
guidance, direction, patience, and continuous encouragement throughout the time of my thesis
work.

Finally, my thanks go to all the people who have supported me to complete the research work
directly or indirectly.

i|Page
ABSTRACT
MANET is a group of wireless mobile nodes that form a dynamic network without the need for
any infrastructure. Because MANET is dynamic and has a finite amount of energy, it is
vulnerable to many non-cooperative node types. However, traditional MANET routing protocols
have no battery consideration parameter, and the node can get energy from the attached battery,
which means there is no energy recharge or replacement technique. Numerous research
techniques for identifying and preventing such non-cooperative node behaviors have been
offered to promote trusted, stable communication in such networks. Participating nodes must
collaborate in routing and forwarding for MANET to function as intended. Due to energy
limitations, a node may choose not to participate.

In this study, we suggest a "trusted stable energy-aware path selection" Ad -hoc on-demand
Distance Vector Algorithm (Proposed-AODV) based approach designed to capture non-
cooperative nodes and select a proper forwarder node for improving overall packet delivery of
the network and prolonging the network lifetime of MANETs. The approach takes into account
individual node residual energy and hop count to terminate non-cooperative nodes, thereby
extending the MANET network lifetime. To assess the proposed AODV routing protocols, we
have used NS2.35 as a simulation tool. And also, we have used normalized energy consumption,
PDR, E2E Delay, detection rate, and the lifetime of the network as performance metrics. Based
on the performance of our Proposed-AODV routing algorithm shows an average detection rate
of 8.7% more than the AODV routing algorithm, an Average extending network lifetime of 3.5%
more than the AODV algorithm, respectively and an Average normalized energy consumption of
Proposed-AODV 2.2% less than AODV routing algorithm. Generally, the simulation values
indicate better performance compared to the other existing strategies covered in the studies.

Keywords: MANETs, Residual Energy, Non-cooperative node, Network life time, AODV.

ii | P a g e
TABLE OF CONTENTS PAGES
ABSTRACT .............................................................................................................................. ii

List of Figures ........................................................................................................................... vi

List of Tables ........................................................................................................................... vii

List of abbreviations ................................................................................................................ viii

Chapter one: Introduction ............................................................................................................1

1.1 Background of the study ....................................................................................................1

1.2 Motivation for the study ....................................................................................................3

1.3 Statement of the problem ...................................................................................................4

1.4 Objective of the study ........................................................................................................5

1.4.1 General objective ........................................................................................................5

1.4.2 Specific Objectives ......................................................................................................5

1.5 Methodology .....................................................................................................................5

1.6 Scope and Limitation of the Study .....................................................................................6

1.7 Significance of the study....................................................................................................6

1.8 Thesis Organization ...........................................................................................................7

Chapter Two: Literature Review .................................................................................................8

2. Overview .............................................................................................................................8

2.1 Introduction to MANET ....................................................................................................8

2.1.1 Characteristics of MANET .........................................................................................9

2.1.2 Architecture of MANET ........................................................................................... 10

2.1.3 Application of MANET ............................................................................................ 11

2.2 MANET Routing Protocol ............................................................................................... 13

2.2.1 Proactive Routing Protocol ....................................................................................... 13

2.2.2 Reactive routing protocols ........................................................................................ 14

iii | P a g e
2.2.3 Hybrid routing protocols ........................................................................................... 16

2.3 Energy Management in MANET ..................................................................................... 17

2.3.1 Energy Constraints in MANET ................................................................................. 18

2.3.2 Energy Efficient Routing in MANET Approach........................................................ 19

2.4 Intermediate Node Participation Techniques in MANET ................................................. 20

2.4.1 Received Signal Strength .......................................................................................... 21

2.5 Related Work .................................................................................................................. 23

2.5.1 Energy-Based Efficient path selection Routing Algorithms in MANET .................... 23

Chapter Three: Proposed Method .............................................................................................. 28

3.1 Overview of the Proposed Work ...................................................................................... 28

3.2. Node Residual Energy .................................................................................................... 28

3.3 Proposed Algorithm Scenarios ......................................................................................... 29

3.4 Flow Chart and Pseudo Code of Proposed Algorithm ...................................................... 30

3.5 Proposed-AODV energy efficient path selection method ................................................. 32

Chapter Four: Implementation and Performance Evaluation ...................................................... 39

4.1 Simulation Tools ............................................................................................................. 39

4.1.1 NS2 Simulation Approach ........................................................................................ 41

4.1.2 NSG2.1..................................................................................................................... 41

4.1.3 NS-2 Network Animator (NAM) .............................................................................. 42

4.1.4 NS2 Simulation Steps ............................................................................................... 42

4.2 Performance Evaluation ................................................................................................... 43

4.2.1 Proposed Work Simulation Parameters for case study ............................................... 43

4.2.2 Implementation of AODV and detection of non-cooperative nodes in AODV routing


protocol ............................................................................................................................. 45

4.2.3 Implementation of Proposed-AODV Algorithm ........................................................ 47

iv | P a g e
4.2.4 Performance Metrics ................................................................................................. 48

4.3 Simulation Results and Discussion .................................................................................. 49

4.3.1 Average End-to-End Delay ....................................................................................... 50

4.3.2 Packet Delivery Ratio ............................................................................................... 51

4.3.3 Normalized energy consumption ............................................................................... 52

4.3.4 Detection Rate .......................................................................................................... 53

4.3.5 Network Lifetime ..................................................................................................... 54

Chapter Five: Conclusion and Future Work ............................................................................... 55

5.1 Conclusion ...................................................................................................................... 55

5.2 Summary of our contributions ......................................................................................... 55

5.3 Future Work .................................................................................................................... 56

List of References ..................................................................................................................... 57

Appendix .................................................................................................................................. 61

v|Page
List of Figures
Figure 1.1: Effect of Non-cooperative node in MANET [5] .........................................................3
Figure 1.2: Methodology used .....................................................................................................6
Figure 2.1: Mobile ad hoc network topology ...............................................................................8
Figure 2.2: Architecture of MANET [13] .................................................................................. 10
Figure 2.3: Military application of MANET [14] ....................................................................... 12
Figure 2. 4: Emergency rescue application of MANET [15] ...................................................... 12
Figure 2. 5: Types of Routing protocol [7]................................................................................. 13
Figure 3.1: Proposed work Algorithm Flow Model.................................................................... 31
Figure 3.2: Detection of Non-cooperative nodes ........................................................................ 32
Figure 3.3: Algorithm for routing and path selection ................................................................. 33
Figure 4.1: Basic Architecture of NS-2...................................................................................... 41
Figure 4.2: Implementation of non-cooperative nodes ............................................................... 46
Figure 4.3: Communicating Between S and D via Node 12, 2, 0 using Proposed-AODV ........... 47
Figure 4.4: Average End-to-End Delay...................................................................................... 50
Figure 4.5: Packet delivery ratio. ............................................................................................... 51
Figure 4.6: Normalized energy consumption ............................................................................. 52
Figure 4.7: Detection rate .......................................................................................................... 53
Figure 4.8: Network lifetime ..................................................................................................... 54

vi | P a g e
List of Tables
Table 2.1: RREQ Information ................................................................................................... 15
Table 2.2: RREP information .................................................................................................... 15
Table 2.3: RERR Information.................................................................................................... 15
Table 2.4: Summer of related work ........................................................................................... 26
Table 4.1: Analysis of Network Simulator ................................................................................. 40
Table 4. 2: Parameters details for simulation ............................................................................. 45
Table: 4.3: Experiment of simulation result ............................................................................... 49

vii | P a g e
List of abbreviations
ACIDS Accurate and Cognitive Intrusion Detection System

AODV Adhoc On-demand Distance Vector

AOMDV Adhoc On-demand Multi path Distance Vector

API Application Programming Interface

CBR Constant Bit Rate

CNE Current Node Energy

CPU Central Processing Unit

DoS Denial-of-Service

FSR Fisheye State Routing

IEEE Institute of Electrical and Electronics Engineers

IN Intermediate Node

INE Incoming Node Energy

IZN Inner zone Node

LAR Location-Aided Routing

LTV Lower Threshold Value

MANET Mobile Adhoc Network

MZN Middle Zone Node

NAM Network Analysis Module

NS-2.35 Network Simulator version 2.35

OMNeT++ Objective Modular Network Testbed

OTCL Object Tool Command Language

OZN Outer Zone Node

viii | P a g e
PDR Packet Delivery Ratio

PHS-AODV Path-Hop-based Secure AODV

QoS Quality of service

RE Residual Energy

RERR Route Error

RREP Route Reply

RREQ Route Request

RSS Received Signal Strength

SEAPS Stable Energy-Aware Path Selection

ST-AODV Secure Trust-Based approach based on AODV

TORA Temporally Ordered Routing Algorithm

UDP User Datagram Protocol

UTP Upper Threshold Value

WLANs Wireless Local-Area Networks

WMANs Wireless Metropolitan-Region Networks

WPAN Wireless Personal-Area Networks

WWAN Wireless Wide-Area Network

ZRP Zone Routing Protocol

ix | P a g e
Chapter one: Introduction
In this, the research background, basic fundamental concepts of MANETs, motivation, statement
of the problem, research question, objective, methodology, scope, limitation, and significance of
the study are described.

1.1 Background of the study


A network is a group of two or more devices that are connected to share a resource. In practice, it
is a collection of diverse computer systems linked together either physically or logically.
Networks are categorized into two primary types based on this broad concept and based on
infrastructure. The globe has recently witnessed significant technological advancements in the
field of wireless communication networks. In wireless communication, there are two main parts,
which are infrastructure-based and infrastructure-less networks. Because of the rapid
advancement of mobile computing (including smartphones, computers, handheld digital devices,
PDAs, or wearable computers), we are witnessing a revolution in our daily lives. With the
advancement of ubiquitous computing, when people utilize several electronic devices
simultaneously to obtain all the information they require, whenever they require it, we have
moved from the age of one computer device per person [1].

MANET is an ad hoc wireless communication network without an infrastructure; it is also


autonomously configured and controlled, lacks centralized management, and exhibits dynamic
behavior with communication taking place between the participating nodes. MANET's primary
design purpose is to enable network connectivity between nodes from anywhere at any time,
regardless of their geographic location. MANET has gained high interest in doing research, and
their applications range widely used in commercial, military, and tactical applications. In nature,
MANETs are multi-hop networks with dynamic network topology. In MANET, nodes by
themselves act as routers and hosts for forwarding and receiving packets. Due to its dynamic
topology and the absence of a central controlling mechanism, link breakage happens. In
MANETs, this problem occurs in different ways. One is in the case of node mobility, the second
is due to node energy, and the third is due to attack [2].

1|Page
Routing is the process of choosing a data transmission channel from a source to a destination. In
MANET, routing selection is a critical issue because of dynamic network topology and node
mobility with varying geographic conditions. So, finding and controlling a path from source to
destination until the communication is complete is difficult. Several different routing protocols,
the majority of which are adapted from wired networks, have been suggested for MANETs.
These routing protocols have a lot of issues with path creation which means during route
discovery and route maintenance when the path between two communication nodes was broken
AODV is a top choice for a routing protocol, according to comparative studies of several routing
protocols [3].

In the MANET, each node depends on the cooperation of other nodes to forward packets to their
intended locations. The extremely dynamic MANET nodes could cause this network topology to
shift quickly. Over an ad-hoc network's link layer, MANET features a routable networking
environment. It may function independently or as a component of the wider network. Even
though each node in the MANET passes traffic to its neighbors, each node functions like a
router. However, some nodes behave in an uncooperative manner and will not collaborate with
other nodes [4]. So, instead of participating in the AODV routing system, these uncooperative
nodes are responsible for packet loss and delay. Furthermore, non-cooperative nodes in MANET
may drop all or a subset of packets. A non-cooperative node has a potentially deadly impact on
MANET since it affects the performance of the network as a whole. The limited battery power of
a node is one of the most critical challenges for link breakage in MANET. Sending and receiving
packets consumes more energy during the routing process because of this non-cooperative node.
To do their functions, the nodes have no way of getting battery energy; simply put, the node can
get its power from the attached battery. If the node does not have enough energy, a non-
cooperative node has occurred during transmitting and receiving of the packet, causing link
breakage [4].

The characteristics of non-cooperative nodes

 Increasing delaying packets.


 Non-participation in the routing process as well as no transmission or response to
HELLO messages.
 Data packets are being dropped.

2|Page
Figure 1.1: Effect of Non-cooperative node in MANET [5]

1.2 Motivation for the study


This study that is now being investigated the most is ad hoc networks. One of the ad hoc
networks in particular is MANET. Because of the advancement of wireless technology and the
interest of the network community, MANET has recently attracted greater attention. Nowadays,
MANET is becoming more important. Therefore, MANETs have several distinctive features and
difficulties, including topology changes, resource and energy constraints, QoS problems, security
issues, and no trusted centralized authority. From those lists of challenges, energy constraint and
security are an open area of research which is not fully addressed and still needs more research
work [6]. Energy and security are not considered while the MANET routing protocol is designed.
That is why energy and security are two of the major problems in MANET. It is possible to
measure trust and establish a reliable path between sender and receiver when every node in the
network stores data about its collaborating neighbors. A node transmits data packets to its
neighbors regularly and receives updates on their cooperative status via the existing AODV
protocol. During the route discovery phase, the source node transmits the RREQ packet to its
neighbors and begins the path to the destination. The receiving node adds its cooperation status
information (true or false) to the message and rebroadcasts it until it reaches its destination. So,
the destination node uses the hop count as well as the path's cooperative state to select the
cooperative stable path, and then the destination node sends the RREP packet along the
identified trusted cooperative stable path [7].

3|Page
Mobile nodes in mobile ad-hoc networks are distributed randomly throughout the network. The
topology of the MANET network is continually changing due to limited energy and random
mobility, which frequently causes non-cooperation between communication nodes. Our primary
goal is to capture non-cooperative nodes that have a trusted stable, energy-aware path selection
method in the AODV routing protocol.

1.3 Statement of the problem


MANET is a wireless network without a base station and has self-configured nodes. The
dynamic nature and limited node energy in MANETs lead to link breakage, which becomes one
of the biggest communication challenges in MANET [8]. The node's portability and the energy
limitations, storage, and processing resources, are the main characteristics of MANETs. Because
of their mobility and limited energy, nodes are not always connected. New paths between nodes
should be examined, and routing tables should be changed to reflect the new network topology if
this occurs. A non-cooperative node is one of the key obstacles to data delivery in MANETs.
Typically, a non-cooperative node will not participate in the transfer and receiving of packets,
causing major network performance issues [9].

The key issues for MANET design can be classified into the following categories: Finding the
optimal route pathways in networks is the main challenge, and the next is minimizing energy
consumption during data transmission from source to destination.

To solve the above issue, we have proposed a trusted stable energy-aware path selection method
for capturing non-cooperative nodes. To increase the performance of the entire network, this
algorithm chooses the best route based on the average residual energy of each node and trust-
based detection during the route discovery phase and the actual data transmission phase. Hence,
this study aims to answer the following research questions: -

RQ1. How does the stable energy path selection method improve the performance of the overall
network in MANET?

RQ2. How does a detecting non-cooperative node happed because of node-limited energy in a
Mobile ad hoc network?

RQ3. How do non-cooperative nodes affect the network performance of MANETs?

4|Page
1.4 Objective of the study
1.4.1 General objective
The main aim of this thesis is to establish a trusted stable energy-aware path selection method for
the AODV routing protocol in non-cooperative nodes.

1.4.2 Specific Objectives


To achieve the overall goal, the following specific aims are formulated:

 To understand and identify the best existing MANET routing protocol.

 To identify the reason why non-cooperative nodes, happen in MANET.

 To design a trusted, stable energy-aware path selection method that can capture non-
cooperative node behavior by AODV routing algorithms.

 To implement the proposed algorithm under the AODV algorithm, simulate the proposed
algorithm using the NS2 simulation tool, and measure its performance.

1.5 Methodology
Different approaches will be used in this study to achieve general and specific goals. The first
step is to perform a comprehensive literature review to gain a better understanding of the
research field and it is domain issue. The importance of prior work in the area of ad-hoc routing
systems is highlighted in this literature. Existing works relevant to this research study were
evaluated to identify and point in the right direction for solving the problems that were
discovered.
The literature developed for some non-cooperative nodes is also discussed, along with their
limitations, in this thesis work. And then, a Proposed-AODV is modeled and designed, adding
the specified parameters. The proposed AODV was then deployed with performance
improvements by modifying the existing AODV routing algorithm. Appropriate simulating
scenarios have been used as a simulation platform for this thesis work and the implementation of
AODV in those simulators is also studied. To study the effect of those parameters that we
consider, the modified routing protocol is simulated in the absence of all or a few of the
parameters that we have now added. The effectiveness of the path selection mechanism and
capturing non-cooperative nodes is evaluated by using our modified method of AODV and the

5|Page
existing AODV protocols as a comparison. The protocol extends network lifetime and packet
delivery ratio while minimizing energy consumption and end-to-end delay. To achieve the above
objectives, the following steps are used: conduct detailed research, design the model, and
implement it. In Figure 1.2 below, the methodologies used in this thesis study are summarized.

Figure 1.2: Methodology used

1.6 Scope and Limitation of the Study


The scope of this study is to determine and adjust trust-stable energy-aware path selection to
capture non-cooperative nodes by using the proposed AODV method. Since a non-cooperative
has happened in different cases, this study limits non-cooperative by node-limited energy
specifically on packet dropping and If any malicious nodes are available in the network it is not
considered in this study.

1.7 Significance of the study


An uncooperative node present because of limited node energy is the main issue in MANET,
which causes link breakage. Therefore, a trusted stable energy-aware algorithm for capturing
non-cooperative nodes is needed to improve the performance of an overall network. Here, the
following lists illustrate the significance of the study: -

 It reduces link breakage, detects non-cooperative nodes, and increases network lifetime.
 It reduces the dropping of data packets by non-cooperative nodes and increases the
network performance of MANET.
 It minimizes energy consumption.

6|Page
1.8 Thesis Organization
The remaining chapters are arranged in the following order:

Chapter Two: Provides an overview of existing routing protocols in the literature review, as well
as their advantages and disadvantages in MANETs, and introduces related works that are carried
out for data routing and are more closely related to our work.

Chapter Three: The Design and Explanation of the Proposed Work, Model, and Methods are
presented in this chapter.

Chapter Four: In this chapter, the proposed algorithms are subjected to a thorough simulation
analysis and evaluation.

Chapter Five: in this chapter, the research conclusion and future work are presented.

7|Page
Chapter Two: Literature Review
2. Overview
To accomplish the main aim of this thesis, various resources, such as books, research papers,
magazines, and other documents, have been reviewed. To understand basic concepts of the
MANET and other related areas which helps us in our work has been reviewed to achieve the
goal of this study. This chapter addresses several different routing protocols that are utilized in
MANET as well as the latest studies on MANET.

2.1 Introduction to MANET


In the 1970s, the wireless network started to take off in the communications sector. These
networks provide mobile users with access to information and capabilities for ubiquitous
computing wherever they may be. Mobile wireless networks fall into two categories:
Infrastructure-based and infrastructure-less networks (multi-hop) The infrastructure network is
connected by a wired link running from one base station to another base station. There are no
fixed routers in an infrastructure-less network; instead, any node can function as a router. Each
node can move around and connect to other nodes dynamically in any way. Infrastructure-free
networks are also known as mobile ad hoc networks [10]. The following figure shows the
MANET's overall structure.

Figure 2.1: Mobile ad hoc network topology

8|Page
MANET is an ad hoc wireless communication network without an infrastructure; it is also
autonomously configured and controlled, lacks centralized management, and exhibits dynamic
behavior with communication taking place between the participating nodes. MANET's primary
design purpose is to enable network connectivity between nodes from anywhere at any time,
regardless of their geographic location. MANET has gained high interest in doing research, and
their applications range widely used in commercial, military, and tactical applications. In nature,
MANETs are multi-hop networks with dynamic network topology. In MANET, nodes by
themselves act as routers and hosts for forwarding and receiving packets [10].

Multi-hop paths are used for communication in MANET. The wireless medium is shared by the
nodes in the MANET, and the network's topology is unpredictable and dynamic. Due to the
nodes' freedom to move, communication links in MANET frequently break. The number of
nodes and their density varies depending on the applications for which MANET is used [11].

2.1.1 Characteristics of MANET


According to written articles [10] [12], MANET has the following characteristics:

 Lack of fixed infrastructure: There is no pre-existing infrastructure, such as wired


access points or base stations, where a device can serve as a router or a host.

 Dynamic Topology: Node mobility (in and out) in the network is arbitrary and random.
As a result, the network topology is constantly changing and unpredictable.

 Multi-hop Communication: Every node act as a router, forwarding packets to each


other and allowing mobile nodes the purpose of information sharing.

 Limited resource: The battery power, CPU speed, and storage capacity of mobile nodes
are all limited.

 Limited Bandwidth: Due to wireless connectivity, MANET is more vulnerable to


physical attackers such as spoofing, eavesdropping, and denial of service attacks (DoS).
It’s more vulnerable to attacks than infrastructural networks.

 Limited device Security: Nodes enter and exit the network without having to
authenticate themselves. Then nodes are subject to a variety of security threats.

9|Page
 Distributed Operation: There is no central administration, which means that network
control is divided among several nodes that provide specialized activities such as routing
and security.

 Poor transmission quality: This is a typical issue in wireless communication brought on


by various error sources that degrade the signal.

 Scalability: A network can provide an adequate level of service even in the presence of a
large number of nodes.

2.1.2 Architecture of MANET


The architecture of MANET is illustrated below: -

Figure 2.2: Architecture of MANET [13]

The above figure tells us, the architecture has three parts that are enabling technologies,
networking, and middleware and applications.

Enabling Technologies: Based on their geographical coverage, it divided into further:

PAN (Personal Area Network): - it covers up to 10 meters; used to connect the mobile device as
well as stationary devices.

10 | P a g e
WLAN (Wireless Local Area Network): - this can connect up to 100 or 500 meters, for
buildings.

Networking: - The first initial concept of networking protocols is for one-hop transmission
service, which is given by the enabling technologies to address end-to-end reliable
communication within the network from the data sender to the data receiver. The architecture is
created specifically for networking protocol functionalities, and redesigned is required for self-
controlling, self-configuring, dynamic, unstable, and peer-to-peer communication environments.
Nodes have multiple ways of the communication channel, which helps to find the path to the
destination. So, to incorporate end-to-end communication the sender should find the destination
within the network, there is a location service concept that maps dynamically the address of the
receiver device to its present location in the network range.

Middleware and Applications:- wireless technologies such as Bluetooth, Wi-Fi, WiMAX,


Hyper LAN, and IEEE 802.11 encourages ad-hoc network deployment and new ad hoc network
applications specifically used for disaster recovery, emergency service, and also environmental
monitoring purpose. The versatility of MANET makes this type of innovation adaptive for some
of the practical situations like in a PAN, home networking, law enforcement operations,
educational and commercial applications, and sensor networks.

2.1.3 Application of MANET


MANET networking is gaining significance as the use of mobile devices grows and wireless
communication progresses because of the expansion in the number of widely used applications.
Without a central infrastructure network, this network occurred anywhere and at any time
without any geographical locations. Ad-hoc networks allow devices to stay connected to the
network while also allowing for the easy addition and removal of devices.

Some of MANET applications: -

Police area exercises or military battlefield: Ad-hoc networks can be useful for creating
messages among a cluster of soldiers for a strategic operation, and also allowing the military to
use a common location and military information headquarters. Military things such as airplanes,
tanks, and warships are another feature that makes MANET incredibly valuable and allows it to
fit into the military installation.

11 | P a g e
Figure 2.3: Military application of MANET [14]

Commercial sector: An emergency rescue operation is another common scenario in which an


MANET is used. The ad-hoc mode of message is mostly effective in the fields of community
safety and search. When medical professionals hurry to a crisis region to treat patients, they need
to be able to communicate quickly and effectively. Medical teams can use mobile nodes such as
laptops or other PDAs to interact with the hospital and their on-site medical teams over a
wireless link.

Figure 2. 4: Emergency rescue application of MANET [15]

Local level: it’s using laptops and computers, ad-hoc networks can establish an instantaneous,
transient multimedia network, such as conferencing, to transmit and share information among
conference, meeting, or classroom participants.

12 | P a g e
2.2 MANET Routing Protocol
MANET’s routing is a hard topic that needs a more flexible and robust system to locate and
maintain routes because of the mobility that causes frequent network topology changes. MANET
routing methods must cope with a variety of issues, including QoS, security issues, and restricted
energy usage, in addition to addressing topology changes. For wireless and mobile networks,
numerous routing techniques have been developed. In wireless and mobile networks, the
essential function of routing protocols is to identify or acquire route information and maintain it
by mobile nodes.

Figure 2. 5: Types of Routing protocol [7]

2.2.1 Proactive Routing Protocol


Table-driven routing protocol is another name for this routing protocol. In this type of routing
system, each node stores routing tables that contain network topology information, which they
periodically exchange over communication. This routing information is broadcast all over the
network so that it will reach all the nodes. Most of the time, proactive routing protocols are not
used in vast networks because they need to update the entire network if there is a topology
change. Some of these routing protocols like Fisheye State Routing (FSR) and Destination
Sequenced Distance Vector (DSDV) protocols [16].

13 | P a g e
2.2.2 Reactive routing protocols
On-demand routing protocol is another name for this routing protocol. In this type of routing
system nodes do not regularly store network topology information; unlike proactive routing
protocols, it applies the route-finding procedure and only shares routing information when a
specific node has to interact with a destination. The main advantage of this protocol is that it uses
less advertisement information and improves routing efficiency by preventing the use of the stale
route. Among the many protocols in this category, Dynamic Source Routing Protocol (DSR),
Temporally Ordered Routing Algorithm (TORA), Ad-hoc on-demand Multi-path Distance
Vector (AOMDV), and Ad-hoc on-demand Distance Vector (AODV) [16].

2.2.2.1 Ad-hoc on-demand Distance Vector

It is an on-demand routing protocol that uses a route request broadcast mechanism to compute
routes on demand. Traditional routing tables with one entry per destination are used by AODV.
RREQ, RREP, and RERR are the three control packets in AODV. The routing tables entries in
this protocol are used to send a route request to the destination node then the destination node
sends a route reply back to the source node and the source node forwards data packets to the
destination node. At each destination node, sequence numbers are kept to detect the route's
freshness and to prevent looping and attack. These sequence numbers are carried by all routing
packets in the given network. It maintains timer-based states in each node to ensure that
individual routing table entries are used effectively, and it removes older useless items from the
table. Every route table item has predecessor node sets, which indicate the neighbor node sets
that use that entry to broadcast packets. When the next hop link fails, these nodes receive route
error packets.

AODV has three control packets such as: -


Route Request (RREQ): - is a control message that establishes the communication path
between two communicative nodes. The RREQ field provides the following information in the
routing table: -

14 | P a g e
Table 2.1: RREQ Information

Source Node Source Packet Destination # (D_seqno is Hop count


Sequence broadcast ID Node unknown During
Number RREQ)

Route Reply (RREP): It is an acknowledgment; the destination node or intermediate node that
knows about the route to the destination or has a valid route that unicasts a route reply message
back to the sender is accountable for this reply. As a result, the format of this reply message is as
follows: -

Table 2.2: RREP information

Source Node Destination Destination Sequence Hop count Life-time


Address Node Address Number
The source node can broadcast the RREQ, but the destination nodes can only unicast the RREP.
This is because every node stores a route back to the source node during the forwarding of the
RREQ message, indicating that the node knows where to travel.

Route Error (RERR): During the communication, all the nodes can monitor their neighborhood
nodes if they are found within the range, so if the node loses the active route, a route error
(RERR) is generated to notify the route of a link failure.
Table 2.3: RERR Information

Packet Type Received Destination Count


Destination IP Address Unreachable
Destination Sequence Number Unreachable
Additional Destination IP Address Unreachable (if needed)
Additional Sequence Number for an Unreachable Destination
Why AODV protocol is selected? Because on [14] [17].

 Bandwidth utilization: AODV can use maximum utilization of bandwidth, which can
make this algorithm the best and get high attention and achievement. The demand for
available bandwidth is lower, and each node has a sequence number that increases
monotonically and is maintained by each node to ensure that the way is active or fresh.
15 | P a g e
 Simple: Individual node functions as a router, simply keeping the routing table, starting
requests for path discovery from the source, and finally allowing the network to start up
on its own.
 The most efficient route information: Following the broadcast of the RREQ and
delivery of the packet by the nodes, each node propagates the RREP before seeking the
RREP with the fewest hops, updating its routing information to reflect the chosen best
path, and propagating it.
 Most existing routing information: routing information is retrieved based on a reactive
algorithm, and the node receives it and chooses the optimal route based on the highest
destination sequence number, updates the routing information with the most recent route,
and then sends using that route.
 Loop-free routes: AODV uses a simple tactical logic of nodes to build loop-free routes
by eliminating bad packets with a similar broadcast id.
 Managing broken links and dynamic topology: Assume that the topology is changing,
the node is migrating, and the active path links are severed. The intermediate nodes can
find the RERR to the source node to skip this link because the current path has a broken
link. To ensure a quick response for the broken connection on the path, the source node
continues the path discovery procedure if it still requests the path.
 Highly scalable: The AODV method is extremely scalable, which means it has low
space complexity and can handle enormous networks.

2.2.3 Hybrid routing protocols


A protocol in this category employs both proactive and reactive routing techniques to meet the
limitations of these classes, such as delay and control overhead. This routing protocol tries to
optimize the benefits of both proactive and reactive routing (to decrease control overhead) by
utilizing proactive routing techniques in small networks (to reduce latency) and reactive routing
schemes in big networks. The Zone Routing Protocol is one instance.

Advantages and Disadvantages of MANET

The following lists are the main advantages of MANET:

 MANET has various benefits over an infrastructure network. Among these:

16 | P a g e
 Regardless of the mobile nodes' dynamic nature, the mobile nodes enable access to
services and information.
 They are a type of network that can be quickly set up anywhere at any time and is cost-
effective.
 MANETs are multi-hop networks with autonomous terminals and dynamic topologies
that do not require a centralized server for infrastructure development.

The following lists are the main disadvantages of MANET:

 They have limited bandwidth.


 They have limited battery.
 They don’t support Authorization.
 Due to the volatile nature of nodes, it is difficult to detect malicious nodes.
 The protocols which are used for the wired network are not supported by a wireless
network.
The mobile nodes are operating their activities on an expendable source of energy. Those
functions required more energy and may the node to lose its energy before the activities are
done. Imagine, if the node wants to transmitter and receive the data, it needs energy for starting
the route and performing the network activities. In this case, the routing process consumes more
energy [18].

2.3 Energy Management in MANET


In mobile ad hoc network technologies, energy efficiency is the greatest priority, and those
technologies depend on battery-operated devices that are used for a variety of applications.
Various investigations on energy-saving techniques, such as self - assembly, changing the state
of mobile nodes, and introducing mobility models, have been authored in [19] [20]. Even though
a few investigations have looked into ways to reduce energy consumption, more research on
effective energy use is still needed to improve and prolong the performance and lifetime of the
mobile network. Following reference [20], MANET energy management is categorized into
mobility node approaches based on energy usage.
Mobility-based approaches: Mobility helps the mobile network use less energy by distributing
its energy consumption across all of its mobile nodes, extending the network's lifespan. The
mobile network's mobility depends on the mobile network application being used. Here, the

17 | P a g e
mobile nodes are either made by the hole, the special nodes, or both. To collect data and send it
to a static sink or mobile sink depending on the network's needs, mobile nodes move around the
deployment area. The network's mobility model is dependent on the application domain.
Mobility modes can be classified broadly into [20] the following:

 Uncontrolled mobility: The mobile nodes move randomly and exhibit a variety of motion
characteristics, including variable speed, variable direction, and variable trajectory. With
regular data routing from source to destination, node movements are unpredictable
because they are uncontrolled.

 Predictable mobility: the nodes' motion is steady or unaltered. Using its predetermined
trajectory, the mobile node predicts the timing of data transfer. Keeping the mobile node
active when sending data instead of switching to sleep mode to conserve energy,
increases energy efficiency.

 Controlled mobility: The user has control over how the nodes move. It is preferable to
use this kind of mobility model to increase connectivity and data distribution.

2.3.1 Energy Constraints in MANET


Energy constraint is the big challenge in MANET, the nodes are performing their operation with
limited battery; this battery has limited working capacity to forward the packet. In the mobile ad
hoc network energy consumption and power failure is the critical issue of packet forwarding. So,
the node performances are caused by this issue, which affects packet forwarding and the overall
network lifetime. Hence, power-aware routing algorithm design is an essential thing in the
MANET environment [21].

Routing protocol requires energy to find the best path, to say MANET is effective, a stable
routing protocol is necessary; routing can select the best way from source to destination. With its
logical structure of the routing protocol, the packet transmits over multiple hops to get to the
destination and to deliver the packet.
In a general, routing is the process of establishing a path in a network with some predefined
metrics for transmitting packets. In Open System Interconnect (OSI) reference model, the routing
process is very important, and it is the nucleus for any multi-hop network system like MANET
which helps to perform proper functions.

18 | P a g e
However, this efficient routing protocol design is influenced by several challenges due to the
different constrained resources of MANET devices, such as limited memory of the node,
processing capability, bandwidth, and battery power life.
During the communication, some MANET devices or nodes die out when they are performing
their work which comes due to limited battery life. Energy is one of the core things because the
mobile nodes are facilitating based on an already charged battery.
Due to the limited energy, a non-cooperative node has happened, which affects the reliable
transmission of a data packet. It becomes a big area of consideration to design a stable energy-
aware path for the MANET routing protocol that could detect non-cooperative nodes and
increase the overperformance of the MANET network.
To forward the packet, the nodes are using their charged battery, because they do not have a
recharging mechanism or on-line charging system which is why the limited battery is a big
challenge in MANET. At the same time, each node can act as both an end system and a router.
Therefore, if the nodes have no enough energy to broadcast the packet, it will cause packet loss.
Due to the absence of an online battery charging mechanism, it creates a non-cooperative node,
so an energy utilization algorithm is necessary for stable MANET communication [22].

2.3.2 Energy Efficient Routing in MANET Approach


A mobile node consumes its energy not only when it is actively sending or receiving packets, but
also when it is inactively participating in the network for establishes communication requests
from other nodes. Thus, energy-efficient routing protocols minimize either the active
communication energy required to transmit and receive data packets or the energy during
inactive periods.

To design an energy-efficient algorithm three common methods are highly dedicated to


achieving communication and increasing the network performances with network connectivity,
network functionality, and network lifetime [23]. It is very important to establish stable energy
and path between the communicating nodes. Those methods are namely: -
Transmission Power Control (TPC) method
This method is based on power control. The energy is controlled during the transmission and
receiving of data.
The goal of this method

19 | P a g e
 To minimize the total energy, and avoid the low-energy nodes

 To minimize the total energy while considering retransmission or taking bidirectional


requirements

Sleep or Power down method


The sleep or power down method, as its name implies, conserves the node battery when it is not
in use. When there is no data to transmit or receive, each node can conserve energy by switching
to sleep or power-down mode or by simply turning it off. This results in significant energy
savings, particularly in network environments where communication activities have a low-duty
cycle. To ensure data delivery, however, even if the majority of nodes are inactive and don't
forward packets to the other nodes, a well-designed routing protocol is necessary.
The goal of this method

 To minimize energy consumption during inactivity.

Load Balancing method (LBM).


It seems like, in the TPC approach, node powers are saved when the nodes are actively
participating in the network operations.
The goal of this method

 To balance energy usage among the nodes and maximize network lifetime by avoiding
over-utilized nodes when selecting a routing path.
So, those three methods are used for increasing the network life time by minimizing the energy
consumption of MANET nodes.
The former category of a protocol can adjust the nodes which are actively and belongs to the
communication energy, so each node has enough radio power to reach the receiving node. In the
proposed work, our algorithm is focused on this approach because this approach is better to
determine the optimal routing path by minimizing the total energy required for delivering the
packet to the destination.

2.4 Intermediate Node Participation Techniques in MANET


In MANET, nodes can communicate themselves without wire, instead of this, they use a wireless
medium which is radio frequency. When the S node wants to send the data to the D node, the
data is carried through the signal. Mobile ad-hoc networks have different routing determination

20 | P a g e
criteria. Those criteria are used to make the best decision; mostly MANET routing protocols use
packet loss, latency, and hop count, which helps determine the stable path for data routing
purposes. It has also different situational causes where these data do not provide enough detail
information to select the best routes. But, using received signal strength and node residual energy
is better to improve the challenges which are faced in MANET routing protocols [24].

2.4.1 Received Signal Strength


The AODV protocol has three control packets, including RREQ, RREP, and RERR, by MANET
routing protocols. If the source node transmits the data to a nearby node, the receiver node must
assess the RSS, or how much signal is flowing in from the outside. It is a measurement of the
strength of the radio signal that was received. Nodes can measure the RSS of neighboring Wi-Fi
and Bluetooth Low Energy (BLE) devices by employing an accurate Wi-Fi position monitor and
a Bluetooth beacon tracker.
The RSS values are measured in dBm and typically have negative values, ranging between 0
dBm, which is an excellent signal, and -110 dBm, which is an extremely poor signal. The main
thing that we are going to keep in mind is that RSS does not decrease linearly as the distance
increases, and it is also affected by different factors, such as the device antenna that is
transmitting, the antenna of the node itself, the number of walls and other obstructions in the
proximity of the nodes, and the number of nodes.
Based on the RSS, nodes that have the capability of broadcasting the given packet or
participating in the route discovery are selected based on their RSS values. By using node
estimation zones in [25], the transmission area around each node is divided; these divisions are
based on the strength of the received signal from the sender, with three different zones: the inner
zone node, the middle zone, and the outer zone. This zone classification limits packet flooding,
which means controlling the packet. So, route discovery is processed by only the middle zone
nodes; the inner zone is removed to reduce the hop count, and the outer zone nodes are ignored
to reduce broken links or avoid certain node partitions in the network.

Authors in [26], the three different zones are classified based on RSS, to do this, a packet
received signal strength technique is required to classify the nodes with their group of categories.
During this process, a transmission power control approach should be used for total transmission
power cost reduction between the source node and the destination node. This approach achieved

21 | P a g e
two ways of measuring transmission power, which are the variable and constant transmission
power approaches. The variable transmission model tells us the radio transmission power is
controlled and can be viewed as a requirement, while the constant transmission power model
works with the fixed transmission power value. So, the protocols that belong to the transmission
power control can select the best path, which is usually the path that consumes the least energy to
reach the destination. Therefore, the nodes that have a higher transmission power can have the
ability to reduce the hop count, and the nodes that have a lower transmission power can increase
the hop count, but the middle-power transmission is better for hop count, link breakage, and
packet overhead issues. In this condition, middle zone nodes have the responsibility of
broadcasting the packet.
Working with RSSI Value
For this paper we use RSSI type to adapt Two Ray Ground model for calculating the signal
strength of the given network;
The formula is given below based on Two Ray Ground model [27]: -
Pt ∗ Gt ∗ Gr ∗ ht 2 ∗ hr 2
𝑃𝑟(𝑑)
d4L
When: -
Pr: Power received at distance d d: Distance from the transmitter
Pt: Transmitted signal power ht: Transmitter antenna height
GT: Transmitter gain hr: Receiver antenna height
Gr: Receiver gain
Received signal strength can vary due to multi-path, interference, or other environmental effects;
it may not give a true indication of communication performance, because these factors tend to
fluctuate the RSSI values.
Each mobile host participating in the ad-hoc network maintains a route cache in which it caches
source routes that are learned in the two-ray ground model of measuring the signal strength using
the RSSI route information.
During route discovery, each node with in the network gets the RSSI values before sending the
frame/messages of any kind from any of the mobile addresses.

22 | P a g e
2.5 Related Work
To support the idea of this work, similar works on MANET have been assessed by different
researchers.

2.5.1 Energy-Based Efficient path selection Routing Algorithms in MANET


In [28], the authors proposed Energy efficient path selection in MANET, in this work the authors
discussed important routing protocol issues and designed new modified algorithms based on the
residual energy of the node. Here, the modifications are applied during the route discovery time
of the node, which means when the source node wants to communicate with the destination, and
also the modification is made before processing the RREQ by using the received signal strength
and residual energy of the node, after processing the RREQ and after broadcasting the RREQ in
terms of jitters which are imposed into RREQ message. The results show that the combined
modified DSR and AODV namely, MDSR and MAODV reduced link breakage in MANET. But
this method has no long path establishment way because it uses total energy consideration.

Authors [8], have presented a routing technique based on remaining battery capacity to prolong
the life of MANETs. In this proposed work, the authors describe that, due to the dynamic nature
of MANET, the routing of packets is a challenging task. when the network is divided or
partitioned in the case of mobility and node battery, which leads to link breakage. So, the authors
wrote that an energy-aware routing algorithm is needed for MANET. Here, the main focus of the
authors is simulating the existing MANET routing protocols based on different metrics like
energy consumption, packet delivery ratio (PDR), throughput, end-to-end delay, overhead, and
network lifetime. The destination node can select the path by comparing the residual energy of
all other nodes that are paired with the source and destination. The results show us, the DSR
algorithm has better performance than AODV with a small network based on network lifetime,
but the network lifetime in a large network is still an issue.

Authors [29], have addressed a novel energy efficient obstacle aware routing algorithm for
MANETs. In this paper, the authors discussed MANET route failures or frequent routes broken
with the presence of obstacles. Stable route searching consumes lots of energy; because of this
many nodes fall below the threshold value which leads the node to be inactive. Due to such kind
of problem, the performance of mobile ad hoc network degrades. Hence, to overcome this

23 | P a g e
problem, the authors proposed a novel energy-efficient and obstacle-aware routing algorithm
developed for considering obstacles in real MANET operations. The authors used maximum
total residual energy; it is done by appending node energy and calculating the average total path
energy, after this the maximum total path energy is selected among the paths. Routing overhead,
packet delivery ratio, average end-to-end delay, and average energy consumption are the main
algorithm performance metrics.

In this energy efficient aware method, the main drawback of this paper is individual node energy
inconsideration because the maximum total energy of the path is computed by the summation of
the smallest residual energy and highest residual energy of the node, so this technique still has
link failure that means low energy nodes are involving in the path selection and also packet
delivery ratio is low, it shows there is a link failure.

Author [26], Optimal Transmission Power Routing for Mobile Ad hoc Networks based on Signal
Strength and Residual Power proposed. This work is done based on left-over spare energy and
signal strength received by using variable transmission power, and the RSS is computed based
on the Frass transmission equation. To estimate the location of the node, the transmitter and
receiver calculate the received signal strength while receiving a packet. As a result, the network
lifetime has been extended while the energy consumption rate of mobile nodes has been reduced
and the end-to-end delay has been reduced. Even if it has a solution to reduce link breakage, due
to all node participation overhead is exist.
Author [27], Location-based Energy Efficient Scheme for Maximizing Routing Capability of
AODV Protocol in MANET proposed that utilizes the use of energy and decrees packet loss due
to link breakage. This research decreases destination finding by using the location-aware idea
and recording each node's residual energy, its location, and its speed. For this proposed work, the
nodes whose battery energy is greater than the threshold value will forward the packets with their
distance combination techniques, resulting in reduced packet losses. Only looking at the node's
energy which has greater than the threshold value, leads may be overhead because if may the
number of nodes is more which participated in the route, all will be flooding then it creates
overhead.
Route Stability and Energy Aware based AODV in MANET was proposed in [30]. Firstly, the
Authors mentioned the main challenges that cause stable path selection between source and

24 | P a g e
destination nodes in MANET are depletion of energy and node mobility. So, based on this
intension RSEA-AODV was proposed based on the consideration of the received signal strength
of the packet, delay during route discovery, node remaining energy, and draining rate of the
node. The route discovery process is done by adding the nodes into the path based on the
received signal strength with a given threshold value. If the node is closer to each other that
means the nodes received signal strength is above the given threshold value, then the node can
participate in the route discovery process otherwise discarded the packet and also the authors
used other parameters such as node draining rate, delay during discovering of the route and
remaining energy of the nodes. The purpose of this work is to extend the network lifetime of
MANET. Here, the work is good for path selection, but the method does not consider individual
node remaining energy.
An AODV_RR a Maximum Transmission Range Based Ad Hoc on-Demand Distance Vector
Routing in MANETs is presented in. The work is focused on minimizing the overall energy
consumption of the network and communication overhead. Based on their work, it is better to
increase the network lifetime of mobile ad hoc networks. This proposed algorithm uses low
transmission power and the routing strategy needs to be controlled also only certain nodes are to
be allowed or some nodes are restricted in the route request processing, which is done by using
received signal strength. So, this technique helps to minimize the overall network overhead and
energy consumption of the network. To evaluate the presented algorithm, the authors used packet
delivery ratio, routing load, end-to-end delay, throughput, and average consumed energy.
According to this work, network overhead reduction improvement is shown. But they do not
divide the network into the inner zone, middle zone, and outer zone, which is better to improve
network performance.
Authors [31], have proposed Enhanced AODV- Energy Efficient Routing Protocol for MANET,
which helps to reduce the transmission power of a node for the active and inactive route if the
next node is closer. In this paper, the main objective is to reduce energy consumption by
reducing the transmission power of a node. The authors used RSS (received signal strength) for
calculating the distance between two consecutive nodes, at this time the threshold value is -
75dBm. Based on their work, the AODV protocol is modified in three phases first, route
establishment, in this phase forwarding route requests which include a comparison of the current
threshold value of RSS, based on this received signal value. The comparison decides whether the

25 | P a g e
node can be a forwarding node or not. The second phase is route handling, in this phase;
modifications are made in the processing and forwarding route reply process. So, the current RSS
value of the signal is compared with the threshold value. According to it, the transmission power of
the nearby node is reduced in the route reply phase. The third phase is the route termination phase, in
this phase changes are made in the route expiry process, which resets the transmission power of the
node.
Generally, in the route request phase, if the RSS is high than the threshold value then that node will
consider forwarding the packet. In the reply phase, if the RSS is high, it implies that nodes are closer;
as a result, lesser transmission power will be required to send data. Therefore, by adding that
modification to the AODV protocol, they reduced the transmission power of the node, which reduces
battery consumption, reduces interference, and extends the battery lifetime of the network. During
the performance evaluation, average end-to-end delay, throughput, average jitter, and residual battery
are the evaluation metrics. Based on the simulation result, their work showed us the algorithm
reduces battery consumption and extends network lifetime, but does not consider the nodes which
have less energy because the authors only consider the transmission power and they do not use
network lifetime and normalized energy consumption as evaluation metrics.
Table 2.4: Summer of related work

Author Year Journal Aims Simulation Conclusion Limitation


tools

Pratik Vyas et al. [18] 2018 IEEE Reducing link NS-2 Link Consideration
breakage breakage is of path
happen by reduced. selection based
non- on total path
cooperative energy and not
nodes by used detection
using rate metrics.
developing
energy-aware
routes.

Ranjan Kumar et al. 2019 IEEE Developing a NS-2 Prolonging Do not use
stable route network individual

26 | P a g e
[30] by using node lifetime node energy
energy and
normalized
energy
consumption
metrics

Sudhir Goswami et al. 2018 IEEE To increase NS-2 The aware More energy is
[27] the routing energy of the consumed
capability of node and because each
AODV maximizing node record
routing location and
capability of doesn’t use
AODV energy metrics.

Pravin and Satnav et. 2019 IEEE Reduction of NS2 By using The
link breakage average destination
due to energy residual node selects
energy link the path to
breakage is depend on the
reduced average energy
of the node
which lacks
individual
node battery
consideration

Pushpa raj et al. [26] 2019 IEEE Developing of NS2 Good path Does not
consider the
Stable route selection
hop count and
created link break
minimization
mechanism.

27 | P a g e
Chapter Three: Proposed Method
3.1 Overview of the Proposed Work
Nowadays, MANET is a recent fundamental infrastructure-less network. It’s designed without a
central administration, so the nodes are free to migrate at anytime and anywhere. As we all
know, developing a routing protocol for MANETs is a challenging task because of its dynamic
topology, bandwidth-constrained wireless links, and energy-constrained nodes.

In MANET nodes are mobile in transmitting and receiving data packets from the neighboring
node as they move in all directions. So, to do these activities, energy is the most necessary thing.
But because of node-limited energy, non-cooperative nodes are occurring, so the performance of
MANET has significantly decreased.

This proposed AODV algorithm:

 It provides better energy efficiency and detects non-cooperative nodes to increase the
lifetime of the network.
 It makes better utilization of the energy available in the nodes by having energy-efficient
management schemes.

So, to capture non-cooperative nodes that have trusted stable energy-aware path selection and to
increase the network performance of MANET, a model based on received signal strength and
consideration of individual node residual energy is proposed.

3.2. Node Residual Energy


Residual energy is the remaining energy after transmitting and receiving the packet. Nodes are
getting the energy power from their initial energy. There are four states of energy consumption:
transmitting, receiving, idle, and sleeping. More energy is consumed in packet transmission,
which means the highest energy power is consumed in transmission mode, but it is less in sleep
mode. In the idle mode, the nodes do not perform any useful work; the energy consumption is as
high in the transmission mode as receiving mode. The principal source of energy waste in Media
Access Control (MAC) is assumed to be collision, message overhearing (receiving the packet
that is addressed for other nodes), idle listening, and control packets. Different issues cause
unstable network communication between communicative nodes. In this proposed work, the

28 | P a g e
algorithm considers the individual node's residual energy because this consideration helps reduce
non-cooperative nodes in the network. If the source node is broadcasting the RREQ, the
intermediate nodes are receiving the packet, and before rebroadcasting the RREQ, they check the
current node energy value and then broadcast data packets.
When the data packet is routed from source to destination, the following tasks are taking
place at the destination node:
Trusted min-max path energy selection
 First, check the current node energy by comparing the current node residual energy and
the incoming node residual energy. Then check the current node status, whether it’s
cooperative or non-cooperative based on the amount of individual node energy value. So,
the following tasks are done: If the current node forwards RREQ, that node is trusted;
otherwise, that node has a non-cooperative node based on its node energy value, so it
captures that node and appends its energy to the minimal residual energy of the path.
 Second, the destination node selects the minimum node energy from the path
Assume, n1, n2, nK………………...……….... (1), where n is the number of nodes
re_n1, re_n2, re_nK…………...re is node residual energy
So, Min (re _p1, re _p2, re _p3… re _pK... (2), Min is min-energy and re_p1, re_p2 is
residual energy of the path.

 Third, select the max (min-path) node energy among all paths
Max (Min (re_p1, re_p2, re_p3… re_pK..…… (3), where Max is used to expressing the
max-energy of the path. Every time a new path is computed, the destination node sends a
route reply with the trusted path and max-path energy.

3.3 Proposed Algorithm Scenarios


The network is densely populated.

 Each node appends its residual energy: first, before appending its energy, each node
compares its current node residual energy with the incoming node residual energy; if the
current node residual energy is less than the incoming node residual energy at that time,
non-cooperative nodes happen because of node limited energy; then they append energy
based on the node energy value.
 The destination node looks at the Max-Min energy of the path.

29 | P a g e
 The proposed algorithm uses upper and lower threshold values for RSS.

Assume that the RREQ is broadcasted and this route request is received by the intermediate
node. In this case, before the intermediate node rebroadcasts it, they check whether the incoming
RREQ packet signal transmission power is between the lower threshold value of -78 and the
upper threshold value of -27 and the individual node energy value. The negative (-78) indicates
the transmission signal is going to be low, and -27 indicates RREQ transmission power is high,
which means the node is the nearest, so this threshold value only limits the number of middle
zone nodes that are participating in RREQ processing.

The proposed algorithm uses values greater than and less than the threshold node energy value.

Assume that the source node sends actual data packets to the intermediate node, in this case,
before the intermediate node rebroadcasts it; they check whether the incoming node energy value
is between the lower threshold value and the upper threshold value. If a node's energy value is
greater than or equal to the threshold value, it is accepted for further possession; otherwise,
append their energy and broadcast alert packets to source nodes and update route selection.

3.4 Flow Chart and Pseudo Code of Proposed Algorithm

The following diagram illustrates a proposed algorithm that shows how the algorithm is working
and how the sequence of activities is performed throughout the process.

30 | P a g e
Figure 3.1: Proposed work Algorithm Flow Model

31 | P a g e
Figure 3.2: Detection of Non-cooperative nodes

In Figure 3.1, we can see that the destination node can select the trusted and stable path based on
the node's residual energy, and after the minimum path selection is done based on the energy and
trust models, the destination node selects the minimum path among the maximum energy and
generates RREP back to the source node. This path selection is important to create stable energy
and trust in communication.
In figure 3.2, the proposed method is that after the route path is established, the actual data
packet transmission phase is applied. Non-cooperative nodes sometimes occur because of limited
node energy. So, to detect such non-cooperative nodes our proposed method during the actual
data transmission phase, every node will keep the energy of data packets sent to the neighboring
node in the route so that it can prevent non-cooperative nodes.

3.5 Proposed-AODV energy efficient path selection method


Why is Energy Efficient path selection needed in MANET?

Energy efficiency is a major issue of concern in wireless ad hoc networks as mobile nodes rely
on batteries, which are limited sources of energy [32].

 One of the main issues in MANET is the development of an energy-efficient protocol due
to the limited battery lifetime.

32 | P a g e
 Power failure of a mobile node not only affects the mobile node itself but also its ability
to forward packets on behalf of others and thus the overall network lifetime.

In particular, we need efficient energy and a stable path that could provide longer transmission
than is necessary for the application where continuous packet forwarding between two
communication nodes (i.e. source and destination node).

MANETs have a dynamic topology and do not have fixed node deployments; in the AODV
protocol, nodes have infinite energy, so these can be the causes of link breakage. During
communication, packet loss occurs due to limited node energy. Most of the time, non-
cooperative nodes were caused by the "lack of energy consideration" problem, which means that
the energy level is not taken into account when choosing the path. Energy control approaches in
exercise performance play a significant part in networks, where data packet transmission from a
sender to a receiver is reduced based on the dissemination model. When a node in the system
sends data packets to an intermediary node, and this intermediate node selects this node as the
router, the node's energy consumption increases quickly. To determine the most stable path
among source S and destination D with the best energy adjustments for stable communication, a
path is built based on the node energy value level. So, the proposed algorithm considers
individual node energy for stable and trusted path selection at the destination node. It is shown
below:

Figure 3.3: Algorithm for routing and path selection

33 | P a g e
Here, figure 3.3 describes how the RREQ message is broadcast and the RREP message is sent
backward to the sender node with the chosen trusted stable path. First, the sender node
broadcasts the RREQ, and then this control message is received by the intermediate nodes. At
that time, before rebroadcasting the incoming message, the intermediate node checks the packet's
received signal strength and node energy value. Then, if the nodes are in the middle zone, they
check the node status to determine whether that node is cooperative or non-cooperative based on
its node energy value. If that node is non-cooperative, they append their energy and rebroadcast
the control packet forward to the target. Since the source node broadcasts the packet based on the
following routes, which help it reach the destination node,

 Route 1: n2 -> n11,


 Route 2: n3- > n12,
 Route 3: n4- > n13.

As Figure 3:3 displays, the source node sent the packets to the destination with different routes.
These routes are three (3). In these cases, the proposed algorithm works based on AODV, so
there are two messages, namely, the control packet and the actual data packet. Before the source
node sends the actual data, it needs to create a trusted, stable path among the two communication
nodes, which are the source and destination.

The only purpose of the control packet is to establish a path. To create this path, the proposed
algorithm works based on the max-min energy of the path. The source node transmits the route
request, and when an adjacent node receives a message and has a route to the receiver, the node
sends a route reply to the source node. Then, based on the defined path, the actual data is
transmitted. This approach aims to capture non-cooperative nodes (which happen because of
limited node energy) and increase the network performance of MANET. We can see how it
selects the best path with the most energy, but these processes are done after the messages have
reached their destination and before the destination is broadcast in the RREP.

Route 1: n2 -> n11, the energy of each node is 36J, and 28J, respectively.

 The destination node takes the min energy, which is sent from those node energy levels.
 According to this, 28J is the min residual energy in the path

34 | P a g e
Route 2: n3 -> n12, energy of each node is 34J, and 30J, respectively.

 From this path, the destination node selects the min residual energy
 So, 30J is the min-path energy

Route 3: n4 -> n13, the energy of each node is 31J, and 45J, respectively.

 Among those energy levels, the destination node takes the min energy; in this case, the
node's min residual energy is 31J.

Finally, the destination node selects the max-path energy among the min-path energy, which
means 28J, 30J, and 31J.

 According to this, max (min-path energy) = max (28J, 30J, 31J)


 So, 31J is the max-path energy, i.e., route 3 is selected, this is an optimal path, which is
better for prolonging the network lifetime in MANETs.

After this process is done, the destination node selects the best path which has trusted stable
energy. So, based on the proposed AODV algorithm scenario, route 3 is selected because it has
the most energy when compared to other paths. By using this selected route, RREP generates
traffic back to the source node. Finally, the source node sends the actual data based on this path
to the destination node.

Detection of a non-cooperative node with trusted stable energy-aware path selection

The proposed algorithm has the following characteristics:

 The source and destination nodes are trusted. But they are not for intermediate nodes.
 Non-cooperative nodes are present in the network because of the limited energy of each
node.
 The nodes need to be in promiscuous mode for Calculating Node Energy Value (NEV).

To calculate the energy of each node state by using: -


𝐸𝑖𝑛𝑖𝑡𝑖𝑎𝑙 (𝑡), 𝐸𝑅𝑒𝑠𝑖𝑑𝑢𝑎𝑙 (𝑡), 𝐸𝑐𝑜𝑛𝑠𝑢𝑚𝑝𝑡𝑖𝑜𝑛 (𝑡).
Where 𝐸 𝑖 𝐶𝑜𝑛𝑠𝑢𝑚𝑝𝑡𝑖𝑜𝑛 (𝑡) indicate the energy consumption of a node for a period, which is the
energy consumed during transmission, receiving, exchanging routing information control

35 | P a g e
packets, and internal operation of nodes. The following equations can be used to determine
how much energy the node uses when in a transmission state to send n packets:
𝐸 𝑖 𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑠𝑠𝑖𝑜𝑛(𝑡) = 𝑛 ∗ 𝑝𝑖 𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑠𝑠𝑖𝑜𝑛 (𝑡)
Where as 𝑝𝑖 𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑠𝑠𝑖𝑜𝑛 (𝑡) indicates how much battery was used during the transmission
of data packets and exchanging control packets and routing information with nearby nodes at
the specified time.
Similar to this, the amount of energy used by a node (𝑖) when in the receiving state to receive
(𝑚) packets, including control packets, over time is computed as follows:
𝐸 𝑖 𝑟𝑒𝑐𝑒𝑖𝑣𝑒(𝑡) = 𝑚 ∗ 𝑝𝑖 𝑟𝑒𝑐𝑒𝑖𝑣𝑒 (𝑡)
Whereas 𝑝𝑖 receive (t) indicates the power consumed by the node during the exchange of
data packets and the number of packets being received at a time.
As all to calculate the residual energy Er (T) measured by the following equations:
𝐸𝑟 (𝑡) = 𝐸𝑖𝑛𝑖𝑡𝑖𝑎𝑙 (𝑡) − 𝐸𝑐𝑜𝑛𝑠𝑢𝑚𝑝𝑡𝑖𝑜𝑛 (𝑡)
Where, 𝑒𝑖 (𝑇) to be the initial energy of the nodes, the average residual energy 𝑒𝑁 (𝑡) of the
network with n nodes, calculated with the following equations:
𝑛
𝐸𝑟 (𝑡)
𝐸𝑁 (𝑡) = ∑
𝑛
𝑖=1

So, based on this method, both the route discovery phase and the actual data transmission phase
were covered by the proposed algorithm's detection of the non-cooperative nodes. The detection
process during the actual data transmission phase is suggested as a way to find this non-
cooperative node. The suggested approach is that after the route path is established based on the
max-min energy of the path, the actual data packet transmission phase is applied. In our
proposed method, during the actual data transmission phase, every node will screen the
neighboring node's energy value along the route in promiscuous mode. Every node will keep
track of the number of data packets sent to the neighboring node in the route so that it can
prevent non-cooperative nodes.

If NEV is less than the threshold value, then the data packets coming from the neighboring node
can be dropped, so that node acts as a non-cooperative node because of its limited energy. After
the monitoring node detects the non-cooperative node, it appends its energy to the smallest node
energy value, then broadcasts an alert packet to the source node and updates route information.

36 | P a g e
Proposed-AODV Pseudocode

Algorithm 1: Route Discovering Method at the Intermediate Node


The following line of the algorithm describes when the source node broadcast the RREQ for getting
the best path with trust to reach the destination node.
Notations: SN = Source Node, IN = Intermediate Node, IZN = Inner zone Node, MZN =
Middle Zone Node, OZN = Outer Zone Node, LTV = Lower Threshold Value, UTP = Upper
Threshold Value, RSS = Received Signal Strength, RE = Residual Energy, CN= Current Node.
Begin
For every routing path in the network do
Initiate RREQ who wants to send the data
While ni (non-cooperative) do
Append their energy while forwarding the data packet transmission
Except for SN and DN, each node calculates the received signal strength and checks the
threshold value
End
Start
SN broadcast the RREQ, then
IN receiveRREQ () //The Intermediate node received the RREQ.
If the IN has a route to DN, then
generateRREP () // The IN generates RREP back to the source node
Else
The IN checks the RSS
If (RSS <= -27 $$ RSS >= -78) then, MZN check NEV
If (CNE >= INE || INE <= CNE) then, node is trusted
Else
The non-cooperative node then detects the non-cooperative node
append (CNE) // append the current node residual energy on NCN
Else append (INE) // append the incoming node residual energy, then
CN forwarder () // flooding RREQ, which is between UTV = -27 and LTV = -78
Else

37 | P a g e
Can’t_join_in_the_networkRREQ () // Route Request is discarded
End
Algorithm 2: Route Selection Method at Destination Node
Like the above algorithms, which means after receiving the RREQ by the destination node and
before preparing RREP for sending back to the source node via the reverse route path, it is
explained how it is processed. The path selection is done with trust max-min path energy
consideration.
Notations: DN = Destination Node, Min_eng = Minimum energy, Max (min-energy) =
Maximum of minimum energy, RREP = Route Reply.
Start
DN received the RREQ, then
Select min_energy () // Destination node select the minimum energy among each path.
After comparing the energy of the route, then, select max (min-path) energy.
If the DN selects max (min-path) energy, then
GenerateRREP () // the DN selects the max-path energy and sends RREP back to SN
Else
Can’t_join_in_the_networkRREQ () // Route Request is discarded
End
Algorithm 3: Detection of non-cooperative nodes
All nodes in the route do;
The source node sends data packets;
Intermediate node Calculate node_energy_value;
The node sending the data packet monitors its neighboring node;
If the neighboring node forwards the data packet, then
Increments current_node_energy (current_node_energy ++);
End
Compute node energy value;
If (NEV < threshold value) then (i.e., non-cooperative nodes)
Append energy on their nodes;
Broadcast Alert packet to source node and update route information;
End

38 | P a g e
Chapter Four: Implementation and Performance Evaluation
This chapter discusses the tools for implementing the proposed method and the performance
indicators for evaluating its effectiveness. Display the results of both the existing and new
algorithms as well. In addition, the simulation's setup, tools, and design are explained.

4.1 Simulation Tools


In this section, we've reviewed the commonly used MANET simulation tools for evaluating the
effectiveness of the protocols. It may be challenging to simulate network activity in the actual
world because the simulator is a piece of software that does so.

The term "simulation" refers to the computational recreation of a real-world system's actions by
mathematically formulated rules. The performance and behavior of the protocol in a wireless
network are assessed using a variety of experimental techniques, such as emulation, simulation,
and an analytical model. Depending on portability and testing conditions, real-world simulation
development is generally an expensive or even impossible endeavor. The most effective
simulation takes a lot of time and is challenging to duplicate. Therefore, it’s predicted that
simulations would address these issues [33]. It makes use of simulator technologies to execute
network design tests before the organization to eliminate or reduce errors, damage, or resource
waste. A lot of the simulation tools developed by MANET, such as NS-2, NS-3, OMNET++,
OPNET, QUALNET, J-SIM, GLOMOSIM, and others, are now used to create and test computer
networks and protocols [34]. Since each of these simulators has unique qualities, the MANET
environment must be taken into account when selecting the right network simulator tools to
evaluate the planned work.

The author [35], explored a variety of simulations and described numerous elements of
simulation tools along with their benefits and drawbacks. The authors employed a variety of
simulation tools to conduct various simulation studies based on this paper, but they chose the
best tools, including NS-2 and OMNET++, which are currently popular in MANET.

Author [36], provided a thorough overview of contemporary network simulators, outlining their
features, benefits, and drawbacks. Well-known network simulators mentioned by the author
include NS-2, NS-3, J-SIM, OPNETT, OMNET++, and QUALNET. The researcher discussed

39 | P a g e
the benefits and drawbacks of the simulator tools in this work. Examples of NS-2's benefits
include its vast array of readily available models, sensible portability models, powerful and
flexible scripting and simulation setup, a large user base, and ongoing development. It also offers
both simple traffic and complex scenarios that can be quickly tested and are well-known for their
modularity. Limitations of NS-2 include the need to constantly recompile it whenever user code
is changed and the difficulty of accurately simulating the complexity of the real system, such as
extensive infrastructure. According to the researcher, NS-2 is currently the substitute simulator.
The NS-2 is the best simulator despite having an overly complicated architectural design. It
allows both deterministic and stochastic modeling of traffic distribution, as well as deterministic
or probabilistic packet loss in queues attached to network nodes. By allowing users to select the
parameters to trace, the simulator allows users to tailor-follow trace files. The NS-2 tool has been
chosen by the authors as a result. The various factors that affect how well the simulation tools
used in this research performed are summarized in the table below.

Table 4.1: Analysis of Network Simulator

S/N Main Stream Network Simulator


NS-2 GloMoSim OMNET++ OPNET++ JSIM
1 License Open License Open License Open License Commercial Open License
2 Programing Language C++, TCL Parsec C C++, NED C JAVA, TCL
3 Scope Application Network Network Communicati Network Network
Protocol Protocol on Simulation
4 Popularity 88.8% 4% 1.4% 2.61% 0.45%
5 Documentation and Excellent Poor Medium Good Poor
user support
6 Simulation Discrete-Event Discrete-event Discrete-event Discrete-event Discrete-event
Techniques

In general, along these lines, and taking into account those many simulation challenges, NS2 was
made to deal with these kinds of problems. Choosing a suitable simulation tool is typically one
of the key challenges for demonstrating the actual performance of our method. Therefore, we

40 | P a g e
chose and used the NS-2 simulation tool to build the proposed algorithm and evaluate its
performance.

4.1.1 NS2 Simulation Approach


A discrete event simulation program geared at networking research is called Network Simulator
2 (NS-2). It employs an object-oriented language to simulate several network protocols and is
written in the two significant programming languages C++ and Object-oriented Tool Command
Language (OTCL). TclCL was employed to combine OTCL with C++ [36].

The TCL scripting language is linked to the NS-2 C++ base by the front-end interpreter or
OTCL. The front end of the simulation is constructed by OTCL by assembling and configuring
the objects, while the back end, or the essential functionality of the simulation objects, is defined
in C++. Together, these two disparate languages create a scriptable environment for C++.

The NS-2 output can be either content-based or graphic-based. In NS-2, there is a built-in tool
for graphical simulation known as a Network Animator (NAM). This tool provides a visual
overview of the node's state and the packet exchange that is occurring there. The NS-2's basic
design is as follows:

Figure 4.1: Basic Architecture of NS-2

4.1.2 NSG2.1
A Java-based NS-2 scenario generator is called NS-2 Scenarios Generator 2 (NSG2). NSG2 can
be run on any platform because it was written in Java. Both wired and wireless TCL scripts for
NS-2 can be produced by NSG2 [37].

41 | P a g e
4.1.3 NS-2 Network Animator (NAM)
It’s a tool for animating network design and simulation traces as well as actual packet traces
[38].

Topology layout, packet-level simulation, and a range of data evaluation capabilities are
supported by NAM. Because the trace file needs to be created first, the NAM file is only
executed after the trace file has been run. Therefore, these trace files contain topology data such
as node, link, and packet loss information. The user can build topology settings, layout data, and
packet traces using tracing events, all of which are tasks carried out during simulation. The NAM
assists in animating the trace file once it has been prepared. Now, Nam generates the network
animators, and topology pops up a window, develops layout, and can pause time. It offers user
interface interaction, which offers a variety of animation features.

4.1.4 NS2 Simulation Steps


The most important and vital NS2 simulation steps are listed in the following [39]: -

Step 1: Simulation Design


Designing the simulation is the initial stage of simulating a network. In this step, the users should
decide the simulation's goals, network configuration, underlying assumptions, performance
metrics, and the kind of results they expect.
Step 2: Configuring and Running the Simulation
The first simulation design step is where this process is implemented. It is divided into two
stages:

 Stage one of network configuration involves creating and configuring network elements
(such as nodes, TCP, and UDP) by the simulation design. Additionally, certain events,
including data transfers, have start times set.
 Stage two of the simulation that was set up in the network configuration step is now
launched during the simulation phase. It keeps track of simulation time and carries out
events in reverse order. This phase typically lasts up to the threshold value set in the
network configuration phase of the simulation.

42 | P a g e
4.2 Performance Evaluation
In this part, we covered the simulation scenarios, the application of the proposed method for
trusted stable energy-aware path selection in non-cooperative nodes, and the performance
metrics.

4.2.1 Proposed Work Simulation Parameters for case study


Table 4.2 showed that, for our simulation scenario, we simulated the NS-2 (version 2.35)
simulator in Ubuntu 20.04. with our modified aodv C++ libraries, we utilized the already
existing C++ libraries of NS-2.35 with our modified AODV C++ library. The components
utilized for simulating and assessing the performance of our proposed algorithm are TCL, NAM,
and Gnuplot. In this simulation, we used UDP in the transport layer, and for data packet
transmission at the application layer, CBR packets are used, which means the simulation bit rate
is constant and supports audio and video communication. The size of the packets is 512 bytes.
we use a 1000m x 1000m topology area for all simulations, simulation time is a time it holds the
total amount of simulation time that is 100 seconds, the number of nodes involved in the
experiments is 16 nodes (12 nodes cooperative and 4 nodes non-cooperative) are participate in
the simulation, initial energy is normal energy of the node before any operation is done which is
100J, types of a channel is wireless because we are simulating wireless mobile ad-hoc node, the
transmission range is 250m, this refers to the ability to receive the signal between this meters,
node mobility speed is 5 to 40ms. In the data transmission phase, we have taken >= 28.1828 J as
a threshold value. The type of Media Access Control (MAC) protocol is IEEE 802.11n, this is
one category of 802, 802 stands for the wireless local area network regulation in IEEE society,
which is designed to be controlled and maintained by IEEE groups. 802.11 maintain node
communication, so 802.11n is the new wireless standard component of mac 802.11, ‟n" indicates
the latest modification of the wireless local area network for high throughput of MANETs. In
this proposed work, the antenna model that the proposed algorithm used was Omni-directional
because, as we know, MANET nodes are dynamic. If the antenna is an Omnidirectional antenna,
it means to broadcast to all because the direction of a mobile ad-hoc network is undefined, which
means once the packet is broadcast, it propagates in all directions, about 360 degrees. There are
two ray ground propagation models for signal propagation model; this two-ray reflection model
considers both the direct path and ground reflection path. To include all participating nodes
Omni (i.e., all directions) antenna is used. Assume the source node wants to send the data to the
43 | P a g e
destination node. At that time, the node initiates and broadcasts the route request to all neighbor
nodes because the source node does not know where the destination is; it may be on the right
side, the left side, the front side, or the backside. For efficient use of energy bidirectional antenna
is better, but Omni-directional is better to include all nodes by rotating 360 nodes from those
nodes high amount of node energy nodes will get, it is not limited to forwarding RREQ and
RREP. The type of mobility model is a random waypoint. Most of the researchers use a random
waypoint, it’s mostly used for mobility models by different works in the MANET [40]. It has
parameters that mean the node when to go and where to go should be specified in his model, like
the starting time, destination (x and y values) and lastly speed how much the node speed to
move.
Constant bit rate is the type of traffic; it means the simulation bit rate is constant and supports
audio and video communication. The comparison routing protocols are AODV and Proposed-
ODV.
The proposed AODV algorithm considers the maximum (minimum-energy) path and hop counts
for trusted stable path selection to capture non-cooperative nodes. So, these algorithms are
simulated and explained in their performance. After the signal strength is checked by the lower
and upper threshold values, the middle node broadcasts the packet; otherwise, the packet is
discarded. Also, the proposed approach is that after the route path is established, the actual data
packet transmission phase is applied. Types of traffic connection are TCP/UDP, which refers to
transmission control protocol or user datagram protocols found in the transport layer. This
protocol is found in NS2 with the path home/ns-alone-2.35/ns-2.35/common/. After opening this
folder, we will get a packet, which has its own TCP/UDP packet type initiation with a
declaration, for example, static const packet _t PT_TCP = 0 and static const packet _t PT_UDP =
1. In this case, the main purpose of TCP/UDP is packet transmission. So, in our simulation, we
used UDP.

44 | P a g e
Table 4. 2: Parameters details for simulation

Parameters Values
Operating system Ubuntu 20.04
Node deployment Random waypoint
Total Number of nodes 16
Total Number of cooperative nodes 12
Number of non-cooperative nodes 1 to 4
Node deployment Area 1000m x 1000m
Simulation time 100s
Traffic type CBR
Packet size 512 bytes
MAC Protocol IEEE 802.11
Antenna Model Omni-directional
Initial battery capacity for each node 100 J
Receiver energy (Rx) 28.1838 J
Transmitter energy (Tx) 28.1838 J
Routing protocol AODV, Proposed-AODV

4.2.2 Implementation of AODV and detection of non-cooperative nodes in AODV


routing protocol
Without understanding node behavior, the simulator tool generates the protocol that we utilize.
In this study, we have not specified that a node is a non-cooperative node. The AODV routing
protocol is modified in the C++ file of aodv in NS-2.35, and we observe the effect of non-
cooperative nodes occurring within a MANET.

Different types of problems on AODV are studied, this study is on non-cooperative nodes that
happen because of limited node energy that affects the link status of the network, The algorithm
is modeled based on the current protocol, and the nodes are scattered at random. Numerous
works are examined for distinct AODV problem categories. A mobile ad hoc network's node
automatically serves as a router, making the network operational [41], There is no information on
the other nodes in the network held by any node in the network. We will create an algorithm that
identifies the non-cooperative node, a node that is disrupting the path information and discovers

45 | P a g e
the non-cooperative node, which does not forward or receive the message for path discovery of
control messages, based on this knowledge and their behavior. From this description, the
algorithm identifies the non-cooperative nodes by deciding a neighbor node to decide in the path
discovering procedure, if a path is failed by utilizing the message transmission controls because
of a non-cooperative node that is identified by node id.

In this work, we describe the simulator's language, which is C++ and OTCL, to comprehend the
existing routing protocol and test it by integrating a novel algorithm for managing and displaying
non-cooperative nodes into the existing protocol. And assess the outcome to determine the nodes'
behavior.

Figure 4.2 shows the simulation of the AODV with four non-cooperative nodes introduced along
with 12 normal nodes, which are implemented in NS-2.35.

Figure 4.2: Implementation of non-cooperative nodes

The following scenario consists of a total of 16 nodes, of which 12 are cooperative nodes and 1,
7, 8, and 9 are non-cooperative nodes. Once it’s done, we will run simulation nodes the green
color is a cooperative node and the red color are non-cooperative node. The non-cooperative
node drops all packets and does not forward any packets. Then we can analyze the results gained
based on selected performance metrics.

46 | P a g e
4.2.3 Implementation of Proposed-AODV Algorithm
The existing protocol does not catch link breakage due to non-cooperative nodes that drop
packets. So, we implemented the Proposed-AODV algorithm that detects non-cooperative nodes
on the AODV protocol using trusted stable energy-aware path selection between mobile nodes.
The proposed approach has modified the aodv.cc, aodv.h, aodv rtable.cc, and aodv rtable.h
existing aodv C++ files in the ns-2.35 files; all of these aodv files are present in the ns-allinone-
ns-2.35 modules; and formulates Node Energy Value (NEV) for identifying the non-cooperative
nodes. To formulate NEV, we used two node energy variables, which are current_node_energy
and incoming_node_energy. Moreover, in the aodv.cc file, we have modified methods such as
sendRequest (), recvRequest (), sendReply (), recvReply (), and forward () to consider non-
cooperative node information.

Figure 4.3: Communicating Between S and D via Node 12, 2, 0 using Proposed-AODV

Figure 4.3 illustrates how communication is carried out through intermediary nodes such as
nodes 12, 2, and 0 after the source node 4 and the destination node 5 fail to cooperate. In this
study, we use the AODV routing protocol implemented in ns2.35. After the tcl code or .tcl, was
executed, two files, such as .nam and .tr, were created. The above figure appears when we open
a .nam file. Therefore, an energy model is added to aodv.cc to access node energy.

47 | P a g e
4.2.4 Performance Metrics
To evaluate existing AODV and Proposed-AODV routing protocols, the following metrics are
used:

Detection Rate

 It's an important metric in examining the accuracy of the status packet to detect non-
cooperative nodes. It’s the ratio of the number of non-cooperative nodes detected divided
by the total number of existing non-cooperative nodes in the network multiplied by one
hundred percent.

Number of non − cooperative nodes detected


Detection Rate = ∗ 100
Total number of existing non − cooperative nodes

Packet Delivery Ratio (PDR)


It refers to the ratio between the received packets by the destination and the generated packets by
the source

received packets
Packet Deliver Ratio = ∗ 100
generated packets

End to End Delay (EED)


It refers to the time taken for a packet to reach from source to destination divided by the number
of data packets received.

Delay = Packet received time − packet sent time

Normalized Energy Consumption (NEC)

It is the ratio of the total energy used by all network nodes to the number of data packets
received. Large amounts of energy are used up during packet transmission and receiving; hence,
normalized energy consumption refers to the energy consumed per packet.

Network Lifetime (NLT)

Where the first node consumes energy. Due to limited node energy, there is no longer a path for
life in a wireless network, especially a mobile ad hoc network. If one node broadcasts RREQ and
the receiver node does not have efficient energy, the packet is dropped because connection

48 | P a g e
breakage has occurred (i.e., a non-cooperative node), which means the end-to-end delay will
increase, and the packet delivery ratio will also decrease. These kinds of issues lead to decreased
network lifetime, so to prolong the network lifetime, individual node energy considerations have
great value. In short, network lifetime is the time that a single node drains its energy and stops
participating in the network operation.

4.3 Simulation Results and Discussion

To evaluate the proposed method, a variety of tests have been executed over the NS-2 simulator
using the various simulation scenarios, Since the purpose of this study is capturing non-
cooperative nodes by using trusted stable energy-aware by measuring the node as either trusted
or not. For generalizing the result based on the proposed algorithm and procedures 16 nodes are
distributed randomly from those nodes we get the assessment result of node 1,7,8,9 is a non-
cooperative node that causes a link breakage on the network. The evaluation of our analytically
based algorithm was presented based on the simulation outcomes, which are mentioned below,
and a results analysis was conducted.

The table and figure below display the existing and proposed AODV. The following analysis of
the experimental data compares the two existing and Proposed-AODV.

Table: 4.3: Experiment of simulation result

Performance Metrics

End-to-End Delay Packet Delivery Energy Detection Rate Network lifetime


Ratio Consumption
# of NCN AODV Proposed- AODV Proposed- AODV Proposed- AODV Proposed- AODV Proposed-
AODV AODV AODV AODV AODV
1 0.0044 0.0011 0.60 0.99 25.0 17.1 70.2 88.2 25.1 30.2
2 0.0069 0.0031 0.51 0.89 31.5 24.2 48.2 74.5 18.2 27.6
3 0.01 0.005 0.35 0.702 42.2 32.1 37.1 61.7 13.5 24.1
4 0.015 0.009 0.2 0.400 50.2 40.4 28.4 45.1 9 19.0

49 | P a g e
4.3.1 Average End-to-End Delay
Figure 4.4 is shown that when the number of non-cooperative nodes increased, the end-to-end
delay increased as well. The simulation is run at the same speed and with total 16 numbers of
nodes from those nodes 12 nodes are cooperative and the other nodes are non-cooperative. When
packet flooding is controlled by reducing the number of network nodes, the delay time is
reduced. As you can see in the figure below, the proposed AODV algorithm indicates less delay.
The network is not congested by the nodes, and packet flooding is sent by the selected nodes; the
middle nodes only sent the data packets by selecting the max (min-path) energy. When the
number of non-cooperative nodes increases, the average end-to-end delay also increases. This is
because non-cooperative nodes' participation in the network is a fact, and we are also looking at
that, but even if it’s done, Proposed-AODV shows better performance than the compared
algorithms. Hence, a decreasing average end-to-end delay means increased network
performance. So, the proposed AODV indicates some delay reduction.

Figure 4.4: Average End-to-End Delay

As shown in the above figure, the simulation result indicates that, compared to AODV,
Proposed-AODV achieves a lower average end-to-end delay. End-to-end delays decrease when
fewer nodes congest the network as data packets are sent from source to destination. As a general
rule, end-to-end delay is reduced with limited control packets.

50 | P a g e
4.3.2 Packet Delivery Ratio
Figure 4.5 shows the packet delivery ratio performance for AODV and proposed AODV against
the number of non-cooperative nodes. The PDR of AODV quickly decreases when the number
of non-cooperative nodes increases. The reason behind the poor results is the coverage of the
network by non-cooperative nodes, which will indeed cut any communication between the
source and destination nodes. As the percentage of non-cooperative nodes increases, the packet
delivery ratio decreases. because they will cover most of the network and disturb
communication, not delivering data packets to the destination properly. According to the
simulation result, we can see in the below figure that the packet delivery ratio is varying based
on the total number of nodes 16 and the packets they transmit. The packet delivers ratio is
increased in the proposed study because, before data packets are forwarded, the incoming packet
is checked with a residual energy comparison on its routing table, so this minimum residual
energy comparison limited the node. So, in the proposed AODV the higher PDR, the network
performance is better.

Figure 4.5: Packet delivery ratio.

The packet delivery ratio typically confirms the ratio of packets that reach the destination relative
to the packets sent there by the source node (PDR). We can gather from Figure 4.5 that the
proposed AODV experiences fewer packet drops than AODV does. The network path also

51 | P a g e
remains steady, reliable, and available for a long time in the proposed study, saving sufficient
energy. As a result, more packets are delivered to the destination node for these reasons.

4.3.3 Normalized energy consumption


Figure 4.6, Normalized Energy Consumption, shows it expressed as energy consumption per
packet. When nodes are highly active and generate more packets, this leads them to consume
more energy. the energy consumption increase is related to the number of non-cooperative nodes
they are participating in the network operation increased. a proposed-AODV limited number of
node participation, however, a limited number of nodes are involved in packet flooding and
proposed-AODV limits the participating nodes and reduces destination node energy
consumption, how it could be done? Before appending their residual energy, first, the individual
nodes compared their residual energy with the incoming node's residual energy; they compared
the minimum residual energy with their neighbor node's residual energy values, so after checking
the nodes that have the minimum residual energy, they could flood the RREQ towards the
destination node. So, the destination node's task load and energy consumption are reduced.

Figure 4.6: Normalized energy consumption

When nodes are highly generating more RREQ, this leads them to consume more energy. Based
on the middle node route selection, the number of nodes is limited. So, the Proposed-AODV

52 | P a g e
routing algorithm performs better performance in normalized energy consumption. Hence, the
proposed routing algorithm reduced energy consumption when compared to AODV.

4.3.4 Detection Rate


In figure 4.7, the x-axis shows the number of non-cooperative nodes, and the y-axis shows the
detection rate of Proposed-AODV compared to AODV. However, the AODV is not able to
detect non-cooperative nodes in the network due to the normal participation in the route
discovery process. Proposed-AODV is higher than that of AODV because it examined and judge
non-cooperative nodes by the check node energy value. If the node energy value is less than the
threshold value, the algorithm appends its energy and broadcasts an alert to the source node then
updates route information.

Non-cooperative detection is an important concern in the MANET, so this study focuses on the
detection of non-cooperative nodes efficiently by using the Proposed-AODV technique. The
detection rate of the non-cooperative node is observed using the Proposed- AODV approach.
When compared to the AODV method, the proposed AODV significantly increases the detection
rate. The comparative analysis between the AODVs is shown below in the figure.

Figure 4.7: Detection rate

53 | P a g e
Figure 4.7 shows the detection rate of AODV and Proposed-AODV under Non-cooperative
nodes. So, our proposed algorithm detects non-cooperative nodes when data drop in the data
transmission phase.

4.3.5 Network Lifetime


According to Figure 4.8, the network lifetime decreases when the number of non-cooperative
nodes increases because every non-cooperative node drops packets, even though they do not
participate in the routing process. For example, network lifetime is decreased in non-cooperative
node 1 up to 4 AODV and Proposed-AODV routing algorithms respectively. Every node around
the transmission range listens to the incoming packet; this consumes node energy. However,
through the communication, Proposed-AODV captured non-cooperative nodes, which flooded
RREQ and selected the highest energy path by considering individual node residual energy to
forward data packets. Therefore, the proposed study outperforms better results than the AODV
routing algorithm with its network lifetime values.

Figure 4.8: Network lifetime

54 | P a g e
Chapter Five: Conclusion and Future Work
This chapter concludes the study by summarizing the major contributions made in terms of
research challenges, and finally, possible future works will be presented.

5.1 Conclusion
Since mobile ad-hoc networks are resource-constrained and do not have a centralized administration
mechanism, this creates link breakage caused by node mobility and limited node energy. In this
regard, nodes did not cooperate in packet routing with other nodes, such nodes are non-cooperative
nodes in this consideration, and the network is unable to fully provide user expectation functionality
since its performance is affected. So, it's still difficult to achieve mutual network operations between
these nodes when implementing a collaborative routing scheme. So, In this study, we identified a
problem that needs a solution in this investigation.

In this study, we designed a model that captured the behaviors of non-cooperative nodes, which was
followed by developing trusted stable energy-aware path selection algorithms. Thus, by using
Received Signal Strength and Consideration of individual node RE with maximum or minimum
energy, In this model, the network is divided into three zones, such as the inner zone, middle zone,
and outer zone, and each zone is categorized based on the packet received signal strength. Based on
this, the middle node has the responsibility for rebroadcasting the RREQ and actual data transmission
by using the max(min-energy) path, each node appends its own compared minimum energy and
forwards the packet towards the destination. Then, the destination node can send back the RREP by
using max (min-path) energy. In all scenarios, the detection rate of our proposed algorithm is higher
than the existing algorithms. From the results, it can be concluded that the proposed algorithm detects
the non-cooperative nodes more efficiently with a shorter end-to-end delay and higher packet
delivery ratio, reduces energy consumption, and prolongs the network life more than the existing
algorithm, which also prolongs the network lifetime and reduces energy consumption.

5.2 Summary of our contributions


MANET is a recent fundamental infrastructure-less wireless network, and nodes freely migrate
anywhere at any time without geographical area limitations. There are some challenges in MANET,
like dynamic movement, node mobility, and the absence of central administration. Because of those
challenges, link breakage occurs due to node mobility and the limited energy of nodes. During these
times, nodes cannot communicate with each other, and as a result, the performance of the network is

55 | P a g e
significantly decreased. So to overcome the issues, our proposed study focuses on the nodes that are
non-cooperative with other nodes due to limited node energy. To transfer and receive a packet
between nodes, energy is the most necessary thing, but because of node-limited energy, non-
cooperative nodes occurred. To solve such issues, we proposed trusted energy-aware path selection
method in non-cooperative nodes, by using the received signal strength and average residual energy
through the max (min) energy path approach.

5.3 Future Work


The proposed AODV system is considered the only non-cooperative behavior that happens
because of limited network node energy. This is done based on max (min-path) residual energy
path selection, which is implemented for trusted stable data transmission to detect non-
cooperative nodes and extend the network lifetime of MANETs. But, in future research work on
considering node location consideration to improve network lifetime.

56 | P a g e
List of References
[1] Imrich Chlamtac, Marco Conti, Jennifer J.-N, "Mobile ad hoc networking: imperatives and
challenges," ELSEVIER, vol. 1, no. 1, pp. 13-64, 2017.

[2] "Survey on challanges and chracteristics of Mobile ad hoc network," International Journal
of Engineering and Advanced Technology, vol. 3, pp. 1-4, February 2018.

[3] Parul Aggarwal, Himanshu Aggarwa, "Comparative Analysis of Routing Protocols in


Mobile Ad-Hoc Networks," International Journal of Computer Applications, vol. 95, no. 4,
pp. 1-5, june 2018.

[4] Khademzadeh, A., & Rahmani, "characteristcs of non-cooperative nodes in Mobile ad hoc
networks," EURASIP Journal on Wireless Communications and Networking, vol. 4, pp. 15-
64, 2019.

[5] Hemanta Kumar Pati and Harshita, "A Survey on Non-cooperative nodes Detection in
MANET," Researchgate, October 2018.

[6] L. Femila and M. Marsaline Beno, "Optimizing Transmission Power and Energy Efficient
Routing Protocol in MANETs," Springer , pp. 5-7, 2019.

[7] K. Gorantala, "Routing Protocols in Mobile Ad-hoc Networks," Research gate, June 2017.

[8] J. S. Chitode, Shilpa Gaikwad, "Residual Battery Capacity Based Routing Protocol for
Extending Lifetime of Mobile Ad Hoc Network," International Conference On Advances in
Communication and Computing Technology , vol. 5, no. 1, February 2019.

[9] S.Marti, T.Giuli, K.Lai, "Capturing Routing Misbehavior in Mobile Ad-Hoc Networks,"
IEEE, vol. 2, pp. 255-265, 2019.

[10] RuchiaA.Kale, and S. R. Gupta, "An Overview of MANET Ad hoc network," IEEE, vol. 6,
no. 2, pp. 21-27, 2017.

[11] Jeroen Hoebeke, Ingrid Moerman and Piet Demeeste, "An Overview of Mobile Ad Hoc
Networks: Applications and Challenges," IJCSE, vol. 4, no. 2, pp. 12-16, 2019.

57 | P a g e
[12] "An Overview of MANET: Applications, Attacks and Challenges," IJCSMC, vol. 3, no. 1,
pp. 408-417, 2019.

[13] Sadiya Mirza, Sana Zeba Bakshi, "Architecture of MANET," International Research
Journal of Engineering and Technology, vol. 5, pp. 17-20, 2018.

[14] Sandhya Katiyar, Rajneesh Gujral, "Comparative performance analysis of MANET routing
protocols in military operation using NS2," International Conference on Green Computing
and Internet of Things, pp. 27-28, 2018.

[15] S. Djahel, "Emergency rescue application of MANET," Research Gate, 2019.

[16] "Introduction of Mobile Ad hoc Network (MANET)," Springer link, pp. 1-4, July 2022.

[17] Tibebu Legesse Molla, "Energy-aware and stable path AODV for extending network
lifetime," dbu instutional repository, pp. 25-27, September 2021.

[18] Pratik Vyas, Mithilesh Tipkari and Shivika Pathania, "Energy efficient path selection in
MANET," IEEE, vol. 2, no. 2, pp. 182-188, 2018.

[19] R. Shelve, G. Kulkarni, R. Sutar, "Energy Management in mobile ad hoc Network,"


Research Gate, pp. 668–671, 2017.

[20] J. A. Khan, H. K. Qureshi, and A. Iqbal, "Energy management in mobile ad hoc Networks,"
Comput. Electr. Eng, vol. 41, pp. 159–176, 2018.

[21] Sathya.E ,Rajpriya G, "Power Aware Routing for Path Selection with Minimum Traffic in
Mobile Adhoc Network," International Journal of Engineering Research and General
Science, vol. 2, pp. 430- 433, 2018.

[22] Salonee Mishra and Binod Kumar Pattanaya, "Power aware routing in Mobile Adhoc
Networks," ARPN Journal of Engineering and Applied Sciences, vol. 8, no. 2, pp. 173-174,
2019.

[23] Chansu Yu, Been Lee and Yong Youn, "Energy efficient routing protocols for mobile ad

58 | P a g e
hoc networks," IEEE, vol. 2, no. 1, pp. 960-969, 2021.

[24] Push Pender Sarao, "Function of intermediate node in Data Transmission in MANETs,"
IJITEE, vol. 8, no. 2, pp. 891-898, 2019.

[25] S. R. Malwe, N. Taneja and G. P. Biswas, ""Enhancement of DSR and AODV Protocols
Using Link Availability Prediction," IEEE, vol. 97, pp. 4451–4466, 2017.

[26] Pushpa raj, Ramachandran and Dinakaran, "Signal Strength and Residual Power Based
Optimum Transmission Power Routing for Mobile Ad hoc Networks," ScienceDirect, pp.
168-174, 2017.

[27] Sudhir Goswami, Chetan Agrawal, "Location based Energy Efficient Scheme for
Maximizing Routing Capability of AODV protocol in MANET," Wireless and Microwave
Technologies, vol. 3, pp. 33-34, 2018.

[28] Pratik Vyas, Mithilesh Tipkari , "Energy efficient path selection in MANET," IEEE, pp. 22-
47, 2019.

[29] Banjo Kumar Panda, Urmila Banjar and Prasant Kumar Pattnaik, "A novel energy efficient
obstacle aware routing algorithm for MANET," International Journal of Knowledge-based
and Intelligent Engineering Systems, vol. 2, no. 1, pp. 37-44, 2020.

[30] Ranjan Kumar and Mansi Gupta, "Route Stability and Energy Aware based AODV in
MANET," IEEE, 2019.

[31] Uma Rathore Bhatt, Priyanka Jain, "Enhanced AODV- Energy Efficient Routing Protocol
for MANET," IEEE, vol. 5, no. 1, pp. 54-57, 2017.

[32] Namita Agrawal, Nitin Choubey and Prashant Mishra, "Energy Efficient Route Selection in
MANET," International Journal of Computer Science and Information Technologies, vol. 5,
no. 3, 2015.

[33] Mr. Nirav Bhatt, Dr. Dhaval Katharina, "Comparison and Analysis of Simulators for Ad hoc
Wireless Networks," IOSR Journal of Engineering, vol. 3, no. 12, pp. 1-9, 2017.

59 | P a g e
[34] Amer O Abu Salem , Hebatallah Awed, "Mobile Ad-hoc Network Simulators, a Survey, and
Comparisons," International Journal of P2P Network Trends and Technology, vol. 4, no. 1,
pp. 22-26, 2017.

[35] S. V. Mallapu, "Survey on Simulation Tools for Mobile Ad-Hoc Network," Int. J. Comput.
Networks Wirel. Commun, vol. 2, pp. 241-248, 2015.

[36] Gibson Chengeta & Grant Blaise O’Reilly, "Survey on Simulation Tools for Wireless
Mobile Adhoc Networks," IEEE, 2015.

[37] P.-J. Wu, "NSG2," 2007.

[38] B. Roy, S. Banik, N. Chaki, "QAODV : An AODV Based Routing Protocol for QoS
Parameters," IEEE, April 2017.

[39] Terawatt Sarayaku Ekram Hossam, "Introduction to Network Simulator NS2 Second
Edition," Springer New York Dordrecht Heidelberg London, pp. 52-54, 2015.

[40] Vinita Mishra, Smita Jangale, "Analysis and comparison of different network simulators,"
International Journal of Application or Innovation in Engineering & Management, 2017.

[41] K. M. Jyothish, K. J. Leenu, R. Mathew, T. Thomas, and M. Tech, "Detection of False


Alarm in Handling of non-cooperative Nodes in Mobile Ad-hoc Networks," International
Journal for Scientific Research & Development, vol. 1, no. 6, pp. 4-8, 2019.

60 | P a g e
Appendix
Appendix A: Tcl Script for simulating Proposed-AODV Routing Protocol

#All settings define options

Set val(chan) Channel/WirelessChannel ;# channel type

Set val(prop) Propagation/TwoRayGround ;# radio-propagation model

Set val(ant) Antenna/OmniAntenna ;# Antenna type

Set val(ll) LL ;# Link layer type

Set val(ifq) Queue/DropTailQueue ;# channel type

Set val(ifqlen) 50 ;# Queue size

Set val(netif) Phy/WirelessPhy ;# network interface type

Set val(mac) mac/802_1l ;# MAC type

Set val(rp) AODV ;# routing protocol

Set val(x) 1000 ;# X-axis length

Set val(y) 1000 ;# Y-axis length

Set val(finish) 100 ;# simulation time takes

Set val(x) 12 ;# number of mobile cooperate nodes

Set val(x) 4 ;# number of mobile non-cooperative nodes

Set ns_[new Simulator] ;# NS2 declaration named as ns_

Set f [ open out.tr w]

$ns_ trace-all $f

Set namtrace [open out.nam w]

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

Set topo [new topography]


61 | P a g e
$topo load_flatgrid $val(x) $val(y)

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

Set chan_1 [new $val (chan) ]

# CONFIGURE AND CREATE NODES

$ns_ node-config -adhocRouting $val (rp)

-llType $val (ll) \

-macType $val(mac) \

-ifqType $val(ifq) \

-ifqLen $val(ifqlen) \

-antType $val(ant) \

-proType $val(prop) \

-phyType $val(netif) \

-topoInstance $topo \

# CONFIGURATION OF ENERGY MODEL

-energyModel “EnergyMode” \

-initialEnergy 100.0 \

-txPower 28.1838 \

-rxPower 28.1838 \

-idlePower 0.05 \

-sleepPower 0.03 \

-agentTrace ON \

-routerTrace ON \

-macTrace ON \

62 | P a g e
-movementTrace ON \

-channel $chan_1

For { set i 0 } {$i < $val (nn) { incr i } {

set node_($i) [$ns_node]

$ns_ initial_node_pos $node_($i) 35

proc finish {} {

global ns_ namtrace filename

$ns_ flush-trace

close $namtrace

exec nam out.nam &

exit 0
}

source 16mob_nodes # Node mobility and connectivity function

$ns_at 0.0 “$node_(1) color blue

$node_(1) color “blue”

$ns_at 0.0 “$node_(2) color orange”

$node_(1) color “blue”

$ns_at 0.0 “$node_(3) color red”

$node_(1) color “red”

$ns_ at 0.0 “[$node_(3) set ragent_ ] non-cooperative”

set udp_ (0) [new Agent/UDP]

$ns_ attach-agent $node_(1) $udp_ (0)

63 | P a g e
set null_ (0) [new Agent/Null]

$ns_ attach-agent $node_(2) $udp_ (0)

set cbr_ (0) [new Application/Traffic/CBR]

$cbr_ (0) set packetSize_ 512

$cbr_ (0) set interval_ 0.2

$cbr_ (0) set random_ 1

$cbr_ (0) set maxpkts_ 300

$cbr_ (0) attach-agent $udp_ (0)

$ns_ connect $udp_ (0) $null_(0)

$ns_ at 0 “$cbr_ (0) start”

$ns_ at 100 “$cbr_ (0) stop”

$ns_ at $val (finish) “finish”

Puts “Start of simulation…”

$ns_ run

Appendix B: configuration of received siginal strength

// The following line of code is added by Chimdesa

void

wirelessPhy::check_rss(Packet*p)

{ double rss; // received siginal strength

rss = 0.0;

assert(initialized());

double Pr; // received power

pr = p -> txinfo_.getTxPr();

64 | P a g e
rss = Pr; //swapping

if (rss < = -27 && > = -78)

printf(“RREQ processed and check node energy value \n”);

else if (rss >= -27 && rss <= -78)

printf(“RREQ is cannot join the network \n”);

}}

Appendix C: Modification of existing algorithm code

Struct hdr_aodv_request {

u_int8_t rq_type; // Packet Type

u_int8_t reserved [2];

u_int8_t rq_hop_count; // Hop count

u_int8_t rq_hop_count; // hop count u_int8_t rq_bcast_id;. // broadcast id

nsaddr_t rq_dst; // destination IP address

u_int32_t. rq_dsr_seqno; //Destination sequence number

nsaddr_t rq_src; // source Ip address

u_int32_t rq_src_seqno; // source sequence number

double rq_timestamp; // When request sent

double rq_energy; // request added by chimdesa

void

AODV:: recRequest (Packet *p) {

65 | P a g e
double average_energy; // average energy path

double t_energy = 0.0; // total node energy of the route

double_hop_count; //total hop count of the route

t_hop_count = rq-> rq_hop_count;

Mobile node *m_node;

m_node =(MobileNode *)(Node::get_node_by_address)(index);

rq-> rq_energy = m_node->energy_model()->energy ();

for(int i =0; i <= path; i++) {

path++;

t_energy = + rq-> rq_energy;

average_energy = t_energy/t_hop_count;

max_energy = average_energy;

for(int j = 0; j<=path; j++) {

path ++;

if(max_eng <=rt -> rt_energy){

max_eng = rt -> rt_energy;

else if(rq->rq->energy >= rt-> rt_energy){

max_eng = rq->rq_energy;

rq->rq_energy = max_eng;

}}

void

AODV::recvReply (Packet*p){

66 | P a g e
...........

...........

// the below code was added by chimdesa

((rt->rt_energy<rp->rp_max_min_avrg_eng) ||

(rt->rt_energy<rp->rp_max_min_avrg_eng&&

(rt->rt_hops> rp->rp_hop_count)))}} // for better routing

67 | P a g e

You might also like