hi
I am simulating a dumbbell topology with 4 TCP Vegas or Reno senders like
you can see below TCL code, but I am getting a utilization near 5% for my
bottleneck link (r0-r1) and considering that I can not find any drops in my
trace file, I think my ftp application cannot generate enough traffic for
my sender. is this possible to control the traffic rate in FTP?
#Create a simulator object
set ns [new Simulator]
#Open the Trace file
set tf [open out.tr w]
$ns trace-all $tf
############################## network Topology######################
########
set node_(s0) [$ns node]set node_(s1) [$ns node]set node_(s2) [$ns node]set
node_(s3) [$ns node]
set node_(r0) [$ns node]set node_(r1) [$ns node]set node_(d0) [$ns node]set
node_(d1) [$ns node]set node_(d2) [$ns node]set node_(d3) [$ns node]
$ns duplex-link $node_(s0) $node_(r0) 1000Mb 0.0275ms DropTail$ns
duplex-link $node_(s1) $node_(r0) 1000Mb 0.0275ms DropTail$ns duplex-link
$node_(s2) $node_(r0) 1000Mb 0.0275ms DropTail$ns duplex-link $node_(s3)
$node_(r0) 1000Mb 0.0275ms DropTail
$ns duplex-link $node_(r0) $node_(r1) 1000Mb 5.5ms DropTail
$ns duplex-link $node_(r1) $node_(d0) 1000Mb 0.0275ms DropTail$ns
duplex-link $node_(r1) $node_(d1) 1000Mb 0.0275ms DropTail$ns duplex-link
$node_(r1) $node_(d2) 1000Mb 0.0275ms DropTail$ns duplex-link $node_(r1)
$node_(d3) 1000Mb 0.0275ms DropTail
set sink0 [new Agent/TCPSink]
$ns attach-agent $node_(d0) $sink0
set sink1 [new Agent/TCPSink]
$ns attach-agent $node_(d1) $sink1
set sink2 [new Agent/TCPSink]
$ns attach-agent $node_(d2) $sink2
set sink3 [new Agent/TCPSink]
$ns attach-agent $node_(d3) $sink3
#set data source from node_(s0) to node_(d0)
set tcp0 [new Agent/TCP/Vegas]
$tcp0 set class_ 1
#$tcp0 set window_ 64
$tcp0 set packetSize_ 1024
$ns attach-agent $node_(s0) $tcp0
set ftp0 [new Application/FTP]
$ftp0 attach-agent $tcp0
$ns connect $tcp0 $sink0
#set data source from node_(s1) to node_(d1)
set tcp1 [new Agent/TCP/Vegas]
$tcp1 set class_ 2
#$tcp1 set window_ 64
$tcp1 set packetSize_ 1024
$ns attach-agent $node_(s1) $tcp1
set ftp1 [new Application/FTP]
$ftp1 attach-agent $tcp1
$ns connect $tcp1 $sink1
#set data source from node_(s2) to node_(d2)
set tcp2 [new Agent/TCP/Vegas]
$tcp2 set class_ 3
#$tcp2 set window_ 64
$tcp2 set packetSize_ 1024
$ns attach-agent $node_(s2) $tcp2
set ftp2 [new Application/FTP]
$ftp2 attach-agent $tcp2
$ns connect $tcp2 $sink2
#set data source from node_(s3) to node_(d3)
set tcp3 [new Agent/TCP/Vegas]
$tcp3 set class_ 4
#$tcp3 set window_ 64
$tcp3 set packetSize_ 1024
$ns attach-agent $node_(s3) $tcp3
set ftp3 [new Application/FTP]
$ftp3 attach-agent $tcp3
$ns connect $tcp3 $sink3
#start to generate traffic
$ns at 0.0 "$ftp0 start"$ns at 0.0 "$ftp1 start"$ns at 0.0 "$ftp2 start"$ns
at 0.0 "$ftp3 start"
$ns at 60.0 "finish"
#Define a 'finish' procedure
proc finish {} {
global ns tf
$ns flush-trace
#Close the Trace file
close $tf
# bottleneck link throughput calculation exec awk -f link.awk
out.tr > throughput.txt
exit 0
}
#Run the simulation
$ns run