GPSR - Greedy Perimeter and Stateless Routing
Please watch the following video for Full details.
VANETs - Vehicular Adhoc NEtworks.
PA GPSR, MM GPSR and GPSR.
Under and post graduate - You can use the modules as it is and compare these protcols for VANETs.
If you are a PhD scholar, you can modify the protocols and design your own GPSR alternatives.
In this video, we will be seeing the installation of GPSR and some source codes.
ns-3.27 which i could not succeed, So I prefer going to ns-3.23
we can both multiple version of ns3. I am going to run ns-3.23 for GPSR and other simulations with ns-3.27 and ns-3.29
Welcome to the Installation.
If you are installing ns3 for the first time, install the following packages.
(You can copy paste)
$] sudo apt install build-essential autoconf automake libxmu-dev python-pygraphviz cvs mercurial bzr git cmake p7zip-full python-matplotlib python-tk python-dev python-kiwi python-gnome2 python-gnome2-dev qt4-dev-tools qt4-qmake qt4-qmake qt4-default gnuplot-x11 wireshark default-jdk
We will download the ns3.23 package. Better that you may use the commands one by one as given below.
$] wget -c http://www.nsnam.org/release/ns-allinone-3.23.tar.bz2
$] tar xjvf ns-allinone-3.23.tar.bz2
$] cd ns-allinone-3.23/
The following are the commands to copy the PA GPSR folder to ns3 folders. I have shown how to copy in GUI.
$] cp -a PA-GPSR/src/. ns-3.23/src/
$] cp -a PA-GPSR/examples/. ns-3.23/scratch/
$] cp -a PA-GPSR/results/ ns-3.23/
$] cp -a PA-GPSR/figures/ ns-3.23/
$] cp -a PA-GPSR/scripts/ ns-3.23/
$] cp PA-GPSR/main.sh ns-3.23/
Installation of ns3.23 along with GPSR protocol.
Open a Terminal
$] cd ns-allinone-3.23/ns-3.23
$] CXXFLAGS="-Wall -std=c++0x" ./waf configure --enable-examples
I got some error
$] ./waf
$] sudo ./waf install
Installation of GPSR and their alternatives is done.
To execute an example
We have already have a file in the scartch folder.
Just for installation of GPSR protocol.
Thanks for watchign my Channel
Please subscribe and share it to your friends.
https://www.nsnam.com
Subscribe to My Youtube Channel - Engineering Clinic
Dear,
ReplyDeleteI flowed all the steps.
In the folder PAgpsr , I found one subfolder called " .git " so I don't no if I have to copy also this subfolder in nS3 along with figures, results, scripts, main.sh. So, I copied this subfolder with the 4 subfolders. And, I run.
CXXFLAGS, ./waf, sudo ./waf install
But I get an error (see below).
Please help me to solve the problem
- install /usr/local/include/ns3.23/ns3/core-module.h (from build/ns3/core-module.h)
+ install /usr/local/include/ns3.23/ns3/csma-layout-module.h (from build/ns3/csma-layout-module.h)
- install /usr/local/include/ns3.23/ns3/csma-module.h (from build/ns3/csma-module.h)
../scratch/pagpsr-main.cc: In constructor ‘GpsrExample::GpsrExample()’:
../scratch/pagpsr-main.cc:93:15: warning: ‘GpsrExample::algorithm’ will be initialized after [-Wreorder]
93 | std::string algorithm;
| ^~~~~~~~~
../scratch/pagpsr-main.cc:92:8: warning: ‘bool GpsrExample::newfile’ [-Wreorder]
92 | bool newfile;
| ^~~~~~~
../scratch/pagpsr-main.cc:127:1: warning: when initialized here [-Wreorder]
127 | GpsrExample::GpsrExample () :
| ^~~~~~~~~~~
../scratch/pagpsr-main.cc:98:12: warning: ‘GpsrExample::nPairs’ will be initialized after [-Wreorder]
98 | uint32_t nPairs;
| ^~~~~~
../scratch/pagpsr-main.cc:77:15: warning: ‘std::string GpsrExample::phyMode’ [-Wreorder]
77 | std::string phyMode;
| ^~~~~~~
../scratch/pagpsr-main.cc:127:1: warning: when initialized here [-Wreorder]
127 | GpsrExample::GpsrExample () :
| ^~~~~~~~~~~
../scratch/pagpsr-main.cc: In member function ‘void GpsrExample::Run()’:
../scratch/pagpsr-main.cc:320:33: warning: variable ‘t’ set but not used [-Wunused-but-set-variable]
320 | Ipv4FlowClassifier::FiveTuple t=classifier->FindFlow(i->first);
| ^
../scratch/pagpsr-main.cc: In member function ‘void GpsrExample::InstallInternetStack()’:
../scratch/pagpsr-main.cc:416:15: warning: unused variable ‘dst_c’ [-Wunused-variable]
416 | char const *dst_c = dst_s.c_str();
| ^~~~~
../scratch/pagpsr-main.cc:417:15: warning: unused variable ‘source_c’ [-Wunused-variable]
417 | char const *source_c = source_s.c_str();
| ^~~~~~~~
Waf: Leaving directory `/home/doctoratas16/ns-allinone-3.23/ns-3.23/build'
Build failed
Traceback (most recent call last):
File "/home/doctoratas16/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Runner.py", line 162, in start
st=tsk.runnable_status()
File "/home/doctoratas16/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Build.py", line 453, in runnable_status
ret=super(inst,self).runnable_status()
File "/home/doctoratas16/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Task.py", line 289, in runnable_status
new_sig=self.signature()
File "/home/doctoratas16/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Task.py", line 274, in signature
self.sig_explicit_deps()
File "/home/doctoratas16/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Task.py", line 327, in sig_explicit_deps
raise Errors.WafError('Missing node signature for %r (required by %r)'%(x,self))
WafError: Missing node signature for /home/doctoratas16/ns-allinone-3.23/ns-3.23/build/src/fd-net-device/ns3.23-tap-device-creator-debug (required by
{task 140658800166352: inst ns3.23-tap-device-creator-debug -> })
Many thanks sir for uploading this video. I am a big fan of your working.
ReplyDeletehats off to you sir.
Pawan Singh
Assistant Professor
IGNTU Amarkantak
Thank you Pawan,
Delete@NS_DOC did you rectified the issue if so do mention i too am troubled and need proper solution.
ReplyDeleteDear Sir
ReplyDeleteI am getting the following error while executing this command on ubuntu 20.04 version
please help me to solve this problem.
user1@HP:~/ns-allinone-3.23/ns-3.23$ ./waf --run scratch/pagpsr-main
Waf: Entering directory `/home/user1/ns-allinone-3.23/ns-3.23/build'
Waf: Leaving directory `/home/user1/ns-allinone-3.23/ns-3.23/build'
'build' finished successfully (14.308s)
Traceback (most recent call last):
File "/home/user1/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Scripting.py", line 97, in waf_entry_point
run_commands()
File "/home/user1/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Scripting.py", line 155, in run_commands
run_command('shutdown')
File "/home/user1/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Scripting.py", line 146, in run_command
ctx.execute()
File "/home/user1/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Context.py", line 84, in execute
self.recurse([os.path.dirname(g_module.root_path)])
File "/home/user1/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Context.py", line 125, in recurse
user_function(self)
File "/home/user1/ns-allinone-3.23/ns-3.23/wscript", line 926, in shutdown
out = open(build_status_file, 'w')
IOError: [Errno 13] Permission denied: '/home/user1/ns-allinone-3.23/ns-3.23/build/build-status.py'
.
Dear Sir
ReplyDeletei am getting the following error, kindly help me to solve this.
I am working on ubuntu 20.04.
user1@HP:~/ns-allinone-3.23/ns-3.23$ ./waf --run scratch/pagpsr-main
Waf: Entering directory `/home/user1/ns-allinone-3.23/ns-3.23/build'
Waf: Leaving directory `/home/user1/ns-allinone-3.23/ns-3.23/build'
'build' finished successfully (14.308s)
Traceback (most recent call last):
File "/home/user1/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Scripting.py", line 97, in waf_entry_point
run_commands()
File "/home/user1/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Scripting.py", line 155, in run_commands
run_command('shutdown')
File "/home/user1/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Scripting.py", line 146, in run_command
ctx.execute()
File "/home/user1/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Context.py", line 84, in execute
self.recurse([os.path.dirname(g_module.root_path)])
File "/home/user1/ns-allinone-3.23/ns-3.23/.waf-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/Context.py", line 125, in recurse
user_function(self)
File "/home/user1/ns-allinone-3.23/ns-3.23/wscript", line 926, in shutdown
out = open(build_status_file, 'w')
IOError: [Errno 13] Permission denied: '/home/user1/ns-allinone-3.23/ns-3.23/build/build-status.py'