Can the DropTailQueue simulate packet drops without a QueueDisc?

107 views
Skip to first unread message

Kushal Ramkumar

unread,
Mar 24, 2019, 9:02:02 AM3/24/19
to ns-3-users
Hi,

I'm using ns-3.27 to create a simple bottleneck model (depicted in the figure below) by configuring the P2P link at n3 to contain an ns3::DropTailQueue with MaxPackets=1.

n1                                            n5
    \ 3 Mb/s, 10ms                   / 3 Mb/s, 10ms
     \          1.5Mb/s, 10ms      /
      n3 -------------------------n4

I tried using traffic-control.cc as a reference to configure the queue, but I do not see any packets being dropped unless I also create a QueueDisc where I specify the "Limit". The source is a BulkSendHelper (because I want to send data as fast as possible) and the sink is a PacketSinkHelper configured to use to the "ns3::TcpSocketFactory".

Also, here's the relevant snippet from my code:
...
PointToPointHelper p2p;
p2p.SetDeviceAttribute ("DataRate", DataRateValue (DataRate (3000000)));
p2p.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (10)));
p2p.SetQueue("ns3::DropTailQueue", "Mode", StringValue ("QUEUE_MODE_PACKETS"));

NetDeviceContainer d1d3 = p2p.Install (n1n3);

NetDeviceContainer d4d5 = p2p.Install (n4n5);

PointToPointHelper bottleneck;
bottleneck.SetDeviceAttribute ("DataRate", DataRateValue (DataRate (1500000)));
bottleneck.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (10)));
//bottleneck.SetQueue("ns3::DropTailQueue", "Mode", StringValue ("QUEUE_MODE_PACKETS"), "MaxPackets", UintegerValue (1));
bottleneck.SetQueue("ns3::DropTailQueue", "MaxPackets", UintegerValue (1));
NetDeviceContainer d3d4 = bottleneck.Install (n3n4);

TrafficControlHelper tch;
//tch.SetRootQueueDisc ("ns3::RedQueueDisc");
tch.SetRootQueueDisc ("ns3::PfifoFastQueueDisc", "Limit", UintegerValue (1));
QueueDiscContainer qdiscs = tch.Install (d3d4);
...


From what I've understood, the queue only applies to the Tx side of the link n3-->n4 and the MaxPackets configuration should cause packets to be dropped in my case. I also tried plotting the Congestion Window (cwnd) without the QueueDisc and I see that the cwnd value increases linearly until the simulation completes without any loss events!

Could someone please help me figure out if I'm missing something?

I see that a similar unanswered question has been posted earlier (link here), but I figured the older post might have lacked sufficient information to receive an answer!

Thanks,
Kushal

sy j

unread,
May 12, 2019, 9:05:12 PM5/12/19
to ns-3-users
Dear Kushal
Hi,
I have a similar problem that I want to simulate the buffer overflow but I make a mistake that attach the DropTailQueue to the Tx side and  no packet dropped as you said above. So do you know what the problem is ? 
And do you know how to simulate the buffer overflow ? I think that it should be done something in the Rx side but I can't find the queue used for the Rx side.

在 2019年3月24日星期日 UTC+8下午9:02:02,Kushal Ramkumar写道:
Reply all
Reply to author
Forward
0 new messages