投影片 1 - Read

Download Report

Transcript 投影片 1 - Read

OMNeT++
Outline
What is OMNeT++?
Installation
TicToc Tutorial for OMNeT++
Simulation models
Visualizing the results with Plove and
Scalars
Reference
What is OMNeT++?
What is OMNeT++?
 OMNeT++ is a public-source, component-based,
modular and open-architecture simulation environment
with strong GUI support and an embeddable simulation
kernel.
 OMNeT++ provides a component architecture for models.
Components (modules) are programmed in C++, then
assembled into larger components and models using a
high-level language (NED).
 OMNeT++ is free for academic and non-profit use;
commercial users must obtain a license from Omnest
Global Inc.
Installation
Platforms
 OMNeT++ runs well on
 Linux
 most other Unix-like systems
 Win32 platforms (NT4.0, Window 2000, XP).
 Third party software
 C++ compiler
 Tcl/Tk
 Perl
 GraphViz
 Ghostscript
 UnxUtils
 LibXML/LibXSLT
Linux, Solaris and
other Unix-like systems
download the source tgz archive
(omnetpp-<version>-src.tgz).
Extract it into your home directory:
(tar xvfz omnetpp-2.3-src.tgz )
You'll find a Readme.Unix file in its doc/
subdirectory -- just follow the instructions
described there.
Windows
You need to have NT4.0, Win2000 or XP.
Win95/98/ME won't work.
Install OMNeT++ into a directory that
doesn't have space in its name, e.g. don't
install in under C:\Program files\
(Otherwise you'll have problems with the
makefiles.)
Windows/Microsoft Visual C++ 6.0 or 7.0
(.NET)
Windows/MSVC - building from sources
Windows/Cygwin
Windows/MinGW
Install OMNeT++ on Windows with
the Cygwin platform
1. install Cygwin
2. download X11inc.zip from the OMNeT++
site then extract it to /usr/include/X11
3. install OMNeT++
4. add omnetpp/bin to the PATH
5. make sure nedtool, gned, opp_makemake
and the sample simulations work
Install Cygwin
 When selection packages to install, be sure to include
the following ones:
gcc g++、make、tcl/tk…
 It is a good idea to create a .bash_profile for each user
who will use Cygwin. This should be stored in each
users home directory (i.e. /home/<you>).
For example, an initial .bash_profile may contain:
alias ls='ls -aF'
export TCL_LIBRARY=c:/cygwin/usr/share/tcl8.3
 TCL_LIBRARY is necessary to allow tcl/tk to operate
correctly.
Install Cygwin
 Cygwin misses X11 headers that are normally
required to build programs with Tcl/Tk. Extract it
to /usr/include/X11. If you're getting compilation
errors like /usr/include/tk.h:77: X11/Xlib.h: No
such file or directory while building Tkenv.
 The BLT Tcl/Tk extension package is needed to
run OMNeT++ 3.x on Cygwin. The Cygwin
distribution doesn't contain BLT. and download
the BLT source, build (./configure;make) and
install (make install) it.
Install OMNeT++
Download the omnetpp source code.
tar zxvf omnetpp.tgz
./configure
make
You should now add the following lines to
your startup file .bash_profile:
export PATH=$PATH:~/omnetpp/bin
Test OMNeT++
make sure nedtool, gned, opp_makemake
and the sample simulations work
cd ~/omnetpp/samples/dyna
./dyna
Tkenv
Tkenv is a portable graphical windowing
user interface.
Tkenv supports interactive execution of
the simulation, tracing and debugging.
Simulation models
 INET Framework
The INET Framework is the successor of the IPSuite
package. It provides TCP, IP, Ethernet, MPLS and other
protocols.
 AdHocSim
Nicola Concer's simulator for ad-hoc networks.
Implements AODV protocol and several mobility models.
 Antnet
The model implements an Ant-based routing algorithms
(AntNet-CL and AntNet-CO) proposed by G. Di Caro and
M. Dorigo.
Simulation models
 Mobility Framework
Supports wireless and mobile simulations within
OMNeT++. The core framework implements the support
for node mobility, dynamic connection management and
a wireless channel model.
 IPv6Suite
IPv6Suite is an OMNeT++ model suite for accurate
simulation of IPv6 protocols and networks.
 VideoInterface
Simulation models
 Ethernet
Ethernet, Fast Ethernet and Gigabit Ethernet model.
Includes MAC, LLC, switch, hub and bus models.
 P2P Swarming Protocol Simulation
The first release of a swarming P2P protocol simulation.
 Centralized Network model based on Hiperlan/2
 SimSANs
A development toolkit for designing, modeling, simulating,
and evaluating SANs (Storage Area Networks).
Simulation models
 Queues
Queues is a queueing network tutorial and basic
queueing library for OMNeT++.
 SCSI Bus
SCSI bus model
 Personal Communication Services (PCS)
 File System Simulation
A simulation of the components involved in a file system
implementation.
OMNEST Demo
OMNEST 3.0 Demo for Windows (installer)
Contains executable demo simulations for
several model frameworks written for
OMNEST/OMNeT++
TicToc Tutorial for OMNeT++
TicToc Tutorial for OMNeT++
This short tutorial to OMNeT++ guides you
through an example of modeling and
simulation, showing you along the way
some of the commonly used OMNeT++
features.
Steps for application
1. Create a working directory called tictoc.
2. Describe your example network by creating a topology file(*.ned).
3. We now need to implement the functionality of the simple
module(*.cc).
4. We now create the Makefile which will help us to compile and
link our program to create the executable tictoc:
$ opp_makemake
5. Compile and link our very first simulation by making command:
$ make
6.you have to create one. omnetpp.ini tells the simulation program
which network you want to simulate
7. Once you complete the above steps, you launch the simulation
by issuing this command:
tictoc1.ned
NED language overview
 NED (NEtwork Description) is the topology
description language of OMNeT++. It has a
simple syntax yet, but it is very powerful in
defining topologies.
GNED - Graphical Network Editor
GNED is a graphical editor for OMNeT++
models. Some features:
fully two-way tool: switch back and forth
between graphics and corresponding NED
representation
multiple files, multiple editing windows
drag & drop submodule creation
syntax highlighted NED editor
txc1.cc
Visualizing the results with
Plove and Scalars
Plove - Overview
 Plove is a handy tool for plotting and analysing
OMNeT++ simulation results. Plove works with output
vector files; they are files OMNeT++ saves simulation
results into. Output vector files contain several output
vectors. An output vector contains a time series: several
values with timestamps.
 Plove can plot output vectors, one or more in a graph.
You can specify the drawing style (lines, dots etc) for
each vector. You can set axis bounds, scaling, titles and
labels, etc.
 You can save the graphs to files in various formats (EPS,
GIF, etc) or (on Windows) copy them to the clipboard.
Scalars - Overview
Scalars is a handy tool for creating bar
charts and x-y plots from OMNeT++ output
scalar files (omnetpp.sca by default).
You can save the graphs to files in various
formats (EPS, GIF, etc) or (on Windows)
copy them to the clipboard.
Reference
http://www.omnetpp.org/
http://www.omnest.com/
Thanks
林志昇
[email protected]