[ns] Doubt Clarified.... TCP max congestion window and ssthreh's values

Mayur mayur at ee.iitd.ac.in
Sat Oct 18 01:51:56 PDT 2008


Mayur wrote:
> Dear ns colleagues, 
>
> How to set max congestion window in tcp? I ns-default.tcl sets it to 0 
> (Zero). How it could be if following concept is correct?
>
>     maxcwnd (Maximum Congestion Window) indicates the maximum number 
> that the CWND can achieve. ie. After tcp enters in the Congestion 
> Avoidance phase, the rate of increase in CWND becomes slow (linear 
> rather than exp). When it reaches MAXCWND, it stops increases. However 
> if some packet loss occurs, during this process, it enters into recovery 
> process, by Reseting the CWND to 1, MAXCWND to half the current CWND.
>
> Am I conceptually (theoretically) correct? If yes, then the default 
> value of maxcwnd must be some greater positive number and not zero!
>
>     (Similar comment is due for ssthresh (Slow Start Threshold ) too, as 
> it is also ZERO by default in ns!)
>
>     As ns2 is working properly, I am sure I am mistaking /  
> misunderstanding somewhre. I just want to know where.
>
> Your expert comments are welcomed..
>
> Mayur
>   


Dear all,

I found the clarification to the doubt...
The code in tcp.cc is
##############################
// if maxcwnd_ is set (nonzero), make it the cwnd limit
      if (maxcwnd_ && (int(cwnd_) > maxcwnd_))
                 cwnd_ = maxcwnd_;

##############################

So, the comment itself speaks well... By default the algorithm (in ns) 
does not check for maxcwnd_, ie. cwnd can grow to (theoretically) 
infinity. If we set it by 'Agent/TCP set maxcwnd_ <some_value>' then it 
is set accordingly.

I hope I perceived it right.

Mayur



More information about the Ns-users mailing list