Beruflich Dokumente
Kultur Dokumente
#General Parameters
set opt(ecn) 0 ;
set opt(window) 30 ;
# Topology
set opt(type) umts ; #type of link:
# AQM parameters
set opt(minth) 30 ;
set opt(maxth) 0 ;
set opt(adaptive) 1 ; # 1 for Adaptive RED, 0 for plain RED
#default downlink bandwidth in bps
set bwDL(umts) 364000
#default uplink bandwidth in bps
set bwUL(umts) 76000
#default downlink propagation delay in seconds
set propDL(umts) .200
#default uplink propagation delay in seconds
set propUL(umts) .200
#default buffer size in packets
set buf(umts) 10
proc stop {} {
global nodes ns opt nf tf
$ns flush-trace
close $nf
close $tf
exec nam out1.nam &
exit 0
}
$ns at 100 "stop"
$ns run
TR file
NAM file
AWK file
BEGIN {
PacketRcvd=0;
Throughput=0.0;
}
{
if(($1=="r") && ($5=="tcp") && ($10=4.0))
{
PacketRcvd++;
}
}
END {
Throughput=((PacketRcvd*1000*8)/(95.0*1000000));
printf("Packet Received:%f\n", PacketRcvd);
printf( "The Throughput is:%f\n",Throughput);
}