Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

20111126 ns2 installation

17,881 views

Published on

Published in: Technology, Business

20111126 ns2 installation

  1. 1. Installing NS 2by Teerawat Issariyakulhttp://www.ns2ultimate.comMarch 2010(last updated November 2011) 1
  2. 2. Outline Known Issues as of November 2010 Working Solution Step-by-Step Installation ◦ Ubuntu ◦ Windows Acknowledgement http://www.ns2ultimate.com 2
  3. 3. Known Issues as of November20101. NS2 DOES NOT work under thefollowing environment.Window platform: Ubuntu platform:o version XP and 7 o version 9.10o NS2 version: 2.33 and o gcc version 4.4.1 2.34o Cygwin 1.5.25 and 1.7.12. NS2 require Cygwin Packagelibmpfr4, which is not installed by http://www.ns2ultimate.com 3
  4. 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. 5. Installing Cygwin 1.7.91. Go to cygwin.com click here to get file “setup.exe” 2. Run the file http://www.ns2ultimate.com 5
  6. 6. Installing Cygwin 1.7.92. Run the file “setup.exe” Keep hitting next and provide directory information http://www.ns2ultimate.com 6
  7. 7. Installing Cygwin 1.7.93. When you hit this page, choose therequired (e.g., gcc4) and optionalpackages Search the package name here Expand package Click here category by to install all clicking ‘+’ the optional packageWhen you are done, hit ‘next’ http://www.ns2ultimate.com 7
  8. 8. Installing NS24. Download and extract ns-2.35 package from[ here ]. Put the downloaded file in your HOMEdirectory (e.g., c:cygwinhomeyourname).5. Run Cygwin6. Go to your home directory by typing» cdHere, you can type pwd to see the full path ofyour home directory.7. Extract the package by calling»tar -xvf ns-allinone-2.35.tar.gz http://www.ns2ultimate.com 8
  9. 9. Installing NS28. When done, execute»cd ns-allinone-2.35»./install9. When the installation completes adds the followings intothe file “.bashrc” located in your home directoryNSHOME=~/ns-allinone-2.35OTCL_LIB=${NSHOME}/otcl-1.14NS2_LIB=${NSHOME}/libexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIBexport TCL_LIBRARY=${NSHOME}/tcl8.5.8/libraryPATH=$PATH:${NSHOME}/ns-2.35:${NSHOME}/nam-1.15Note: Look carefully at the directory you might have tochange something http://www.ns2ultimate.com 9
  10. 10. Verifying the Installation1. Test whether the NS2 directory should beadded 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. 11. Verifying the Installation2. Now type nsAn NS command prompt % shouldappear on the screen, and you are done! http://www.ns2ultimate.com 11
  12. 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. 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. 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. 15. For more information aboutNS 2Please see this book from SpringerT. Issaraiyakul and E. Hossain, “Introductionto Network Simulator NS2”, Springer 2009 15

×