30-05-2013, 02:47 PM
NS2 Tutorial
NS2 Tutorial[.pdf (Size: 1.25 MB / Downloads: 23)
Motivation for Simulations
● Cheap does
not require costly equipment
● Complex scenarios can be easily tested
● Results can be quickly obtained – more ideas can
be tested in a smaller timeframe
● The real thing isn't yet available
● Controlled experimental conditions
– Repeatability helps aid debugging
● Disadvantages: Real systems too complex to
model
Features of NS2
● Protocols: TCP, UDP, HTTP, Routing algorithms,
MAC etc
● Traffic Models: CBR, VBR, Web etc
● Error Models: Uniform, bursty etc
● Misc: Radio propagation, Mobility models , Energy
Models
● Topology Generation tools
● Visualization tools (NAM), Tracing
NS Structure
● NS is an object oriented discreteevent
simulator
– Simulator maintains list of events and executes one event after
another
– Single thread of control: no locking or race conditions
● Back end is C++ event scheduler
– Protocols mostly
– Fast to run, more control
● Front end is oTCL
– Creating scenarios, extensions to C++ protocols
– fast to write and change
Summary
● Simulators help in easy verification of protocols
in less time, money
● NS offers support for simulating a variety of
protocol suites and scenarios
● Front end is oTCL, back end is C++
● NS is an ongoing
effort of research and
development