How to Patch Codel Queue in NS2

  • Step 1
    # Define options
set val(chan)Channel/WirelessChannel;# channel type
set val(prop)Propagation/TwoRayGround;# radio-propagation model
set val(netif)Phy/WirelessPhy;# network interface type
set val(mac)Mac/802_11;# MAC type
set val(ifq)Queue/CODEL;# interface queue type
set val(ll)LL;# link layer type
set val(ant)Antenna/OmniAntenna;# antenna model
set val(ifqlen)50;# max packet in ifq
set val(nn)60;# number of mobilenodes
set val(rp)AODV;# routing protocol
set val(x)600;# X dimension of topography
set val(y)600;# Y dimension of topography
set val(stop)30;# time of simulation end
  • Step 2 :

    Queue/CODEL set thresh_ 5Queue/CODEL set maxthresh_ 15

    Queue/CODEL set q_weight_ 0.001

    Queue/CODEL set bytes_ false

    Queue/CODEL set queue_in_bytes_ false

    Queue/CODEL set gentle_ false

    Queue/CODEL set mean_pktsize_ 1000

  • C++ part :Step 3 :

    Replace the files in corresponding location
    ( and codel.h) copy  —-> ns-allinone-2.35–> ns-2.35–>queue–> replace

  • Step 4 :

    replace ns-default.tcl,ns-lib.tcl in ns-allinone-2.35/ns-2.35/tcl/lib folder

  • Step 5 :

    paste Makefile in ns-allinone-2.35/ns-2.35

  • Step 6 :

    . / configure
    Make clean
    Make install