Search code examples
ns-3congestion-control

How to install AQM algorithms in ns3


I am new to ns3 and trying a way to add Active Queue Management Algorithms in my code. I was wondering how could I implement them on my topology.

I tried implementing them through netdevcontainer, but it was showing a sigsegv error.


Solution

  • I am not sure of the error you are getting but to install Queuing Disciplines (AQM algorithms) ,initially you need to have a NetDevContainer of the nodes you want to install the algorithm on like NetDeviceContainer internalNet;

    Then install the AQM algorithm using the following code :

    `std::string aqmAlgo = "ns3::CoDelQueueDisc";

    QueueDiscContainer queueDiscs;
    
    TrafficControlHelper tch;   //AQM implementation
    
    tch.SetRootQueueDisc (aqmAlgo);
    
    queueDiscs = tch.Install(internalNet);`
    

    Also don't forget to include the following header files:

    #include "ns3/traffic-control-module.h"
    

    Then it should work fine,

    Chinmay