This document provides instructions for installing NS 2 network simulator on Windows and Ubuntu platforms. It outlines known issues, such as NS2 not working on Windows XP/7 or Ubuntu 9.10. It then describes downloading and installing Cygwin 1.7.9 with required packages on Windows. Detailed steps are provided to download NS2, extract the file, run the install script, and verify the installation. Troubleshooting tips are included if errors occur. The document concludes by acknowledging contributions from various sources and recommending a book for more information on NS2.
08448380779 Call Girls In Civil Lines Women Seeking Men
20111126 ns2 installation
1. Installing NS 2
by Teerawat Issariyakul
http://www.ns2ultimate.com
March 2010
(last updated November 2011)
1
2. Outline
Known Issues as of November 2010
Working Solution
Step-by-Step Installation
◦ Ubuntu
◦ Windows
Acknowledgement
http://www.ns2ultimate.com 2
3. Known Issues as of November
2010
1. NS2 DOES NOT work under the
following environment.
Window platform: Ubuntu platform:
o version XP and 7 o version 9.10
o NS2 version: 2.33 and o gcc version 4.4.1
2.34
o Cygwin 1.5.25 and
1.7.1
2. NS2 require Cygwin Package
libmpfr4, which is not installed by
http://www.ns2ultimate.com 3
4. Working Solution
These two solutions are tested. They
DO WORK!!
Windows Platform
Cygwin 1.7.9 with additional
packages:
◦ Basic packages: gcc4, gcc4-g++, gawk,
tar, gzip, make, patch, perl,
w32api, libmpfr4
◦ Graphic packages: X11 (for running
things like nam or Xgraph)
◦ Read [ here ] for more info. about
required packages
http://www.ns2ultimate.com 4
5. Installing Cygwin 1.7.9
1. Go to cygwin.com
click here
to get file
“setup.exe”
2. Run the
file
http://www.ns2ultimate.com 5
6. Installing Cygwin 1.7.9
2. Run the file “setup.exe”
Keep hitting
next and
provide
directory
information
http://www.ns2ultimate.com 6
7. Installing Cygwin 1.7.9
3. When you hit this page, choose the
required (e.g., gcc4) and optional
packages
Search the
package
name here
Expand
package Click here
category by to install all
clicking ‘+’ the optional
package
When you are done, hit
‘next’
http://www.ns2ultimate.com 7
8. Installing NS2
4. Download and extract ns-2.35 package from
[ here ]. Put the downloaded file in your HOME
directory (e.g., c:cygwinhomeyourname).
5. Run Cygwin
6. Go to your home directory by typing
» cd
Here, you can type pwd to see the full path of
your home directory.
7. Extract the package by calling
»tar -xvf ns-allinone-2.35.tar.gz
http://www.ns2ultimate.com 8
9. Installing NS2
8. When done, execute
»cd ns-allinone-2.35
»./install
9. When the installation completes adds the followings into
the file “.bashrc” located in your home directory
NSHOME=~/ns-allinone-2.35
OTCL_LIB=${NSHOME}/otcl-1.14
NS2_LIB=${NSHOME}/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB
export TCL_LIBRARY=${NSHOME}/tcl8.5.8/library
PATH=$PATH:${NSHOME}/ns-2.35:${NSHOME}/nam-1.15
Note: Look carefully at the directory you might have to
change something
http://www.ns2ultimate.com 9
10. Verifying the Installation
1. Test whether the NS2 directory should be
added to the $PATH variable
Test by executing
>> echo $PATH
Your NS2 path should be shown above.
You can now execute NS2 from any directory
http://www.ns2ultimate.com 10
11. Verifying the Installation
2. Now type ns
An NS command prompt % should
appear on the screen, and you are done!
http://www.ns2ultimate.com 11
12. Troubleshooting
If it’s not working,
1. Try to run ns2 from the installation
directory by typing “./ns”
If the % appears, your NS2 is installed
correctly.
http://www.ns2ultimate.com 12
13. Troubleshooting
If it’s not working, you may create a
link to ns2 executable
>>cd /usr/local/bin
>>ln –s /home/T_Bear/ns-allinone-2.35/ns-2.35/
ns.exe
And, now you
should be able
to run ns2
http://www.ns2ultimate.com 13
14. Acknowledgement
I would like to acknowledge
tumblr.com, slideshare.net
Lupe Krops for useful discussion.
Aslinda Hassan for confirming the problem with gcc
version.
Tom Handerson and Sidney Doria for his suggestion on
ns-2.35
Chaiyut Jandang for his blog (http://jacaranda-
jandaeng.blogspot.com/2009/12/ns2-ns-234-
ubuntu-904.html) in Thai language
Sucha Supittayapornpong for introducing Slideshare.com
http://www.ns2ultimate.com 14
15. For more information about
NS 2
Please see this book from Springer
T. Issaraiyakul and E. Hossain, “Introduction
to Network Simulator NS2”, Springer 2009
15