I have spent the whole of today trying to implement
ECN effectively but have encountered the following problems:
*Firstly, I have had difficulty finding appropriate
values for thresh_ , maxthresh_ and q_weight. In general I have used
defaults or made educated guesses.
*Looking at the
RED queue trace reveals that the E flag (congestion experienced) is seldom
set.
*In addition to that, there are no instances
of the C flag (ECN echo) being set during congestion. It is only set
during the TCP initialization.
*Enabling the setbit_ option doesn't result in
reduced packet losses. Fairness is very
low.
I would be grateful for any pointers.
Thank you
Joshua Mentz
Following is my tcl script:
#Create a simulator object
set ns [new Simulator] #Define different colors for data flows (for
NAM)
$ns color 1 Blue $ns color 2 Red $ns color 3 green #Open the NAM trace file
set nf [open sim1.nam w] $ns namtrace-all $nf #--------------Define a 'finish'
procedure---------------------
proc finish {} { global ns nf f $ns flush-trace #Close the NAM trace file close $f close $nf #Execute NAM on the trace file exec nam.exe sim1.nam & exit 0 } #Create four nodes
set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set n4 [$ns node] #-----------CLASS VARIABLE
MODIFICATIONS---------------------------
#modify agent class vairables Agent/TCP/Sack1 set window_ 100 Agent/TCP/Sack1 set packetSize_ 1500 Agent/TCP/Sack1 set ecn_ true Application/Traffic/Pareto set rate_ 1mb Queue/RED set setbit_ true
#Queue/RED set thresh_ 2 #Queue/RED set maxthresh_ 8 #Queue/RED set q_weight_ 0.002 #Create links between the nodes
$ns duplex-link $n0 $n3 10Mb 1ms DropTail $ns duplex-link $n1 $n3 10Mb 1ms DropTail $ns duplex-link $n2 $n3 10Mb 1ms DropTail $ns duplex-link $n3 $n4 20Mb 5ms RED #Set Queue Size of link (n4-n5) to 10 packets $ns queue-limit $n3 $n4 20 set f [open sim1Q.tr w]
$ns trace-queue $n3 $n4 $f #Give node position (for NAM)
$ns duplex-link-op $n0 $n3 orient right-down $ns duplex-link-op $n1 $n3 orient right $ns duplex-link-op $n2 $n3 orient right-up $ns duplex-link-op $n3 $n4 orient right #Monitor the queue for link (n4-n5). (for
NAM)
$ns duplex-link-op $n3 $n4 queuePos 0.5 #---------TCP connection
0-------------------------------
set tcp0 [new Agent/TCP/Sack1] $tcp0 set class_ 2 $ns attach-agent $n0 $tcp0 set sink [new Agent/TCPSink/Sack1]
$ns attach-agent $n4 $sink $ns connect $tcp0 $sink $tcp0 set fid_ 0 set cbr0 [new Application/Traffic/Pareto]
$cbr0 attach-agent $tcp0 #---------TCP connection 1------------------------------- set tcp1 [new Agent/TCP/Sack1] $ns attach-agent $n1 $tcp1 set sink [new Agent/TCPSink/Sack1]
$ns attach-agent $n4 $sink $ns connect $tcp1 $sink $tcp1 set fid_ 1 set cbr1 [new Application/Traffic/Pareto]
$cbr1 attach-agent $tcp1 #---------TCP connection
2-------------------------------
set tcp2 [new Agent/TCP/Sack1] $ns attach-agent $n2 $tcp2 set sink [new Agent/TCPSink/Sack1]
$ns attach-agent $n4 $sink $ns connect $tcp2 $sink $tcp2 set fid_ 2 set cbr2 [new Application/Traffic/Pareto]
$cbr2 attach-agent $tcp2 #-----------------Schedule
events----------------------------
$ns at 0.0 "$cbr0 start"
$ns at 0.0 "$cbr1 start" $ns at 0.0 "$cbr2 start" $ns at 1.0 "$cbr0 stop" $ns at 1.0 "$cbr1 stop" $ns at 1.0 "$cbr2 stop" $ns at 1.2 "finish"
#Print CBR packet size and interval
#puts "CBR packet size = [$cbr0 set packet_size_]" #puts "CBR interval = [$cbr0 set interval_]" #Run the simulation
$ns run |