Académique Documents
Professionnel Documents
Culture Documents
Install
Chao-Ying Chiu
1
Outline
Install Cygwin
Install NS2
Test NS2 Example
Install Environment
Linux
NS2
Windows
Cygwin+NS2
VMWare+NS2
Cygwin
/cg/
/ftp%3a%2f%2fcygwin.csie.ntu.edu.tw%2fpub
%2fcygwin/
Cygwin
http://cygwin.com/
NS2
http://www.isi.edu/nsnam/dist/ns-allinone-2.27.
tar.gz
55MB
Install Cygwin
Download
10
11
12
13
14
15
16
17
18
Cygwin
Execute
19
Cygwin (con.)
20
Cygwin (con.)
Type startx
21
22
Install NS2
Download
http://www.isi.edu/nsnam/dist/ns-allinone-2.27.
tar.gz
55MB
23
ns2 cygwin/home/
24
25
26
Type cd ns-allinone-2.27
27
Type ./install
28
NS2
29
30
31
32
33
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
34
To avoid retyping these commands everytime you login you can do the
following, after having updated your environment variables as described
above:
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
35
36
37
38
Type cd ns-2.27
39
40
41
42
43
44
NS2
45
NS2
C:\cygwin\home\ \ns-allinone-2.27\ns2.27\tcl\ex
46
47
Type cd tcl/ex
48
Type startx
49
50
simple.tcl
Type ns simple.tcl
51
52
53
54
55
Reference
http://www.sims.berkeley.edu/~christin/nscygwin.shtml
56