Download presentation
Presentation is loading. Please wait.
Published byAshlyn Briggs Modified over 9 years ago
1
1 Network Simulator 2 Install Chao-Ying Chiu
2
2 Outline n Install Cygwin n Install NS2 n Test NS2 Example
3
3 Install Environment n Linux u NS2 n Windows u Cygwin+NS2 u VMWare+NS2
4
4 Download Files before Install n Cygwin u /cg/ F /ftp%3a%2f%2fcygwin.csie.ntu.edu.tw%2fpub% 2fcygwin/
5
5 Files before Install (con.) n Cygwin u http://cygwin.com/
6
6 Files before Install (con.) n NS2 u http://www.isi.edu/nsnam/dist/ns-allinone- 2.27.tar.gz http://www.isi.edu/nsnam/dist/ns-allinone- 2.27.tar.gz u 55MB
7
7 Install Cygwin n Download n Execute setup.exe (20~30 minutes)
8
8 Install Cygwin (con.) n 三種安裝選項
9
9 Install From Internet n 選擇從網路上直接安裝
10
10 Download From Internet n 從網路下載安裝檔案
11
11 Install From Local Directory n 選擇從硬碟裡的檔案安裝
12
12 Install From Local Directory (con.) n 選擇安裝檔案所在目錄
13
13 Install From Local Directory (con.) n 選擇安裝檔案所在目錄
14
14 Install From Local Directory (con.) n 準備安裝
15
15 Install From Local Directory (con.) n 選擇安裝選項
16
16 Install From Local Directory (con.) n 開始安裝
17
17 Install From Local Directory (con.) n 安裝中
18
18 Install From Local Directory (con.) n 安裝完成
19
19 Cygwin n Execute 帳號 名稱 電腦 名稱 注意 : 不能 有空格
20
20 Cygwin (con.) n 安裝完成後
21
21 Cygwin (con.) Type “ startx ”
22
22
23
23 Install NS2 n Download u http://www.isi.edu/nsnam/dist/ns-allinone- 2.27.tar.gz http://www.isi.edu/nsnam/dist/ns-allinone- 2.27.tar.gz u 55MB
24
24 Install NS2 (con.) n 將 ns2 檔案置於 cygwin/home/ 帳號目錄下
25
25 Install NS2 (con.) Type “ gzip -d -c ns-allinone-2.27.tar.gz | tar xvf - ” ( 解壓縮檔案 )
26
26 Install NS2 (con.) n 解壓縮後的結果
27
27 Install NS2 (con.) Type “ cd ns-allinone-2.27 ”
28
28 Install NS2 (con.) Type “./install ”
29
29 Install NS2 (con.) n 開始安裝 NS2
30
30 Install NS2 (con.)
31
31 Install NS2 (con.)
32
32 Install NS2 (con.)
33
33 Install NS2 (con.) n 安裝完成
34
34 Install NS2 (con.) n 加入環境變數 n Update your environment variables: u export NS_HOME=`pwd` u export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH u export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:\ u $NS_HOME/otcl-1.8:$NS_HOME/lib:$LD_LIBRARY_PATH u export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library
35
35 Install NS2 (con.) n To avoid retyping these commands everytime you login you can do the following, after having updated your environment variables as described above: u Type pwd at the command prompt u Note what the shell returns: a directory of the form /home/XXX/ns- allinone-2.27/ (where XXX is your login name) u Update your ~/.bashrc file by adding the following commands to it: F export NS_HOME=/ home/XXX/ns-allinone-2.27/ F export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH F export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:\ F $NS_HOME/otcl-1.8:$NS_HOME/lib:$LD_LIBRARY_PATH F export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library
36
36 Install NS2 (con.) n where you replace /home/XXX/ns-allinone- 2.27/ by whatever pwd returned. Make sure you respect the line breaks as shown above.
37
37 Install NS2 (con.) n 設環境變數
38
38 Install NS2 (con.)
39
39 Install NS2 (con.) Type “ cd ns-2.27 ”
40
40 Install NS2 (con.) Type “./validate ” ( 需要 70~80 分鐘 )
41
41 Install NS2 (con.)
42
42 Install NS2 (con.)
43
43 Install NS2 (con.)
44
44 Install NS2 (con.)
45
45 Install NS2 (con.) n NS2 安裝完成
46
46 Test NS2 Example (con.) n NS2 範例所在位置 u C:\cygwin\home\ 帳號 \ns-allinone-2.27\ns- 2.27\tcl\ex
47
47
48
48 Test NS2 Example (con.) Type “ cd tcl/ex ”
49
49 Test NS2 Example (con.) Type “ startx ”
50
50
51
51 Test NS2 Example (con.) n 執行 simple.tcl 範例 Type “ ns simple.tcl ”
52
52
53
53
54
54
55
55
56
56 Reference n http://www.sims.berkeley.edu/~christin/ns- cygwin.shtml
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.