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

Re: cwnd bug?



Andras, 
TCP in the version of ns that I currently have does not implement any flow 
control.  So the send window is solely based on the congestion window and the 
maximum allowable window "window_" in tcl which is binded to "wnd_" in the C++ 
code.  The congestion window should always grow in the absence of loss.  So if 
you have no loss in your network, what I see in your output is not strange.  
However, the send window can be no larger than "window_" no matter what the 
"cwnd_" value is.  I hope this helps.




Moncef Elaoud
	       

________________________________________________________________________________

University of Wisconsin-Madison         
Department of Electrical and Computer Engineering 
1415 Engineering Drive, Room 3622          
Madison, WI 53706-1691	        
Phone: (608) 262-5130	 
Fax:   (608) 265-4623	 
e-mail: [email protected]	 
http://www.cae.wisc.edu/~elaoud	 
________________________________________________________________________________

> 
> I tried the following little script to log the cwnd of two competing
> TCPs. They share a single buffer:
> 
> $ns duplex-link $na $nb 0.2Mb 10ms DropTail
> 
> Surprisingly the cwnd increases continuously which is quite
> strange. Even after simulating it for 1 hour simulation time.
> 
> Is it a bug or a 'feature' :) ?
> 
> The program logs the windows into 'byte.log'. After 3600s of simulation,
> the tail of the file looks like:
> 
> Time                cwnd1      cwnd2
> 
> 3598.5999999989181  300.577296 300.517404
> 3598.7999999989179  300.577296 300.534042
> 3598.9999999989177  300.577296 300.550679
> 3599.1999999989175  300.577296 300.567315
> 3599.3999999989173  300.583949 300.577296
> 3599.5999999989172  300.600583 300.577296
> 3599.799999998917  300.617216 300.577296
> 3599.9999999989168  300.633848 300.577296
> 
> So the amount of packets in the system is >600? It is impossible!
> 
> 
> \Andras
> 
> ns v2.1b5:
> -----------------------------------------------------------------------
> 
> set ns [new Simulator]
> 
> set na [$ns node]
> set nb [$ns node]
> 
> $ns duplex-link $na $nb 0.2Mb 10ms DropTail
> 
> $ns queue-limit $na $nb 100
> 
> set N 2
> for {set i 0} {$i<$N} {incr i} {
>    set tcp($i) [new Agent/TCP]
>    $tcp($i) set class_ $i
>    set sink($i) [new Agent/TCPSink]
>    $ns attach-agent $na $tcp($i)
>    $ns attach-agent $nb $sink($i)
>    $ns connect $tcp($i) $sink($i)
>    set ftp($i) [new Application/FTP]
>    $ftp($i) attach-agent $tcp($i)
> 
>    $ns at 0 "$ftp($i) start"
> }
> 
> 
> set log [open byte.log w]
> 
> $ns at 3600 finish
> $ns at 0 ize
> 
> set dt 0.2
> set tt 0
> 
> 
> proc ize {} {
>    global ns tt dt tcp log N
>    
>    set str ""
>    for {set j 0} {$j<$N} {incr j} {
>       set bb [$tcp($j) set cwnd_ ]
> 
>       set b($j) $bb
> 
>       set str "$str [$tcp($j) set cwnd_ ]"
>    }
>    puts $log "$tt $str"
> 
>    set tt [expr $tt+$dt]
>    $ns at $tt ize
> }
> 
> proc finish {} {
> 	global log
>         close $log
> 	exit 0
> }
> 
> $ns run
> 
> 
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Andras Veres                          [email protected]
> TrafficLab ETH/LT                     Tel: +36-1-437-7735
> Ericsson Kft.                         Fax: +36-1-437-7219 
> P.O.B. 107, 1300 Budapest, Hungary
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~