Hi
I am trying to simulate RED with ECN.
I am using ns2.33 on Ubuntu 9.04
I have encountered two problems so far that I would like to share.
If anybody knows a solution for them, please share.
1. (more important of the two).
As far as I know, a RED queue should mark packets linearly when the
queue is between thresh_ and maxthresh_ in average size.
However this was not the case in the simulations.
I had a queue that was constantly over maxthresh_ but it was marking
half the packets.
The problem seems to be in queue/red.cc in the function
REDQueue::drop_early(Packet* pkt)
Here, around the line 550 it says
if (u<= edv_.v_prob) {
// DROP or MARK
.........
}
The problem is that edv_.v_prob constantly fluctuates between the
value 0 and the value 1 even if the queue occupancy is very very close
to maxtresh_.
Since u is a random variable between 0 and 1 the result is that only
half of the packets that should be marked are actually marked.
Interestingly, once the average queue size exceeds maxthresh_ then
edv_.v_prob becomes 1.
What I've done is to change the above code to:
if (u<= (double)edv_.v_prob1) {
// DROP or MARK
.....
}
This does the job as I expected.
Now, am I missing something? Is what I'm saying here incorrect?
2. RFC 3168 that describes ECN states
>>>>>
This document specifies ECN-capable TCP implementations MUST NOT set
either ECT codepoint (ECT(0) or ECT(1)) in the IP header for
retransmitted data packets
>>>>>
However, in ns2 all the retransmissions seem to be marked ECN-capable.
Any help is appreciated
Thanks
Florin