Professional Documents
Culture Documents
Set the queue size and vary the bandwidth and find the number of packets dropped.
Outcome :
� Creation of nodes & generation of traffic in a network
� Analyze the network traffic by varying queue size and bandwidth.
� Find the number of packets dropped with increased network traffic.
#Create Simulator
set ns [new Simulator]
#Finish Procedure
proc Finish {} {
global ns ntrace namfile
#Create 3 nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
#Schedule Events
$ns at 0.0 "$cbr0 start"
$ns at 5.0 "Finish"
Output:
The number of Packets Dropped is 8