{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

02-NS2 - An An Introduction to NS2 NS2 Textbook T...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
An Introduction to NS An Introduction to NS2 Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2 , Springer 2008. 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Outline • Overview Overview • Installation E l An Example Incorporate C++ Modules into NS2 • Summary Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2 , Springer 2008. 2
Background image of page 2
Overview: Network Simulation 3 Simulation Main Steps 1. Design and Implementation Things to simulate Assumptions Performance measure Code Implementation 2 Simul ti n 2. Simulation Network Configuration Phase Simulation Phase 3. Result Compilation Debugging and Tracing Compute performance measures Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2 , Springer 2008. 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Overview: NS2 Architecture NS2 = Network Simulator 2 Consists of – C++: Internal mechanism – OTcl: User interface TclCL: Connecting C++ to OTcl – TclCL: Connecting C++ to OTcl Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2 , Springer 2008. 4
Background image of page 4
Overview: NS2 Invocation • Syntax >> ns [<filename>] [<args>] No argument: Enter NS2 environment – <filename> = Tcl simulation script; Use OTcl filename Tcl simulation script; Use OTcl programming lauguage In the Tcl file, <args> is stores in the internal variable ( $argv ). • Example >> ns myfirst ns tcl 1 2 3 >> ns myfirst_ns.tcl 1 2 3 To retrieve the second input argument (2), execute ( lindex $argv 1 ) Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2 , Springer 2008. 5 The index of the element to retrieve, starting from 0
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Outline • Overview Overview • Installation E l An Example Incorporate C++ Modules into NS2 • Summary Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2 , Springer 2008. 6
Background image of page 6
Installation: NS2 1. Go to NS2 web page: NS2 Webpage: http://www.isi.edu/nsnam/ns/ Download Link: http://www.isi.edu/nsnam/ns/ns- build.html#allinone1 . 2 G t ll i k 2. Get all-in-one package NS2, Tcl/Tk, OTcl, TclCL NAM, Zlib, Xgraph 3 U i ll th fil 3. Unzip all the files 4. Use the installation package “ ./install Follow the instruction NS2 is designed for Unix For windows, install Cygwin Textbook: T. Issariyakul and E. Hossain,
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}