eb2_shadow
wolf_banner only
NCSUbrick_CSC reshaded
Computer Simulation ofNetworksComputer Simulation ofNetworks
ECE/CSC 777: Telecommunications Network Design
Fall, 2013, Rudra Dutta
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Objective Performance StudyObjective Performance Study
Direct Measurement
Reactive
Disrupts the user/system, affects the behavior/characteristics
Can be done only on completed running systems
Predictive
Analytical Methods
Useful if the model is available and is computationally efficient
Most systems are complex and require highly complex mathematicalmodels
Usually only steady state can be modeled
Simulation
Give more detail than analytical modeling
Very useful when large design space to be explored
Can study dynamic behavior
Not exact and involves some amount of approximation
Can explore only part of operational space
Halfway approach - some implementation
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Simulation and ModelSimulation and Model
Image courtesy of GSU, “Hyperphysics” site, Rovio
tra12.gif
imgres.jpeg
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
SimulationSimulation
Programmatic representation of system entities
We know how bits and pieces of the system work algorithmically
Possibly for some bits we know mathematically
Implement these algorithms and let them interact
Two main types of simulation
Discrete event
discrete points in time, using random number generators
Continuous time
State changes occur continuously across time
Packages
E.g. OPNET (commercial), NS-2 (open source), OMNeT++
Levels of detail
E.g. packet level, flow level
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Discrete Event SimulationDiscrete Event Simulation
Useful for speeding up when details are abstracted
Decide what happens first
Many things happen after this that are not modeled in thesimulation
E.g. in GBN the next thing after receiving frame is sending ACK
Decide what events are triggered by this event that aremodeled by simulation
Arrange in order of time of occurrence
Jump to next event, do the same
Until you run out of events, or have run it for long enough
wolf_banner only
NCSUbrick_CSC reshaded
Discrete Event ExampleDiscrete Event Example
Sender transmits threemessages at times 0s, 10s,20s
The channel takes 2s topropagate
Receiver takes a randomtime between 1s and 9s toprocess
Sends back either a moreinfo request or an OK,alternately
Upon more info, sendersends one more messageimmediately
Copyright Fall 2013, Rudra Dutta, NCSU
S
S
D
D
0s: S sends P1
0s: S sends P1
10s: S sends P2
10s: S sends P2
20s: S sends P3
20s: S sends P3
2s: R rcvs P1
2s: R rcvs P1
wolf_banner only
NCSUbrick_CSC reshaded
Discrete Event ExampleDiscrete Event Example
Sender transmits threemessages at times 0s, 10s,20s
The channel takes 2s topropagate
Receiver takes a randomtime between 1s and 9s toprocess
Sends back either a moreinfo request or an OK,alternately
Upon more info, sendersends one more messageimmediately
Copyright Fall 2013, Rudra Dutta, NCSU
S
S
D
D
0s: S sends P1
0s: S sends P1
10s: S sends P2
10s: S sends P2
20s: S sends P3
20s: S sends P3
13s: R rcvs P1+
13s: R rcvs P1+
11s: S sends P1+
11s: S sends P1+
11s: S rcvs MI
11s: S rcvs MI
9s: R sends MI
9s: R sends MI
2s: R rcvs P1
2s: R rcvs P1
12s: R rcvs P2
12s: R rcvs P2
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Event ProcessorsEvent Processors
Each event generates new events
Event generation algorithm is an algorithmic model ofthe part of the system being simulated
Callback handlers or processors
Processing algorithms represent specificentities, e.g. GBN receiver
These can obviously grow quite complex
Usually the bulk of the effort of simulation
Also the problem specific part
The Discrete Event framework is an engine and canbe commoditized
Hence the concept of entity models that plug intosuch an engine
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Introduction to OPNETIntroduction to OPNET
A variegated software package
Modeler, IT Guru, SP Guru, …
Modeler: a comprehensive development environmentdriven from GUI
Features
Object-oriented modeling
Discrete event simulator
Integrated data analysis tool
More scalable and efficient simulation engine
Hundreds of protocol and vendor device models
Flexibility to develop detailed custom models
Extensive online documentation and tutorials - quickoverview here
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Specification
Data Collectionand Simulation
Analysis
Using OPNETUsing OPNET
The cycle is repeated until we achieve the correctobjective
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Typical ApplicationsTypical Applications
Network (LAN/WAN) performance modeling
Network planning
R & D in communications architectures andprotocols
Resource sizing
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Model SpecificationModel Specification
Objective - developing a representation of thesystem
Mirrors the hierarchical structure of realnetworks/systems/…
Primarily three levels of abstraction
Network Model (highest level)
Entire network, e.g., the entire Internet
Node Model
Individual devices, e.g., computers, routers, servers, …
Process Model (lowest level)
Basic level of functionality
Typically individual protocols
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
  
 
1
2
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Creating Models in OPNET (1-a)Creating Models in OPNET (1-a)
Project Editor      Network Model
Main work place for creating a network simulation
Where you can :
Create a network model using models from the StandardModel Library (the highest level of abstraction)
Choose statistics to collect
Execute a simulation
View results
Two options
Object Palette (use built-in models)
Build your own nodes
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Creating Models in OPNET (1-b)Creating Models in OPNET (1-b)
Corresponds to thenetwork architecture /topology
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Creating Models in OPNET (2-a)Creating Models in OPNET (2-a)
Node Editor      Node Model
2nd level of abstraction
Used to define the behavior of each network object(node/system)
Important constituents of node model are
Modules
They model some internal aspect of node behavior
E.g. simple traffic source, processor, …
Packet streams (flow of data)
Connect modules
Two options
Use the library
Build your own process modules
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Creating Models in OPNET (2-b)Creating Models in OPNET (2-b)
Corresponds to theinternal structure ofdevices in the network
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Creating Models in OPNET (3-a)Creating Models in OPNET (3-a)
Process Editor      Process Model
The lowest level of abstraction
Represented by Finite State Machines (FSMs)
State (icons)
Transitions (lines)
Operations performed in each state or for atransition are described in embedded C/C++code blocks
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Creating Models in OPNET (3-b)Creating Models in OPNET (3-b)
 
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Many Other EditorsMany Other Editors
E.g. link model editor, path editor, …
Probe editor
Specify the statistics to be collected during simulation,e.g. delay, throughput, utilization, …
Two types of statistics
Global
Local
Two ways to collect statistics
Probe editor
Straight from the project editor
wolf_banner only
NCSUbrick_CSC reshaded
Copyright Fall 2013, Rudra Dutta, NCSU
Simulation AnalysisSimulation Analysis
Simulation execution
using the “configure simulation” tool, or “advancedconfigure simulation” tool
Can specify various attributes, simulation time andother details
Analysis
Directly from project editor
No. of ways to analyze the results: get time-average,peak values, etc.
Graphical analysis