1 / 56

Quick Guide to Installing NS2 with Cygwin on Windows

Learn step-by-step instructions to install NS2 on Windows using Cygwin, including setting up the environment variables for optimal performance.

sburks
Download Presentation

Quick Guide to Installing NS2 with Cygwin on Windows

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Network Simulator 2

  2. Outline • Install Cygwin • Install NS2 • Test NS2 Example

  3. Install Environment • Linux • NS2 • Windows • Cygwin+NS2 • VMWare+NS2

  4. Download Files before Install • Cygwin • /cg/ • /ftp%3a%2f%2fcygwin.csie.ntu.edu.tw%2fpub%2fcygwin/

  5. Files before Install (con.) • Cygwin • http://cygwin.com/

  6. Files before Install (con.) • NS2 • http://www.isi.edu/nsnam/dist/ns-allinone-2.27.tar.gz • 55MB

  7. Install Cygwin • Download • Execute setup.exe (20~30 minutes)

  8. Install Cygwin (con.) • 三種安裝選項

  9. Install From Internet • 選擇從網路上直接安裝

  10. Download From Internet • 從網路下載安裝檔案

  11. Install From Local Directory • 選擇從硬碟裡的檔案安裝

  12. Install From Local Directory (con.) • 選擇安裝檔案所在目錄

  13. Install From Local Directory (con.) • 選擇安裝檔案所在目錄

  14. Install From Local Directory (con.) • 準備安裝

  15. Install From Local Directory (con.) • 選擇安裝選項

  16. Install From Local Directory (con.) • 開始安裝

  17. Install From Local Directory (con.) • 安裝中

  18. Install From Local Directory (con.) • 安裝完成

  19. Cygwin • Execute 帳號名稱 電腦名稱 注意: 不能有空格

  20. Cygwin (con.) • 安裝完成後

  21. Cygwin (con.) • Type “startx”

  22. startx

  23. Install NS2 • Download • http://www.isi.edu/nsnam/dist/ns-allinone-2.27.tar.gz • 55MB

  24. Install NS2 (con.) • 將ns2檔案置於cygwin/home/帳號目錄下

  25. Install NS2 (con.) • Type “gzip -d -c ns-allinone-2.27.tar.gz | tar xvf - ” (解壓縮檔案)

  26. Install NS2 (con.) • 解壓縮後的結果

  27. Install NS2 (con.) • Type “cd ns-allinone-2.2 ”

  28. Install NS2 (con.) • Type “./install”

  29. Install NS2 (con.) • 開始安裝NS2

  30. Install NS2 (con.)

  31. Install NS2 (con.)

  32. Install NS2 (con.)

  33. Install NS2 (con.) • 安裝完成

  34. Install NS2 (con.) • 加入環境變數 • Update your environment variables: • export NS_HOME=`pwd` • export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH • export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:\ • $NS_HOME/otcl-1.8:$NS_HOME/lib:$LD_LIBRARY_PATH • export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library

  35. Install NS2 (con.) • To avoid retyping these commands everytime you login you can do the following, after having updated your environment variables as described above: • Type pwd at the command prompt • Note what the shell returns: a directory of the form /home/XXX/ns-allinone-2.27/ (where XXX is your login name) • Update your ~/.bashrc file by adding the following commands to it: • export NS_HOME=/home/XXX/ns-allinone-2.27/ • export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH • export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:\ • $NS_HOME/otcl-1.8:$NS_HOME/lib:$LD_LIBRARY_PATH • export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library

  36. Install NS2 (con.) • where you replace /home/XXX/ns-allinone-2.27/ by whatever pwd returned. Make sure you respect the line breaks as shown above.

  37. Install NS2 (con.) • 設環境變數

  38. Install NS2 (con.)

  39. Install NS2 (con.) • Type “cd ns-2.27”

  40. Install NS2 (con.) • Type “./validate” (需要70~80分鐘)

  41. Install NS2 (con.)

  42. Install NS2 (con.)

  43. Install NS2 (con.)

  44. Install NS2 (con.)

  45. Install NS2 (con.) • NS2安裝完成

  46. Test NS2 Example (con.) • NS2範例所在位置 • C:\cygwin\home\帳號\ns-allinone-2.27\ns-2.27\tcl\ex

  47. Test NS2 Example (con.) • Type “cd tcl/ex”

  48. Test NS2 Example (con.) • Type “startx”

More Related