To simulate Ad-hoc On-demand Multipath Distance Vector protocol (AOMDV) projects within NS2, we will be operating with a reactive routing protocol, which prolongs AODV by permitting several paths among the origin and destination nodes. This protocol is specifically helpful for minimizing route discovery overhead and enhancing fault tolerance within mobile ad-hoc networks (MANETs).
phdprime.com only can guide you with detailed guidance and project results so If you are looking for best AOMDV Protocol Projects simulation in ns2 tool , then we will serve you with good outcomes.
We will teach you through the step-by-step method on how to simulate AOMDV using NS2:
Steps to Simulate AOMDV Protocol Projects in NS2
- Install NS2 with AOMDV Support
By default, NS2 does not encompass AOMDV. But, we can discover AOMDV patches for NS2 (often for NS2.35) or contain AOMDV from a research project or module that supports it.
Steps to apply an AOMDV patch:
- Download the AOMDV patch for NS2.
- Implement the patch to the NS2 installation:
cd ns-allinone-2.35/ns-2.35/
patch -p1 < aomdv-patch.diff
- Rebuild NS2:
./configure
make clean
make
If the patch installation is successful then AOMDV will be obtainable as a routing protocol in the NS2 simulations.
- Set Up AOMDV Routing Protocol
When AOMDV is allowed in the NS2 configuration then we can set up nodes to utilize AOMDV as their routing protocol.
Example TCL Script for Setting Up AOMDV:
# Create a new simulator instance
set ns [new Simulator]
# Set up network parameters (wireless channel, propagation, MAC, etc.)
set val(chan) Channel/WirelessChannel ;# Channel type
set val(prop) Propagation/TwoRayGround ;# Propagation model
set val(netif) Phy/WirelessPhy ;# Network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(ifq) Queue/DropTail/PriQueue ;# Interface queue type
set val(ll) LL ;# Link layer type
set val(ant) Antenna/OmniAntenna ;# Antenna type
set val(x) 1000 ;# X dimension
set val(y) 1000 ;# Y dimension
# Configure nodes to use AOMDV as the routing protocol
$ns node-config -adhocRouting AOMDV \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen 50 \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channelType $val(chan)
# Create nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
# Set initial positions for nodes
$n0 set X_ 50; $n0 set Y_ 50; $n0 set Z_ 0.0
$n1 set X_ 200; $n1 set Y_ 200; $n1 set Z_ 0.0
$n2 set X_ 300; $n2 set Y_ 300; $n2 set Z_ 0.0
$n3 set X_ 400; $n3 set Y_ 400; $n3 set Z_ 0.0
$n4 set X_ 500; $n4 set Y_ 500; $n4 set Z_ 0.0
- Set Up Traffic Between Nodes
We can replicate traffic among the nodes utilizing TCP or UDP. AOMDV uses numerous routes for communication, thus traffic can be routed via diverse paths.
Example for TCP Traffic:
# Set up TCP connection between node 0 and node 4
set tcp0 [new Agent/TCP]
set sink0 [new Agent/TCPSink]
$ns attach-agent $n0 $tcp0
$ns attach-agent $n4 $sink0
$ns connect $tcp0 $sink0
# Create FTP traffic over TCP
set ftp0 [new Application/FTP]
$ftp0 attach-agent $tcp0
$ns at 2.0 “$ftp0 start”
$ns at 10.0 “$ftp0 stop”
Example for UDP Traffic (CBR):
# Set up UDP communication between node 1 and node 3
set udp0 [new Agent/UDP]
set null0 [new Agent/Null]
$ns attach-agent $n1 $udp0
$ns attach-agent $n3 $null0
$ns connect $udp0 $null0
# Generate CBR traffic over UDP
set cbr0 [new Application/Traffic/CBR]
$cbr0 set packetSize_ 512
$cbr0 set rate_ 100kb
$cbr0 attach-agent $udp0
$ns at 3.0 “$cbr0 start”
$ns at 12.0 “$cbr0 stop”
- Enable Node Mobility (Optional)
AOMDV is specifically helpful in mobile environments, thus we can allow mobility for nodes to replicate modifying network topologies.
# Enable mobility for nodes
$ns at 5.0 “$n0 setdest 250 300 15.0” ;# Move node n0 to a new destination at 15 m/s
$ns at 7.0 “$n1 setdest 400 350 10.0” ;# Move node n1 to a new destination at 10 m/s
- Run the Simulation
We can save TCL script (e.g., aomdv_simulation.tcl) and then run it using NS2:
ns aomdv_simulation.tcl
It will make trace files (.tr) and NAM files (.nam) for investigation and visualization in Network Animator (NAM).
- Analyze the Simulation Results
We can investigate crucial parameters such as Packet Delivery Ratio (PDR), End-to-End Delay, and Routing Overhead to compute the performance of AOMDV in the network.
Example AWK Script to Calculate Packet Delivery Ratio:
BEGIN { sent = 0; received = 0; }
{
if ($1 == “s” && $4 == “AGT”) { sent++; }
if ($1 == “r” && $4 == “AGT”) { received++; }
}
END { print “Packet Delivery Ratio = “, received/sent*100, “%”; }
- Example Project Ideas for AOMDV Simulation
- Performance Comparison Between AOMDV and AODV:
- Replicate both AOMDV and AODV in the similar network and relate performance such as packet delivery, end-to-end delay, and routing overhead.
- Impact of Node Mobility on AOMDV:
- Investigate how node mobility impacts AOMDV’s ability to maintain numerous routes and make certain packet delivery.
- Energy-Efficient AOMDV:
- Change AOMDV to contain energy efficiency in route selection and examine how it influences network lifetime and performance.
- AOMDV in High Traffic Scenarios:
- Mimic AOMDV in a high-traffic network and estimate its performance such as congestion control and load balancing.
- Fault Tolerance in AOMDV:
- Replicate node or link failures within a network running AOMDV and examine how the protocol adjusts to maintain communication via another paths.
By following this guide, you can simulate AOMDV protocol projects in NS2 and analyse the performance of Ad-hoc On-demand Multipath Distance Vector protocol. If you need further assistance with configuring specific scenarios or analysing performance metrics, we will be made available.