Specification Data Collection and Simulation Analysis

advertisement
Computer Simulation of
Networks
Rudra Dutta
ECE/CSC 570 - Fall 2007, Section 001
Objective - 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 mathematical
models
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
2
Simulation and Model
Copyright Spring 2007, Rudra Dutta, NCSU
3
Simulation

Programmatic representation of system entities
–
We know how bits and pieces of the system work algorithmically

–

Implement these algorithms and let them interact
Two main types of simulation
–
Discrete event

–
discrete points in time, using random number generators
Continuous time


Possibly for some bits we know mathematically
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
Copyright Spring 2007, Rudra Dutta, NCSU
4
Discrete Event Simulation

Useful for speeding up when details are abstracted
 Decide what happens first
–
–

Decide what events are triggered by this event that are
modeled by simulation
–

Many things happen after this that are not modeled in the
simulation
E.g. in GBN the next thing after receiving frame is sending ACK
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”
Copyright Spring 2007, Rudra Dutta, NCSU
5
Event Processors

Each event generates new events
–
–

Processing algorithms represent specific
entities, e.g. GBN receiver
–

Event generation algorithm is an algorithmic model of
the part of the system being simulated
“Callback” handlers or processors
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 can
be commoditized
Hence the concept of “entity models” that plug into
such an engine
Copyright Spring 2007, Rudra Dutta, NCSU
6
Introduction to OPNET

A variegated software package
–


Modeler: a comprehensive development environment
driven from GUI
Features
–
–
–
–
–
–

Modeler, IT Guru, SP Guru, …
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 - quick
overview here
Copyright Spring 2007, Rudra Dutta, NCSU
7
Using OPNET
Specification
Data Collection
and Simulation
Analysis

The cycle is repeated until we achieve the correct
objective
Copyright Spring 2007, Rudra Dutta, NCSU
8
Typical Applications





Network (LAN/WAN) performance modeling
Network planning
R & D in communications architectures and
protocols
Resource sizing
…
Copyright Spring 2007, Rudra Dutta, NCSU
9
Model Specification

Objective - developing a representation of the
system
 Mirrors the hierarchical structure of real
networks/systems/…
 Primarily three levels of abstraction
–
Network Model (highest level)

–
Node Model

–
Entire network, e.g., the entire Internet
Individual devices, e.g., computers, routers, servers, …
Process Model (lowest level)


Basic level of functionality
Typically individual protocols
Copyright Spring 2007, Rudra Dutta, NCSU
10
Copyright Spring 2007, Rudra Dutta, NCSU
11
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 Standard
Model 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
Copyright Spring 2007, Rudra Dutta, NCSU
12
Creating Models in OPNET (1-b)

Corresponds to the
network architecture /
topology
Copyright Spring 2007, Rudra Dutta, NCSU
13
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
Copyright Spring 2007, Rudra Dutta, NCSU
14
Creating Models in OPNET (2-b)

Corresponds to the
internal structure of
devices in the network
Copyright Spring 2007, Rudra Dutta, NCSU
15
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 a
transition are described in embedded C/C++
code blocks
Copyright Spring 2007, Rudra Dutta, NCSU
16
Creating Models in OPNET (3-b)
Copyright Spring 2007, Rudra Dutta, NCSU
17
Many 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
Copyright Spring 2007, Rudra Dutta, NCSU
18
Simulation & Analysis

Simulation execution
–
–

using the “configure simulation” tool, or “advanced
configure simulation” tool
Can specify various attributes, simulation time and
other details
Analysis
–
–
–
Directly from project editor
No. of ways to analyze the results: get time-average,
peak values, etc.
Graphical analysis
Copyright Spring 2007, Rudra Dutta, NCSU
19
Download