Anirban Chakrabarti - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Anirban Chakrabarti

Description:

Presented by. Anirban Chakrabarti. Dependable Computing & Networking ... Random number generator. Uniform, exponential, pareto, constant and Hyper exponential ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 22
Provided by: rsr1
Category:

less

Transcript and Presenter's Notes

Title: Anirban Chakrabarti


1
Introduction to NS-2
  • Presented by
  • Anirban Chakrabarti
  • Dependable Computing Networking Laboratory
  • Department of Electrical and Computer Engineering
  • Iowa State University
  • Ames, IA 50011

2
Overview
  • Introduction to NS architecture
  • Example of a typical NS script
  • Some useful NS classes
  • Documentation Information

3
Introduction
  • Event Driven Simulator
  • Implemented in UC Berkeley
  • Official web-site
  • http//www.isi.edu/nsnam/ns/
  • Documentations available in
  • http//titan.cs.uni-bonn.de/greis/ns/ns.html

4
Implementation
  • NS-2 is implemented in C and Otcl (Object Tcl)
  • C is used for the detailed simulations of large
    data sets
  • C compiler is used
  • Otcl is used for data tweaking
  • Otcl Interpreter is used

5
Abstraction
User Script
OTCL
C
6
Class Tcl
  • Encapsulates the Otcl interpreter
  • Obtain a reference to the Tcl instance
  • Invokes Otcl procedures
  • Report results back to the interpreter

7
Class TclObject
  • Base classes for most classes in compiled and
    interpreted hierarchies
  • Calls the constructors of all the classes
  • Maintains the interpreted object in the hash
    tables
  • Takes care of variable binding

8
Class TclClass
  • Pure Virtual class
  • User is required to derive the class from the
    TclClass
  • Provide the constructor and the create function
  • Constructor passes the name of the class in the
    interpreted hierarchy

9
Problem ...
TCP Source (FTP)
0
1
3
2
Sink
UDP Source
10
Script File
  • An example shown
  • Ns is instantiated
  • Open the trace file
  • Set the nodes
  • Attach agents
  • Run the simulation

11
UDP Flows Attached
12
TCP Flow Attached ...
13
Queue buildup ...
14
Nodes
  • Implemented in Tcl
  • Nodes are instantiated by ns node
  • Nodes are assigned default addresses
  • Can be made to support multicasting by the macro
    multicast on at the simulator instantiation

15
Links
  • Simplex or Duplex
  • Facility for link up/down option
  • Links can have different bandwidths assigned
  • Different Packet Schedulers can be attached to
    the link

16
Queues currently available
  • DropTail
  • FQ
  • RED
  • CBQ
  • WFQ (downloaded version available)

17
Agents
  • Class Agent is responsible for packet allocation
    and generation
  • One has to attach agents to the nodes for packet
    transmission and reception
  • The different agents are
  • TCP and its variants
  • UDP
  • Loss Monitor

18
Analysis
  • Through Network Animator (nam)
  • Trace files are generated
  • Nam shows the trace file by animation
  • Through user created trace files
  • User can have their own trace files

19
Multicast support in ns
  • Different types of multicast trees
  • Centralized, Shared tree and bi-directional
    shared tree
  • Facilities for joining and leaving groups
  • ltiifgt and ltoiflistgt specifies the multicast tree

20
Special ns support
  • Random number generator
  • Uniform, exponential, pareto, constant and Hyper
    exponential
  • Mathematical support
  • Integrals

21
Where to find...
  • Logon to linux.ee.iastate.edu
  • NS source code available in
  • /remote/cpre541/ns-allinone.1b6/ns-2.1b6
  • Examples in
  • /remote/cpre541/ns-allinone.1b6/ns2.1b6/tcl/ex
Write a Comment
User Comments (0)
About PowerShow.com