yi zheng qualnet tutorial. contents introduction 1 using qualnet 2 writing protocols in qualnet 3...

16
Yi Zheng QualNet Tutorial

Upload: julian-rogers

Post on 04-Jan-2016

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

Yi Zheng

QualNet Tutorial

Page 2: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

Contents

Introduction1

Using QualNet2

Writing protocols in QualNet3

Example4

2

Page 3: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

QualNet

3

Part IIntroduction

Page 4: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

Introduction

What’s QualNet? Commercial derivative of GlomoSim 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

4

Page 5: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

Introduction

Installation Make a local copy of QualNet in your home directory

• % mkdir ~/qualnet• % cp –r /cs/research/utn/6590_2013_simulation/4.0-x86/ ~/qualnet

Set environment variables in ~/.cshrc• setenv QUALNET_HOME ~/qualnet/4.0

• setenv PATH ${PATH} :${QUALNET_HOME}/bin

Test installation• % cd ~/qualnet/4.0/bin

• % qualnet default.config

5

Page 6: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

Introduction

Directory Structure addons Components developed as custom add-on modules bin Executable and other runtime files data Data files for the Wireless Model Library documentation User’s Guide, Release Notes, etc. gui Graphical components include QualNet kernel header files interfaces Code to interface QualNet with third party

tools kernel QualNet kernel objects used in the build process lib Third party libraries used in the build process libraries Source code for models in QualNet model libraries license_dir License files required for the build process main Kernel source files and Makefiles scenarios Sample scenarios

6

Page 7: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

Introduction

Simulation experiment life cycle Startup

• Read configuration files

• Initialize wireless environment

• Create/initialize nodes Execution

• Execute events Shutdown

• Finalize nodes

• Produce statistics files

7

Page 8: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

QualNet

8

Part IIUsing QualNet

Page 9: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

Configuration File (1)

Configuration files Plain-text explanation for configuration file

• $QUALNET_HOME/scenarios/default/default.config Global Parameters

• Experiment name

• Simulation time

• Coordinate system and terrain

• Random seed Topology and subnets Layer/Protocol related parameters

9

Page 10: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

Configuration File (2)

EXPERIMENT-NAME default Name of experiment. Results are written to default.stat.

SIMULATION-TIME 15M SEED 1

Value used to seed the random number generator.

COORDINATE-SYSTEM CARTESIAN TERRAIN-DIMENSIONS (1500, 1500)

Cartesian xy terrain dimensions in meters

SUBNET N16-1.0 { 1 thru 30 } 30 nodes whose IP addresses range from 0.0.1.1 to 0.0.1.30 Format: N<# host bits>-<address with front end 0’s omitted> N16-1.0 allows hosts with IP address numbered from 0.0.1.1 through 0.0.1.65534, it is equivalent to N16-0.0.1.0

10

Page 11: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

Configuration File (3)

NODE-PLACEMENT UNIFORM/GRID/RANDOM/FILE

GRID RANDOM UNIFORM

MULTICASTGROUPFILE ./default.member multicast membership file See $QUALNET_HOME/scenarios/default/default.member for more details.

APPCONFIGFILE ./default.app Specifies a file with a list of apps/traffic generators to run CBR <src> <dest> <items to send> <size> <interval> <start time> <end time> See $QUALNET_HOME/scenarios/default/default.app for more details.

11

Page 12: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

Configuration File (4)

ROUTING-PROTOCOL AODV Unicast routing protocol

MULTICAST-PROTOCOL SPTM Multicast routing protocol

Layer Statistics 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)

12

Page 13: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

Using QualNet

Step 1: Prepare config files for your protocol

Step 2: Run QualNet on the config files

Step 3: Examine the output statistics file Use script language (perl/awk) to process it.

Step 4: Use plotting tools (gnuplot) to create graphs from above results.

13

Page 14: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

Using QualNet

Find fast computers in our department Checkout /proc/cpuinfo, /proc/meminfo, etc. Use “top” to check no other people is using that computer

Some new(fast) computers cse2017-pc01 ~ cse2017-pc12: E8400 3G 6M cache cse2027-pc01 ~ cse2027-pc08: E8400 cse2023-pc01 ~ cse2023-pc08: E8400 jun01 ~ jun24: E6750 2.66G 4M cache navy Don’t run QualNet on Indigo/Red Only one process in one computer. Our QualNet license only supports 30 processes simultaneously.

14

Page 15: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2

Tip

More Information

Read manuals in $QUALNET_HOME/documents

Read source codes

Visit community forums• http://www.scalable-networks.com/support/forums

15

Page 16: Yi Zheng QualNet Tutorial. Contents Introduction 1 Using QualNet 2 Writing protocols in QualNet 3 Example 4 2