How to enable ECN on CoDelQueueDisc or TcpSocketBase?

81 views
Skip to first unread message

Md Ashiqur Rahman

unread,
Jun 16, 2020, 3:15:49 PM6/16/20
to ns-3-users
I am on ns3 version 3.30 and trying to manually enable/disable the ECN. I have tried different ways to do so, but always end up with error. 
Please suggest how I can set enable/disable ECN properly (of course default is disabled).


Here are some tries and errors:

// Try 1

Config::SetDefault ("ns3::TcpSocketBase::UseEcn", StringValue ("On"));

error:
msg="Could not set default value for ns3::TcpSocketBase::UseEcn", file=../../src/core/model/config.cc, line=815


// Try 2

Config::SetDefault ("ns3::CoDelQueueDisc::UseEcn", BooleanValue (true));

error:
msg="Could not set default value for ns3::CoDelQueueDisc::UseEcn", file=../../src/core/model/config.cc, line=815


// Try 3, out of frustration, pretty sure this is completely wrong:

TrafficControlHelper tchCoDel;
tchCoDel
.SetRootQueueDisc ("ns3::CoDelQueueDisc");
tchCoDel
.SetQueueLimits("ns3::CoDelQueueDisc", "UseEcn", BooleanValue (true));
// later used tchCoDel.install(<somenetdevice>);

error:
msg="Invalid attribute set (UseEcn) on ns3::CoDelQueueDisc", file=../../src/core/model/object-factory.cc, line=84


I tried to follow the examples provided on this page (I'm not using DCTCP):

I also see that CoDel has attributes "UseEcn",: https://www.nsnam.org/doxygen/classns3_1_1_co_del_queue_disc.html,

Tom Henderson

unread,
Jun 16, 2020, 3:24:12 PM6/16/20
to ns-3-...@googlegroups.com, Md Ashiqur Rahman
On 6/16/20 12:15 PM, Md Ashiqur Rahman wrote:
> I am on ns3 version 3.30 and trying to manually enable/disable the ECN.
> I have tried different ways to do so, but always end up with error.
> Please suggest how I can set enable/disable ECN properly (of course
> default is disabled).

ECN is not supported in that model in release 3.30. It will be in
release 3.31, about to be published; it was recently added.

Please have a look at ns-3-dev code.

- Tom

Md Ashiqur Rahman

unread,
Jun 16, 2020, 3:59:56 PM6/16/20
to ns-3-users
Hi Tom,

Thanks for the reply. I think I figured it out and looks to me that it's working properly on 3.30. Here's the modification I made:

1. Update the codel-queue-disc header and cc files with the latest one.
2. Use the following to enable the ECN:

Config::SetDefault ("ns3::CoDelQueueDisc::UseEcn", BooleanValue (true));
Config::SetDefault ("ns3::TcpSocketBase::EcnMode", StringValue ("ClassicEcn"));


Best-
Ashiq

Tom Henderson

unread,
Jun 16, 2020, 4:05:38 PM6/16/20
to ns-3-...@googlegroups.com, Md Ashiqur Rahman
On 6/16/20 12:59 PM, Md Ashiqur Rahman wrote:
Hi Tom,

Thanks for the reply. I think I figured it out and looks to me that it's working properly on 3.30. Here's the modification I made:

1. Update the codel-queue-disc header and cc files with the latest one.
2. Use the following to enable the ECN:

Config::SetDefault ("ns3::CoDelQueueDisc::UseEcn", BooleanValue (true));
Config::SetDefault ("ns3::TcpSocketBase::EcnMode", StringValue ("ClassicEcn"));


Best-
Ashiq


Yes, in general, there are changes to how ECN is configured between ns-3.30 and ns-3.31.  If you are doing research using ECN, I recommend to upgrade once the release is published.  ns-3.31 will include ECN support in FqCoDel and CoDel.

- Tom

Md Ashiqur Rahman

unread,
Jun 16, 2020, 4:07:26 PM6/16/20
to Tom Henderson, ns-3-...@googlegroups.com
Hi Tom,

Thanks for your suggestion. I’ll definitely keep that in mind.

Best-
Ashiq
Reply all
Reply to author
Forward
0 new messages