A homepage subtitle here And an awesome description here!

18 August 2019

Routing in VANETs using ns3

Part 1
WAVE - Wireless Access for Vehicular environments. vanet-routing-compare.cc It might take more than an hour. The readers are requested to be patient. SUMO, VANETs, routing comparison 1. Explain the full source code (1550 lines of code) 2. Creating a real scenario using osm (Open Street Map Web Wizard) 3. Performance analysis for various vanet protocols. https://www.nsnam.com Location of the source code /home/pradeepkumar/ns-allinone-3.27/ns-3.27/src/wave/examples
Move this file to the scratch/ for inclusion of all modules. Step 1: Explanation of source code. Copy the file to scratch folder. This is just Part 1 of the VANET comparison

Part 2
Please watch the First Part before watching this video  

Part 2 - Analysis of the results.

Please go through the first video (Part 1) and then watch this video (PArt 2)

#VANETs #NS3 #Routing

1. SUMO for web traffic (osmWebWizard.py)
2. Convert this into mobility.tcl file and that can be loaded to vanet-routing-compare.cc file (as discussed in part1)
3. We will be analysing various metrics like 
Receive Rate
Packets Received
Mac PHY overhead
Packetloss
Throughput and other metrics.
Files that are generated
mobility.tcl (for generating traffic in the network)
.tr (Ascii Trace, throughput and goodput)
.flowmon (FlowMonitor)
.xml (for NetAnim)
.pcap (Wireshark)

Step 1 - SUMO

$] export SUMO_HOME=/home/pradeepkumar/sumo/
$] cd sumo/tools
$] python osmWebWizard.py

Once the data generated

$] sumo -c osm.sumocfg --fcd-output trace.xml
sumo has a traceExporter.py file, this file has to be processed.


$]  python traceExporter.py -i 2019-08-18-20-47-08/trace.xml --ns2mobility-output=/home/pradeepkumar/mobility.tcl

from the mobility.tcl file,there are 
32 nodes (vehicles) and 249 seconds


Step 2:
NS3 part
Copy the file vanet-routing-compare.cc file to the scratch folder. 
$] cp ns-allinone-3.27/ns-3.27/src/wave/examples/vanet-routing-compare.cc ns-allinone-3.27/ns-3.27/scratch/

Do the modifications in line numbe 2392 as indicated in the video

My simulation will be running for various protocols like OLSR, AODV and DSDV
Scenario 2 is used for Selaiyur, Tambaram, Chennai, India
Total time is 30 seconds 
Vehicle movement is 20m/s

$] ./waf --run "scratch/vanet-routing-compare --protocol=1 --scenario=2"
1 - OLSR 
2- AODV
3- DSDV
4. DSR


To process the results, we used gnuplot and LibreOFfice Spreadsheet
Gnuplot Code.

set terminal pdf
set output "RR.pdf"
set title "Receive Rate"
set xlabel "Simulation Time (Seconds)"
set ylabel "Receive Rate"
plot "AODV.csv" using 1:2 with linespoints title "AODV", "OLSR.csv" using 1:2 with linespoints title "OLSR","DSDV.csv" using 1:2 with linespoints title "DSDV","DSR.csv" using 1:2 with linespoints title "DSR" 

set terminal pdf
set output "PR.pdf"
set title "Packets Receives"
set xlabel "Simulation Time (Seconds)"
set ylabel "PAckets Received"
plot "AODV.csv" using 1:3 with linespoints title "AODV", "OLSR.csv" using 1:3 with linespoints title "OLSR","DSDV.csv" using 1:3 with linespoints title "DSDV","DSR.csv" using 1:3 with linespoints title "DSR" 

set terminal pdf
set output "macphy.pdf"
set title "Mac Phy OVerhead"
set xlabel "Simulation Time (Seconds)"
set ylabel "Overhead"
plot "AODV.csv" using 1:22 with linespoints title "AODV", "OLSR.csv" using 1:22 with linespoints title "OLSR","DSDV.csv" using 1:22 with linespoints title "DSDV","DSR.csv" using 1:22 with linespoints title "DSR" 


WE have done the basic simulations.. and plotting of characteristics. 
Similar way , we can do it for other results also.

In the next video, I will be showcasing how to use flowmonitor for plotting the various losses, bitrates in the system or network.

python scripts to read the flowmonitors.

Thanks for watching. please share the videos to your friends and ask them to subscribe. 

Thank you....


Powered by Blogger.

About Me

Featured Post

5G Network Simulation in NS3 using mmWave | NS3 Tutorial 2024

5G Network Simulation in NS3 Using mmWave This post shows the installation of ns3mmwave in Ubuntu 24.04 and simulates 5G networks in ns3. In...

Contact form

Name

Email *

Message *

Total Pageviews

Search This Blog

Pages

Pages

Pages - Menu

Most Popular

Popular Posts