This is time for go back to linux.
first step is setup internet connection, second step is setup rhythmbox music player for playing mp3 and setup movie player for watching movie.
Finally, Try to install Network Simulator NS2.31 for ubuntu to waste boring winter vacation
Download and install ns2.31 allinone.
$ wget http://nchc.dl.sourceforge.net/sourceforge/nsnam/
ns-allinone-2.31.tar.gz
$ tar -xzvf ns-allinone-2.31.tar.gz
$ cd ns-allinone-2.31
$ sudo apt-get install build-essential autoconf automake libxmu-dev
Set Environment Variable :
$ gedit ~/.bashrc
Add the following lines to the end of it. Remember replace
“/home/networklab/ns/” by something like “/home/yourname/”
——————————————————————————————–
# LD_LIBRARY_PATH
OTCL_LIB=/home/networklab/ns/ns-allinone-2.31/otcl-1.13
NS2_LIB=/home/networklab/ns/ns-allinone-2.31/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_
LIB:$USR_LOCAL_LIB# TCL_LIBRARY
TCL_LIB=/home/networklab/ns/ns-allinone-2.31/tcl8.4.14/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB# PATH
XGRAPH=/home/networklab/ns/ns-allinone-2.31/bin:/home/networklab/ns/
ns-allinone-2.31/tcl8.4.14/unix:/home/networklab/ns/ns-allinone-2.31/tk8.4.14/unix
NS=/home/networklab/ns/ns-allinone-2.31/ns-2.31/
NAM=/home/networklab/ns/ns-allinone-2.31/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM
————————–
Let it take effect immediately:
$ source ~/.bashrc
Note: if ns unsuccessfully. you can restart your X windows, or reboot your system, to make it work Now,the installation has been completed. then try:
$ ns
Then a “%” will appear on the screen.type “exit” to quit the mode and back to “$”
Validation :
$ cd ns-2.31
$ ./validateyou need to wait around 30 minutes to validate
![]()
What’s next step ?
You can do whatever you want
![]()
References :
Jika teringat tentang dikau…
February 06 2008,
Taipei City
High Speed Network Lab
Udin Harun





February 9, 2008 at 11:10 pm |
Hi,
have followed your installations procedure on a fairly new ubuntu 7.10
When starting my terminal I get following warning:
“bash: LIB:/usr/local/lib: No such file or directory”
Do you have an idea what the reason for this is?
thx
Michael
udinharun said :
Hi Michael, I didn’t have problem when installation.
may be you can check ‘the Set Environment Variable’
notice this note :
Add the following lines to the end of it. Remember replace
“/home/networklab/ns/” by something like “/home/yourname/”
February 27, 2008 at 6:56 pm |
Very Usefull For me.
I Translate this Post in persian And i Will write it in my persian Linux Blog
Goodluck -
udinharun reply :
OK, very good.
Goodluck
March 21, 2008 at 8:40 am |
after giving the following commands
$ar -xzvf ns-allinone-2.31.tar.gz
$ cd ns-allinone-2.31
$ sudo apt-get install build-essential autoconf automake libxmu-de
i gave ./install it says
bash: ./install: No such file or directory
whats wrong?
and i have only ns-2.31 and zlib-1.13 inside ns-allinone-2.31 folder?
April 11, 2008 at 7:17 am |
These posts may help you to fix your problem
http://mmmzdev.blogspot.com/2008/03/able-to-install-automake-and-autoconf.html
http://mmmzdev.blogspot.com/2008/03/installing-ns232-on-ubuntu710.html
UdinHarun Said :
Thank You Mahmoud Zidan for your information
May 29, 2008 at 3:50 am |
thank you..
July 14, 2008 at 12:45 am |
It also comes up with “bash: LIB:/usr/local/lib: No such file or directory” after I revised the .bashrc file and “source ~/.bashrc”. then “ns”, it says
Usage: host [-v] [-a] [-t querytype] [options] name [server]
Listing: host [-v] [-a] [-t querytype] [options] -l zone [server]
Hostcount: host [-v] [options] -H [-D] [-E] [-G] zone
Check soa: host [-v] [options] -C zone
Addrcheck: host [-v] [options] -A host
Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
Common options: [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
Other options: [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
Special options: [-O srcaddr] [-j minport] [-J maxport]
Extended usage: [-x [name ...]] [-X server [name ...]]
what does it suppose to mean? could you please tell me the solution? thanks a lot!
July 29, 2008 at 9:06 am |
Hi
I am trying to follow the instructions and installing ns 2.31 but I am getting the following error when I “./install”
checking whether the C compiler (gcc ) works… no
configure: error: installation or configuration problem: C compiler cannot create executables.
tcl8.3.2 configuration failed! Exiting …
Tcl is not part of the ns project. Please see http://www.Scriptics.com
to see if they have a fix for your platform.
But the gcc is installed. How do I check if it is working? Any help on this would be much appreciated.
July 29, 2008 at 1:00 pm |
Since my previous message, the installation seems to have progressed with no gcc errors but now I am getting these errors, I think to do with tk8.4.14, some of the output which is below. Any help is appreciated. Thanks.
home/cranfield/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1391: error: ‘TkWindow’ has no member named ‘dispPtr’
/home/cranfield/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1394: error: ‘TkDisplay’ has no member named ‘borderTable’
/home/cranfield/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1394: error: ‘TkDisplay’ has no member named ‘borderTable’
/home/cranfield/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1400: error: ‘TkBorder’ has no member named ‘nextPtr’
/home/cranfield/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1403: error: ‘TkBorder’ has no member named ‘resourceRefCount’
/home/cranfield/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1405: error: ‘TkBorder’ has no member named ‘objRefCount’
make: *** [tk3d.o] Error 1
tk8.4.14 make failed! Exiting …
August 26, 2008 at 1:37 am |
oh really need help!!!
i been try many way to install ns2.33 to ubuntu8.04
but everytime after ./install and ~./bashrc
i type ns and it show this
dose anyone know what is it mean?
really thanks~
steve@god-bless-me:~/桌面/ns-allinone-2.33$ ns
Usage: host [-v] [-a] [-t querytype] [options] name [server]
Listing: host [-v] [-a] [-t querytype] [options] -l zone [server]
Hostcount: host [-v] [options] -H [-D] [-E] [-G] zone
Check soa: host [-v] [options] -C zone
Addrcheck: host [-v] [options] -A host
Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
Common options: [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
Other options: [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
Special options: [-O srcaddr] [-j minport] [-J maxport]
Extended usage: [-x [name ...]] [-X server [name ...]]
steve@god-bless-me:~/桌面/ns-allinone-2.33$
October 1, 2008 at 7:33 am |
After i Set Environment Variable,
It shows the following error when I rung “source ~/.bashrc”
***bash: LIB:/usr/local/lib: No such file or directory***
Reply from udin harun :
I have ever experienced that problem. You need to Re-Set Environment variable carefully. I think your set environment variable is wrong.
October 2, 2008 at 4:30 am |
hi…
ive installed the ns2.33 on ubuntu…
ive set the environment variable and when i typed “source ./bashrc” nothing happened.. was it right?
i continued the installation and validated it…
everything looked fine, but i couldn’t open tcl files.
when i typed “ns example.tcl”, it said
“warning: using backward compatibility mode
error when calling class OldSim: example1b.tcl”
same case with nam…
did i set the wrong environment?
do i have to validate it again after i edit my bashrc?
Reply from Udin Harun :
I am sorry, I don’t know exactly. In case for me, I installed the ns2.31 on ubuntu. I have not try install ns2.33 yet. but I think it should in the same way.
October 6, 2008 at 6:54 am |
I installed 2.33 using same instructions – just had to replace 2.31 by 2.33 in the bashrc exports/includes and the wget command. Worked fine for me!
Thanks Pal.
Reply from Udin Harun
Hi StewieGriffin, Thank you for your information
November 14, 2008 at 7:15 am |
hi
it was very helpful for me. i made the end of the procedure but the validation time is very large when i installed this way. any way it was given me a very good practise.
thx
Reply From Udin Harun :
OK, congratz.
December 3, 2008 at 2:34 am |
Dear Udin Harun,
Can i use the same step to install ns2 on Ubuntu 8.10..?
UdinHarun Reply :
I don’t know exactly. I used these steps on ubuntu 7.10. After that I upgrade to ubuntu 8.04 while released.
December 5, 2008 at 8:33 am |
assalamualaikum Udin harun,
Thanks for your helpful steps on the ns2 installation. In fact i used those steps on my kubuntu 8.04.1 and i guess it works pretty fine.
However i have problem with generating the nam directly after building the tcl script where the nam window didn’t seem to open. If i am not mistaken, the nam will be executed right after we enter the last line of tcl script command ($ns run), rite??
My nam-1.13 just works fine as i can open it directly from it’s own directory but not from the tcl script… wondering what causing this..
Udin Harun Reply :
Waalaikumsalam Zaid.
If you can open nam file from its directory, so there is no problem with nam.
The nam will be executed right after $ns run. If not, may be there is problem with tcl script.
December 9, 2008 at 6:56 am |
hapy aidiladha! Thank you so much for your quick reply.
well i don’t think there is problem with the tcl script and besides i got the script sample from the tutorial source on internet. However i got this warning message as i try to run the tcl script. do u know what this warning sign is about?
./ns
ns ns-simple.tcl
warning : using backward compatibility mode
error when calling class OldSim : ns-simple.tcl
Udin Harun Reply :
hapy aidiladha too!
I don’t know. I never get that kind of error message
September 28, 2009 at 1:50 pm |
hi am too getting the ame error if u found how to solve the error pls do post it….
December 22, 2008 at 4:01 pm |
hi
i m anu
can u elp me?
i have problem wit run the command
ns example1.tcl
it give te msg no directory is found
plz tell me where i write tcl script n how i save n run this
Udin Harun Reply :
Hi Anu,
If your NS2 installation success. You can save the tcl script anywhere directory.
you should run that kind of ns command in that directory.
Also you can try to execute some example tcl files at directory …./ns-2.31/tcl/ex
December 23, 2008 at 7:19 am |
hiii
i have installed this in ubuntu8.04…
after validating it shows some tests are failed ….
then i don’t know how to open the network simulator…
plz give me instructions for how to open file&how to work on tha ns2,31
thqanx in advance
Udin Harun Reply :
Hi,
the above steps are my installation process. after that, you can try this tutorial http://www.isi.edu/nsnam/ns/tutorial/ to make sure whether your installation success or not.
February 4, 2009 at 12:51 am |
Hi,
for those who have the following problem :
***bash: LIB:/usr/local/lib: No such file or directory***
try to check that there is no new line after “X11_” in the folowing line :
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_
LIB:$USR_LOCAL_LIB
you have to change it into :
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
February 4, 2009 at 12:55 am |
and don’t forget to check the version written in every folder :
ns-allinone-2.31
otcl-1.13
tcl8.4.14
tk8.4.14
ns-2.31
nam-1.13
October 1, 2009 at 2:40 pm |
Hi,
In fact, I have insalled ns2.31 but when I run
$ nam out.nam
I have this output
nam:
[/code]
: no event type or button # or keysym
while executing
"bind Listbox {
%W yview scroll [expr {- (%D / 120) * 4}] units
}"
can you please help me it's urgent !!!!
here is my email marwouta23@yahoo.fr
Thanks in advance
February 16, 2009 at 12:19 am |
I have installed ns2 2.33 on ubuntu 8.04 Hardy.
But, when run %ns, this is appear ;
Usage: host [-v] [-a] [-t querytype] [options] name [server]
Listing: host [-v] [-a] [-t querytype] [options] -l zone [server]
Hostcount: host [-v] [options] -H [-D] [-E] [-G] zone
Check soa: host [-v] [options] -C zone
Addrcheck: host [-v] [options] -A host
Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
Common options: [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
Other options: [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
Special options: [-O srcaddr] [-j minport] [-J maxport]
Extended usage: [-x [name ...]] [-X server [name ...]]
Is this right or not? I have tried 3 times install this ns2, but the same thing happen.
please..help me..
February 20, 2009 at 4:33 pm |
Hi , i Have a question ,, i cant install the patch patch-ns-2.31-041707 it tells me that no such file or directory…..what wrong did i do
March 3, 2009 at 7:50 am |
thanks to Udin Harun.the instructions are very handy.i installed ubuntu last night and installed ns2.33 today.this is the first time in my life i am using linux. i dont have any idea about what the command means/what is bash /sudo…nothing. still i could install ns2 smoothly following ur steps.
UdinHarun Reply :
Thank you. You are welcome
March 3, 2009 at 7:51 am |
@ Hilalmuhd , i followed the same steps in ubuntu 8.04.02LTS for ns2.33. so i think,this is universal
just dont forget to have a look at WAEL’s post here. because the version of tcl/otcl/nam might be different from Udin’s. so check it for urself. and replace the /home/networklab/ns/ns-allinone-2.33 with ur own user name and path.
for example, my user name USER and i installed ns in the directory DESKTOP, not in directory ns.
so i replace it with /home/user/Desktop/ns-allinone-2.33
March 3, 2009 at 7:51 am |
Assalamu’alaikum..
I have same problem with Peter (July 14,2008), Steve (August 26,2008), and Vanillabean (Feb 16,2009), afer restart my komputer and run ns ( $ns ) the result no display ( % ) but like following :
Usage: host [-v] [-a] [-t querytype] [options] name [server]
Listing: host [-v] [-a] [-t querytype] [options] -l zone [server]
Hostcount: host [-v] [options] -H [-D] [-E] [-G] zone
Check soa: host [-v] [options] -C zone
Addrcheck: host [-v] [options] -A host
Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
Common options: [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
Other options: [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
Special options: [-O srcaddr] [-j minport] [-J maxport]
Extended usage: [-x [name ...]] [-X server [name ...]]
How the solution for this problem,thanks before..
March 5, 2009 at 8:00 pm |
nam: no display name and no $DISPLAY environment variable
i got this error after running simple.tcl… on Ubunto 8.04
any help ????
April 3, 2009 at 8:03 pm |
Very usefull in general.. even same steps.. for newer versions.. the fact of use pics is great for newbies like me..
April 6, 2009 at 10:27 pm |
Do you know any link to download QualNet4.5 ?
April 15, 2009 at 11:44 am |
sir will anyone plz tell following reply
i m installing ns2.31 giving the two initial commands as usual but after giving ./install following results r showing
* Build tcl8.4.14
============================================================
loading cache ./config.cache
checking whether to use symlinks for manpages… no
checking whether to compress the manpages… no
checking whether to add a package name suffix for the manpages… no
checking for gcc… no
checking for cc… no
configure: error: no acceptable cc found in $PATH
tcl8.3.2 configuration failed! Exiting …
what shud i do?
April 23, 2009 at 3:49 pm |
Very useful!! thanks a lot!
Udin Harun Reply :
Thank you
May 4, 2009 at 4:28 pm |
You saved my career (or at least my day). Thanks!
May 8, 2009 at 7:46 am |
I need the solution for backward Compatability.
how to solve this problem.
May 11, 2009 at 9:34 pm |
i have the same issue like others, when i try it tu run writting ns here is what happens
Usage: host [-v] [-a] [-t querytype] [options] name [server]
Listing: host [-v] [-a] [-t querytype] [options] -l zone [server]
Hostcount: host [-v] [options] -H [-D] [-E] [-G] zone
Check soa: host [-v] [options] -C zone
Addrcheck: host [-v] [options] -A host
Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
Common options: [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
Other options: [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
Special options: [-O srcaddr] [-j minport] [-J maxport]
Extended usage: [-x [name ...]] [-X server [name ...]]
who has solved this???
May 20, 2009 at 9:21 pm |
Hi,
I am trying to install nsallinone-2.33. NA d I am getting error as “make: *** [tk3d.o] Error 1”.
Do you know how to solve this. It will be very helpful.
Thanks.
June 4, 2009 at 5:04 am |
hi, i have followed the exact steps of your method.. till the source ~/.bashrc, everything is fine.
but wen i write ns simple.tcl, it says “simple.tcl doesnot exist,try again”. while my “simple.tcl” is present at the desktop.
any idea,where i am going wrong? please reply soon. Its the fourth day of my failed attempt of ns installation and i am going mad now.
Udin Harun Reply :
Hi
If your NS2 installation success. You can save the tcl script anywhere directory.
you should run that kind of ns command in that directory. make sure you compile command “ns simple.tcl” in the same directory where the file simple.tcl is saved.
June 24, 2009 at 5:19 pm |
i tried all i could to install ns2.31 allinone on kubuntu having followed your instruction but all my effort to do so proved abortive. pls help
June 24, 2009 at 6:04 pm |
i tried all i could to install ns2.31 allinone on kubuntu having followed your instruction but all my effort to do so proved abortive.
I typed :
bowen@bowen-desktop:~/Desktop/NS DEPENDENCIES$ tar -xzvf ns-allinone-2.33.tar.gz
the problem is:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
July 1, 2009 at 8:12 pm |
Hello all. Just to say thanks. I follow the instructions and it works completely for me!! If you have something related to otcl on ubuntu I would be happy to get it. Once again thanks!!
Udin Harun Replys :
Hi, do you mean tcl example files ? if the installation process success, you can find many example of tcl files in the ns2 directory.
Thank you.
July 10, 2009 at 10:58 am |
creating ./config.status
./config.status: 28: DEPENDENCIES/ns-allinone-2.33/tcl8.4.18/unix: not found
after installing ns allinone2.33, i encountered this problem
creating Makefile
sed: can’t read /Makefile.in: No such file or directory
creating dltest/Makefile
sed: can’t read /dltest/Makefile.in: No such file or directory
creating tclConfig.sh
sed: can’t read /tclConfig.sh.in: No such file or directory
make: *** No targets. Stop.
tcl8.4.18 make failed! Exiting …
For problems with Tcl/Tk see http://www.scriptics.com
July 19, 2009 at 5:19 pm |
hi,
i have created c plus file sensornode.cc. in make when i write sesnornode.o. when i write make it gives error
make: *** [sensornode.o] Error 1
what should i do
July 20, 2009 at 1:00 pm |
hi,
i have created c plus file sensornode.cc
when i declare this in make sensornode.o
and run make
it gives error
make: *** [sensornode.o] Error 1
what should i do
September 28, 2009 at 10:59 am |
Hi. when I type “ns” I get :
Usage: host [-v] [-a] [-t querytype] [options] name [server]
Listing: host [-v] [-a] [-t querytype] [options] -l zone [server]
Hostcount: host [-v] [options] -H [-D] [-E] [-G] zone
Check soa: host [-v] [options] -C zone
Addrcheck: host [-v] [options] -A host
Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
Common options: [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
Other options: [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
Special options: [-O srcaddr] [-j minport] [-J maxport]
Extended usage: [-x [name ...]] [-X server [name ...]]
What is it?
November 10, 2009 at 12:37 am |
Type in terminal
which ns
You’ll get something like usr/bin. This means that there is an other program named as ns.
Then go in that folder using your terminal and rename ns to ns-different using this command
sudo mv ns ns-different
Good luck!
October 1, 2009 at 11:16 am |
i am using ns-allinone-2.31 in ubuntu 9.04 but i got
the following error while trying to run nam
> $ nam out.nam
> nam:
> [/code]
> : 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 if you have an idea can you help to resolve the problem it's urgent.
Thanks
October 1, 2009 at 1:41 pm |
Hi, please if anyone know the solution forward it to me because i’m blocked and i don’t know how to resolve it!!!
Thanks