[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RED




Hi,
One think I can assure is that the red.cc has no bugs and works fine.
I don't know if they have changed it in the latest version but the variable
should be linterm_ not Linterm_. It's worth a check.

Kedar

At 01:15 PM 12/14/98 +0100, Bodog Gyula wrote:
>Hi,
>
>I have enough traffic. I used 8 and 32 FTP flow.
> In my simulation, I used the ECN bit to notify
>congestion. As I looked the result (queue length, avg queue length), there's
>congestion.
>My problem is:
>
>When I change the Linterm_ parameter from 4 to 100, result doesn't change.
>I think, in this case, t should see the change in the result, but it doesn't
>change.
>
>Here my simulation script:
>
>
>
>set ns [new Simulator]
>
>set n0 [$ns node]
>set n1 [$ns node]
>set n2 [$ns node]
>set n3 [$ns node]
>
>Queue/RED set thresh_ 20
>Queue/RED set maxthresh_ 80
>Queue/RED set q_weight_ 0.002
>Queue/RED set setbit_ true
>
>$ns simplex-link $n0 $n1 10M 0ms RED
>$ns simplex-link $n1 $n2 45M 0ms DropTail
>$ns duplex-link $n1 $n3 20M 0ms DropTail
>$ns simplex-link $n2 $n3 20M 10ms DropTail
>$ns simplex-link $n3 $n0 20M 10ms DropTail
>
>$ns queue-limit $n0 $n1 240
>
>Simulator instproc get-link {node1 node2} {
> $self instvar link_
> set id1 [$node1 id]
> set id2 [$node2 id]
> return $link_($id1:$id2)
> }
>
> set l [$ns get-link $n0 $n1]
> set q [$l queue]
> 
>$q set Linterm_ 4 
>
>set qred [$l queue]
>set avg [open avg w]
>
>proc avgqueue {qred isti} {
>global ns avg status
>
>set maxpr [$qred set Linterm_]
>set egz [$qred set ave_]
>set cur [$qred set curq_]
>set prob [$qred set prob1_]
>set curt [$ns now]
>
>puts $avg [format "%9.3f %9.3f %9.3f %9.3f %9.3f" $curt $egz $cur $prob
>$maxpr]
>
>$ns at [expr $curt + $isti] "avgqueue $qred $isti"
>}
>
>for {set i  0} {$i <12 } { set i [expr $i+0.001]}  {
>$ns at $i "avgqueue $qred 12"
>}
>
>
>Agent/TCP set packetSize_ 1000
>Agent/TCP set bugFix_ false
>Agent/TCP set window_ 32K
>Agent/TCP set ecn_ true
>
>for {set i 0} {$i <8} {set i [expr $i+1]} {
>
>set tcp(i) [new Agent/TCP/Reno]
>set snk(i) [new Agent/TCPSink]
>$ns attach-agent $n0 $tcp(i)
>$ns attach-agent $n2 $snk(i)
>$ns connect $tcp(i) $snk(i)
>set ftp(i) [$tcp(i) attach-source FTP]
>$ns at 0.0 "$ftp(i) start"
>$ns at 12.0 "$ftp(i) stop"
>}
>
>
>for {set i 0} {$i <24} {set i [expr $i+1]} {
>
>set tcp(i) [new Agent/TCP/Reno]
>set snk(i) [new Agent/TCPSink]
>$ns attach-agent $n0 $tcp(i)
>$ns attach-agent $n2 $snk(i)
>$ns connect $tcp(i) $snk(i)
>set ftp(i) [$tcp(i) attach-source FTP]
>$ns at 4.0 "$ftp(i) start"
>$ns at 8.0 "$ftp(i) stop"
>}
>
>$ns at 12 "finish"
>
>
>proc finish {} {
>
>  
>        global ns
>        exit 0
>
>}
>
>                          
>
>$ns run
>
>
>Thanks in advance
>
>
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
> *    Gyula Bodog                                      *
> *     e-mail: [email protected]              *
> *     tel.: (06 1) 3-691-839                          *
> *     Student at Technical University of Budapest     *
> *                                                     *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
>
>