Ns-2.33 (and nam) on Ubuntu 8.04 (Hardy Heron)

June 11th, 2008 by Jason Ernst
 
ubuntu

Since I have been working with ns2 for the last few months in preparation for my thesis I have decided to write a guide on how to install the most recent version of ns2 on the most recent version of ubuntu (at the time of this writing, Monday June 9th, 2008).

I have found many people already who have had difficulty setting it up so maybe this will be of some help to someone. For this tutorial I am assuming you have installed the most recent version of Ubuntu (8.04). (At the time of writing)

Step 1: Update Ubuntu

Since it has already been a month or so since Hardy Heron has been released its probably best, if you haven’t already done so to update Ubuntu. The easiest way I’ve found is to go to System>>Administration>>Update Manager. Alternatively, you can enter this into the terminal:

sudo apt-get update
sudo apt-get upgrade
Update Manager - Ubuntu Hardy Heron

Step 2: Download all of the required pieces to make ns2 work

Here is a list of archives required for ns2 to work properly (you can download them by clicking the links or just enter all of the commands in the code sections below for automatic download and untar). I saved each archive to the desktop so I could find each one easily but you could use anywhere you like.

  1. tcl 8.4.14
  2. tk 8.4.14
  3. otcl 1.13
  4. tclcl 1.19
  5. ns 2.33
  6. nam 1.13

Step 2.5: Install Ubuntu Packages

Before installing everything else, I have found that it is helpful to get a few packages from the ubuntu repositories or else it wont build correctly. Grab a cup of coffee it might take a while since kdebase-dev is somewhat large. I’m sure there is a way to do this with fewer packages however I know this works. If anyone figures out exactly which packages are required let me know so I can update this.

sudo apt-get install libx11-dev kdebase-dev

Step 3: Install tcl

wget http://www.jasonernst.com/wp-content/uploads/2008/06/tcl8.4.19-src.tar.gz
tar xvf tcl8.4.19-src.tar.gz
cd tcl8.4.19/unix
./configure
make
sudo make install

Step 4: Install tk

cd ..
cd ..
wget http://www.jasonernst.com/wp-content/uploads/2008/06/tk8.4.19-src.tar.gz
tar xvf tk8.4.19-src.tar.gz
cd tk8.4.19/unix
./configure
make
sudo make install

Step 5: Install oTcl

Important Note: The ‘./configure –with-tcl=’ portion of the following two code fragments should point to the source files for tcl. If you have been following the guide by copying and pasting the previous commands what we have here will work just fine. Otherwise you will need to change this to point to the correct location of your tcl source files.

cd ..
cd ..
wget http://www.jasonernst.com/wp-content/uploads/2008/06/otcl-src-1.13.tar.gz
tar xvf otcl-src-1.13.tar.gz
cd otcl-1.13
./configure --with-tcl=../tcl*/
make
sudo make install

Step 6: Install tclcl

cd ..
wget http://www.jasonernst.com/wp-content/uploads/2008/06/tclcl-src-1.19.tar.gz
tar xvf tclcl-src-1.19.tar.gz
cd tclcl-1.19
./configure --with-tcl=../tcl*/
make
sudo make install

Step 7: Install ns2

cd ..
wget http://www.jasonernst.com/wp-content/uploads/2008/06/ns-2.33.tar.gz
tar xvf ns-2.33.tar.gz
cd ns-2.33
./configure
make
sudo make install

You will likely get alot of warnings for deprecated conversions. Just ignore these or if you really are concerned about them visit the nsnam troubleshooting page. If you want to make sure your version of ns-2 is working correctly after the install you can run the validation test from within the ns2 source directory. You can do this by entering:

./validate

You should see that the test output agrees with the reference output. Congratulations you have a working version of ns-2 installed.

Step 8: (optional) Install nam

cd ..
wget http://www.jasonernst.com/wp-content/uploads/2008/06/nam-src-1.13.tar.gz
tar xvf nam-src-1.13.tar.gz
cd nam-1.13
./configure
make
sudo make install

Note: if you get this error:

error: X11/Xmu/WinUtil.h: No such file or directory

it may be necesary to do this:

sudo apt-get install libxmu-dev

You are now ready to start working with ns2 and nam. If you are like me and working on a new protocol or something you will want to start modifying the ns-2 source code and recompile again so you might want to keep that folder handy. The rest of the source can be safely removed as far as i know. Keep in mind after you have modified the source you will want to do another make install so that when you type ns in your terminal the version you just compiled is used.

Getting Started with NS2

These are some quick tips to get you started using ns2 if you are a beginner.

All example files are located in ns/tcl/ex. You can run these scenarios on ns2 using ns filename.tcl The best way to start is probably changing things in these files until you understand what is happening more thoroughly.

The output will usually be a trace file with a similar name: ex) filename.tr. Trace files can usually be viewed with a text-editor program. There are also tools to analyze the trace files and pull stats from them. These may require some tweaking however depending on the format of the trace file. Additionally, a nam output file for visualization may be generated as well. This will usually be named filename.nam. To view the visualization use: nam filename.nam

Useful Links

I thought it might be useful to add a section on useful links here since this article has become quite popular. If you would like to suggest a link feel free to contact me.


Posted in Computer Science, Linux, Simulation, Wireless Networks by Jason Ernst

Tags: , , , , , , , ,

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

84 Responses to “Ns-2.33 (and nam) on Ubuntu 8.04 (Hardy Heron)”

  1. gravatar Paul Barr Says:

    Reference NS-2.13. New to Ubuntu and Unix
    Followed all your steps. Steps 5, 6, 7, and 8 had no make files
    Did a ./validate – kept getting ./test-all-template1:149:../../ns:not found
    Since I’m a beginner how do I START NS ?

    Any help would be be great.

  2. gravatar Jason Ernst Says:

    Hi there, the makefile is generated from the ./configure step. If you do not have one then there likely has been some problem in the configure stage. Try to look for some sort of error during this step because you may be missing a crucial package required for ns2. If you still have trouble getting it install you could email me the results of your ./configure step and I will try to help out. Also I suggest you join the ns2 mailing list which can be found on their website. Often people post on the list about problems getting ns2 to work there.

    To get ns2 to start, after it has successfully built with the instructions above, you should be able to just type ‘ns2 scriptname.tcl’ at the prompt where scriptname.tcl is the simulation file you wish to run.

  3. gravatar Milton Says:

    Hi Jason
    I am a new user to the ns-2 your steps were very helpfull and were easy to works with step by step. Please can you let me know how can i get some script example on ipv6 mobelity (NEMO) on NS-2 or any of the ip mobelity scrips that work on ns-2? It is for me to be able to know and understnd how it can be implemented or how to do an new script for IPv6 mobelity.

    Thanks very much

  4. gravatar Jason Ernst Says:

    Hey, I’m sure about the NEMO protocol specifically, but I’m fairly sure that ns2 supports mobile ip (but maybe only ipv4). If you go to Marc Greis’s Tutorial on ns2 here: http://www.isi.edu/nsnam/ns/tutorial/index.html there is a section on mobile IP for wired-cum-wireless topologies and it kinda walks through step by step on how to setup the tcl scripting for that sorta thing. This page lists a whole bunch of modules for ns2 for wireless and mobility: http://nsnam.isi.edu/nsnam/index.php/Contributed_Code#Wireless_and_Mobility

  5. gravatar Chris Says:

    Hi Jason.The guide is very helpfull.Congratulations for the effort.
    I’m having a problem with the installation and after a reserach i found that it has to do something with gcc.In step 7 after make, when the procedure finishes it gives me this output:

    /usr/bin/ld: ns: hidden symbol `__stack_chk_fail_local’ in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO
    /usr/bin/ld: final link failed: Nonrepresentable section on output
    collect2: ld returned 1 exit status
    make: *** [ns] Error 1

    These are the last lines from the output.The rest output before these lines seem to be ok.Do you have any idea how i can solve this issue?
    Thanks in advance jason.

  6. gravatar Jason Ernst Says:

    Hi Chris,
    This is actually a known problem with ns-2.30 / ns-2.31 and gcc 4.1. If you go to this page: http://nsnam.isi.edu/nsnam/index.php/Troubleshooting#ns-2.30.2Fns-2.31_do_not_build_with_gcc.2Fg.2B.2B_4.1 and look for the section called ns-2.30/ns-2.31 do not build with gcc/g++ 4.1, there are step-by-step instructions on how to fix it. There are basically two options for how to fix it: 1) Patch the make file or 2) Use gcc 4.0 to compile.

  7. gravatar Jason’s Computer Science Blog » Blog Archive » ns-3.2 on Ubuntu 8.04 Hardy Heron Says:

    [...] however, so if you are looking for a guide to getting that working in Ubuntu see my post “NS-2.33 on Ubuntu 8.04 Hardy Heron“. In addition to this, ns-3 no longer uses the tcl scripting language. Instead the choice of [...]

  8. gravatar joujou Says:

    Hi
    Thank you very much for this guide.I followed it but when I executed ./validate, I have this message:validate overall report: some portable tests failed:
    ./test-all-red
    to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME.
    Do you have an idea to solve this problem.
    Thanks a lot for your help

  9. gravatar Jason Ernst Says:

    Hey joujou,
    A good starting point would be to try each test individually to try to see if any of the tests validate correctly. I’ve never encountered this problem myself so I likely cannot help much. You could try posting in the ns2 mailing lists: http://www.isi.edu/nsnam/ns/ns-lists.html . Make sure you are very detailed about your computer, your compiler, what version of linux kernel you are using etc if you post there. The more information you give the better they can help.

  10. gravatar asmat alam Says:

    sir .i have a problem in ns2 all version in fedora6.here is a big problem of nam.every time i installed ns2 .nam exectuable file is missing what should i do plz help me out.
    thanx

  11. gravatar gh Says:

    Hi
    Thank you for this guide . It helped me so much.
    I followed all the steps mentioned below but when I tried to test an example using ns I wrote: cd ~/ns/ns-2.33/tcl/ex
    ns simple.tcl
    I have this error:simple.tcl does not exist, try again.
    But thisfile exists really in this path.
    I don’t know how to solve this problem and use ns normally.
    please help me.
    Thank you for your help.

  12. gravatar gh Says:

    Hi
    sorry but I forget to inform you that I’m using ns2.33 under Ubuntu Hardy Heron and I m using tcl/tk 8.4.16; oTCL 1.13; and nam 1.13.
    Thanks

  13. gravatar Jason Ernst Says:

    @ asmat: Ensure you have done the ‘./configure’ and ‘make’ finished properly from the guide above. If they did finish without errors, then make sure you have done the ‘make install’ step. This step is what places the executables where your system can find them. Another option would be to find the location of the ‘nam’ executable yourself and add it to the global environment variables. To find the executable you could do something like this:

    find / -name nam

    Then to add the environment variable:

    LD_LIBRARY_PATH=/path-to-nam
    export LD_LIBRARY_PATH

    If this works, then you can put the LD_LIBRARY stuff into your .bashrc, .bash_profile or /etc/profile depending on how your system is configured. (see this page: http://www.linuxforums.org/forum/redhat-fedora-linux-help/40271-environment-variables-manuals.html)

  14. gravatar Jason Ernst Says:

    @gh: I have tried to reproduce similar errors to what you are getting: If I specify a file that I know does not exist: ns simple1.tcl
    couldn't read file "simple1.tcl": no such file or directory.
    If I misspell ns when I try to run it: ns2 simple.tcl
    -bash: ns2: command not found
    So since neither of the errors are exactly what you are seeing, its hard to say what is going on, on your system. You could try doing this:

    cd ~/ns/ns-2.33
    touch test.tcl
    ./ns test.tcl

    If you don’t get any errors then it may be that somehow your ns2 did not do the ‘make install’ step properly and it cannot find ns2 when you are not in the same directory as the executable. As a workaround until you get this fixed, you could just try running all of your tcl scripts from within the same directory as the executable if that happens to work for you.

  15. gravatar gh Says:

    Hi

    Do you know please where can I find an NS2.33 sample with a power measurement . It is a very important factor and I want to measure it.
    Thank you for your help.

  16. gravatar Jason Ernst Says:

    @gh: I don’t know any off hand, but a good place to start would be looking through papers on power control or cross-layered design. Then you could try visiting the authors websites or contacting them directly since they likely have done simulation work in this area. It is an area I am also beginning to explore myself so I may end up posting something on it here in the future.

  17. gravatar nadine Says:

    Hi Jason
    Thank you very much for this blog.
    I wanted to ask you if you have an idea about NS2 trace file (.tr).
    and how to interpret them.I’ve found that I can do this by using awk or xgraph but I didn’t understand how exactly.
    So if you know how, help me please.
    Tanks a lot for your help

  18. gravatar Jason Ernst Says:

    Hey Nadine,
    For traces files in ns2, they seem to be very dependent on the changes made to the code. For example if you are using any patches the trace format can be very different from the standard ns2 traces. If you have an unmodified ns2 however, it may be easier. This link: http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats explains how to make some sense of the trace files, and generally most of them follow this pattern, or something similar. There are also several tools out specifically for analysis of trace files ex: http://ieeexplore.ieee.org/Xplore/login.jsp?url=/iel5/4339287/4339288/04339302.pdf?temp=x . You could try contacting the authors or some of them since they will likely be the experts on this subject.

  19. gravatar naourez Says:

    Hi, thanks for the clear description of howto install ns2.33 on ubuntu 8.04.
    I am using gcc4.3.2 and i am having the same problem as in “ns-2.30/ns-2.31 do not build with gcc/g++ 4.1 ” however even after modifying the file configure.in i am still having the same problem. I couldn’t find gcc 4.0 to install.
    any ideas how to do?

  20. gravatar Jason Ernst Says:

    Hi naourez,
    If you are using Ubuntu, this guide may be helpful in installing an alternate version of gcc: http://ubuntuforums.org/showthread.php?t=441889 . Other than that, my only suggestion would be to try search through the ns2 mailing list archives since I’m sure many people have had similar problems. If you are still stuck you could always try posting the list yourself.

  21. gravatar Robin Cheung Says:

    Hi Jason,could you send a message to joujou or see this detail to solve this problem? Cause i have the same poblem with him.
    Category: Validation Failure
    Package: ns 2.27
    OS: Ubuntu 8.04 (Hardy Heron)
    Description:
    >
    > Description of Problem:
    >
    > When I run validate, it reports like this:
    > validate overall report: some tests failed:
    > ./test-all-red
    > to re-run a specific test, cd tcl/test; ../../ns test-all-TEST-NAME
    > Notice that some tests in webcache will fail on freebsd when -O is turned on.
    > This is due to some event reordering, which will disappear when -g is turned on.
    >
    > Then I run “cd tcl/test; ../../ns test-all-red” and it reports:
    >
    > robin@robin:~/ns-allinone-2.27/ns-2.27/tcl/test$ ./test-all-red
    Tests: red1 ecn red2 red_twoway red_twowaybytes flows_unforced flows_forced flows_combined ungentle gentle gentleEcn gentleEcn1 ungentleBadParams gentleBadParams q_weight q_weight_auto
    Running test red1:
    ../../ns test-suite-red.tcl red1
    0/cwnd=1.0000/ssthresh=15/ack=-1
    5/cwnd=40.7922/ssthresh=15/ack=732
    Test output agrees with reference output
    next?
    unknown event: 4
    XIO: fatal IO error 11 (Resource temporarily unavailable) on X server “:0.0″
    after 52682 requests (37711 known processed) with 0 events remaining.
    XIO: fatal IO error 11 (Resource temporarily unavailable) on X server “:0.0″
    after 552 requests (442 known processed) with 0 events remaining.
    >
    Any ideas how to deal with it?

  22. gravatar Nick Says:

    I followed all the steps u mention. But I can’t install NS-2.33.
    I can’t type command “make” on that step.
    When i type the command “make”, i get the message “No target specified and no makefile found”.
    Do u have any idea for that?

  23. gravatar Jason Ernst Says:

    Hey, it sounds like you are not within the correct folder since it sounds like there is no ‘Makefile’ where you are trying to type this. For each package you wish to install you need to change into the appropriate folder and type make, if you look at the commands I have listed in the instructions, this should happen.

  24. gravatar tomy Says:

    hello sir,
    first thanks for you effort, this guide is very helpful and detailed.
    i have some problem with ./configure i obtain this:
    No .configure file found in current directory
    Continuing with default options…
    checking build system type… i686-pc-linux-gnu
    checking host system type… i686-pc-linux-gnu
    checking target system type… i686-pc-linux-gnu

    config.status: creating indep-utils/webtrace-conv/epa/Makefile
    config.status: creating indep-utils/cmu-scen-gen/setdest/Makefile
    config.status: creating autoconf.h
    config.status: autoconf.h is unchanged
    is this normal? and how can i start testing simple instruction with, ns, sorry for my ignorance !
    thanks ^^

  25. gravatar Jason Ernst Says:

    It looks like it worked fine from what you attached to it. To start testing some simple things you could try changing to the ‘ns/tcl/ex’ directory. In here you will find some example tcl scripts that will have simple scenarios. To run one of these files with ns2 you enter: ns filename.tcl You can try editing these and seeing the results. The output will usually be in a .tr file which is named similar to the tcl file you have run with ns2. Some tcl files will also generate a .nam file. This allows you to view a visualization of the simulation using the nam tool if you installed this as well. You can then type nam filename.nam in order to see the visualization.

  26. gravatar tomy Says:

    thank you for your clear and fast response :)
    i have choosing for example shuttle.tcl
    ns shuttle.tcl
    it’s return me:
    Nameserver not responding
    shuttle.tcl NS record not found, try again
    i have trying with other exemples … it’s return me the same thing!
    is this normal? and where can i find the .tr file?
    thank you very much :)

  27. gravatar Jason Ernst Says:

    It sounds like you have some other sort of ns program set up on your computer. It looks like it is trying to connect to a server on the internet with the same name as the filename you are specifying for your input file for the ns simulator program.

  28. gravatar tomy Says:

    do you think that is related with PATH variable in LINUX?
    like in this http://www.nabble.com/Problem-with-NS2-installation-td20665635.html

  29. gravatar Jason Ernst Says:

    Yes, it sounds like the same problem

  30. gravatar Vehicular Networks: How To Install Ns 2 On Ubuntu Says:

    [...] reference: http://www.jasonernst.com/2008/06/11/ns-233-and-nam-on-ubuntu-804-hardy-heron/ page tags: install linux ns-2 ubuntu help | terms of service | privacy | [...]

  31. gravatar Oogii Says:

    Hello, Thanks for your all time.
    I am implementing LEACH protocol using NS2.27 on Fedora.
    But I have a error with ./config command.
    Config.status: autoconf is unchanged
    Do you have a any suggestion for it?

  32. gravatar Bandana Says:

    Hi Jason,
    I had installed ns2.33 on ubuntu and was able to run the tcl scripts and view the outputs in nam and in trace graph. I added um-olsr patch as suggested in http://masimum.inf.um.es/?Software:UM-OLSR:Installation, and now when I try to run any tcl scripts it displays ..”filename.tcl does not exist, try again”.
    Please suggest.

  33. gravatar Jason Ernst Says:

    Hi Oogii,
    This likely means that nothing changed in your configuration since the last time you ran this tool. This tool will only detect changes in required system components and does not need to be run every time you make a change in your ns2 source. When you make changes in your ns2 source you probably only need to run ‘make clean’, ‘make’ and then ‘make install’

  34. gravatar Jason Ernst Says:

    Bandana, the only suggestion I have would be to ensure you are running ns from the same directory as your tcl scripts. You might be able to find more help from the site you referred to in your link.

  35. gravatar Bandana Says:

    Thanks Jason,
    Yea I wasn’t aware that I was not in the same directory .
    It works now !!!
    Thanks once again.

  36. gravatar Jason Ernst Says:

    No problem, good luck with your simulations!

  37. gravatar Oogii Says:

    Hi!Jason
    Thanks your reply.
    Still I have problem with LEACH implementation. I spend too much time for it, becuase it will very necessary to me. My installing detials following:
    1. I installed both Cygwin on Windows and Fedora5
    2. tar zxvf ns-allinone-2.27.tar.gz
    patch -p0 < ns-227-gcc34.patch
    cd ns-allinone-2.27/
    ./install
    3. Exract mit.tar.gz in ns-allinone-2.27/ns-2.27
    4. In ns-allinone-2.27/ns-2.27, patch -p0 < leach_makefile-2.27.patch
    5. Edit the Makefile as a follows in
    Add -DMIT_uAMPS to the DEFINE list
    Add -I./mit/rca -I./mit/uAMPS to the INCLUDE list
    Add the following just prior to the line gaf/gaf.o \
    mit/rca/energy.o mit/rca/rcagent.o \
    mit/rca/rca-ll.o mit/rca/resource.o \
    mac/mac-sensor-timers.o mac/mac-sensor.o mit/uAMPS/bsagent.o \

    4. Added to .basch file

  38. gravatar Oogii Says:

    Hi!Jason
    Thanks your reply.
    Still I have problem with LEACH implementation. I spend too much time for it, becuase it will very necessary to me. My installing detials following:
    1. I installed both Cygwin on Windows and Fedora5
    2. tar zxvf ns-allinone-2.27.tar.gz
    patch -p0 < ns-227-gcc34.patch
    cd ns-allinone-2.27/
    ./install
    3. Exract mit.tar.gz in ns-allinone-2.27/ns-2.27
    4. In ns-allinone-2.27/ns-2.27, patch -p0 < leach_makefile-2.27.patch
    5. Edit the Makefile as a follows in
    Add -DMIT_uAMPS to the DEFINE list
    Add -I./mit/rca -I./mit/uAMPS to the INCLUDE list
    Add the following just prior to the line gaf/gaf.o \
    mit/rca/energy.o mit/rca/rcagent.o \
    mit/rca/rca-ll.o mit/rca/resource.o \
    mac/mac-sensor-timers.o mac/mac-sensor.o mit/uAMPS/bsagent.o \

    6. Modified source code: ~/ns-allinone-2.27/ns-2.27/mac/wireless-phy.cc
    Goto line 59, that is after line 58:
    #define max(a,b) (((a)(b))?(b):(a))
    7. Added to . bashrc file:
    export NS_HOME=`pwd`/ns-allinone-2.27
    export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH
    export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/otcl-1.8:$NS_HOME/lib:$LD_LIBRARY_PATH
    export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library
    export RCA_LIBRARY=`pwd`/ns-allinone-2.27/ns-2.27/mit/rca
    export uAMPS_LIBRARY=`pwd`/ns-allinone-2.27/ns-2.27/mit/uAMPS

    8. make clean
    9. make

    But make command has following error:
    In file included from tools / random.cc: 40:
    config.h:60:19: tclcl.h: No such file or directory config.h: 60:19: tclcl.h: No such file or directory
    In file included from tools/random.h:42, In file included from tools / random.h: 42,
    from tools/random.cc:41: from tools / random.cc: 41:
    tools/rng.h:103: error: syntax error before ‘<’ token tools / rng.h: 103: error: syntax error before ‘<’ token
    tools/rng.h:112: error: syntax error before ‘const’ tools / rng.h: 112: error: syntax error before ‘const’
    tools/rng.h:113: error: syntax error before ‘long’ tools / rng.h: 113: error: syntax error before ‘long’
    tools/rng.h:121: error: syntax error before ‘,’ token tools / rng.h: 121: error: syntax error before ‘,’ token

    When running tcl/ex/wireless.tcl following error:

    couldn’t read file “tcl / lib / ns-mobilenode.tcl”: no such file or directory
    while executing while executing
    “source.orig tcl/lib/ns-mobilenode.tcl” “source.orig tcl / lib / ns-mobilenode.tcl”
    (“uplevel” body line 1) ( “uplevel” body line 1)
    invoked from within invoked from within
    “uplevel source.orig [list $fileName]” “uplevel source.orig [list $ fileName]”
    invoked from within invoked from within
    “if [$instance_ is_http_url $fileName] { “if [$ instance_ is_http_url $ fileName] (
    set buffer [$instance_ read_url $fileName] set buffer [$ instance_ read_url $ fileName]
    uplevel eval $buffer uplevel eval $ buffer
    } else { ) Else (
    uplevel source.orig [list $fileName] uplevel source.orig [list $ fileName]
    …” … ”
    (procedure “source” line 8) (procedure “source” line 8)
    invoked from within invoked from within
    “source tcl/lib/ns-mobilenode.tcl” “source tcl / lib / ns-mobilenode.tcl”
    (file “wireless.tcl” line 184) (file “wireless.tcl” line 184)

    I don’t have any idea to continue do my work. Which step i have a mistake?
    Please help me! I will be very appreciate your reply.

    Sincerely. Oogii

  39. gravatar Jason Ernst Says:

    You may need to locate the files that it cannot find yourself and change the wireless.tcl script such that it points to the correct location of these scripts. They are probably not in the correct location, but still around somewhere in the directory structure.

  40. gravatar saeed Says:

    hello

    thank you all for the help..
    but i have a big problem with nam…..
    can anyone tell me how to solve it…..?

  41. gravatar mary Says:

    Hi dear Jason thank u very much for ur efforts

    I managed to install ns2.33 on ubuntu. can u plz tell me if I need any patch to work on infrastructure mode (access point) in ns2.33 or it can support this mode without any patch?

    thanks again
    Mary

  42. gravatar Problem while adding new protocol to ns-2.27 Says:

    Hi,
    I created new protocol which is basically extension od AODV protocol.
    I changed evry thing, and i complied my code it compiled perfectly. but when i run a tcl script against my protocol, it shows message as “Wrong node routing Agent!”. Kindly clarify this and please provide some information on how to add new protocol to ns-2.27.

    Thanks!!!

  43. gravatar bea Says:

    hi,
    i have followed the steps but i get an error when i do: make in ns2.33 installation. it appears:
    …..
    /main-monolithic.o -L/home/bea/tclcl-1.19 -ltclcl -L/home/bea/otcl-1.13 -lotcl -L/usr/local/lib -ltk8.4 -L/usr/local/lib -ltcl8.4 -lXext -lX11 -lnsl -lpcap -ldl -lm -lm
    /usr/bin/ld: ns: hidden symbol `__stack_chk_fail_local’ in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO
    /usr/bin/ld: final link failed: Nonrepresentable section on output
    collect2: ld devolvió el estado de salida 1
    make: *** [ns] Error 1

    what can i do? please some help!!!
    thank you in advance

  44. gravatar Jason Ernst Says:

    Hi Bea, please see earlier comments in this post on the same problem you are having: http://www.jasonernst.com/2008/06/11/ns-233-and-nam-on-ubuntu-804-hardy-heron/comment-page-1/#comment-628 and http://www.jasonernst.com/2008/06/11/ns-233-and-nam-on-ubuntu-804-hardy-heron/comment-page-1/#comment-629

  45. gravatar Nara Says:

    Hi Jason
    Thank you very much for this manual! :)
    I followed all steps and also steps from ns-nam troubleshooting.
    I get an error while launching nam:
    nam:
    [code omitted because of length]
    : no event type or button # or keysym
    while executing
    "bind Listbox {
    %W yview scroll [expr {- (%D / 120) * 4}] units
    }"
    invoked from within
    "if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
    bind Listbox {
    %W yview scroll [expr {- (%D)}] units
    }
    bind Li..."

    Could you please help.

  46. gravatar Dan Ojwang Says:

    Hi, You said you are likely to post some work on power control, how soon is this?

  47. gravatar Jason Ernst Says:

    Hi Dan, it turns out my research has taken a bit of a change of direction. I haven’t done much work with power control yet, however I am working with a cross-layer scheduling algorithm. There may be an opportunity to work power control into this, although I have no plans for it yet. I will post code of what I am working on after I defend my thesis (ns3 code)

  48. gravatar Jason Ernst Says:

    @ Nara: I have never encountered that problem before, however from what you have posted it looks like there is some kind of problem with X or whatever display environment you are using. You may want to try posting into the ns mailing list with this problem. Also when you post you will likely want to provide information on what version of linux you are using and any extra details you can think of that may be useful.

  49. gravatar bea Says:

    Hello, i have tried to install OLSR in ns2.33, i follow the steps in:http://masimum.dif.um.es/?Software:UM-OLSR:Installation ; but when i run a script i get:

    num_nodes is set 3
    (_o14 cmd line 1)
    invoked from within
    “_o14 cmd addr”
    invoked from within
    “catch “$self cmd $args” ret”
    invoked from within
    “if [catch "$self cmd $args" ret] {
    set cls [$self info class]
    global errorInfo
    set savedInfo $errorInfo
    error “error when calling class $cls: $args” $…”
    (procedure “_o14″ line 2)
    (SplitObject unknown line 2)
    invoked from within
    “_o14 addr”
    (“eval” body line 1)
    invoked from within
    “eval $node addr $args”
    (“default” arm line 2)
    invoked from within
    “switch -exact $routingAgent_ {
    DSDV {
    set ragent [$self create-dsdv-agent $node]
    }
    DSR {
    $self at 0.0 “$node start-dsr”
    }
    AODV {
    set ragent [$self cre..."
    (procedure "_o3" line 14)
    (Simulator create-wireless-node line 14)
    invoked from within
    "_o3 create-wireless-node"
    ("eval" body line 1)
    invoked from within
    "eval $self create-wireless-node $args"
    (procedure "_o3" line 23)
    (Simulator node line 23)
    invoked from within
    "$ns_ node"
    ("for" body line 2)
    invoked from within
    "for {set i 0} {$i < $val(nn) } {incr i} {
    set node_($i) [$ns_ node]
    $node_($i) random-motion 0 ;# disable random motion
    }”

    thank you!

  50. gravatar Paolo Says:

    Great post. Got this from google. :) Thank you.

  51. gravatar alicia Says:

    hello ,
    i want to install ns-2.27 on my ubuntu8.04, i’ve follow the last tutorial: http://sara.kw.ac.kr/?document_srl=661
    but when i tape make, i have too message of warning:
    common/packet.h:230: attention : deprecated conversion from string constant to «char*»
    almost in every line!
    when i want to execute wireless.tcl i have this result:
    num_nodes is set 50
    INITIALIZE THE LIST xListHead
    Loading connection pattern…
    Loading scenario file…
    Load complete…
    Starting Simulation…
    channel.cc:sendUp – Calc highestAntennaZ_ and distCST_
    highestAntennaZ_ = 1.5, distCST_ = 550.0
    SORTING LISTS …DONE!
    NS EXITING…

    note wireless.tcl is in tcl/ex.
    please can anyone help me, i need it for my final project of studies in 3 week :( .
    thank you in advance.

  52. gravatar Jason Ernst Says:

    It looks like from your output is has finished executing successfully, you just need to look for a .tr (trace) file to see the output of the experiment. You can view this with any text editor. Additionally, there may have been a .nam file which will allow you to “see” what happened in the simulation as well by using the nam tool (if you have installed it)

  53. gravatar gesit adnd Says:

    hi jason,,
    im working my final project about scheduling algorithm in wimax,, im using nist wimax module,, but i confused how to add or implementing new scheduling algorithm,, am i have to change the .cc or .h to implementing new algorithm ? or i just working on .tcl to add new scheduling alghrtm? which file i should editing, or adding? so i can focus on one subject to learn,,
    i am sorry for bothering you,, i really need your advise,, thank you

  54. gravatar Jason Ernst Says:

    Hi Gesit, I am not too familiar with the wimax module you are talking about so I can’t comment specifically, however I would recommend trying to make changes to the existing code first (you may need to change both cc and h files depending on what you are trying to accomplish). I have not done too much work yet in ns2, I have been focusing mostly on ns3. However in ns3 I did my scheduling work at the mac layer, so that may be a place to start to look for trying to modify the wimax module you are talking about.

  55. gravatar gesit adnd Says:

    Thank you for your advice mr Jason,, yes there are files name BSscheduler.cc ,, and my algorithm work in mac layer too, im trying to run simulation in downlink mode with PMP topology ,, i am using proportional fairness algorithm, but the default algorithm which has had implemented before is Weighted Round Robin,, but now after i knew how to start then i will focusing in C++ learning, thanks again mr Jason, hopefully you will success for your work and research, i will report you about my final project progress next time,, but if you are not mind off course :p

  56. gravatar ava Says:

    Hi,
    I would like to know whether we need any patches to install in ns2.33
    for wireless sensor networks?(I mean for ns 2.29 we install mannasim patch)

  57. gravatar Jason Ernst Says:

    Hi ava, I’m not sure if you need a patch for ns2.33 and WSN, I have not had any experience yet with sensor network simulation so I haven’t explored this myself. You could always take a look at the source yourself and see if it includes what you need.

  58. gravatar dini Says:

    hi jason
    i’m using ns2.33 installed in xp with cygwin and i try to install program antnet by lavina jain in ns2.33, i follow all the steps she gave and my problem started when i edit the Makefile :
    OBJ_CC = \
    tools/random.o tools/rng.o tools/ranvar.o common/misc.o common/timer-handler.o \
    * . . *
    antnet/antnet_common.o antnet/antnet_rtable.o antnet/antnet.o \
    $(OBJ_STL)

    then i did these:
    $ touch common/packet.cc
    $ make
    and after i run make i got this message:
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/usr/local/ns-allinone-2.33/ns-allinone-2.33/ns-2.33/indep-utils/webtrace-conv/ucb’

    what is my problem??what is the meaning ‘ Leaving directory `/usr/local/ns-allinone-2.33/ns-allinone-2.33/ns-2.33/indep-utils/webtrace-conv/ucb’ ??? i can run tcl script from marc greis which i don’t put the scripts not in ns2.33 directory but i can’t run her tcl script ( i put the program in ns2.33 directories as her instruction) . i already try to ./configure, make , make install but nothing change. Please give me solution what to do

  59. gravatar shahzad Says:

    i install ns2.29.3 on ubuntu and got no problem even upto the command ns and i get the % on the terminal. but When I run validate, it reports like this:

    “validate overall report: some tests failed: ./test-all-red
    to re-run a specific test, cd tcl/test; ../../ns test-all TEST-NAME
    Notice that some tests in webcache will fail on freebsd when -O is turned on.
    This is due to some event reordering, which will disappear when -g is turned on.”

    please help me to get out from this problem i have tried to install ns2 for a number of times since a week.
    and also tell me the link where can i download examples of WLAN and LAN simulations for ns.

  60. gravatar lisa Says:

    I would like to create forms using tcl/tk on NS 2.33 and ubuntu 8.01 to allow the user of the system to enter parameter like packet size, number of nodes to make the system more user friendly.
    Create mobile nodes, show communication by flashing of nodes, calculate bandwidth, delay and packey loss and show these on X graphs.
    Show mobility of nodes on NAM.
    If you have a single code that does the above please email me using the above address
    Please assist.
    Regards,
    Lisa

  61. gravatar Jason Ernst Says:

    it sounds like something is wrong with your makefile and it no longer knows what to do for the “make all”

  62. gravatar Jason Ernst Says:

    I have never encountered a failed validation yet myself. You could try to re-validate the specific test using the method mentioned in the error message to double check it without having to re-run all of them. If it still fails I would try posting to the ns2 mailing list or at least do a google search for the particular failed test. Maybe you can find someone else with a similar problem. As for the examples of WLAN and LAN just look through the source code folders, there should be one that has many scenario files (i think its somewhere like /tcl/examples or /ex/tcl or something. There you will find all different types of scenarios.

  63. gravatar Jason Ernst Says:

    As far as I know NAM already supports visualization of mobility, I have done some experiments myself with mobility and there is no problem. For the forms you are looking for, I am assuming you mean forms that are displayed in a browser? For this I don’t know of any existing tools for this, although I am interested in something like this as well, it would make it much easier to input and change simulation values rather than having to edit scenario files constantly. Let me know if you find anything, or would like to start some kind of module for this. Maybe we can collaborate on something.

  64. gravatar shahzad Says:

    now I downloaded tried to start a simple simulation example
    ns ns-simple.tcl
    given in that page but it gives me this message in my shell prompt.
    >>> ns-simple.tcl does not exist, try again <<<<

    Can somebody explain me what should i do?

  65. gravatar shahzad Says:

    my ns2.29 is somehow working now on Ubuntu. but there is still a problem, that is when i run .tcl files which does not include nam appearance are run without any error. but when i try to open files with nam, are produce the following error.

    >>> root@ubuntu:/home/shahzad/Desktop/Store/NS2# ns ns-simple.tcl~ <<<
    CBR packet size = 1000
    CBR interval = 0.0080000000000000002
    root@ubuntu:/home/shahzad/Desktop/Store/NS2# nam:
    [code omitted because of length]
    : no event type or button # or keysym
    while executing
    "bind Listbox {
    %W yview scroll [expr {- (%D / 120) * 4}] units
    }"
    invoked from within
    "if {[string equal [tk windowingsystem] "classic"]
    || [string equal [tk windowingsystem] "aqua"]} {
    bind Listbox {
    %W yview scroll [expr {..."

    please tell me the solution as soon as possible in a very simple way.

  66. gravatar Nguyen Minh Thu Says:

    When I run a file with the command : ./ns myfirst.tcl or ./ns convert.tcl. There is not anything happened. Can you explain it for me?

  67. gravatar dini Says:

    hi jason,it’s me again
    i change my ns to lower version become ns2.29, i install it then i start again to add antnet module,i also edit my-endian.h but when i run ‘make’ again i got the same errors as when i run it in ns2.33.

    This should work unless it involves constant data structures referencing symbols
    from auto-imported DLLs.Info: resolving __timezone by linking to __imp___timezo
    ne (auto-import)
    for i in indep-utils/cmu-scen-gen/setdest indep-utils/webtrace-conv/dec indep-ut
    ils/webtrace-conv/epa indep-utils/webtrace-conv/nlanr indep-utils/webtrace-conv/
    ucb; do ( cd $i; make all; ) done
    make[1]: Entering directory `/usr/local/ns-allinone-2.29.2/ns-allinone-2.29/ns-2
    .29/indep-utils/cmu-scen-gen/setdest’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/usr/local/ns-allinone-2.29.2/ns-allinone-2.29/ns-2.
    29/indep-utils/cmu-scen-gen/setdest’
    make[1]: Entering directory `/usr/local/ns-allinone-2.29.2/ns-allinone-2.29/ns-2
    .29/indep-utils/webtrace-conv/dec’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/usr/local/ns-allinone-2.29.2/ns-allinone-2.29/ns-2.
    29/indep-utils/webtrace-conv/dec’
    make[1]: Entering directory `/usr/local/ns-allinone-2.29.2/ns-allinone-2.29/ns-2
    .29/indep-utils/webtrace-conv/epa’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/usr/local/ns-allinone-2.29.2/ns-allinone-2.29/ns-2.
    29/indep-utils/webtrace-conv/epa’
    make[1]: Entering directory `/usr/local/ns-allinone-2.29.2/ns-allinone-2.29/ns-2
    .29/indep-utils/webtrace-conv/nlanr’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/usr/local/ns-allinone-2.29.2/ns-allinone-2.29/ns-2.
    29/indep-utils/webtrace-conv/nlanr’
    make[1]: Entering directory `/usr/local/ns-allinone-2.29.2/ns-allinone-2.29/ns-2
    .29/indep-utils/webtrace-conv/ucb’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/usr/local/ns-allinone-2.29.2/ns-allinone-2.29/ns-2.
    29/indep-utils/webtrace-conv/ucb’

    i confused why i always got the same errors??is the problem in the installation of ns2 (maybe i wrong in installation) or maybe because i use ns2 in xp using cygwin (could it be not support???). i have no idea why it happen because i can run tcl script from marc greis but fail when i run antnet by lavina jain.help me to solve it please.
    thx

  68. gravatar Jason Ernst Says:

    Not sure what the problem is exactly. I have never tried ns2 with cygwin yet myself. Again it is some type of problem with make. Look into googling cygwin and the ns2 versions you are using, perhaps there is some sort of known issue with cygwin which causes this error. If you are able to run the tcl from marc then maybe it ended up installing properly despite the errors you got. Perhaps the problem is with the antnet script you are trying to run, maybe try consulting the people who made that script because maybe they have encountered this problem as well.

  69. gravatar Jason Ernst Says:

    If you are using the ./ns … you need to be doing that in the ns folder as far as i know. If you have installed it properly using a ’sudo make install’ then you should be able to leave out the ./ in front and it should work. If you haven’t done a ’sudo make install’ then you will always need to make sure you are running from the same folder as the executable, or set up your paths so that the system knows where to look for ns

  70. gravatar Faruqui Says:

    Hello Jason.

    I am a new user in NS2 environment. So, my question seems funny to others as its a very basic question!
    I installed ns2 version 2.33 in RedHat enterprise Linux 5. Installation is done without any error and I also did validate.
    Now I want to run a basic simulation program to understand how things work here. Plz advise me how to run a simulation in ns 2.33. After I understood the process, I have to check the AODV protocol simulation.

    Many thanks in advance.
    Regards.

  71. gravatar Shollar79 Says:

    hello,i m new to ns2..my project requires me to set up a real scenario mobile ipv4 and mobile ipv6 networks in ns2 .i already have ns2.33 and cygwin 1.5.25-15 software ready to install it on my pc.does this version of ns2 and cygwin require a patch to support mobile ipv4 and mobile ipv6?
    regards

  72. gravatar afo Says:

    Hi Jason…
    I’m having problems with my nam. Each time I try to run the simple.tcl file using the command ‘ns simple.tcl’ it compiles but I cant view the nam animator. I always get the error below. Please help…

    [afo@localhost ex]$ ns simple.tcl
    210
    0.0037499999999999999
    running nam…
    [afo@localhost ex]$ nam:
    [code omitted because of length]
    : no event type or button # or keysym
    while executing
    "bind Listbox {
    %W yview scroll [expr {- (%D / 120) * 4}] units
    }"
    invoked from within
    "if {[string equal [tk windowingsystem] "classic"]
    || [string equal [tk windowingsystem] "aqua"]} {
    bind Listbox {
    %W yview scroll [expr {..."

    I will appreciate any help asap!!

  73. gravatar Demelash Says:

    Hi gesit adnd

    I am doing my thesis workon scheduling algorithms in ns-2.33.
    I get difficulty how and where am i supposed to change or work in ns.
    my scheduling algorithms are used for giving different priority or accessing the channels in cellular networks to users. pls help me it is so urgent how could i proceed?

    Thanks in Advance

  74. gravatar Usman Ali Says:

    Hi Dear
    On step 7 when i type make it gives following error
    make: *** [ns] Error 1
    what should i do now
    Your prompt response would be appreciated.
    thanx in advance
    usman

  75. gravatar Usman Ali Says:

    this is a complete error
    ns: hidden symbol `__stack_chk_fail_local’ in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO
    /usr/bin/ld: final link failed: Nonrepresentable section on output
    collect2: ld returned 1 exit status
    make: *** [ns] Error 1

  76. gravatar Usman Ali Says:

    Result of ./configure
    usmanali@ubuntu:~$ cd ns-2.33
    usmanali@ubuntu:~/ns-2.33$ ./configure
    No .configure file found in current directory
    Continuing with default options…
    checking build system type… i686-pc-linux-gnu
    checking host system type… i686-pc-linux-gnu
    checking target system type… i686-pc-linux-gnu
    checking for gcc… gcc
    checking for C compiler default output file name… a.out
    checking whether the C compiler works… yes
    checking whether we are cross compiling… no
    checking for suffix of executables…
    checking for suffix of object files… o
    checking whether we are using the GNU C compiler… yes
    checking whether gcc accepts -g… yes
    checking for gcc option to accept ANSI C… none needed
    checking for g++… g++
    checking whether we are using the GNU C++ compiler… yes
    checking whether g++ accepts -g… yes
    checking how to run the C preprocessor… gcc -E
    checking for egrep… grep -E
    checking for ANSI C header files… yes
    checking for sys/types.h… yes
    checking for sys/stat.h… yes
    checking for stdlib.h… yes
    checking for string.h… yes
    checking for memory.h… yes
    checking for strings.h… yes
    checking for inttypes.h… yes
    checking for stdint.h… yes
    checking for unistd.h… yes
    checking for string.h… (cached) yes
    checking for main in -lXbsd… no
    checking for socket in -lsocket… no
    checking for gethostbyname in -lnsl… yes
    checking for dcgettext in -lintl… no
    checking for getnodebyname in -ldnet_stub… no
    checking that g++ can handle -O2… no
    checking if C++ libraries work without any namespace… no
    checking if C++ libraries work with namespace std… yes
    checking if STL works without any namespace… no
    checking if STL works with namespace std… yes
    checking should use STL… yes
    checking for tcl.h… -I/usr/local/include
    checking for libtcl8.4… -L/usr/local/lib -ltcl8.4
    checking for init.tcl… /usr/local/lib/tcl8.4
    checking for tclsh8.4.18… no
    checking for tclsh8.4… /usr/local/bin/tclsh8.4
    checking for tk.h… -I/usr/local/include
    checking for libtk8.4… -L/usr/local/lib -ltk8.4
    checking for tk.tcl… /usr/local/lib/tk8.4
    checking for otcl.h… -I../otcl-1.13
    checking for libotcl1.13… -L../otcl-1.13 -lotcl
    checking for tclcl.h… -I../tclcl-1.19
    checking for libtclcl… -L../tclcl-1.19 -ltclcl
    checking for tcl2c++… ../tclcl-1.19
    checking for X11 header files
    checking for X11 library archive
    checking for XOpenDisplay in -lX11… yes
    checking for XShmAttach in -lXext… yes
    checking for libtcldbg… no
    checking dmalloc… not requested with –with-dmalloc
    checking for perl… /usr/bin
    checking for ANSI C header files… (cached) yes
    checking arpa/inet.h usability… yes
    checking arpa/inet.h presence… yes
    checking for arpa/inet.h… yes
    checking fenv.h usability… yes
    checking fenv.h presence… yes
    checking for fenv.h… yes
    checking netinet/in.h usability… yes
    checking netinet/in.h presence… yes
    checking for netinet/in.h… yes
    checking for string.h… (cached) yes
    checking for strings.h… (cached) yes
    checking time.h usability… yes
    checking time.h presence… yes
    checking for time.h… yes
    checking for unistd.h… (cached) yes
    checking net/ethernet.h usability… yes
    checking net/ethernet.h presence… yes
    checking for net/ethernet.h… yes
    checking for main in -lm… yes
    checking for bcopy… yes
    checking for bzero… yes
    checking for fesetprecision… no
    checking for feenableexcept… yes
    checking for getrusage… yes
    checking for sbrk… yes
    checking for snprintf… yes
    checking return type of random… long
    checking for int8_t… yes
    checking for int16_t… yes
    checking for int32_t… yes
    checking for u_int8_t… yes
    checking for u_int16_t… yes
    checking for u_int32_t… yes
    checking for u_char… yes
    checking for u_int… yes
    checking for strtoq… yes
    checking for strtoll… yes
    checking for long… yes
    checking size of long… 4
    checking for __int64_t… no
    checking for long long… yes
    checking for int64_t… yes
    checking which kind of 64-bit int to use… int64_t
    checking system version (for dynamic loading)… Linux-2.6.28-13-generic
    checking for dlopen in -ldl… yes
    checking dlfcn.h usability… yes
    checking dlfcn.h presence… yes
    checking for dlfcn.h… yes
    checking for ns library name… libns.so
    checking for struct ether_header… found
    checking for struct ether_addr… found
    checking for addr2ascii… no
    checking for Linux compliant tcphdr… found
    checking for BSD compliant tcphdr… not found
    checking for socklen_t… yes
    checking for main in -lpcap… no
    checking to make nse… no
    Explicitly disabling static compilation
    checking for dlopen in -ldl… (cached) yes
    checking for a BSD-compatible install… /usr/bin/install -c
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating tcl/lib/ns-autoconf.tcl
    config.status: creating indep-utils/webtrace-conv/ucb/Makefile
    config.status: creating indep-utils/webtrace-conv/dec/Makefile
    config.status: creating indep-utils/webtrace-conv/nlanr/Makefile
    config.status: creating indep-utils/webtrace-conv/epa/Makefile
    config.status: creating indep-utils/cmu-scen-gen/setdest/Makefile
    config.status: creating autoconf.h
    config.status: autoconf.h is unchanged

  77. gravatar Usman Ali Says:

    hi
    in step 7
    when i run make
    it gives error make error 1
    what should i do now

  78. gravatar oyekunle Says:

    I installed ns on ubuntu 9.04 successfully
    I followed all steps and also steps from ns-nam troubleshooting.
    I get an error while launching nam:
    nam:
    [code omitted because of length]
    : no event type or button # or keysym
    while executing
    "bind Listbox {
    %W yview scroll [expr {- (%D / 120) * 4}] units
    }"
    invoked from within
    "if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
    bind Listbox {
    %W yview scroll [expr {- (%D)}] units
    }
    bind Li..."

    Could you please help urgently.

  79. gravatar Shilpa Lambor Says:

    Nice information. I am trying to install ns2 on Ubuntu. The downloading & installation commands have worked well. However when I try to set the environment variables using the $ gedit ~/.bashrc command, it says that the bashrs file / directory does not exist. What should I do?

  80. gravatar Mahedi Says:

    Hello Everybody,

    I am using NS-2.31 in ubuntu 8.10. I got this error message when try run this command “make”. After I install NS-2.31, I got this kind of error:

    for i in indep-utils/cmu-scen-gen/setdest indep-utils/webtrace-conv/dec indep-utils/webtrace-conv/epa indep-utils/webtrace-conv/nlanr indep-utils/webtrace-conv/ucb; do ( cd $i; make all; ) done
    make[1]: Entering directory `/opt/ns-allinone-2.31/ns-2.31/indep-utils/cmu-scen-gen/setdest’
    g++ -o setdest setdest.o rng.o -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ -DCPP_NAMESPACE=std -Wall \
    -lnsl -lpcap -ldl -lm -lm
    setdest.o: In function `Node::Node()’:
    setdest.cc:(.text+0×22e5): undefined reference to `my_abort(int, char*)’
    setdest.o: In function `init()’:
    setdest.cc:(.text+0×23f6): undefined reference to `my_abort(int, char*)’
    setdest.cc:(.text+0×243e): undefined reference to `my_abort(int, char*)’
    setdest.cc:(.text+0×24b1): undefined reference to `my_abort(int, char*)’
    setdest.o: In function `Node::Node()’:
    setdest.cc:(.text+0×27a7): undefined reference to `my_abort(int, char*)’
    setdest.o:setdest.cc:(.text+0×296a): more undefined references to `my_abort(int, char*)’ follow
    collect2: ld returned 1 exit status
    make[1]: *** [setdest] Error 1
    make[1]: Leaving directory `/opt/ns-allinone-2.31/ns-2.31/indep-utils/cmu-scen-gen/setdest’
    make[1]: Entering directory `/opt/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/dec’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/opt/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/dec’
    make[1]: Entering directory `/opt/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/epa’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/opt/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/epa’
    make[1]: Entering directory `/opt/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/nlanr’
    g++ -Wall -DCPP_NAMESPACE=std -o nlanr-tr-stat tr-stat.o logparse.o -L/opt/ns-allinone-2.31/lib -ltcl8.4 -lnsl -lpcap -ldl -lm
    tr-stat.o: In function `main’:
    tr-stat.cc:(.text+0×6ad): undefined reference to `my_abort(int, char*)’
    tr-stat.cc:(.text+0×731): undefined reference to `my_abort(int, char*)’
    tr-stat.cc:(.text+0×779): undefined reference to `my_abort(int, char*)’
    tr-stat.cc:(.text+0×8e8): undefined reference to `my_abort(int, char*)’
    logparse.o: In function `lf_get_next_entry(_IO_FILE*, lf_entry&)’:
    logparse.cc:(.text+0×1b1): undefined reference to `my_abort(int, char*)’
    logparse.o:logparse.cc:(.text+0×26f): more undefined references to `my_abort(int, char*)’ follow
    collect2: ld returned 1 exit status
    make[1]: *** [nlanr-tr-stat] Error 1
    make[1]: Leaving directory `/opt/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/nlanr’
    make[1]: Entering directory `/opt/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/ucb’
    make[1]: Nothing to be done for `all’.
    make[1]: Leaving directory `/opt/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/ucb’

    Would anyone please tell me how to solve this problem. I am facing this kind of error.

    Thank you in advances

  81. gravatar irk Says:

    Hello Jason,
    I want to implement a tdma-based mac protocol in NS2. But I don't find information about mac protocol implementation in NS2 and about the mac-tdma protocol implemented in NS2. Do you know any book or documentation to have something about that?.
    Thanks in advance,
    irk.

  82. gravatar kar Says:

    this is result of my validate report

    validate overall report: all tests passed
    karthik@karthik-desktop:~/project/ns-allinone-2.34/ns-2.34$

    now i ve created a tcl file example1.tcl and placed in directory ns-2.34…. now what should i do to run tat tcl file…

  83. gravatar abdul Says:

    hi,
    i compile my progrm test.tcl and i got test.tr. but i didn't got output in tracegraph.

  84. gravatar swathi Says:

    hi i am doing my project in ns2. i have to include wimax patch in it to work? Do you know how to include it and how to work properly?

Leave a Reply