[e2e] Can TCP's congestion window go beyond receiver's maximum advertised window?

Syed Faisal Hasan rony3000us at hotmail.com
Sat Apr 16 03:12:52 PDT 2005


Dear Folks,

I was trying to do a simple simulation using NS-2.27 and  I found
something interesting.

The topology is as follows
[n0]---------------[n1]

n0 is running a ftp application on top of tcp.
TCP receiver's advertised maximum window size is set to 20 (that is
the default in NS)

Congestion window (cwnd) should never go beyond receive window (rwnd), 
right?
Then why in the simulation, cwnd grows beyond rwnd? cwnd reaches to
24, while rwnd is fixed at 20.

If this is a silly question, I 'm sorry for asking. But I 'ld like to
have an explanation.

Faisal
#==========================================
#The NS script is below
#===========================================
set ns [new Simulator]

set file1 [open testout.tr w]
$ns trace-all $file1

set file2 [open ./temp/namtest.nam w]
$ns namtrace-all $file2
set windowfile [ open ./temp/WindowFile w]

proc finish {} {

global ns file1 file2
$ns flush-trace
close $file1
close $file2

exec nam ./temp/namtest.nam &
exec xgraph ./temp/WindowFile -geometry 800x600 &
exit 0

}

set n0 [$ns node]
set n1 [$ns node]
$ns duplex-link $n0 $n1 0.2Mb 500ms DropTail
$ns duplex-link-op $n0 $n1 orient right

set tcp [new Agent/TCP/Sack1]
$ns attach-agent $n0 $tcp
$tcp set window_ 20

set tcpsink [new Agent/TCPSink]
$ns attach-agent $n1 $tcpsink
$ns connect $tcp $tcpsink

set ftp [new Application/FTP]
$ftp attach-agent $tcp

proc getwindow {source file } {

global ns
set now [$ns now]
set time 0.1
set cwnd [$source set cwnd_]
puts $file "$now $cwnd"
$ns at [expr $now+$time] "getwindow $source $file"

}

$ns at 0.1 "getwindow $tcp $windowfile"

$ns at 0.0 "$ftp start"
$ns at 9.0 "$ftp stop"
$ns at 10 "finish"
$ns run
#===================================

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/



More information about the end2end-interest mailing list