NS­2 Tutorial

Kameswari Chebrolu Dept. of Computer Science and Engineering,  IIT Bombay

Motivation for Simulations ●

Cheap ­­  does not require costly equipment



Complex scenarios can be easily tested



Results can be quickly obtained – more ideas can  be tested in a smaller timeframe



The real thing isn't yet available



Controlled experimental conditions –



Repeatability helps aid debugging

Disadvantages: Real systems too complex to  model

Features of NS­2 ●

Protocols: TCP, UDP, HTTP, Routing algorithms,  MAC etc



Traffic Models: CBR, VBR, Web etc



Error Models: Uniform, bursty etc



Misc: Radio propagation, Mobility models , Energy  Models



Topology Generation tools



 Visualization tools (NAM), Tracing







NS Structure

NS is an object oriented discrete­event simulator –

Simulator maintains list of events and executes one event after  another



Single thread of control: no locking or race conditions

Back end is C++ event scheduler –

Protocols mostly



Fast to run, more control

Front end is oTCL –

Creating scenarios, extensions to C++ protocols



fast to write and change

TCL tutorial

set x 1 set y $x



Variables:



Arrays:

set a(0) 1



Printing:

puts “$a(0) \n”



Arithmetic Expression:



Control Structures:  if {$z == 6} then { puts “Correct!”}

set z = [expr $y + 5]

for {set i =0} {$i < 5} {incr i }{ puts “$i * $i equals [expr $i * $i]”  }



Procedures:    

proc sum {a b} { return [expr $a + $b] }

NS programming Structure ●

Create the event scheduler



Turn on tracing



Create network topology



Create transport connections



Generate traffic



Insert errors

Creating Event Scheduler ●

Create event scheduler: set ns [new simulator]



 Schedule an event: $ns at 

NS2 Tutorial

Misc: Radio propagation, Mobility models , Energy. Models ... Control Structures: ○ Procedures:аааа set x 1 set y $x set a(0) 1 putsа“$a(0) \n” set z = [expr $y + ...

1MB Sizes 1 Downloads 137 Views

Recommend Documents

TCP Performance Simulations Using Ns2
Ns2 can be built and run both under Unix and Windows. Instructions on how to .... 3.3.3. Files and lists. In tcl, a file can be opened for reading with the command: ... node is not a router but an end system, traffic agents (TCP, UDP etc.) and traffi

PDF Computer Network Simulation Using NS2 Read online
Computer Network Simulation Using NS2 Download at => https://pdfkulonline13e1.blogspot.com/1498768547 Computer Network Simulation Using NS2 pdf download, Computer Network Simulation Using NS2 audiobook download, Computer Network Simulation Using

Download [Pdf] Computer Network Simulation Using NS2 Read online
Computer Network Simulation Using NS2 Download at => https://pdfkulonline13e1.blogspot.com/1498768547 Computer Network Simulation Using NS2 pdf download, Computer Network Simulation Using NS2 audiobook download, Computer Network Simulation Using

Read [PDF] Computer Network Simulation Using NS2 Full Pages
Computer Network Simulation Using NS2 Download at => https://pdfkulonline13e1.blogspot.com/1498768547 Computer Network Simulation Using NS2 pdf download, Computer Network Simulation Using NS2 audiobook download, Computer Network Simulation Using

BPS black holes in Ns2 five dimensional ADS ...
Dec 3, 1998 - BPS black hole solutions of U 1 gauged five-dimensional supergravity are obtained by solving the Killing spinor .... e. C. F F A. IJK mn rs l. 48. 9. 2. I. J. i j. I. J qg VV 6X X y g E X E X. 1Ž . Ž . I J ... The signature yqqqq is u

FeynRules Tutorial
We will call mass eigenstates Φ1 and Φ2, and their masses M1 and M2, ... (3) where u and e are the SM up-quark and electron fields. Note that there is a Z2 symmetry ..... The kinetic terms for the fermions can be implemented in a similar way.

LaTeX Tutorial
To have formulas appear in their own paragraph, use matching $$'s to surround them. For example,. $$. \frac{x^n-1}{x-1} = \sum_{k=0}^{n-1}x^k. $$ becomes xn − 1 x − 1. = n−1. ∑ k=0 xk. Practice: Create your own document with both kinds of for

FeynRules Tutorial
The model we are considering depends on 9 new parameters, .... approach, and we start by opening a new notebook and load the FeynRules package (see the ...

ENVI Tutorial
Navigate to the Data\can_tm directory, select the file can_tmr.img from the list, and click. Open. .... From the ROI Tool dialog menu bar, select File > Restore ROIs.

TUTORIAL DOODLE.pdf
Page 3 of 9. TUTORIAL DOODLE.pdf. TUTORIAL DOODLE.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying TUTORIAL DOODLE.pdf. Page 1 of 9.

Tutorial MindMeister.pdf
Sign in. Loading… Whoops! There was a problem loading more pages. Whoops! There was a problem previewing this document. Retrying... Download. Connect ...

Tutorial Chemsketch.pdf
Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Tutorial Chemsketch.pdf. Tutorial Chemsketch.pdf. Open. Extract.

The C++ Language Tutorial
The ANSI-C++ standard acceptation as an international standard is relatively recent. It was first ... free. Compilers. The examples included in this tutorial are all console programs. That means .... several error messages when you compile it. ... Ho

DSQSS Tutorial 2015.12.01 - GitHub
Dec 1, 2015 - Step1 :Choose a site and an imaginary time point. Step2 :Put a worm pair. if no, go to Step4. Step3 :The worm-head moving. When the head ...

psd Tutorial
Adobe Photoshop in 4 simple steps. With just one text layer and a few layer styles you can have yourself a deliciously glossy emblem text effect in no time.

Tutorial Handout.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Tutorial ...

Tutorial Gitar.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Tutorial Gitar.pdf.

Tutorial XtraNormal.pdf
animaciones 3D en formato de video. Plan Integral de Educación ... Su funcionalidad cobra sentido cuando se. integra a una .... Tutorial XtraNormal.pdf. Tutorial ...

Epic Vim Tutorial - GitHub
Jan 19, 2012 - Move back to the start of the first email address in the file. 7. Press Ctrl+v to enter visual block mode. 8. Using the arrow keys, select all email ...

Tutorial GoAnimate.pdf
Page 3 of 63. Tutorial GoAnimate.pdf. Tutorial GoAnimate.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Tutorial GoAnimate.pdf. Page 1 of 63.

Tutorial Avogadro.PDF
Page 2 of 18. Colección de aplicaciones gratuitas. para contextos educativos Avogadro // Pág. 2. Plan Integral de Educación Digital. Dirección Operativa de ...

Tutorial Edmodo.pdf
DIMODIFIKASI: Kamar mandi khusus dipersiapkan oleh pengelola Masjid Istiqlal untuk Raja Salman bin. “ BACA: Pesan Kamar Abdulaziz. ..., hal 7. Page 1. Whoops! There was a problem loading this page. Retrying... Whoops! There was a problem loading th

Proof card workflow tutorial
The system will automatically show a warning if the photographers favorite tag is missing. The picture set as photographer's favorite will be added to the products ...

TUTORIAL PROFICAD.pdf
Sign in. Page. 1. /. 58. Loading… Page 1 of 58. Page 1 of 58. Page 2 of 58. Page 2 of 58. Page 3 of 58. Page 3 of 58. TUTORIAL PROFICAD.pdf. TUTORIAL ...