Qual Net Tutorial

Download as pdf or txt
Download as pdf or txt
You are on page 1of 60

Qualnet Tutorial

Scalable Network Technologies

with contributions by
Chaiporn Jaikaeo and Chien-Chung Shen
University of Delaware

© Scalable Network Technologies Contact: [email protected] 1


Outline
„ QualNet Overview: slides 3-10
„ Installation: slides 11-16
„ Simulation Architecture: slides 17-20
„ Wireless Experiment Design (both command line
and GUI): slides 21-46
„ Animator Execution (demo): slides 47-52
„ Analyzer: slides 53-59
„ Resources: slide 60

© Scalable Network Technologies Contact: [email protected] 2


Advantages of QualNet
„ Rapid prototyping of protocols
„ Comparative performance evaluation of
alternative protocols at each layer
„ Built-in measurements on each layer
„ Modular, layered stack design
„ Standard API for composition of protocols across
different layers
„ Scalability via support for parallel execution
„ GUI Tools for system/protocol modeling

© Scalable Network Technologies Contact: [email protected] 3


Genesis: GloMoSim, DARPA funded effort at UCLA (‘97 – ‘00)
for efficient simulation of large heterogeneous networks
UAV Network
How does the network perform as it is
scaled to 10000+ heterogeneous devices?

Heterogeneous
devices &
networks
Mobile Ad Hoc
Networks

Satellite Comm Which routing


algorithm?

DARPA Objective: Large Heterogeneous Network Simulation


© Scalable Network Technologies Contact: [email protected] 4
QualNet
„ Commercial derivative of GloMoSim
„ Substantially expanded MANET models:
„ AODV, DSR, OLSR, 802.11 DCF, 802.11 PCF, 802.11a,

directional antennas, …
„ Rapid GUI-based model design, animation & analysis

„ High-fidelity commercial protocol & device models

„ Analysis:
„ Comparative performance evaluation of alternative protocols at

each layer
„ Built-in measurements on each layer

„ Modular, layered stack design


„ Scalability via support for parallel execution

© Scalable Network Technologies Contact: [email protected] 5


QualNet Versatility
„ GloMoSim was designed for MANET
„ QualNet supports a wider range of networks and
analysis
„ MANET
„ QoS
„ Wired Networks
„ Satellite
„ Cellular
„ This presentation focuses on QualNet’s MANET
features
© Scalable Network Technologies Contact: [email protected] 6
QualNet Model Library
„ MANET
„ 802.11a, 802.11b, CSMA, MACA, AODV, DSR, LAR1, STAR,
ODMRP, ZRP, FSR, OLSR, directional antenna
„ QoS
„ WFQ, WRR, SCFQ, CBQ, QoSPF, diffserv, RED, RIO, WRED,
RSVP-TE
„ Wired Networks
„ OSPF, BGP, router configuration, IGRP, EIGRP, HSRP, import of
LAN configuration
„ Satellite
„ Geo-stationary
„ Cellular
„ GSM

© Scalable Network Technologies Contact: [email protected] 7


QualNet Layer Model
Data Plane
„ Uses an architecture that is similar to
one used in physical networks with CBR, ftp, telnet, …
well-defined APIs between Application
neighboring layers
TCP, UDP, RSVP
„ Provides capability for network Transport
emulation by supporting direct code
migration between the model and IP
operational networks. IP
OSPF, AODV, …
„ Protocols interface with a well- Network
defined API defining interactions
between layers immediately above Packet Store/Forward
Link Layer
and below its own IEEE 802.11, 802.3, …
MAC Layer
The unit defining the interaction is Radio, bus, point-point...
„
Physical
the Message, which is generally
either a Packet or a Timer wired Free space, TIREM

© Scalable Network Technologies Contact: [email protected] 8


QualNet Developer Toolkit
ƒ Animator: Graphical
experiment set up &
animation tool

ƒ Designer: Graphical, finite


state machine-based
custom protocol design tool
ƒ Analyzer: Statistical
graphing tool for built-in
and custom statistics
collection
ƒ Tracer: Packet level tracing
& visualization tool.
© Scalable Network Technologies Contact: [email protected] 9
QualNet Directory Structure
„ /addons optional packages
„ /application application layer protocols and traffic generators
„ /bin executable and configuration or input/output files
„ /data storage for sample files, e.g. modulation and terrain
„ /gui the Graphical User Interface (GUI)
„ /include common include files
„ /mac code for the mac layer protocols
„ /main the basic design framework/Makefiles
„ /mobility the code for mobility models
„ /network code for the network layer and routing protocols
„ /phy wireless physical and propagation models
„ /tcplib trace based TCP applications (FTP, TELNET, HTTP)
„ /transport transport layer protocols (TCP/UDP)
„ /verification Sample files and outputs

© Scalable Network Technologies Contact: [email protected] 10


Installation
„ Prerequisites
„ C Compiler
„ Visual C++ 6.0 w/ SP5 on Windows
„ Must be configured to run from the command line.
„ gcc on Unix
„ Java version 1.3.
„ A QualNet license.

© Scalable Network Technologies Contact: [email protected] 11


Program Environment
„ Define QUALNET_HOME and add GUI and path
„ On Unix (assuming csh or tcsh), add to .cshrc
„ setenv QUALNET_HOME ~/qualnet/3.6
„ set path=($path ~/qualnet/3.6/gui/bin)
„ On Windows
„ Right-click My Computer, choose Properties
„ Choose Advanced → Environment Variables
„ Add QUALNET_HOME with value C:\qualnet\3.6
„ Edit Path: add C:\qualnet\3.6\gui\bin
„ Click OK.

© Scalable Network Technologies Contact: [email protected] 12


Compilation
„ On Windows
„ cd %QUALNET_HOME%\main
„ copy Makefile-windowsnt Makefile
„ nmake
„ On unix
„ cd $QUALNET_HOME/main
„ make -f Makefile-<osname>-<compiler>
„ (e.g. on Linux, make -f Makefile-linux-gcc-2.95)

© Scalable Network Technologies Contact: [email protected] 13


Trial Run
„ Run the default experiment
„ cd C:\qualnet\3.6\bin
„ qualnet default.config
„ Examine the output
„ more default.stat

© Scalable Network Technologies Contact: [email protected] 14


Animator
„ Start Animator by doing one of the following:
„ From a Command Prompt, type RunQualnet
„ Or … Click QualNet icon on desktop
„ Press Setup QualNet Parameters
„ Go to Wireless Settings tab

© Scalable Network Technologies Contact: [email protected] 15


Animator Layout

Zoom Runtime Current


Control Control Simulation
Toolbar Time
Manual
Configuration
Toolbar

Animation Canvas
Settings
Toolbar

© Scalable Network Technologies Contact: [email protected] 16


Simulation Study Life Cycle
(Re)define (for Network Models)
Experiment(s)

Application Mobility Device Environment


(Traffic Specification Model(s) model
Generation)

Execute
Model Objective:
Accurate real-time analysis to enable
Collect dynamic management &
statistics reconfiguration of comm networks

Analyze
Results
© Scalable Network Technologies Contact: [email protected] 17
Simulation Experiment Life Cycle
„ Startup
„ Read Input Files
„ Initialize Wireless Environment
„ Create/Initialize Nodes
„ Execution
„ Check for External Inputs (via HLA, etc.)
„ Execute Events
„ Shut down
„ Finalize Nodes
„ Produce Output Files

© Scalable Network Technologies Contact: [email protected] 18


Node Life Cycle
„ Initialization
„ Bottom up layer initialization
„ Read Input Files
„ Event Handling
„ Creation
„ Scheduling
„ Handling
„ Finalization
„ Printing Statistics

© Scalable Network Technologies Contact: [email protected] 19


Packet Life Cycle
Application Application

MESSAGE_Alloc(…) MESSAGE_Free(…)
MESSAGE_PacketAlloc(…)
MESSAGE_Send(…)

Transport Transport

MESSAGE_AddHeader(…) MESSAGE_RemoveHeader(…)
MESSAGE_Send(…) MESSAGE_Send(…)

Routing IP IP

MESSAGE_AddHeader(…) MESSAGE_RemoveHeader(…)
MESSAGE_Send(…) MESSAGE_Send(…)

MAC MAC

MESSAGE_AddHeader(…) MESSAGE_RemoveHeader(…)
MESSAGE_Send(…) MESSAGE_Send(…)

Physical Physical

© Scalable Network Technologies Contact: [email protected] 20


Experiment Design & Analysis
„ Setting Global Variables
„ Simulation time & seed, coordinate system, terrain
„ Layer/Protocol related parameters:
„ Channel/Radio

„ Physical Layer

„ MAC Layer

„ Network Layer

„ Node placement & mobility


„ Specifying topology and configuring networks
„ Adding Traffic
„ Application setup
„ Running & Analyzing

© Scalable Network Technologies Contact: [email protected] 21


Configuration Files
„ Line entry format:
[Qualifier] <PARAMETER>[Index] <VALUE>
„ Qualifier (optional) specifies a range of nodes and has precedence
over the general one
„ Similarly, the optional Index specifies an array of parameters, such as
priority queues.
„ E.g.
MOBILITY
MOBILITY NONENONE
[5
[5 thru
thru 10]
10] MOBILITY
MOBILITY RANDOM-WAYPOINT
RANDOM-WAYPOINT

„ Notes:
„ Some settings require additional parameters, e.g. MOBILITY
„ Lines starting with # are treated as comments

© Scalable Network Technologies Contact: [email protected] 22


Qualifiers and Indices
„ Global Qualifier
MOBILITY NONE
„ Subnet Qualifier
[N8-2.0] MAC-PROTOCOL MACA
„ Node Qualifier
[5 thru 15] MOBILITY NONE
„ Index for an array of 3 priority queues
QUEUE-WEIGHT[0] 0.5
QUEUE-WEIGHT[1] 0.3
QUEUE-WEIGHT[2] 0.2

© Scalable Network Technologies Contact: [email protected] 23


Other Configuration Files
„ Node placement: NODE-PLACEMENT-FILE
Æ See details in bin/default.nodes
„ Mobility trace: MOBILITY-TRACE-FILE
Æ See details in bin/default.mobility
„ Static routing: STATIC-ROUTE-FILE
Æ See details in bin/default.routes-static
„ Link/node faults: FAULT-CONFIG-FILE
Æ See details in bin/default.fault
„ Multicast membership: MULTICAST-GROUP-FILE
Æ See details in bin/default.member

© Scalable Network Technologies Contact: [email protected] 24


Important Global Variables
„ EXPERIMENT-NAME: Name of the output statistic file
e.g. EXPERIMENT-NAME default
Resulting statistics are written in default.stat
„ SIMULATION-TIME: The length of time to simulate.
e.g. SIMULATION-TIME 15M
(Available time units: NS, US, MS, S, M, H, D; default is in
seconds)
„ SEED: The random seed used to derive all other seeds
used in the simulation.
e.g. SEED 1

© Scalable Network Technologies Contact: [email protected] 25


Coordinates and Terrain Dimensions
„ COORDINATE-SYSTEM: LATLONALT or CARTESIAN
e.g., COORDINATE-SYSTEM CARTESIAN
„ TERRAIN-DIMENSIONS: The size of the rectangular area to simulate (in meters) for
Cartesian coordinate.
e.g., TERRAIN-DIMENSIONS (1000, 1000)
„ Terrain corners are required by LATLONALT system
e.g., TERRAIN-SOUTH-WEST-CORNER (30.00, 40.00)
TERRAIN-NORTH-EAST-CORNER (30.01, 40.01)
„ Irregular terrain
TERRAIN-DATA-TYPE DEM
DEM-FILENAME[0] ../data/terrain/los_angeles-w
DEM-FIlENAME[1] ../data/terrain/los_angeles-e

# Tie nodes to the ground level


MOBILITY-GROUND-NODE YES

© Scalable Network Technologies Contact: [email protected] 26


Node Placement
„ NODE-PLACEMENT: GRID, RANDOM, UNIFORM, FILE
GRID RANDOM UNIFORM
GRID-UNIT

„ Use FILE to specify node positions in a file


NODE-PLACEMENT FILE
NODE-PLACEMENT-FILE ./default.nodes
„ Format: nodeId 0 (x, y, z) [azimuth elevation]

© Scalable Network Technologies Contact: [email protected] 27


Node Placement In GUI
„ Manual
„ Choose Device type and
place
„ Automatic
„ Experiment->Automatic
Node Placement
„ Choices of Uniform,
Random or Grid

© Scalable Network Technologies Contact: [email protected] 28


Mobility Model
„ NONE, TRACE
„ RANDOM-WAYPOINT
e.g. MOBILITY RANDOM-WAYPOINT
MOBILITY-WP-PAUSE 30S
(min,max) (min,max)
MOBILITY-WP-MIN-SPEED 0
MOBILITY-WP-MAX-SPEED 10 pause

„ MOBILITY-POSITION-GRANULARITY: distance in meters at which a


node’s location is updated
) small values potentially slow down the simulation

Location updates when granularity = 5


5m 1m

Location updates when granularity = 1


© Scalable Network Technologies Contact: [email protected] 29
Setting Up A Wireless Scenario (1)

„ Scenario Description
„ Two small subnets communicating on different
frequencies, 2.4GHz and 2.5GHz
„ Mostly default settings: 802.11b, AODV, Two-Ray…
„ 5 nodes in the scenario
„ each within 300m of at least one other node
„ 3 in each subnet, one in both
„ Two subnets
„ One with Listening/Listenable Mask = 01, the other set
to 10.
„ One CBR application between two distant nodes

© Scalable Network Technologies Contact: [email protected] 30


Specifying Topology
„ SUBNET Parameter
„ SUBNET <subnet> { comma-delimited list of nodes }

„ Ex. SUBNET N8-1.0 { 1, 3, 7 thru 9 }


„ NodeIds 1, 3, 7, 8, and 9 have network interfaces with address
0.0.1.1 through 0.0.1.5
Node ID Interface Address
1 0.0.1.1
3 0.0.1.2
7 0.0.1.3
8 0.0.1.4
9 0.0.1.5

„ Basic form: SUBNET N16-0 { 1 thru n }


„ n is the number of nodes

„ IP address and Node ID are identical

Æ Node 5 has IP address 0.0.0.5

© Scalable Network Technologies Contact: [email protected] 31


Subnet Shorthand
„ Format:
N<# host bits>-<address with front end 0’s omitted>

„ Ex. N8-1.0 The subnet address is 0.0.1.0


Host IP addresses are 8 bits

„ This allows for 28-2 (254) hosts in this subnet with IP


addresses numbered from 0.0.1.1 through 0.0.1.254
„ The broadcast address for this subnet is 0.0.1.255
„ The subnet mask is 255.255.255.0
„ N8-0.0.1.0 is an equivalent representation

© Scalable Network Technologies Contact: [email protected] 32


Wireless Scenario Layout in Animator

© Scalable Network Technologies Contact: [email protected] 33


Command Line Layout
SUBNET N3-1.0 {1, 2, 3}
[N3-1.0] CHANNEL-LISTENABLE-MASK 10
[N3-1.0] CHANNEL-LISTENING-MASK 10

SUBNET N3-2.0 {3 thru 5}


[N3-2.0] CHANNEL-LISTENABLE-MASK 01
[N3-2.0] CHANNEL-LISTENING-MASK 01

© Scalable Network Technologies Contact: [email protected] 34


Wireless Settings in Animator
Open Global Parameters

© Scalable Network Technologies Contact: [email protected] 35


Channel Properties
„ Channel Frequencies
„ PROPAGATION-CHANNEL-FREQUENCY[0] 2.4e9
„ PROPAGATION-CHANNEL-FREQUENCY[1] 2.5e9
„ For each frequency you can set
„ Statistical Propagation model
„ Pathloss model
„ Free space or two ray or ITM
„ Fading model
„ Rayleigh
„ Ricean

© Scalable Network Technologies Contact: [email protected] 36


Propagation Model
„ PROPAGATION-LIMIT: received signals with power
below this limit (in dBm) will not be processed.
e.g. PROPAGATION-LIMIT -111.0
„ PROPAGATION-PATHLOSS-MODEL: specifies path-loss
model
„ FREE-SPACE Æ Empty space, no ground (r2 loss)
„ TWO-RAY Æ Flat ground (r4 loss for far sight)
„ Considers a ray bounced back from the ground

d
hTX d’ hRX
ground

„ ITM Æ Irregular terrain (terrain database required)

© Scalable Network Technologies Contact: [email protected] 37


Fading Model
„ Applied to only narrowband channels (flat fading)
„ Specified by PROPAGATION-FADING-MODEL
„ Available models
„ NONE – No fading

„ RAYLEIGH – Highly mobile, no line of sight

„ RICEAN – requires an additional parameter RICEAN-K-FACTOR

„ K = 0 : no line of sight (similar to RAYLEIGH)


„ K = ∞ : strong line of sight
e.g. PROPAGATION-FADING-MODEL RAYLEIGH

© Scalable Network Technologies Contact: [email protected] 38


Physical Layer (Radio) Model
„ Noise modeling
„ Thermal noise

„ PHY-NOISE-FACTOR (default 10)


„ PHY-TEMPERATURE (in K; default 290)
„ Interference
„ PHY-RX-MODEL (SNR-THRESHOLD-BASED | BER-BASED)
„ Parameters specific to 802.11b
„ PHY802.11b-DATA-RATE (in bps) Rx threshold

„ PHY802.11b-TX-POWER (in dBm)


A
„ PHY802.11b-RX-SENSITIVITY (in dBm)
Rx sensitivity
„ PHY802.11b-RX-THRESHOLD (in dBm)
C B

© Scalable Network Technologies Contact: [email protected] 39


Antenna Models φ

„ Omnidirectional
Pattern 3 Pattern 0
„ Switched beam (same shape,
different angle)
Pattern 2 Pattern 1
„ ANTENNA-MODEL SWITCHED-BEAM
„ ANTENNA-AZIMUTH-PATTERN-FILE
default.antenna-azimuth

„ Steerable (different shape, φ


different angle)
Pattern 0
„ ANTENNA-MODEL STEERABLE
„ ANTENNA-AZIMUTH-PATTERN-FILE
steerable.antenna-azimuth Pattern 2Pattern 1

© Scalable Network Technologies Contact: [email protected] 40


Routing Protocols
„ Proactive protocols
„ BELLMANFORD
„ RIPv2
„ OSPFv2
„ OLSR
„ Reactive protocols
„ AODV
„ DSR
„ LAR1
„ Static routing: requires STATIC-ROUTE-FILE

© Scalable Network Technologies Contact: [email protected] 41


MAC Layer Model
„ MAC-PROTOCOL: specifies MAC layer protocol
„ CSMA

„ Requires carrier sensing before transmission


„ If the channel is free, the packet is transmitted immediately
„ Otherwise, set a random timeout
„ MACA
„ Uses RTS/CTS to acquire channel
„ Does not carrier sense
„ MAC802.11
„ CSMA/CA with ACKs and optional RTS/CTS
„ TDMA
„ MAC802.3/SWITCHED-ETHERNET Æ Wired networks
„ SATCOM Æ Satellite networks
„ PROMISCUOUS-MODE: set to YES to allow nodes to overhear packets
destined to the neighboring node (required by DSR).

© Scalable Network Technologies Contact: [email protected] 42


Network Layer: IP
„ Currently the only support network layer protocol
„ Available queuing models
„ First-in first-out (FIFO)
„ Variations of Random Early Detection: RED, RIO, WRED,
„ Three priority types supported: control (0), real-time
(1), and non-real-time (2)
„ IP-QUEUE-PRIORITY-QUEUE-SIZE specifies the queue’s
size (in bytes)
„ Each priority queue's size can be specified separately
IP-QUEUE-PRIORITY-QUEUE-SIZE[0] 25000
IP-QUEUE-PRIORITY-QUEUE-SIZE[1] 50000
IP-QUEUE-PRIORITY-QUEUE-SIZE[2] 50000

© Scalable Network Technologies Contact: [email protected] 43


Application Specification
„ APP-CONFIG-FILE: Specifies a file with a list of
apps/traffic generators to run.
„ FTP
„ TELNET
„ CBR/MCBR
„ HTTP
„ VoIP
„ etc
„ See bin/default.app for more details

© Scalable Network Technologies Contact: [email protected] 44


Application Specification In GUI
„ Click Application
button
„ Choose Application
„ Click source node
„ Drag to destination

© Scalable Network Technologies Contact: [email protected] 45


Statistics
„ Some statistics include:
„ APPLICATION-STATISTICS (YES|NO)
„ TCP-STATISTICS (YES|NO)
„ UDP-STATISTICS (YES|NO)
„ ROUTING-STATISTICS (YES|NO)
„ NETWORK-LAYER-STATISTICS (YES|NO)
„ QUEUE-STATISTICS (YES|NO)
„ MAC-LAYER-STATISTICS (YES|NO)
„ PHY-LAYER-STATISTICS (YES|NO)
„ MOBILITY-STATISTICS (YES|NO)
„ Other statistics are protocol specific
„ BGP-STATISTICS (YES|NO)

© Scalable Network Technologies Contact: [email protected] 46


Running

Run QualNet
(Action!)
Button

© Scalable Network Technologies Contact: [email protected] 47


Run Scenario
„ Click Run QualNet (Action!) button
„ From View Menu
„ Select Animation Filter → By Event → Antenna
„ Press Play (watch for a while)
„ Press Pause, Step (1S)
„ From Edit menu
„ Select Set Step Size → By Animation Command
to 1

© Scalable Network Technologies Contact: [email protected] 48


Controlling QualNet Simulator
„ Play—Plays continuously, resumes from a pause
„ Pause—Temporarily pauses execution
„ Stop—Stops QualNet; click Run QualNet
(Action!) to start over from the beginning
„ Step—Steps forward in the execution by 1
second

© Scalable Network Technologies Contact: [email protected] 49


Visualizing the Scenario
„ Types of
animation
„ Mobility
„ Data transmission
„ send (blue)

„ receive (green)

„ Antenna patterns
„ Orientation
„ Queues

© Scalable Network Technologies Contact: [email protected] 50


Animation Filtering

„ QualNet produces a • Filtering by layer


lot of animation
„ Slowing the GUI

and showing
more than the
user wishes to
see.

„ Filtering by event

© Scalable Network Technologies Contact: [email protected] 51


Other Capabilities
„ Batch Execution: running
several experiments at
once.
„ Dynamic statistics

© Scalable Network Technologies Contact: [email protected] 52


Analyzer Capabilities
„ Quickly graphs collected statistics.
„ Generates several types of figures for
convenient graphical comparison of results
„ Generate application-neutral ASCII data files
„ Can be imported into your favorite graphing program
(gnuplot, Excel)

© Scalable Network Technologies Contact: [email protected] 53


Running Analyzer
„ After running the batch experiments, start
Analyzer
„ Click the Σ symbol in lower-right corner of the GUI,
or
„ Run Analyzer from Statistics menu
„ Note the stats files produced are as follows:
„ Qualnet_Seed1.stat
„ Qualnet_Seed2.stat, etc.

© Scalable Network Technologies Contact: [email protected] 54


Analyzer Sample Screen

Data Set Metric


Window Window

© Scalable Network Technologies Contact: [email protected] 55


Graph Types
„ The Analyzer (graphical component) supports
the following graph types
„ Single Experiment per-node comparison
„ (Choose one data set, one metric)
„ Multiple Experiment comparison
„ (Choose more than one data set, one metric)
„ Per-node average
„ Experiment-wide sum
„ Histogram

© Scalable Network Technologies Contact: [email protected] 56


Single Experiment

© Scalable Network Technologies Contact: [email protected] 57


Multiple Experiment

© Scalable Network Technologies Contact: [email protected] 58


Histogram

© Scalable Network Technologies Contact: [email protected] 59


Additional QualNet Resources
„ Plain-text explanation for configuration files:
„ $QUALNET_HOME/bin/default.*
„ Qualnet User Manual/Developer’s Guide
„ This is available either in your installation of QualNet or from
your QualNet Download Page (emailed to you)

„ QualNet Help Files


„ http://www.scalable-networks.com/help/index.html

„ Qualnet Community forums


„ http://www.scalable-networks.com/
training_and_support/support/forums/index.php

© Scalable Network Technologies Contact: [email protected] 60

You might also like