Bonn motion, traffic generation and nam

34
BONN-MOTION, TRAFFIC GENERATION AND NAM MANAS GAUR NS2 WORKSHOP AT SRM UNIVERSITY

Transcript of Bonn motion, traffic generation and nam

BONN-MOTION, TRAFFICGENERATION AND NAM

MANAS GAUR

NS2 WORKSHOP AT SRM UNIVERSITY

OUTLAY OF PRESENTATION

• Bonn-Motion• Mobility Scenarios• Network Animator Module (NAM)• Ant-Net Protocol• Cbrgen.tcl for traffic generation

WHAT IS BONNMOTION

• Java Based Software responsible for creation and analysis of mobility scenarios –mobile ad-hoc network characteristics.

• Developed by Institute of Computer Science IV of University of Bonn, Germany.

• Can be exported for NS2, GloMoSim/Qual Net, COOJA, MiXiM, ONE

WHAT ARE MOBILITY MODELS

• Mobility Models are used to thoroughly simulate a protocol for Ad-hocNetwork.

• A mobility model should attempt the mimic the movements of real MN’s.• Changes in speed, direction, pause time, turn probability, #of nodes,

simulation area facilitate exhaustive performance analysis of the protocols.• The Mobility generated file , consists of positions( x, y coordinates) which the

MN’s achieve with progress in time parameter.

VARIOUS MOBILITY SCENARIOS

• Random Waypoint Model• Manhattan Grid Model• Gauss Markov Model• Random Walk Model• Probabilistic Random Walk Model

RANDOM WAYPOINT MODEL (RWPM)

• Elementary Model that describes the movement pattern of independentnodes

• Each node moves along a zigzag line from one waypoint P(i) to next P(i+1)• Waypoint are uniformly distributed over the given convex area• Random velocity from velocity distribution defines motion in new leg• At each point the nodes have thinking times, before starting on new leg.

IMPLEMENTATION FEATURE OF RWPM

• Restricting the mobile node’s movement“-d 1” : nodes move only along x-axis“-d 2” : nodes move either along x-axis or along the y-axis (probability =0.5)“-d 3” : it is the classical random waypoint model• Setting up Attraction points on the simulation areaDefined by 4 floating point numbers<x-cood> <y-cood> : coordinates for attraction point position<intensity> : intensity levels weight the attraction point; intensity ∞ probability<standard deviation> : of the Gaussian distribution with mean 0 that is used to define

the distance of nodes from attraction

MANHATTAN GRID MODEL (MGM)

• In this model nodes move only in predefined path• Arguments to this model• “-u” : Define the number of rows• “-v” : Define the number of columns• Speed of Mobile Node : long period of very slow node movement without

this parameter.• Pausing the nodes

Define the lanes orstreets

PauseProbability

Maximum PauseTime

GAUSS-MARKOV MODEL• Node move outside the simulation area• GMM allows automatic adaption of node’s position to simulation area.• The new speed and direction of movement is identified by normal distribution curve.

• = ( )• Standard deviation is specified using “-a” and “-s”• In GMM speed values are constrained to a certain interval, specified using “-m” and

“-h”• if speed ≥ “-h” or speed ≤ -m then speed =m or speed =h• “-b” : size of Simulation area is fixed and nodes simply bounce at area boundaries.• “-u” : to make adaptation of speed of nodes uniformly distributed.

RANDOM WALK MODEL (RWM)

• Extension with features from Gauss-Markov Model.• New Location is selected randomly.• Speed : [speedmin, speedmax]• Direction:[0,2]• Nodes on reaching simulation boundary, bounces off.• Nodes can be configured to move for a set amount of time and set distance.• “-t” : time limited mode• “-s” : distance limited mode

PROBABILISTIC RWM

• Utilizes probability matrix that defines the probability of node in movingforward, backward or remain still in both x and y direction

• The nodes moves with a fixed speed for a specified allotment of time• Time is set with “-t” flag

INSTALLATION OVERVIEW

• Make sure you have JRE or JDK installed. On Linux preferably openSDK• Unpack the archive• Run the install script in Super User Mode• Provide the location of the Java Binary File• Test the installation by typing in complete path followed by “./bm”• Select the file with extension “.ns_movements” for NS2 simulation

Bonn-motiongeneration Node

mobility

NAM (NETWORK ANIMATOR MODULE)

WHAT IS NAM

• Nam is a TCL or TK based animation tool for viewing network simulationtraces and real world packet traces.

• It is mainly intended as a companion animator to the ns simulator.• It supports topology layout, packet level animation, and various data

inspection tools.

Hello packetsDrop Packets

Successand DropPackets

StartGenerate mobilityscenario usingBonn Motion

Save .ns_movementsfile location in TCL

script

Simulate TCLscript in NS

.tr file (tracefile is created) .nam file

Execute NAMon NetworkAnimation

Area

Extract relevant simulationdata using AWK script for a

particular ProtocolCharacteristics

End

General Trace File Attribute

Protocol Specific Type Trace Attribute

ANT COLONY OPTIMIZATION (ACO)

• ACO features a multi-agent organization, stigmergic communication amongthe agents, distributed operations, use of a stochastic decision policy toconstruct solutions, stigmergic learning of the parameters of the decisionpolicy.

• It has been applied with success to a large variety of combinatorialproblems.

• Ant-Net has been the first ACO algorithm for routing in packet-switchednetworks.

ANT-NET PROTOCOL

• Ant-Net is an algorithm for adaptive best-effort routing in IP networks.• Ant-Net design is based on the Ant Colony Optimization (ACO) framework,

which exploits the mechanisms behind the shortest path behaviourobserved in ant colonies to define a Nature-inspired meta-heuristic forcombinatorial optimization.

• Ant-Net's performance has been extensively tested in simulation,considering different networks and traffic patterns, and compared to severalstate-of-the-art routing algorithms.

NSG 2.1 : THE TCL SCRIPTGENERATOR

• NSG is a Java based tool that runs on any platform and can generate TCLScripts for Wired as well as Wireless Scenarios for Network Simulator - 2.

• The procedure to execute these TCL Scripts on NS-2 is same as those ofmanually written TCL Scripts.

FEATURES OF NSG 2.1

• Creating Wired and Wireless nodes just by drag and drop.• Creating Simplex and Duplex links for Wired network.• Creating Grid, Random and Chain topologies.• Creating TCP and UDP agents. Also supports TCP Tahoe, TCP Reno, TCP New-Reno

and TCP Vegas.• Supports Ad Hoc routing protocols such as DSDV, AODV, DSR and TORA.• Supports FTP and CBR applications. Supports node mobility.• Setting the packet size, start time of simulation, end time of simulation, transmission

range and interference range in case of wireless networks, etc.• Setting other network parameters such as bandwidth, etc for wireless scenarios.

CBRGEN.TCL : A CBR TRAFFICGENERATOR

• What is CBR?Constant Bit Rate.

• Generating ideaRandomly pick up node pairs as sources and destinations.

• Location~ns/indep-utils/cmu-scen-gen/cbrgen.tcl

• Command formatns cbrgen.tcl [-type ##] [-nn ##] [-seed ##] [-mc ##][-rate ##]

CBRGEN.TCL

• Option explanationtype: traffic/connection type. Must be tcp or cbr.nn: number of nodes.seed: seed for generating random number. It is used to

generate the random starting time of the traffic.mc: maximum number of connections.rate: packet rate = 1 / packet interval

• Generate real random trafficcbrgen.tcl does not generate the real random traffic.

LAUNCHING NSG 2.1

• To execute NSG2, you have to install JAVA6.0 first. You can downloadJAVA6.0 from http://java.sun.com/. The details of JAVA6.0 installation,please refer to Sun JAVA site.

• NSG2 doesn't need to be installed in your computer.• You just download it and launch it with following instruction under TERMINAL

command environment.• open terminal• change directory into the folder where NG2.1.jar is copied.• type this command

java -jar NSG2.1.jar

NSG with Connection model and TCLscript

Connected Component formation for Network Analysis

FunctionalPerspective of

Network Simulator

TRACEGRAPH

PURPOSE OF TRACE GRAPH

• Trace graph is a great application that comes handy to ns2 users.• It eliminates the need to configure and run perl / awk scripts over the trace

file.• Trace file analysis simplified.

INSTALLING TRACEGRAPH

• Trace-graph seems to have been developed using Matlab and thereforesupporting code is needed make it run in Linux.

• This is the reason behind installing mglinstaller.• Extract tracegraph202linux.tar.gz file in your home folder.

• Extract mglinstaller.gz into home folder.

tar –xvf tracegraph202linux.tar.gz

gunzip mglinstallerSudo chmod 777 mglinstaller

./mglinstaller

INSTALLING TRACEGRAPH

• Copy all the files and folder in folder with name “glnx86”.

cd /home/mak/mgltrace/tracegraph202/bin/glnx86

Sudo su( change to super user; make sure logged in as administrator)

chmod 777 trgraphExit from super user mode

./trgraph