<div dir="ltr">Hi Anjali,<div><br></div><div>You can test CoDel on wired as well as wireless networks.</div><div><br></div><div>CoDel's code is available for Linux, ns-2 and ns-3.</div><div><br></div><div>See the following link for more details:</div><div><br></div><div><a href="http://www.bufferbloat.net/projects/codel/wiki/Wiki/#Simulations">http://www.bufferbloat.net/projects/codel/wiki/Wiki/#Simulations</a><br></div><div><br></div><div>Hope it helps.</div><div><br></div><div>Best Regards,</div><div>Mohit P. Tahiliani<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 19, 2015 at 12:50 PM, <span dir="ltr"><<a href="mailto:codel-request@lists.bufferbloat.net" target="_blank">codel-request@lists.bufferbloat.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Send Codel mailing list submissions to<br>
<a href="mailto:codel@lists.bufferbloat.net">codel@lists.bufferbloat.net</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://lists.bufferbloat.net/listinfo/codel" target="_blank">https://lists.bufferbloat.net/listinfo/codel</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:codel-request@lists.bufferbloat.net">codel-request@lists.bufferbloat.net</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:codel-owner@lists.bufferbloat.net">codel-owner@lists.bufferbloat.net</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Codel digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. tcl code of CoDel (Anjali Chawla)<br>
2. Codel code (kanu monga)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 19 Feb 2015 11:59:50 +0530<br>
From: Anjali Chawla <<a href="mailto:anjaliachawla013@gmail.com">anjaliachawla013@gmail.com</a>><br>
To: <a href="mailto:codel@lists.bufferbloat.net">codel@lists.bufferbloat.net</a><br>
Subject: [Codel] tcl code of CoDel<br>
Message-ID:<br>
<CAL6QuG_pujPYrB6r0gcOhyPUgy6SV0gGFCTfsuQ_i35E=<a href="mailto:qYsjQ@mail.gmail.com">qYsjQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi<br>
i want to know can we test CoDel with wired network???<br>
or should we go for wireless only???<br>
anybody please reply because i am new to all this.<br>
your suggestions can help me in taking one step further.<br>
Thanks<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.bufferbloat.net/pipermail/codel/attachments/20150219/5c072359/attachment-0001.html" target="_blank">https://lists.bufferbloat.net/pipermail/codel/attachments/20150219/5c072359/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 19 Feb 2015 12:49:34 +0530<br>
From: kanu monga <<a href="mailto:kanumonga013@gmail.com">kanumonga013@gmail.com</a>><br>
To: <a href="mailto:codel@lists.bufferbloat.net">codel@lists.bufferbloat.net</a><br>
Subject: [Codel] Codel code<br>
Message-ID:<br>
<CAJ0uZqx6aWUTEuHHAn1g--5H3nwQv-mR8GbWD7wubt=<a href="mailto:H0fB3%2Bg@mail.gmail.com">H0fB3+g@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
is there anyone who can help me in understanding tcl code of codel(given<br>
below)<br>
This one is quite complex for me.<br>
please help if you can.<br>
Thanks in advance.<br>
<br>
###################################################################<br>
<br>
<br>
# ns codel.tcl f w c {b}Mb s d r<br>
# where:<br>
# f = # ftps<br>
# w = # PackMime connections per second<br>
# c = # CBRs<br>
# b = bottleneck bandwidth in Mbps<br>
# s = filesize for ftp, -1 for infinite<br>
# d = dynamic bandwidth, if non-zero, changes (kind of kludgey)<br>
# have to set the specific change ratios in this file (below)<br>
# r = number of "reverse" ftps<br>
<br>
set stopTime 300<br>
set ns [new Simulator]<br>
<br>
# These are defaults if values not set on command line<br>
<br>
set num_ftps 1<br>
set web_rate 0<br>
set revftp 0<br>
set num_cbrs 0<br>
#rate and packetSize set in build_cbr<br>
set bottleneck 3Mb<br>
#for a 10MB ftp<br>
set filesize 10000000<br>
set dynamic_bw 0<br>
set greedy 0<br>
<br>
# Parse command line<br>
<br>
if {$argc >= 1} {<br>
set num_ftps [lindex $argv 0]<br>
if {$argc >= 2} {<br>
set web_rate [lindex $argv 1]<br>
if {$argc >= 3} {<br>
set num_cbrs [lindex $argv 2]<br>
if {$argc >= 4} {<br>
set bottleneck [lindex $argv 3]<br>
if {$argc >= 5} {<br>
set filesize [lindex $argv 4]<br>
if {$argc >= 6} {<br>
set dynamic_bw [lindex $argv 5]<br>
if {$argc >= 7} {<br>
set revftp [lindex $argv 6]<br>
}<br>
}<br>
}<br>
}<br>
}<br>
}<br>
}<br>
<br>
set bw [bw_parse $bottleneck]<br>
if { $revftp >= 1} {<br>
set num_revs $revftp<br>
} else {<br>
set num_revs 0<br>
}<br>
puts "ftps $num_ftps webrate $web_rate cbrs $num_cbrs bw $bw filesize<br>
$filesize reverse $num_revs"<br>
<br>
# experiment settings<br>
set psize 1500<br>
if { $bw < 1000000} { set psize 500 }<br>
set nominal_rtt [delay_parse 100ms]<br>
set accessdly 20<br>
set bdelay 10<br>
set realrtt [expr 2*(2*$accessdly + $bdelay)]<br>
puts "accessdly $accessdly bneckdly $bdelay realrtt $realrtt bneckbw $bw"<br>
<br>
# CoDel values<br>
# interval to keep min over<br>
set interval [delay_parse 100ms]<br>
# target in ms.<br>
set target [delay_parse 5ms]<br>
<br>
global defaultRNG<br>
$defaultRNG seed 0<br>
ns-random 0<br>
#$defaultRNG seed 54321<br>
#ns-random 23145<br>
<br>
# ------- config info is all above this line ----------<br>
<br>
#bdp in packets, based on the nominal rtt<br>
set bdp [expr round($bw*$nominal_rtt/(8*$psize))]<br>
<br>
Trace set show_tcphdr_ 1<br>
set startTime 0.0<br>
<br>
#TCP parameters - have to set both for FTPs and PackMime<br>
<br>
Agent/TCP set window_ [expr $bdp*16]<br>
Agent/TCP set segsize_ [expr $psize-40]<br>
Agent/TCP set packetSize_ [expr $psize-40]<br>
Agent/TCP set windowInit_ 4<br>
Agent/TCP set segsperack_ 1<br>
Agent/TCP set timestamps_ true<br>
set delack 0.4<br>
Agent/TCP set interval_ $delack<br>
<br>
Agent/TCP/FullTcp set window_ [expr $bdp*16]<br>
Agent/TCP/FullTcp set segsize_ [expr $psize-40]<br>
Agent/TCP/FullTcp set packetSize_ [expr $psize-40]<br>
Agent/TCP/FullTcp set windowInit_ 4<br>
Agent/TCP/FullTcp set segsperack_ 1<br>
Agent/TCP/FullTcp set timestamps_ true<br>
Agent/TCP/FullTcp set interval_ $delack<br>
<br>
<br>
Agent/TCP/Linux instproc done {} {<br>
global ns filesize<br>
#this doesn't seem to work, had to hack tcp-linux.cc to do repeat ftps<br>
$self set closed_ 0<br>
#needs to be delayed by at least .3sec to slow start<br>
puts "[$ns now] TCP/Linux proc done called"<br>
$ns at [expr [$ns now] + 0.3] "$self send $filesize"<br>
}<br>
<br>
# problem is that idle() in tcp.cc never seems to get called...<br>
Application/FTP instproc resume {} {<br>
puts "called resume"<br>
global filesize<br>
$self send $filesize<br>
# $ns at [expr [$ns now] + 0.5] "[$self agent] reset"<br>
$ns at [expr [$ns now] + 0.5] "[$self agent] send $filesize"<br>
}<br>
<br>
Application/FTP instproc fire {} {<br>
global filesize<br>
$self instvar maxpkts_<br>
set maxpkts_ $filesize<br>
[$self agent] set maxpkts_ $filesize<br>
$self send $maxpkts_<br>
puts "fire() FTP"<br>
}<br>
<br>
#buffersizes<br>
set buffersize [expr $bdp]<br>
set buffersize1 [expr $bdp*10]<br>
<br>
Queue/CoDel set target_ $target<br>
Queue/CoDel set interval_ $interval<br>
<br>
#set Flow_id 1<br>
<br>
proc build_topology { ns } {<br>
# nodes n0 and n1 are the server and client side gateways and<br>
# the link between them is the congested slow link. n0 -> n1<br>
# handles all the server to client traffic.<br>
#<br>
# if the web_rate is non-zero, node n2 will be the packmime server cloud<br>
# and node n3 will be the client cloud.<br>
#<br>
# num_ftps server nodes and client nodes are created for the ftp<br>
sessions.<br>
# the first client node is n{2+w} and the first server node is n{2+f+w}<br>
# where 'f' is num_ftps and 'w' is 1 if web_rate>0 and 0 otherwise.<br>
# servers will be even numbered nodes, clients odd<br>
# Warning: the numbering here is ridiculously complicated<br>
<br>
global bw bdelay accessdly buffersize buffersize1 filesize node_cnt<br>
set node_cnt 2<br>
<br>
# congested link<br>
global n0 n1<br>
set n0 [$ns node]<br>
set n1 [$ns node]<br>
$ns duplex-link $n0 $n1 $bw ${bdelay}ms CoDel<br>
$ns duplex-link-op $n0 $n1 orient right<br>
$ns duplex-link-op $n0 $n1 queuePos 0.5<br>
$ns duplex-link-op $n1 $n0 queuePos 1.5<br>
$ns queue-limit $n0 $n1 $buffersize<br>
$ns queue-limit $n1 $n0 $buffersize<br>
set node_cnt 2<br>
<br>
#dynamic bandwidth<br>
# these are the multipliers for changing bw, times initial set bw<br>
# edit these values to get different patterns<br>
global stopTime dynamic_bw<br>
array names bw_changes<br>
set bw_changes(1) 0.1<br>
set bw_changes(2) 0.01<br>
set bw_changes(3) 0.5<br>
set bw_changes(4) 0.01<br>
set bw_changes(5) 1.0<br>
<br>
puts "bottleneck starts at [[[$ns link $n0 $n1] link] set<br>
bandwidth_]bps"<br>
for {set k 1} {$k <= $dynamic_bw} {incr k 1} {<br>
set changeTime [expr $k*$stopTime/($dynamic_bw+1)]<br>
set f $bw_changes($k)<br>
set newBW [expr $f*$bw]<br>
puts "change at $changeTime to [expr $newBW/1000000.]Mbps"<br>
$ns at $changeTime "[[$ns link $n0 $n1] link] set bandwidth_ $newBW"<br>
$ns at $changeTime "[[$ns link $n1 $n0] link] set bandwidth_ $newBW"<br>
$ns at $changeTime "puts $newBW"<br>
}<br>
<br>
set li_10 [[$ns link $n1 $n0] queue]<br>
set li_01 [[$ns link $n0 $n1] queue]<br>
<br>
set tchan_ [open /tmp/<a href="http://redqvar.tr" target="_blank">redqvar.tr</a> w]<br>
$li_01 trace curq_<br>
$li_01 trace d_exp_<br>
$li_01 attach $tchan_<br>
<br>
global num_ftps web_rate num_cbrs greedy num_revs<br>
set linkbw [expr $bw*10]<br>
<br>
set w [expr $web_rate > 0]<br>
if {$w} {<br>
global n2 n3<br>
#server<br>
set n2 [$ns node]<br>
$ns duplex-link $n2 $n0 $linkbw ${accessdly}ms DropTail<br>
$ns queue-limit $n2 $n0 $buffersize1<br>
$ns queue-limit $n0 $n2 $buffersize1<br>
<br>
#client<br>
set n3 [$ns node]<br>
$ns duplex-link $n1 $n3 $linkbw ${accessdly}ms DropTail<br>
$ns queue-limit $n1 $n3 $buffersize1<br>
$ns queue-limit $n3 $n1 $buffersize1<br>
set node_cnt 4<br>
}<br>
#need to fix the angles if use nam<br>
for {set k 0} {$k < $num_ftps} {incr k 1} {<br>
# servers<br>
set j $node_cnt<br>
global n$j<br>
set n$j [$ns node]<br>
if {$greedy > 0 && $k == 0} {<br>
$ns duplex-link [set n$j] $n0 $linkbw 1ms DropTail<br>
} else {<br>
$ns duplex-link [set n$j] $n0 $linkbw ${accessdly}ms DropTail<br>
}<br>
$ns queue-limit [set n$j] $n0 $buffersize1<br>
$ns queue-limit $n0 [set n$j] $buffersize1<br>
set angle [expr $num_ftps>1? 0.75+($k-1)*.5/($num_ftps-1) : 1]<br>
$ns duplex-link-op $n0 [set n$j] orient $angle<br>
incr node_cnt<br>
<br>
# clients<br>
set j $node_cnt<br>
global n$j<br>
set n$j [$ns node]<br>
set dly [expr ${accessdly} +($k+1)]<br>
$ns duplex-link $n1 [set n$j] $linkbw ${dly}ms DropTail<br>
$ns queue-limit $n1 [set n$j] $buffersize1<br>
$ns queue-limit [set n$j] $n1 $buffersize1<br>
set angle [expr $num_ftps>1? fmod(2.25-($k-1)*.5/($num_ftps-1), 2)<br>
: 0]<br>
$ns duplex-link-op $n1 [set n$j] orient $angle<br>
incr node_cnt<br>
}<br>
for {set k 0} {$k < $num_cbrs} {incr k 1} {<br>
# servers<br>
set j $node_cnt<br>
global n$j<br>
set n$j [$ns node]<br>
$ns duplex-link [set n$j] $n0 $linkbw ${accessdly}ms DropTail<br>
$ns queue-limit [set n$j] $n0 $buffersize1<br>
$ns queue-limit $n0 [set n$j] $buffersize1<br>
# set angle [expr $num_cbrs>1? 0.75+($k-1)*.5/($num_cbrs-1) : 1]<br>
$ns duplex-link-op $n0 [set n$j] orient $angle<br>
incr node_cnt<br>
<br>
# clients<br>
set j $node_cnt<br>
global n$j<br>
set n$j [$ns node]<br>
$ns duplex-link $n1 [set n$j] $linkbw ${accessdly}ms DropTail<br>
$ns queue-limit $n1 [set n$j] $buffersize1<br>
$ns queue-limit [set n$j] $n1 $buffersize1<br>
# set angle [expr $num_cbrs>1? fmod(2.25-($k-1)*.5/($num_ftps-1), 2)<br>
: 0]<br>
$ns duplex-link-op $n1 [set n$j] orient $angle<br>
incr node_cnt<br>
}<br>
#reverse direction ftps<br>
for {set k 0} {$k < $num_revs} {incr k 1} {<br>
# clients<br>
set j $node_cnt<br>
global n$j<br>
set n$j [$ns node]<br>
$ns duplex-link [set n$j] $n0 $linkbw ${accessdly}ms DropTail<br>
$ns queue-limit [set n$j] $n0 $buffersize1<br>
$ns queue-limit $n0 [set n$j] $buffersize1<br>
set angle [expr $num_ftps>1? 0.75+($k-1)*.5/($num_ftps-1) : 1]<br>
$ns duplex-link-op $n0 [set n$j] orient $angle<br>
incr node_cnt<br>
<br>
# servers<br>
set j $node_cnt<br>
global n$j<br>
set n$j [$ns node]<br>
set dly [expr ($accessdly)*1.1 +($k+1)]<br>
$ns duplex-link $n1 [set n$j] $linkbw ${dly}ms DropTail<br>
$ns queue-limit $n1 [set n$j] $buffersize1<br>
$ns queue-limit [set n$j] $n1 $buffersize1<br>
set angle [expr $num_ftps>1? fmod(2.25-($k-1)*.5/($num_ftps-1), 2)<br>
: 0]<br>
$ns duplex-link-op $n1 [set n$j] orient $angle<br>
incr node_cnt<br>
}<br>
}<br>
<br>
proc build_cbr {cnd snd startTime timeToStop Flow_id} {<br>
global ns<br>
set udp [$ns create-connection UDP $snd LossMonitor $cnd $Flow_id]<br>
set cbr [new Application/Traffic/CBR]<br>
$cbr attach-agent $udp<br>
# change these for different types of CBRs<br>
$cbr set packetSize_ 100<br>
$cbr set rate_ 0.064Mb<br>
$ns at $startTime "$cbr start"<br>
$ns at $timeToStop "$cbr stop"<br>
}<br>
<br>
# cnd is client node, snd is server node<br>
proc build_ftpclient {cnd snd startTime timeToStop Flow_id} {<br>
<br>
global ns filesize greedy revftp<br>
set ctcp [$ns create-connection TCP/Linux $snd TCPSink/Sack1 $cnd<br>
$Flow_id]<br>
$ctcp select_ca cubic<br>
set ftp [$ctcp attach-app FTP]<br>
$ftp set enableResume_ true<br>
$ftp set type_ FTP<br>
<br>
#set up a single infinite ftp with smallest RTT<br>
if {$greedy > 0 || $filesize < 0} {<br>
$ns at $startTime "$ftp start"<br>
set greedy 0<br>
} else {<br>
$ns at $startTime "$ftp send $filesize"<br>
}<br>
$ns at $timeToStop "$ftp stop"<br>
}<br>
<br>
proc build_webs {cnd snd rate startTime timeToStop} {<br>
set CLIENT 0<br>
set SERVER 1<br>
<br>
# SETUP PACKMIME<br>
set pm [new PackMimeHTTP]<br>
$pm set-TCP Sack<br>
$pm set-client $cnd<br>
$pm set-server $snd<br>
$pm set-rate $rate; # new connections per second<br>
$pm set-http-1.1; # use HTTP/1.1<br>
<br>
# create RandomVariables<br>
set flow_arrive [new RandomVariable/PackMimeHTTPFlowArrive $rate]<br>
set req_size [new RandomVariable/PackMimeHTTPFileSize $rate $CLIENT]<br>
set rsp_size [new RandomVariable/PackMimeHTTPFileSize $rate $SERVER]<br>
<br>
# assign RNGs to RandomVariables<br>
$flow_arrive use-rng [new RNG]<br>
$req_size use-rng [new RNG]<br>
$rsp_size use-rng [new RNG]<br>
<br>
# set PackMime variables<br>
$pm set-flow_arrive $flow_arrive<br>
$pm set-req_size $req_size<br>
$pm set-rsp_size $rsp_size<br>
<br>
global ns<br>
$ns at $startTime "$pm start"<br>
$ns at $timeToStop "$pm stop"<br>
}<br>
<br>
proc uniform {a b} {<br>
expr $a + (($b- $a) * ([ns-random]*1.0/0x7fffffff))<br>
}<br>
<br>
proc finish {} {<br>
global ns<br>
$ns halt<br>
$ns flush-trace<br>
exit 0<br>
}<br>
<br>
# $ns namtrace-all [open out.nam w]<br>
# $ns color 2 blue<br>
# $ns color 3 red<br>
# $ns color 4 yellow<br>
# $ns color 5 green<br>
<br>
build_topology $ns<br>
<br>
#$ns trace-queue $n0 $n1 [open <a href="http://out_n0ton1.tr" target="_blank">out_n0ton1.tr</a> w]<br>
#set fname f${num_ftps}w${web_rate}b${bottleneck}.tr<br>
set fname <a href="http://f.tr" target="_blank">f.tr</a><br>
puts $fname<br>
$ns trace-queue $n0 $n1 [open /tmp/$fname w]<br>
#reverse direction<br>
#$ns trace-queue $n1 $n0 [open /tmp/$fname w]<br>
<br>
set node_cnt 2<br>
if {$web_rate > 0} {<br>
build_webs $n3 $n2 $web_rate 0 $stopTime<br>
set node_cnt 4<br>
}<br>
<br>
for {set k 1} {$k <= $num_ftps} {incr k 1} {<br>
set j $node_cnt<br>
incr node_cnt<br>
set i $node_cnt<br>
build_ftpclient [set n$i] [set n$j] \<br>
$startTime $stopTime $i<br>
# [expr 1.0*($k-1)] $stopTime $i<br>
# [expr $startTime+($k-1)*[uniform 0.0 2.0]] $stopTime $i<br>
incr node_cnt<br>
}<br>
<br>
for {set k 1} {$k <= $num_cbrs} {incr k 1} {<br>
set j $node_cnt<br>
incr node_cnt<br>
set i $node_cnt<br>
build_cbr [set n$i] [set n$j] \<br>
[expr $startTime+($k-1)*[uniform 0.0 2.0]] $stopTime $i<br>
incr node_cnt<br>
}<br>
<br>
#for reverse direction, give client smaller number<br>
for {set k 1} {$k <= $num_revs} {incr k 1} {<br>
set j $node_cnt<br>
incr node_cnt<br>
set i $node_cnt<br>
build_ftpclient [set n$j] [set n$i] $startTime $stopTime $j<br>
incr node_cnt<br>
}<br>
<br>
$ns at [expr $stopTime ] "finish"<br>
$ns run<br>
exit 0<br>
###################################################################<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.bufferbloat.net/pipermail/codel/attachments/20150219/e21c3125/attachment.html" target="_blank">https://lists.bufferbloat.net/pipermail/codel/attachments/20150219/e21c3125/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Codel mailing list<br>
<a href="mailto:Codel@lists.bufferbloat.net">Codel@lists.bufferbloat.net</a><br>
<a href="https://lists.bufferbloat.net/listinfo/codel" target="_blank">https://lists.bufferbloat.net/listinfo/codel</a><br>
<br>
<br>
End of Codel Digest, Vol 29, Issue 1<br>
************************************<br>
</blockquote></div><br></div></div></div>