installing ns 2
TRANSCRIPT
http://www.ns2ultimate.com 1
Installing NS 2
by Teerawat Issariyakul
http://www.ns2ultimate.com
March 2010
http://www.ns2ultimate.com 2
OutlineKnown Issues as of March 2010Working SolutionStep-by-Step Installation
◦ Ubuntu◦ Windows
Acknowledgement
3
NS2 DOES NOT work under the following environment.
Possible cause: gcc version!
Known Issues as of March 2010
Window platform:o version XP and 7o NS2 version: 2.33 and
2.34o Cygwin 1.5.25 and
1.7.1o gcc version 3.4.4-999
Ubuntu platform:o version 9.10o gcc version 4.4.1
http://www.ns2ultimate.com
4
These two solutions are tested. They DO WORK!!
Note: ns-2.35 checks for gcc4 and gcc4-g++ rather than gcc and gcc-g++
Working Solution
Window platform:o version XP and 7o NS2 version: 2.35o Cygwin1.7.1o gcc version 4.3.4
Ubuntu platform:o version 8.04o NS2 version 2.33
and 2.34o gcc version 4.2.4
http://www.ns2ultimate.com
5
Ubuntu: please see my previous posthttp://
www.ns2ultimate.com/post/439346614/working-combination-ns-2-34-ubuntu-8-04-and-perhaps Windows Use cygwin
◦ Required package:
gcc4, gcc4-g++, gawk, tar, gzip, make, patch, perl, w32api
◦ Graphic package:
xorg-server, xinit, libX11-devel, libXmu-devel
◦ Graphic package if required if you would like to run graphical things like nam or Xgraph. I find them unnecessary.
Step-by-Step Installation
http://www.ns2ultimate.com
6
1. Go to cygwin.com
Installing Cygwin 1.7.1
click here to get file“setup.exe
”
2. Run the file “setup.exe”
http://www.ns2ultimate.com
7
2. Run the file “setup.exe”
Installing Cygwin 1.7.1
Keep hitting next and provide
directory information
http://www.ns2ultimate.com
8
3. When you hit this page, choose the required (e.g., gcc4) and optional packages
Installing Cygwin 1.7.1
Search the package
name here
Expand package category
by clicking ‘+’
Click here to install all the
optional package
When you are done, hit ‘next’
http://www.ns2ultimate.com
9
4. Open Cygwin
5. Download and extract ns2allinone2.35-RC3 package
5. Extract the package by calling
»tar -xvf ns-allinone-2.34-RC3.tar.gz
6. When done, call
»cd ns-allinone-2.35-RC3
»./install
Installing Cygwin 1.7.1
http://www.ns2ultimate.com
10
7. When the installation completes adds the followings into the file “.bashrc” located in your home directory
NSHOME=~/ns-allinone-2.35-RC3
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
Installing Cygwin 1.7.1
http://www.ns2ultimate.com
11
8. Test whether the install is alright by typing ns
An NS command prompt % should appear on the screen, and you are done!
Installing Cygwin 1.7.1
http://www.ns2ultimate.com
http://www.ns2ultimate.com 12
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://suchaxplore.blogspot.com/).
http://www.ns2ultimate.com 13
For more information about NS 2
Please see this book from Springer
T. Issaraiyakul and E. Hossain, “Introduction to Network Simulator NS2”, Springer 2009