This phenomenon is explained in the tutorial in Marc Greis's tutorial on 
the ns-2 website (see 
http://www.isi.edu/nsnam/ns/tutorial/nsscript2.html ).  The queue that 
you're probably using is a DropTail.  The DropTail queue has no concept 
of fairness, so it's going to drop whatever packet happens to be there.

If you want some kind of fairness, you can do as the tutorial suggests, 
and replace DropTail with SFQ in your simulation.  You will then get a 
fairer split of the bandwidth.  If you monitor the queue and the dropped 
packets, you will indeed see that they are queued and dropped in a much 
more equal way.

Eduardo J. Ortega wrote:
> Hi there:
> 
> I've set up this experiment. I have two source nodes S1 and S2 directly 
> connected to a node R1 and two destination nodes D1 and D2 also directly 
> connected to a node R2. Nodes R1 and R2 are connected. All links are 1 Mb/s 
> Full duplex with DropTail. Now, here's the thing. I set up two flows, one 
> going from S1 to D1 and the other one form S2 to D2. Both flows are UDP CBR 1 
> Mb/s. Flow 1 starts at t=0 and finishes at t=20.  flow 2 starts at t=10 and 
> stops at t=15. Sim runs from t=0 to t=25.
> 
> I'd expect that at t=10 (when flow 2 starts), both flows would experience the 
> same amount of packet losses, so that each one would use about 0.5Mb/s of the 
> link between R1 and R2. But what really happens is that from t=10 to t=15, 
> flow 2 uses all bandwidth while flow 1 loses all packets. Since both flows 
> have the same parameters, shouldn't they receive the same share of bandwidth 
> during that period? Or am i missing something here?
> 
> Thanks in advance.
> 

Reply via email to