Happy New Year to all the readers. Its long, I have not posted any thing on this blog except comments
. So, here, today we will see how to install ns3 on linux box. The home page of ns3 is NS3 Home
the current release is ns3.10 (January 5, 2011) and can be downloaded from DOWNLOAD NS3.10
Step 1: Download ns3.10 and save it some where , but on the same machine where you want to install (Just Kidding
)
Step 2: open the terminal and go to the folder where ns3.10 tar file is.
Step 3: from the terminal run :
$tar -xvf ns-allinone-3.10.tar.bz2
$cd ns-allinone-3.10
$./build.py
you can provide some options to build.py but as a newbie use the default one
When the build process get over (it will take some time), type
$cd ns-3.10
and now we will validate our installation
$./test.py
the out put of this will be some thing like this:
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
‘build’ finished successfully (2.010s)
PASS: TestSuite lte-bearer
PASS: TestSuite lte-propagation-loss-model
PASS: TestSuite wimax-fragmentation
PASS: TestSuite lte-phy
…………..PASS: Example examples/tcp/tcp-nsc-lfnPASS: Example examples/wireless/wifi-ap.pyPASS: Example src/contrib/flow-monitor/examples/wifi-olsr-flowmon.py168 of 168 tests passed (168 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors)
Step 4: Now our ns3 is installed and ready to run sample programs.
$ cp examples/tutorial/first.cc scratch/myfirst.cc
$./waf
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’‘build’ finished successfully (15.900s)
Step 5: now it is the time to run the simulation
$ ./waf –run myfirstWaf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’‘build’ finished successfully (1.353s)Sent 1024 bytes to 10.1.1.2Received 1024 bytes from 10.1.1.1Received 1024 bytes from 10.1.1.2
$cp examples/wireless/ofdm-validation.cc scratch/myofdm.cc$./waf
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’[1330/1502] cxx: scratch/myofdm.cc -> build/debug/scratch/myofdm_2.o[1500/1502] cxx_link: build/debug/scratch/myofdm_2.o -> build/debug/scratch/myofdmWaf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’‘build’ finished successfully (5.842s)
$ ./waf –run myofdm
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’‘build’ finished successfully (1.448s)OfdmRate6MbpsOfdmRate9MbpsOfdmRate12MbpsOfdmRate18MbpsOfdmRate24MbpsOfdmRate36MbpsOfdmRate48MbpsOfdmRate54Mbps
Enjoy Ns3 , soon, I will come back with tutorials on ns3 and dependencies resolution for ns3 (only if some will mention the errors
)
Pingback: Tweets that mention How To Install ns3 on linux ? « WirelessCafe -- Topsy.com
Hey,
You could have posted a simple “hello world” kind of example with 1 transmitter and 1 receiver
with line by line explanation.
Thanks
Dear Sendil,
Thanks for the idea, I will start the tutorial section on ns3 with this
. This post is just for installing ns3, and running the inbuilt examples, means, more on how to install and check ns3 is installed correctly or not. In coming posts I will start on how to write codes and scripts for ns3
thanks and regards,
Ashwini for WirelessCafe !!
thank you for this information,
i tried itbut it giave me some error on some line
i have RedHat Linux ver5. on my pc, does ns3 work on redhat thats one,
second, do i have to install anything on my PC before i start the procedure you had post, i dont have enough experience in ns simulator. so i might need more help.
if yes what do i have to install on my PC
Best Regards,
Dear Hassan,
Please paste the error message, then only we can say some thing, as such the procedure is same for all the distros but will have to check for dependencies.
Thanks and Regards,
Ashwini for WirelessCafe !!
when i execute this command :
$ ./waf –run myfirst
there error :
waf: error: no such option: -r
any clue ? , thanks before ..
FYI, I am Already found it, the command should be …
$ ./waf –-run myfirst
(double dash), eniwe, nice tutorial Mr. Ashwini .., keep going and update with great tutorial..
Build failed: -> task failed (err #1):
{task: cxx visual-simulator-impl.cc -> visual-simulator-impl_2.o}
how to fix erro
Dear Ashwini,
Nice tutorial. Do u have any idea about the implementation of Shim6 protocol in NS-2.33/2.34 or 3.10? Waiting for your kind response
cheers
Mudassir
Thanh and Vampire,
Will need some time to sort and figure that out. meanwhile if come across any solution then please post to help others.
Thanks and regards,
Ashwini for WirelessCafe !!
Mudassir,
No idea about shim6 !!
Thanks and Regards,
Ashwini for WirelessCafe !!
Deas Ashwini
I got the same problem:
….
[1190/1487] cxx: src/tools/visualizer/model/visual-simulator-impl.cc -> build/debug/src/tools/visualizer/model/visual-simulator-impl_2.o
../src/tools/visualizer/model/visual-simulator-impl.cc:20: fatal error: Python.h: No such file or directory
compilation terminated.
Waf: Leaving directory `/home/ymansyali/Documents/ns-allinone-3.10/ns-3.10/build’
Build failed: -> task failed (err #1):
{task: cxx visual-simulator-impl.cc -> visual-simulator-impl_2.o}
how to fix this error
Thanks
Dear Ashwini
Can i apply a new vertical handover decision (WIMAX Vs WLAN ) in Ns-3?
Thanks in advance,
Ammar
Dear Ashwini
Can i apply a new vertical handover decision (WIMAX Vs WLAN ) in Ns-3?
Thanks in advance,
Ammar Bathich
Dear Ammar,
In ns3 there are many things which are already implemented related to LTE and Wimax , you can implement vertical handover algos, but before that go through the documentation of ns3 as it is still in development phase.
All the best,
Ashwini for WirelessCafe !!
thanks for the tutorial
BUT every time i try to run this command: ./build.py
i get the following error:
error: could not open ‘/home/raad/ns-allinone-3.10/ns-3.10/build/config.log’ for writing
what can i do?
Dear RAAD,
there are two options, but first see why the problem is there, may be it is due to the fact that you are not having permission to create or write the file, and may be it is because the file doesnt exist. Solution: you can try to run every thing as sudo , hope this will solve your problem, else, create a config.log as a normal user.
In either cases, make us know, share your solution with others.
All the best,
Ashwini for WirelessCafe !!
thanks for ur replay but i was using sudo
and when i checked for config.log which is supposed to be inside build i found a file “build.py” and it is a file not a folder (directory) so it cant contain config.log i guess
so can u help me and tell me what is the type (.py) and what am i supposed to do now?? thanks in advance
Dear Raad,
.py is for python script, read the installation method carefully, the config.log file should be there in ns-allinone-3.10/ns-3.10/build/ directory.
All the best,
Ashwini for WirelessCafe !!
thanks again this time i got another error:
Checking for program g++ or c++ : not found
Checking for program icpc : not found
Checking for program c++ : not found
/home/raad/ns-allinone-3.10/ns-3.10/wscript:218: error: could not configure a cxx compiler!
does this mean that i should install a c++ compiler before installing NS-3 ??
please help
Dear Raad,
It seems that there is no c++ / g++ compiler installed in your machine, to test , open a terminal and type $whereis gcc c++ g++ cc , this will give you the location of the respective compiler if they are present then only, else you will have to install them. By the way , which os you are using ??
All the best,
Ashwini for WirelessCafe !!
thanks,
i had the following results:
raad@raad-G31T-M7:~$ whereis gcc c++
gcc: /usr/bin/gcc /usr/lib/gcc /usr/share/man/man1/gcc.1.gz
c++:
raad@raad-G31T-M7:~$ whereis gcc g++
gcc: /usr/bin/gcc /usr/lib/gcc /usr/share/man/man1/gcc.1.gz
g++:
raad@raad-G31T-M7:~$ whereis gcc cc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/share/man/man1/gcc.1.gz
cc: /usr/bin/cc /usr/share/man/man1/cc.1.gz
raad@raad-G31T-M7:~$ whereis gcc c++ g++ cc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/share/man/man1/gcc.1.gz
c++:
g++:
cc: /usr/bin/cc /usr/share/man/man1/cc.1.gz
raad@raad-G31T-M7:~
and i am using ubuntu 10.10
what am i supposed to do now and which compiler should i install??
Dear Raad,
Serach for gcc-c++ in synaptic, or make a search for gcc* it will resolve your problem and it will install the required compiler.
All the best,
Ashwini for WirelessCafe !!
another problem!!
root@raad-G31T-M7:/home/raad/ns-allinone-3.10# ./build.py
# Build NSC
Entering directory `nsc-0.5.2′
=> python scons.py liblinux2.6.18.so liblinux2.6.26.so
scons: Reading SConscript files …
Checking target architecure…(cached) x86
AttributeError: SConsEnvironment instance has no attribute ‘CFile’:
File “/home/raad/ns-allinone-3.10/nsc-0.5.2/SConstruct”, line 139:
SConscript(‘globaliser/SConscript’)
File “/home/raad/ns-allinone-3.10/nsc-0.5.2/scons-local-1.2.0.d20090223/SCons/Script/SConscript.py”, line 612:
return apply(method, args, kw)
File “/home/raad/ns-allinone-3.10/nsc-0.5.2/scons-local-1.2.0.d20090223/SCons/Script/SConscript.py”, line 549:
return apply(_SConscript, [self.fs,] + files, subst_kw)
File “/home/raad/ns-allinone-3.10/nsc-0.5.2/scons-local-1.2.0.d20090223/SCons/Script/SConscript.py”, line 259:
exec _file_ in call_stack[-1].globals
File “/home/raad/ns-allinone-3.10/nsc-0.5.2/globaliser/SConscript”, line 18:
env.CFile(target = ‘lexer.lex.cc’, source = ‘lexer.l’)
# Build NSC: failure (ignoring NSC)
Leaving directory `nsc-0.5.2′
# Build NS-3
Entering directory `./ns-3.10′
Note: configuring ns-3 without NSC
=> python waf configure –with-pybindgen ../pybindgen-0.15.0
Checking for program gcc or cc : /usr/bin/gcc
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for gcc : ok
Checking for program g++ or c++ : /usr/bin/g++
Checking for g++ : ok
Checking for program pkg-config : /usr/bin/pkg-config
Checking for -Wl,–soname=foo support : yes
Checking for header stdlib.h : yes
Checking for header signal.h : yes
Checking for header pthread.h : yes
Checking for type uint128_t : not found
Checking for type __uint128_t : not found
Checking for high precision time implementation : cairo 128-bit integer
Checking for header stdint.h : yes
Checking for header inttypes.h : yes
Checking for header sys/inttypes.h : not found
Checking for library rt : yes
Checking for header netpacket/packet.h : yes
Checking for header linux/if_tun.h : yes
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘gtk+-2.0′ found
Checking for pkg-config flags for GTK_CONFIG_STORE : not found
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘libxml-2.0′ found
Checking for pkg-config flags for LIBXML2 : not found
Checking for library sqlite3 : not found
Checking for NSC location : ok ../nsc-0.5.2 (guessed)
Checking for library dl : yes
Checking for NSC supported architecture i686 : ok
Checking for header sys/socket.h : yes
Checking for header netinet/in.h : yes
Checking for program python : /usr/bin/python
Checking for Python version >= 2.3 : ok 2.6.6
Checking for library python2.6 : not found
Checking for library python2.6 : yes
Checking for program python2.6-config : not found
Checking for program python-config-2.6 : not found
Checking for header Python.h : yes
Checking for -fvisibility=hidden support : yes
Checking for pybindgen location : ok ../pybindgen-0.15.0 (given)
Checking for Python module pybindgen : ok
Checking for pybindgen version : ok 0.15.0
Checking for types uint64_t and unsigned long equivalency : no
Checking for types uint64_t and unsigned long long equivalency : yes
Checking for the apidefs that can be used for Python bindings : gcc-ILP32
Checking for Python module pygccxml : not found
Checking for program mpic++ : not found
Checking for program sudo : /usr/bin/sudo
Checking for program valgrind : not found
Package gsl was not found in the pkg-config search path.
Perhaps you should add the directory containing `gsl.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘gsl’ found
Checking for pkg-config flags for GSL : not found
Checking for -Wno-error=deprecated-declarations support : yes
Checking for -Wno-error=deprecated-declarations support : yes
Checking for -fstrict-aliasing support : yes
Checking for -fstrict-aliasing support : yes
Checking for -Wstrict-aliasing support : yes
Checking for -Wstrict-aliasing support : yes
Checking for program doxygen : not found
—- Summary of optional NS-3 features:
Threading Primitives : enabled
Real Time Simulator : enabled
Emulated Net Device : enabled
Tap Bridge : enabled
GtkConfigStore : not enabled (library ‘gtk+-2.0 >= 2.12′ not found)
XmlIo : not enabled (library ‘libxml-2.0 >= 2.7′ not found)
SQlite stats data output : not enabled (library ‘sqlite3′ not found)
Network Simulation Cradle : not enabled (NSC library liblinux2.6.26.so is missing: NSC has not been built?)
Python Bindings : enabled
Python API Scanning Support : not enabled (Missing ‘pygccxml’ Python module)
MPI Support : not enabled (option –enable-mpi not selected)
Use sudo to set suid bit : not enabled (option –enable-sudo not selected)
Build examples and samples : enabled
Static build : not enabled (option –enable-static not selected)
GNU Scientific Library (GSL) : not enabled (GSL not found)
‘configure’ finished successfully (2.496s)
=> python waf
Waf: Entering directory `/home/raad/ns-allinone-3.10/ns-3.10/build’
[1190/1487] cxx: src/tools/visualizer/model/visual-simulator-impl.cc -> build/debug/src/tools/visualizer/model/visual-simulator-impl_2.o
../src/tools/visualizer/model/visual-simulator-impl.cc:20: fatal error: Python.h: No such file or directory
compilation terminated.
[1191/1487] cxx: src/devices/bridge/examples/csma-bridge-one-hop.cc -> build/debug/src/devices/bridge/examples/csma-bridge-one-hop_2.o
Waf: Leaving directory `/home/raad/ns-allinone-3.10/ns-3.10/build’
Build failed: -> task failed (err #1):
{task: cxx visual-simulator-impl.cc -> visual-simulator-impl_2.o}
Traceback (most recent call last):
File “./build.py”, line 121, in
sys.exit(main(sys.argv))
File “./build.py”, line 112, in main
build_ns3(config)
File “./build.py”, line 60, in build_ns3
run_command(["python", "waf"])
File “/home/raad/ns-allinone-3.10/util.py”, line 24, in run_command
raise CommandError(“Command %r exited with code %i” % (argv, retval))
util.CommandError: Command ['python', 'waf'] exited with code 1
please help
well my last comment got lots of code lines in it so i’ll just write the error msg here:
Build failed: -> task failed (err #1):
{task: cxx visual-simulator-impl.cc -> visual-simulator-impl_2.o}
what is wrong now??
thanks in advance
well i figured it out… i didn’t have the packages ns3 needs to be installed
and i did the installation and everything went fine except for i noticed that i had the following msgs while installing:
Checking for type uint128_t : not found
Checking for type __uint128_t : not found
Checking for header sys/inttypes.h : not found
Checking for Python module pygccxml : not found
but everything else went fine knowing that i tested ns3 and ran “hello simulator” script from terminal
so what effect would these “not found” stuff would have on my ns3 ???
thanks in advance
can u plz tell me how to generate and use trace file in ns-3..?
thanks in advance
Dear Raad,
I think Python is not installed or all modules of python are not installed, try with that, and please in next comment, mention all the dependencies you installed for ns3 so that it will help others.
Thanks and Regards,
Ashwini for WirelessCafe !!
Dear Ume,
Will make a post for that soon
Thanks and Regards,
Ashwini for WirelessCafe !!
Thanks Ashwini for your help.
what i did to install ubuntu was to follow the steps in this link http://www.nsnam.org/wiki/index.php/Installation#Prerequisites
in parallel with the installation steps mentioned in the NS-3 tutorial which is available on their official site http://nsnam.org/tutorials.html
(by the way i was installing NS-3.10 on ubuntu 10.10)
but this can be done on some other ubuntu editions for example ubuntu 9.10
Dear Raad,
Thanks for the information
i will try to modify the post accordingly, I prefer fedora, so that I will not need to install the dependencies.
Thanks and Regards,
Ashwini for WirelessCafe !!
Pingback: Installing Network Simulator(ns2.34) in Ubuntu10.10 « tutorMicman
Hi all,
Why i’m getting permission denied when try to run the build.py? I already use login as a root…
Dear Azlan,
try with chmod +x build.py
or check the mount attributes of the drive, may be it is mounted in non executeable mode.
Also please specify the distro you are using.
I think second one be the main reason.
All the best,
Ashwini for WirelessCafe !!
hi again i installed ns3.10 on ubuntu 3.10 but i got some missing stuff:
type uint128_t
type __uint128_t
header sys/inttypes.h
so from where can i download them and where should i place them in the ns3 folder?
Dear Raad,
try to explore packages on ubuntu package site, I am having no idea about this error

and please share the solutions
I think you will need to install some additional package to resolve this, I never get such error on my OS (fedora 1x full install)
All the best,
Ashwini for WirelessCafe !!
hey
thnx very much Ashwini Shankar Patankar this tutorial in instalation of ns is more useful
i found this
PASS: Example examples/wimax/wimax-multicast
PASS: Example examples/wireless/multirate –totalTime=0.3s –rateManager=ns3::RraaWifiManager
PASS: Example examples/wireless/wifi-ap –verbose=0
155 of 161 tests passed (155 passed, 6 skipped, 0 failed, 0 crashed, 0 valgrind errors)
is that mean any error on instalition the exmaple work propably with out error plz tell me if any error occure in installation and if u can help me with any tutorial about how can i use it .
best regard
Montadher aladdab
Dear Raad,
I figured it out, open the respective file and include the one file by name “types” or “sys/types”, the problem will get solved
Thanks and Regards,
Ashwini for WirelessCafe !!
Dear Montadher,
You have successfully installed ns 3, try to run some examples.
All the best,
Ashwini for WirelessCafe !!
hi,
dir Ashwini if you can help me to learn how can build a project or write a code or any thing about NS3.10 i want a build to access piont with 5 mobile
best regards
montadher aladdab
Dear Monntadher,
As soon as I will get time, I will make the post for the same. Meanwhile, if you come out with some thing, and want to share here on the blog, mail me, I will grant you the rights to make post.
Thanks and Regards,
Ashwini for WirelessCafe !!
Hi all,
To install ns-allinone-3.11 under Fedora 11, I’ve followed the instructions listed above. Every thing was ok until the fifth step where I tryed to execute the lte-device example. I tryed the following commands:
$ cp src/lte/examples/lte-device.cc scratch/lte-device.cc
$ ./waf
this was the output of this command. It shows that the build was seccessful.
“Waf: Entering directory `/home/dhouha/Bureau/ns-allinone-3.11/ns-3.11/build’
Waf: Leaving directory `/home/dhouha/Bureau/ns-allinone-3.11/ns-3.11/build’
‘build’ finished successfully (3.924s)”
but when i tried to run the executable:
#./waf –-run build/debug/scratch/lte-device
I got this error message :
error: No such command ‘\xe2\x80\x93-run’
Maybe the problem is related to the version I’m working with. I don’t know exactly. Have you any idea about the cause?
Thanks in advance.
I need some inputs regarding ns3 usage.
- Basically I am planning to verify one of our device’s tcp functionality. This device has got its own proprietary OS with tcp stack and etc etc… so we are planning to verify the few of the tcp functionalities with few of the test cases like dropping packet, not sending ack and etc…
- We came across ns3 and felt you have sound knowledge in this ns3 too.
questions:
1) How to create EMU netdevice and how to configure it to connect to a real host?
2) How to implement dropping some tcp packets and how to delaying the packet responses?
3) Does emulator capable of doing the above two functionalities or we need to integrate emulator and simulator?, if we can integrate emulator with simulator please let me know how?
Regards,
Prasanna
# Build NSC
Entering directory `nsc-0.5.2′
=> python scons.py liblinux2.6.18.so liblinux2.6.26.so
scons: Reading SConscript files …
Checking target architecure…(cached) x86
AttributeError: SConsEnvironment instance has no attribute ‘CFile’:
File “/home/mint/ns-allinone-3.10/nsc-0.5.2/SConstruct”, line 139:
SConscript(‘globaliser/SConscript’)
File “/home/mint/ns-allinone-3.10/nsc-0.5.2/scons-local-1.2.0.d20090223/SCons/Script/SConscript.py”, line 612:
return apply(method, args, kw)
File “/home/mint/ns-allinone-3.10/nsc-0.5.2/scons-local-1.2.0.d20090223/SCons/Script/SConscript.py”, line 549:
return apply(_SConscript, [self.fs,] + files, subst_kw)
File “/home/mint/ns-allinone-3.10/nsc-0.5.2/scons-local-1.2.0.d20090223/SCons/Script/SConscript.py”, line 259:
exec _file_ in call_stack[-1].globals
File “/home/mint/ns-allinone-3.10/nsc-0.5.2/globaliser/SConscript”, line 18:
env.CFile(target = ‘lexer.lex.cc’, source = ‘lexer.l’)
# Build NSC: failure (ignoring NSC)
Leaving directory `nsc-0.5.2′
# Build NS-3
Entering directory `./ns-3.10′
Note: configuring ns-3 without NSC
=> python waf configure –with-pybindgen ../pybindgen-0.15.0
Checking for program gcc or cc : /usr/bin/gcc
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for gcc : ok
Checking for program g++ or c++ : not found
Checking for program icpc : not found
Checking for program c++ : not found
/home/mint/ns-allinone-3.10/ns-3.10/wscript:218: error: could not configure a cxx compiler!
Traceback (most recent call last):
File “./build.py”, line 121, in
sys.exit(main(sys.argv))
File “./build.py”, line 112, in main
build_ns3(config)
File “./build.py”, line 59, in build_ns3
run_command(cmd)
File “/home/mint/ns-allinone-3.10/util.py”, line 24, in run_command
raise CommandError(“Command %r exited with code %i” % (argv, retval))
util.CommandError: Command ['python', 'waf', 'configure', '--with-pybindgen', u'../pybindgen-0.15.0'] exited with code 1
I am having this problem when i am installing ns3-3.10 and ns3-3.11
what should i do?
hii ,
i am new to ns3 and will be working on mesh networking.i have downloaded and installed ns3 on fedora 11 and the examples,tests seem to working fine.What i dont understand is how do i simulate any script or run an animation?? i’ve read somewhere about NetAnim do i have to install that also.Simulation in ns3 is different from ns2 where u can simply give a command as “ns filename.tcl” can you plz tell me how does it work out in ns3.little confused out here.
thanks in advance,
Shashank
I am not able to execute the command ./waf –run filename
It says error no such command –run exists.
hi.. dude.. thanks for this page..
i got it…
Dear Vengadesh,
Thanks, you can also share your experience with ns3 by writing post about it on WirelessCafe
the whole community will appreciate it
Thanks and Regards,
Ashwini for WirelessCafe !!
Dear Sanika.
Check the installation, I suspect some error in the installation or setting the environment variables.
All the best,
Ashwini for WirelessCafe !!
how to work on NetAnim in ns-3.11
i follow all steps mentioned in http://www.nsnam.org/wiki/index.php/NetAnim
but in 3rd step ns3.pro does not find
pls help me…….
how to install ns3 in ubuntu?please let me know….
thank you
Dear Saburi,
Same way as mentioned in the post, if any error will appear then make us know
All the best,
Ashwini for WirelessCafe !!
Dear Sonal,
I will try and will make you know, meanwhile, if you will get the solution please share so that others will get benefited.
thanks and regards,
Ashwini for WirelessCafe !!
Can u tell me what the hell should I do in case that my ns3 don’t interprate .py(python) files… Well I try what you did in the tutorial and with .cc it works fine but when I tried with .py (at the same folder scratches) gives me:
Waf: Entering directory `/home/flames/repost/ns-allinone-3.11/ns-3.11/build’
program ‘primeiro’ not found; available programs are: [‘main-callback’, ‘src/core/examples/main-callback’, ‘sample-simulator’, ‘src/core/examples/sample and so on so on…
Please help me :’(
Deas Ashwini
I got the problem installation NS3 in Ubuntu 11.10 (32 bits)
….
[ 612/1504] cxx: src/common/buffer.cc -> build/debug/src/common/buffer_1.o
../src/common/buffer.cc: In member function ‘void ns3::Buffer::Iterator::Write(ns3::Buffer::Iterator, ns3::Buffer::Iterator)’:
../src/common/buffer.cc:846:12: error: variable ‘cur’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
Waf: Leaving directory `/home/rushendra/sim/ns-allinone-3.10/ns-3.10/build’
Build failed: -> task failed (err #1):
{task: cxx buffer.cc -> buffer_1.o}
Traceback (most recent call last):
File “./build.py”, line 121, in
sys.exit(main(sys.argv))
File “./build.py”, line 112, in main
build_ns3(config)
File “./build.py”, line 60, in build_ns3
run_command(["python", "waf"])
File “/home/rushendra/sim/ns-allinone-3.10/util.py”, line 24, in run_command
raise CommandError(“Command %r exited with code %i” % (argv, retval))
util.CommandError: Command ['python', 'waf'] exited with code 1
how to fix this error
Thanks you for your attention.
hi friend ,
i going to work with lte and wimax
i did not understand whether there is error or complete installations is done,
no “”ok”" responses on
Checking for program gcc or cc : /usr/bin/gcc
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
………………………………..
Checking for type uint128_t : not found
Checking for type __uint128_t : not found
root@vinay:/home/vinayagam/repos/ns-3-allinone/ns-3.12-RC1# ./waf -d debug –with-pybindgen=/home/vinayagam/repos/ns-3-allinone/pybindgen/ –valgrind –shell –enable-sudo –enable-examples –enable-tests configure –enable-mpi –with-nsclick=/home/vinayagam/repos/ns-3-allinone/ns-3.12-RC1/nsclick/ –with-openflow=/home/vinayagam/repos/ns-3-allinone/ns-3.12-RC1/openflow/ –python-scan –apiscan=MODULE[,MODULE...] –with-nsc=/home/vinayagam/repos/ns-3-allinone/nsc/
Checking for program gcc or cc : /usr/bin/gcc
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for gcc : ok
Checking for program g++ or c++ : /usr/bin/g++
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program pkg-config : /usr/bin/pkg-config
Checking for -Wl,–soname=foo support : yes
Checking for type uint128_t : not found
Checking for type __uint128_t : not found
Checking for high precision time implementation : cairo 128-bit integer
Checking for header stdint.h : yes
Checking for header inttypes.h : yes
Checking for header sys/inttypes.h : not found
Checking for header sys/types.h : yes
Checking for header sys/stat.h : yes
Checking for header dirent.h : yes
Checking for header stdlib.h : yes
Checking for header signal.h : yes
Checking for header pthread.h : yes
Checking for header stdint.h : yes
Checking for header inttypes.h : yes
Checking for header sys/inttypes.h : not found
Checking for library rt : yes
Checking for header netpacket/packet.h : yes
Checking for header linux/if_tun.h : yes
Checking for pkg-config flags for GTK_CONFIG_STORE : ok
Checking for pkg-config flags for LIBXML2 : ok
Checking for NSC location : ok /home/vinayagam/repos/ns-3-allinone/nsc/ (given)
Checking for library dl : yes
Checking for NSC supported architecture i686 : ok
Checking for header sys/socket.h : yes
Checking for header netinet/in.h : yes
Checking for libnsclick.so location : ok /home/vinayagam/repos/ns-3-allinone/ns-3.12-RC1/nsclick/ (given)
Checking for library dl : yes
Checking for library nsclick : yes
boost headers : Version 1_42 (/usr/include)
library boost_signals : ok
library boost_filesystem : ok
Checking for OpenFlow location : ok /home/vinayagam/repos/ns-3-allinone/ns-3.12-RC1/openflow/ (given)
Checking for library dl : yes
Checking for library xml2 : yes
Checking for library openflow : yes
Checking for library sqlite3 : yes
Checking for program python : /usr/bin/python
Checking for Python version >= 2.3 : ok 2.6.6
Checking for library python2.6 : yes
Checking for program python2.6-config : /usr/bin/python2.6-config
Checking for header Python.h : yes
Checking for -fvisibility=hidden support : yes
Checking for pybindgen location : ok /home/vinayagam/repos/ns-3-allinone/pybindgen/ (given)
Checking for Python module pybindgen : ok
Checking for pybindgen version : ok 0.15.0.795
Checking for types uint64_t and unsigned long equivalency : no
Checking for types uint64_t and unsigned long long equivalency : yes
Checking for the apidefs that can be used for Python bindings : gcc-ILP32
Checking for internal GCC cxxabi : complete
Checking for Python module pygccxml : ok
/usr/lib/pymodules/python2.6/pygccxml/parser/declarations_cache.py:8: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
Checking for pygccxml version : ok 1.0.0
Checking for program gccxml : /usr/bin/gccxml
Checking for gccxml version : ok 0.9.0
Checking for program mpic++ : /usr/bin/mpic++
Checking for program sudo : /usr/bin/sudo
Checking for program valgrind : /usr/bin/valgrind
Checking for pkg-config flags for GSL : ok
Checking for -Wno-error=deprecated-declarations support : yes
Checking for -Wno-error=deprecated-declarations support : yes
Checking for -fstrict-aliasing support : yes
Checking for -fstrict-aliasing support : yes
Checking for -Wstrict-aliasing support : yes
Checking for -Wstrict-aliasing support : yes
Checking for program doxygen : /usr/bin/doxygen
—- Summary of optional NS-3 features:
Static build : not enabled (option –enable-static not selected)
Threading Primitives : enabled
Real Time Simulator : enabled
Emulated Net Device : enabled
Tap Bridge : enabled
GtkConfigStore : enabled
XmlIo : enabled
Network Simulation Cradle : enabled
NS-3 Click Integration : enabled
NS-3 OpenFlow Integration : enabled
SQlite stats data output : enabled
Python Bindings : enabled
Python API Scanning Support : enabled
MPI Support : enabled
Use sudo to set suid bit : enabled
Build tests : enabled
Build examples : enabled
GNU Scientific Library (GSL) : enabled
‘configure’ finished successfully (4.726s)
vinotd1@gmail.com
tell me installtion suggestion
what is this command execution results ;;is it ok or not
Checking for Python module pygccxml : ok
/usr/lib/pymodules/python2.6/pygccxml/parser/declarations_cache.py:8: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
i not satisfied bescos proper installation or not
send me reply
i used ubuntu 10.10
ns-12.1 version installlation
Dear Mr.Patankar,
Thank you for all the information. It’s really helpful.
But when I was installing, I’ve got a problem. I have no idea about it and hope get some help here. Many thanks in advance.
when running: % ./test.py
the problem came up:
Traceback (most recent call last):
File “./waf”, line 157, in
import Scripting
ImportError: No module named Scripting
Waf died. Not running tests
Best Regards,
Yeki
when i execute this command i got this error..
./waf –run myfirst
error: No such command ‘\xe2\x80\x93run’
any clue???
thnks in advance
Dear Vipin,
may be you are standing in the wrong directory, or paste the output of ls -l (some permission issues, run chmod +x waf)
All the best,
Ashwini for WirelessCafe !!
Dear Yeki,
I will try to check.
all the best,
Ashwini for WirelessCafe !!
Dear Vinotd,
Follow all the steps mentioned in the blog post, the above output is of ./configure only.
All the best,
Ashwini for WirelessCafe !!
Dear Ashwini,
I’ve tried several times, but it still didnt work. Hope to hear from you soon. Many many thanks.
Best regards,
Yeki
thanks ashvini
used all those all steps in this blog on kubuntu 11.10 and ns-3.10
./build.py
./src/common/buffer.cc: In member function ‘void ns3::Buffer::Iterator::Write(ns3::Buffer::Iterator, ns3::Buffer::Iterator)’:
../src/common/buffer.cc:846:12: error: variable ‘cur’ set but not used [-Werror=unused-but-set-variable]
[ 613/1504] cxx: src/common/buffer-test.cc -> build/debug/src/common/buffer-test_1.o
cc1plus: all warnings being treated as errors
Waf: Leaving directory `/home/vina/ns-allinone-3.10/ns-3.10/build’
Build failed: -> task failed (err #1):
{task: cxx buffer.cc -> buffer_1.o}
Traceback (most recent call last):
File “./build.py”, line 121, in
sys.exit(main(sys.argv))
File “./build.py”, line 112, in main
build_ns3(config)
File “./build.py”, line 60, in build_ns3
run_command(["python", "waf"])
File “/home/vina/ns-allinone-3.10/util.py”, line 24, in run_command
raise CommandError(“Command %r exited with code %i” % (argv, retval))
util.CommandError: Command ['python', 'waf'] exited with code 1
thank for ur reply
kind give a solution
hi ashwin
./test.py
FAIL: Example examples/wireless/wifi-ap.py
FAIL: Example examples/wireless/mixed-wireless.py
FAIL: Example examples/wireless/wifi-ap.pyFAIL: Example examples/wireless/mixed-wireless.py
74 of 77 tests passed (74 passed, 0 skipped, 3 failed, 0 crashed, 0 valgrind errors)
what to do
thanks for reply
dear Shankar,
i follows all the step for installing ns3, but when i try the second example
$cp examples/wireless/ofdm-validation.cc scratch/myofdm.cc
i have this
bash: examples/wireless/ofdm-validation.cc: Permission non accordée
Is my installatin failed???
thanks for your help
kheira
Dear sir,
I am working my final year M.E project in WiMAX handover. I have sucessfully installed ns3 and executed the sample examples … I want to know whether ns3 supports handover or not….
Dear Priya,
I think it supports, check the ns3 documentation
All the best,
Ashwini for WirelessCafe !!
Dear Kheira,
If your sample example is running fine, then your installation is not failed. Check for the permissions of the folder and files by ls -l command.
All the best,
Ashwini for WirelesCafe !!
Dear Vinotd,
Have you run the sample code in the same way as mentioned in the blog post ?
All the best,
Ashwini for WirelesCafe !!
Dear Vinotd,
the error is in
../src/common/buffer.cc:846:12: error: variable ‘cur’ set but not used [-Werror=unused-but-set-variable]
search for this, may be you will get a solution.
All the best,
Ashwini for WirelesCafe !!
hi Ashwin ,
friend i have a doubt
before that i say u about the LTE-sim software is very useful in design of LTE for performance evalution,,,,for scheduling in lte
u also try .
okay
i want to create a scenario cross scheduling algorithm for LTE
it is simulator funtion of mac layer scheduling in LTE
suggest me any other way to develop if not possible in other softwares
after typing this command $./test.py
160 of 166 tests passed (161 passed, o skipped,0 failed, 5 crashed, 0 valgrind errors)
why 5 tests crashed
Dear Adham,
I havent use ns3 much but you can look out for logs of the test cases, any way your ns3 will work fine.
All the best,
Ashwini for WirelessCafe !!
Dear Vinotd,
Please provide the link for lte sim, and you can try Matlab for simulation purpose.
Thanks and Regards,
Ashwini for WirelessCafe !!
LTE-Sim home page: http://telematics.poliba.it/LTE-Sim
u can download and install by by this command “make” after locating the /LTE-Sim folder through terminal..
LTE design tool for handoff,scheduling simular to ns3 tool
cheer!!!!!!!!!!!!!!!!!
vinotd
Dear Vinotd,
Thanks for the useful link.
Ashwini for WirelessCafe !!
xunilresu you must put:
$ ./waf –run myfirst
hey Ashwini. How u doin’?
It says :: version conflict for package “Tcl”: have 8.5.10, need exactly 8.4
while executing
“package require -exact Tcl 8.4″
What should I do?
Plz help.
Dear Sayan,
You can down grade the package depending upon the OS you are using, else pick the recent release of ns.
All the best,
Ashwini for WirelessCafe !!
Hi.i would like to ask if vertical handoff from wlan to wimax has been implemented in ns3.It would be very helpfull if somebody knows that …in order to not re-envent the wheel.thank you