[ns] Questions about RTT exponential backoff in NS-2
Felix
flam at cuhk.edu.hk
Wed May 5 21:02:05 PDT 2004
Hi all,
I am simulating with NS-2 version 2.26.
I have a question about the implementation on RTT exponential backoff =
mechanism.
As I know, according to the Karn's algorithm, the t_srtt value should be =
doubled after a timeout which has already been implemented in the tcp =
module of NS-2.
However, I found that in NS-2, the t_srtt will be reset to 0 after a few =
consecutive timeouts. What is the reason for this? Does this reset =
mechanism exist in any RFCs ? =20
The following code perform the t_srtt reset:
void TcpAgent::rtt_backoff()
{
if (t_backoff_ < 64)
t_backoff_ <<=3D 1;
if (t_backoff_ > 8) {
/*
* If backed off this far, clobber the srtt
* value, storing it in the mean deviation
* instead.
*/
t_rttvar_ +=3D (t_srtt_ >> T_SRTT_BITS);
t_srtt_ =3D 0;
}
}
rgs,
Felix
More information about the Ns-users
mailing list