Chapter 10: Introduction to Network Simulator (NS2)
Recommend Documents
A summary of all the chapters in this book is ... An overview of Network Simulator 2 (NS2) is discussed in Chapter 2. Here ... OSI and TCP/IP Reference Models .
level course or a graduate level course on telecommunication networks offered ...... âMyClassâ pointer is a shorthand for a pointer which points to an object.
transport layer protocol, application, etc. To investigate network performance, researchers can .... NS2 Descriptor File . ..... 11.4.1 FTP (File Transfer Protocol) .
beginners rely on online tutorials. Most of the ... The objective of this textbook is to act as a primer for NS2 beginners. ..... Creating and Destroying a Shadow TclObject . . . . . . . . 50 ...... 1 For the sake of illustration only four layers are
International Journal of Engineering Trends and Technology (IJETT) â Volume 13 Number 7 â Jul 2014. ISSN: 2231- ... Thus, solutions ... Network on Chip (NOC) and Network Simulator .... period of the simulation (which depends on Ts) is.
Material from or based on: The HCS12/9S12: An Introduction to Software &
Hardware. Interfacing, Thomson Delmar Learning, 2006. ECE 4510. 2. Chapter
10.
NETWORK ANALYSIS. 1.1 INTRODUCTION. The study of social networks is a
new but quickly widening multidis- ciplinary area involving social, mathematical,
...
Russell et al, 2002; Streitz et al., 1999). In this paper we describe ... Plasma Poster Network, digital bulletin boards that display community- generated ... in Brand's terms poster boards are part of the malleable âspace planâ, with the posted
CHEMICAL CALCULATIONS AND CHEMICAL. EQUATIONS. 367 lthough
Chapter 9 was full of questions that began with, “How much…?” we are not done
with ...
When a program needs to manage a large amount of data, a database is a good
... Modules - Displays any modules (Visual Basic for Applications procedures).
Aug 9, 2011 ... Limits, derivatives and integrals. Limits and Motion: The Tangent Problem.
Average Velocity is the change in position divided by the change in.
For the benefit of this laboratory exercises we are going to use OMNET++
simulator. ... OMNET following the installation guide given in the e-learning
website. 4.
prova# ifconfig lo0 127.0.0.1 mtu 576 # small packets --> large windows prova# .... M. Mathis, J. Mahdavi, S. Floyd, A. Romanow: \RFC2018: TCP Selective Ac-.Missing:
... Washington, DC. http://blog.usaid.gov/2012/03/translating-words-into-action- .... A farm er in K enya applies fertil
GNS3 is a Graphical Network Simulator that allows emulation of complex ..... (
Note: In Windows Vista, the telnet client is not automatically installed as in
previous ...
May 29, 2008 - ment called Opportunistic Network Environment simulator (ONE). Unlike other DTN simulators, which usually focus only on routing simulation, ...
Oct 13, 1989 - COSATI CODES. 18. ... of discrete conditonal probability density functions (pdf's) for a phase state variable shall be ... order to produce a phase reference or estimate, S(n). Here. the ..... used for sifting or masking some of the.
Chapter 3 Executing Program by CX-Simulator ..... The following is coding of a
simple ladder program by using CX-Programmer. This is a sample .... CX-One
Ver2.1 or higher ..... OMRON Industrial Automation Global: www.ia.omron.com.
content delivery networks such as Akamai [Aka01]. As mentioned above, however, there are some simulators that estimate response times. We describe a few of ...
Course: Introduction to Network Analysis, CP SC 881 ... Natural gas major
pipelines in Europe (Newman “Networks: An Introduction”). Delivery and
Distribution ...
Abstract - According to need of communication in societies as well as an area which can integrates the communication, it is necessary to exist a reference with ...
Targets :Iris Flower Data Set. â¢Targets are denoted as ... Fisher's Iris Data. Sepal length. Sepal width. Petal .... â
Chapter 10: Introduction to Network Simulator (NS2)
Quit complicated to install in Windows Windows installation and usage not introduced here 3
ns2- Network Simulator
One of the most popular simulator among networking researchers
Discrete event, Packet level simulator
Open source, free Events like ‘received an ack packet’, ‘enqueued a data packet’
Network protocol stack written in C++ Tcl (Tool Command Language) used for specifying scenarios and events. Simulates both wired and wireless networks.
4
Goal of this tutorial
Understand how to write Tcl scripts to simulate simple network topologies and traffic patterns.
Analyze the trace files and understand how to evaluate the performance of networking protocols and operations.
5
“Ns” Components
Ns, the simulator itself Nam, the network animator
Visualize ns (or other) output Nam editor: GUI interface to generate ns scripts
Pre-processing:
Since we only run ns2 in remote Unix server, we will not introduce Nam usage in this class
Traffic and topology generators
Post-processing:
Simple trace analysis, often in Awk, Perl, or Tcl You can also use grep (under linux), or C/java
6
C++ and OTcl Separation
“data” / control separation
C++ for “data”: per packet processing, core of ns fast to run, detailed, complete control
OTcl for control: Simulation scenario configurations Periodic or triggered action Manipulating existing C++ objects fast to write and change
7
Basic Tcl variables: set x 10 set z x+10 # string ‘x+10’ to z set y [expr $x+10] puts “x is $x”
procedures: proc pow {x n} { if {$n == 1} { return $x } set part [pow x [expr $n-1]] return [expr $x*$part] }
functions and expressions: set y [expr pow($x, 2)] control flow: if {$x > 0} { return $x } else { return [expr -$x] } while { $x > 0 } { puts $x incr x –1 }
Arrays: set matrix(1,1) 140
8
Simple two node wired network n0
Step 1:
Step 2:
n1
#Create a simulator object # (Create event scheduler) set ns [new Simulator] #Open trace files set f [open out.tr w] $ns trace-all $f 9
Name of scheduler
Simple two node wired network n0
Step 3:
Step 4:
n1
#Create two nodes set n0 [$ns node] set n1 [$ns node] #Create a duplex link between the nodes $ns duplex-link $n0 $n1 1Mb 10ms DropTail 10
Simple two node wired network #Create a simulator object set ns [new Simulator] #Open trace files set f [open out.tr w] $ns trace-all $f #Define a 'finish' procedure proc finish {} { global ns $ns flush-trace close $f exit 0 } #Create two nodes set n0 [$ns node] set n1 [$ns node] #Create a duplex link between the nodes $ns duplex-link $n0 $n1 1Mb 10ms DropTail #Call the finish procedure after 5 seconds of simulation time $ns at 5.0 "finish" #Run the simulation But we have no traffic! $ns run 11
Adding traffic to the link n0
n1
udp
#Create a UDP agent and attach it to node n0 set udp0 [new Agent/UDP] $ns attach-agent $n0 $udp0
12
Adding traffic to the link n0
n1
udp cbr # Create a CBR traffic source and attach it to udp0
set cbr0 [new Application/Traffic/CBR] $cbr0 set packetSize_ 500 $cbr0 set interval_ 0.005 $cbr0 attach-agent $udp0 13
Adding traffic to the link n0
n1
udp
null
cbr
#Create a Null agent (a traffic sink) and attach it to node n1 set null0 [new Agent/Null] $ns attach-agent $n1 $null0 14
Adding traffic to the link n0
n1
udp
null
cbr #Connect the traffic source with the traffic sink $ns connect $udp0 $null0 #Schedule events for the CBR agent $ns at 0.5 "$cbr0 start" $ns at 4.5 "$cbr0 stop” $ns at 5.0 "finish" $ns run 15