How To Install ns3 on linux ?


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-lfn
PASS: Example examples/wireless/wifi-ap.py
PASS: Example src/contrib/flow-monitor/examples/wifi-olsr-flowmon.py
168 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.

right now we are in directory “ns-3.10″
from terminal :

 

$ cp examples/tutorial/first.cc scratch/myfirst.cc

$./waf
this time waf will give 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 (15.900s)

Step 5: now it is the time to run the simulation

$ ./waf –run myfirst
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.353s)
Sent 1024 bytes to 10.1.1.2
Received 1024 bytes from 10.1.1.1
Received 1024 bytes from 10.1.1.2
Congratulations !! NS3 is installed and running successfully.
Lets try some other example.
Again go to the terminal and type
$cp examples/wireless/ofdm-validation.cc scratch/myofdm.cc
$./waf
out put will be:
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/myofdm
Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
‘build’ finished successfully (5.842s)
now run the simulation:
$ ./waf –run myofdm
this time output will be:
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)
OfdmRate6Mbps
OfdmRate9Mbps
OfdmRate12Mbps
OfdmRate18Mbps
OfdmRate24Mbps
OfdmRate36Mbps
OfdmRate48Mbps
OfdmRate54Mbps
So, this way you can try different examples, and get an introduction of ns3.
Note: As I am using Fedora 14 Complete Installation, I have not feel the need to resolve the dependencies, but if you will come across any error then please make me know, so that I will extend the post to cover the dependencies problems, and to other distributions also like ubuntu etc.

Enjoy Ns3 , soon, I will come back with tutorials on ns3 and dependencies resolution for ns3 (only if some will mention the errors ;))

Ashwini Patankar for WirelessCafe !!
About these ads

95 responses to “How To Install ns3 on linux ?

  1. Pingback: Tweets that mention How To Install ns3 on linux ? « WirelessCafe -- Topsy.com

  2. Hey,

    You could have posted a simple “hello world” kind of example with 1 transmitter and 1 receiver :) with line by line explanation.

    Thanks

  3. 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 !!

  4. 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,

  5. 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 !!

  6. 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..

  7. Build failed: -> task failed (err #1):
    {task: cxx visual-simulator-impl.cc -> visual-simulator-impl_2.o}

    how to fix erro

  8. 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

  9. 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

  10. Dear Ashwini

    Can i apply a new vertical handover decision (WIMAX Vs WLAN ) in Ns-3?

    Thanks in advance,

    Ammar

  11. Dear Ashwini

    Can i apply a new vertical handover decision (WIMAX Vs WLAN ) in Ns-3?

    Thanks in advance,

    Ammar Bathich

  12. 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 !!

  13. 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?

  14. 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 !!

  15. 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 :)

  16. 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 !!

  17. 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

  18. 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 !!

  19. 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

  20. 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

  21. 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 :)

  22. 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 :D

  23. 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 !!

  24. 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 !!

  25. Pingback: Installing Network Simulator(ns2.34) in Ubuntu10.10 « tutorMicman

  26. 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 !!

  27. 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?

  28. 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 !!

  29. 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

  30. 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 !!

  31. 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

  32. 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 !!

  33. 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.

  34. 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

  35. # 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?

  36. 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

  37. 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 :’(

  38. 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.

  39. 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)

  40. 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

  41. 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

  42. when i execute this command i got this error..
    ./waf –run myfirst
    error: No such command ‘\xe2\x80\x93run’

    any clue???
    thnks in advance

  43. Dear Ashwini,

    I’ve tried several times, but it still didnt work. Hope to hear from you soon. Many many thanks.

    Best regards,
    Yeki

  44. 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

  45. 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

  46. 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

  47. 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….

  48. 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 !!

  49. 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

  50. 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

  51. 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.

  52. 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

  53. hii ashwin

    i have successfully installed ns3 following ur instructions .
    am very new to ns3 .
    how can i calculate throughput of 50 nodes using HWMP ?
    kindly guide me

  54. Hi Aswhwini.

    I am using ns-3.15. But I got the following error mesages when building it.

    Build failed
    -> task in ‘ns3-internet’ failed (exit status 1):
    {task 153577708: cxx ipv4-raw-socket-impl.cc -> ipv4-raw-socket-impl.cc.1.o}
    ['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-pthread', '-Ibuild', '-I.', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_PACKET_H=1', '-DHAVE_DL=1', '../src/internet/model/ipv4-raw-socket-impl.cc', '-c', '-o', 'src/internet/model/ipv4-raw-socket-impl.cc.1.o']

    Any idea what’s wrong with my package installation? Thanks.

  55. Hi Aswin,

    Thanks for the response. Actually, I have reinstalled the package and have successufuly built and tested it. However, I got the following error when trying to run the example according to your steps. Please help me. Thank you.

    kman@kman-Vostro-3350 ~/ns/ns-allinone-3.15/ns-3.15 $ ./waf
    Waf: Entering directory `/home/kman/ns/ns-allinone-3.15/ns-3.15/build’
    Waf: Leaving directory `/home/kman/ns/ns-allinone-3.15/ns-3.15/build’
    ‘build’ finished successfully (0.891s)

    Modules built:
    antenna aodv applications
    bridge buildings config-store
    core csma csma-layout
    dsdv dsr emu
    energy flow-monitor internet
    lte mesh mobility
    mpi netanim (no Python) network
    nix-vector-routing olsr point-to-point
    point-to-point-layout propagation spectrum
    stats tap-bridge test (no Python)
    tools topology-read uan
    virtual-net-device wifi wimax

    Modules not built:
    click openflow visualizer

    kman@kman-Vostro-3350 ~/ns/ns-allinone-3.15/ns-3.15 $ ./waf –run myfirst
    No function –run defined in /home/kman/ns/ns-allinone-3.15/ns-3.15/wscript
    kman@kman-Vostro-3350 ~/ns/ns-allinone-3.15/ns-3.15 $

  56. Dear

    I install the ns-allinone version in the ubuntu server.
    but the problem is, when I execute the example, expecially wireless

    the error message is happen.
    if possible Could you please little bit guide to me for that ?

    Thanks and Best Regards

    -Woong-
    the error message is
    No function wifi-ap defined in /home/kt/ns-3-allineone/ns-3-dev/wscript

    What is the meaning of wscript??

    The error message is continuously happen. So I little bit congested.

    anytime feel free to talk to me.
    Thanks

  57. when i write the command ./waf runmyofdm the error comes ” No such file or directory” plz help me….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s