Lab 1
Lab 1
#The below code is used to set the queue size b/w the nodes
$ns set queue-limit $n0 $n2 1
$ns set queue-limit $n1 $n2 1
$ns set queue-limit $n2 $n3 1
#The below code sets the udp0 packets to red and udp1
#packets to blue color
$udp0 set class_ 1
$udp1 set class_ 2
awk script
BEGIN{
#include<stdio.h>
count=0;
}
{
if($1=="d") #d stands for the packets drops. count+
+
}
END{
printf("The Total no of Packets Dropped due to Congestion :%d\n\n", count)
}