ns2 - appendix ming-feng yang. 2 2 outline ns2 models ns2 directory structure extending ns2 in otcl...
TRANSCRIPT
![Page 1: NS2 - Appendix Ming-Feng Yang. 2 2 Outline NS2 Models NS2 Directory Structure Extending NS2 in OTcl Extending NS2 in C++ NS2 related links](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649ecb5503460f94bd95ce/html5/thumbnails/1.jpg)
NS2 - Appendix
Ming-Feng Yang
![Page 2: NS2 - Appendix Ming-Feng Yang. 2 2 Outline NS2 Models NS2 Directory Structure Extending NS2 in OTcl Extending NS2 in C++ NS2 related links](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649ecb5503460f94bd95ce/html5/thumbnails/2.jpg)
22
Outline
NS2 Models
NS2 Directory Structure
Extending NS2 in OTcl
Extending NS2 in C++
NS2 related links
![Page 3: NS2 - Appendix Ming-Feng Yang. 2 2 Outline NS2 Models NS2 Directory Structure Extending NS2 in OTcl Extending NS2 in C++ NS2 related links](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649ecb5503460f94bd95ce/html5/thumbnails/3.jpg)
33
NS2 Models
Traffic models and applications Web, FTP, telnet, CBR, real audio
Transport protocols unicast: TCP (Reno, Vegas, etc.), UDP Multicast: SRM
Routing and queueing Wired routing, ad hoc routing and directed diffusion queueing protocols: RED, drop-tail, etc
Physical media Wired (point-to-point, LANs), wireless (multiple propag
ation models), satellite
![Page 4: NS2 - Appendix Ming-Feng Yang. 2 2 Outline NS2 Models NS2 Directory Structure Extending NS2 in OTcl Extending NS2 in C++ NS2 related links](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649ecb5503460f94bd95ce/html5/thumbnails/4.jpg)
44
NS2 Directory Structure
TK8.0 OTcl tclclTcl8.0 ns-2 nam-1
tcl
ex test lib
...
...
examples validation tests
C++ code
OTcl code
ns-allinone
mcast
![Page 5: NS2 - Appendix Ming-Feng Yang. 2 2 Outline NS2 Models NS2 Directory Structure Extending NS2 in OTcl Extending NS2 in C++ NS2 related links](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649ecb5503460f94bd95ce/html5/thumbnails/5.jpg)
55
Extending NS2 in OTcl
If you don’t want to compile Source your changes in your sim scripts
Otherwise Modifying code; recompile Adding new files (ex. tcl/mysrc/msg.tcl)
Change Makefile• NS_TCL_LIB = \
tcl/mysrc/msg.tcl \…..
Change tcl/lib/ns-lib.tcl• Class Simulator
source ../mysrc/msg.tcl…..
Recompile
![Page 6: NS2 - Appendix Ming-Feng Yang. 2 2 Outline NS2 Models NS2 Directory Structure Extending NS2 in OTcl Extending NS2 in C++ NS2 related links](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649ecb5503460f94bd95ce/html5/thumbnails/6.jpg)
66
Extending NS2 in C++
Modifying code Make depend Recompile
Adding code in new files Change Makefile (include “new files.o” in the object file
list) Make depend Recompile
![Page 7: NS2 - Appendix Ming-Feng Yang. 2 2 Outline NS2 Models NS2 Directory Structure Extending NS2 in OTcl Extending NS2 in C++ NS2 related links](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649ecb5503460f94bd95ce/html5/thumbnails/7.jpg)
77
NS2 related links
VINT Project Home Page:http://www.isi.edu/nsnam/vint/
NS Home Page:http://www.isi.edu/nsnam/ns/
NS Installation:http://www.isi.edu/nsnam/ns/ns-build.html
NS Documentation:http://www.isi.edu/nsnam/ns/ns-documentation.html
Tcl/Tk Quick Reference Guide:http://www.slac.stanford.edu/~raines/tkref.html
OTcl Tutorial (Berkeley Version):http://bmrc.berkeley.edu/research/cmt/cmtdoc/otcl
![Page 8: NS2 - Appendix Ming-Feng Yang. 2 2 Outline NS2 Models NS2 Directory Structure Extending NS2 in OTcl Extending NS2 in C++ NS2 related links](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649ecb5503460f94bd95ce/html5/thumbnails/8.jpg)
88
NS2 related links
The Network Simulator - Contributed Code:http://www.isi.edu/nsnam/ns/ns-contributed.html
Network Animator (NAM):http://www.isi.edu/nsnam/nam/
NS Tutorial:http://www.isi.edu/nsnam/ns/tutorial/index.html
NS by Example:http://nile.wpi.edu/NS/
NS Simulator Course for Beginners :http://www-sop.inria.fr/mistral/personnel/Eitan.Altman/ns.htm