Download ns-allinone-2.32 and Install
$ wget http://nchc.dl.sourceforge.net/sourceforge/nsnam/ns-allinone-2.32.tar.gz
$ tar -xzvf ns-allinone-2.32.tar.gz
$ cd ns-allinone-2.32
$ sudo apt-get install build-essential autoconf automake libxmu-dev
If an error raising Package autoconf is not available or something similar then this post may help you for fixing that
(If previous command still generate some errors, and if it does, restart your computer and try the following step :)
$ sudo apt-get install -f build-essential libxt-dev libxt6 \
libsm-dev libsm6 libice-dev libice6 libxmu-dev
If an error raising Package autoconf is not available or something similar then this post may help you for fixing that
Now run this command
$./install
$ gedit ~/.bashrc
Add the following lines to the end of it. Remember replace "/your/path" by something like "/home/purple"
# LD_LIBRARY_PATH
OTCL_LIB=/your/path/ns-allinone-2.32/otcl-1.13
NS2_LIB=/your/path/ns-allinone-2.32/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=/your/path/ns-allinone-2.32/tcl8.4.15/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/your/path/ns-allinone-2.32/bin:/your/path/ns-allinone-2.32/tcl8.4.15/unix:/your/path/ns-allinone-2.32/tk8.4.14/unix
NS=/your/path/ns-allinone-2.32/ns-2.32/
NAM=/your/path/ns-allinone-2.32/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM
Let it take effect immediately:
$ source ~/.bashrc
Note: the step described above is important;otherwise, you cannot run ns successfully.
(or you can restart your X windows,i.e. logout and then login, or reboot your system, to make it work.)
Now,the installation has been completed.If you try:
$ ns
Then a "%" will appear on the screen.type "exit" to quit the mode and back to "$"
Validation
After these steps, you can now run the ns validation suite with
$ cd ns-2.32 $ ./validate
11 comments:
hi.. i am working in ns2 using cygwin in windows... I cant maximize the network animator window.. Do you know how to do it??? Reply me in my blog http://bestinfotainment.blogspot.com
hi Satheesh ...
I've checked your blog but I didn't where I can reply for your question
Anyway
I haven't your problem in Ubuntu and I didn't deal with cygwin before
Mahmoud, thx a lot !
Your post has helped immensely to successfully install NS2...Saved me lots of debugging hours...
Thanks Mr Anonymous...
Hi,
I use Fedora Core 8 and installed ns2.32 but after validation test-all-tcpHighspeed, test-all-cbq and test-all-red fails.
I couldn't find any solution, should I use Ubuntu?
didn't figure out where else to post this :D
but I think u may be interested in GNS3 project.
cheers
@Hassan
Also first time I see GNS3 but it is a little bit away from my research project and my Msc
>>didn't figure out where else to post this
I don't know exactly what you mean?
Jazak Allah 7'airan Hassan :D
Hi anybody can tell me how to inastall ns2 in windows. i need to create new simulator plz help me
my e-mail id is: j.nanda27@gmail.com
Thanks in advance
Nanda
hi...I'm using ns-allinone-2.32 with MPLS patch on Ubuntu 8.04. The installation is OK, nam runs well. However, when I run tcl in .../tcl/ex/tcpapp.tcl, there is error as the following:
wrong # args: should be "_o3 self class proc n1 n2 bw delay res type args"
(Simulator duplex-link line 1)
involed from within
"$ns duplex-link $n0 $n1 2Mb 5ms DropTail"
(file "tcpapp.tcl" line 43).
I really need your help, please!
hello...i've to use ns2.32,for my project.if anybody knows,which linux version will be best suitable for this,plz inform me.
trikoti
I also faced the same problem as tmhoang.
When i patch the mtens patch then i got error as
wrong # args: should be "_o3 self class proc n1 n2 bw delay res type args"
(Simulator duplex-link line 1)
invoked from within
"$ns duplex-link $Node0 $LSR1 1Mb 10ms DropTail "
(file "MPLSPIMSMexample.tcl" line 34)
Can you please help me on this?
Post a Comment