Friday, July 11, 2008

Install NS2-AllInOne-2.33 on Ubuntu 8.04

This is an example of the NS2-AllInOne-2.33 installation.

Suppose that there is "ns-allinone-2.33.tar.gz" in current directory (e.g. "~/" for me is "/home/sucha").
All steps are done in Terminal, so open a terminal in Accessories/Terminal.

To extract the file:
tar xvfz ./ns-allinone-2.33.tar.gz

Go into extracted directory:
cd ns-allinone-2.33

Download required packages:
sudo apt-get install build-essential autoconf automake libxmu-dev

Start installation:
./install

Set environment parameter:
gedit ~/.bashrc
Then at the last line, append the following text with changing "/your/path" to the directory that contains "ns-allinone-2.33". (e.g. "/home/sucha/" )

# LD_LIBRARY_PATH
OTCL_LIB=/home/sucha/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/sucha/ns-allinone-2.33/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/sucha/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/sucha/ns-allinone-2.33/bin:/home/sucha/ns-allinone-2.33/tcl8.4.18/unix:/home/sucha/ns-allinone-2.33/tk8.4.18/unix
NS=/home/sucha/ns-allinone-2.33/ns-2.33/
NAM=/home/sucha/ns-allinone-2.33/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM


Done!!!
Good luck. :)

Reference:
http://nsnam.isi.edu/nsnam/index.php/Installing_ns2.31_on_Ubuntu7.04

16 comments:

Anonymous said...

Thanks for you help!!!

Anonymous said...

Anyway... Your blog is helping me so much.

Anonymous said...

really helpful Thanks mate!

truncs said...

Thanks for the help!!!

vanilla bean said...

when run %ns, the output is ;
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 ...]]

right or not.?

but i look at the other source, the output must be %.

so, which one is true?

Sucha said...

@vanilla bean:
When you run "ns" in a terminal, you should get ns2's command line (may be "%"). I am positively sure; however; currently, my computer does not have it, so I cannot have a try. :)

Vinod Kumar (AIT) said...

Well done!!!!
I know you are a sincere man at work but didn't knew you are also available on internet. I appreciate your work and willingness to help others.

Vk (AIT) said...

Hi sucha,
good work but you missed one step,
$ source ~/.bashrc

and I was tangled in it, otherwise quite useful and simple.............
thanks

Sucha said...

@VK(AIT):
Thank you for your comment. The source command will update the environment (.bashrc). In my case, after I reopen a terminal, it works also. :)

Anonymous said...

I'm somewhat new to just about eveything involved with this process but i'm attempting to jump in. I got to the apt-get command and i get "E: Couldn't find package build-essential." I'm running a small install (1 CD) of Ubuntu 8.10. Any thoughts on what i might be missing. Thanks.

Romil said...

romil@ubuntu:~$ 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 ...]]

this was the output i got ...i shud have got % ...please help where i might have gone right.

Umair Ahmad said...

hi sucha... i have installed ns-allinone-2.33 package but when i run it i get the following error...


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


kindly help me as soon as possible.... thanks...

Anonymous said...

from Anmol
hi,
even i'm getting the same thing:-

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

pls help finding a soln. to this problem.

I tried "$ source ~/.bashrc" also after install, but it doesn't help.

Sucha said...

Sorry for a (very) late reply.

@Anonymous (February 25, 2009 9:01 AM): It seems like your OS cannot access to the source. This may come from various reasons such as Internet connection, live CD.

@Romil, @Umair Ahmad, @Anmol: Your ns command does not refer to the NS2-simulator command. You may try to execute the command from the original directory in case the installation is successful.

Réjane said...
This post has been removed by the author.
Réjane said...
This post has been removed by the author.