From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ie0-x236.google.com (mail-ie0-x236.google.com [IPv6:2607:f8b0:4001:c03::236]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 44EB221F318 for ; Sun, 22 Feb 2015 22:02:44 -0800 (PST) Received: by iecat20 with SMTP id at20so20931944iec.12 for ; Sun, 22 Feb 2015 22:02:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=vgex5y131cY6SOFSuZRGDAa8eIWtonPYwQT48wu/OPk=; b=022ewgOh48DyCf0mC42Jrpx6+33urpl2SakkMI/Z4LVM7UvOzWjlEt7Z6xN+USabi/ vKdgGjWZp3lU7M7tNUC143pNIfE2lDc1mYUPbaDgF4lsYAuxq/dC80jN1Wb8RlqFx7gB QWqt+73bVTWa79VmIUQKZOP4yOOw0210ZrNhmsOA6woY1McKFr9Vnvxra77YW7PIYRWJ Ch3r1vt2bGXIY33qcUOQaZAK1RE4tStf4JLft53bWlxYFQat3phJQwti9NSJ6GfiQ3Q/ AQf0kUO/jXo+tNroNBtVDg2CVKqnKJvQurXfXstj4BreefcSEhTqfKEJK2SP6w0NmnlZ l3pg== MIME-Version: 1.0 X-Received: by 10.51.16.1 with SMTP id fs1mr10840428igd.8.1424671363870; Sun, 22 Feb 2015 22:02:43 -0800 (PST) Received: by 10.36.44.10 with HTTP; Sun, 22 Feb 2015 22:02:43 -0800 (PST) In-Reply-To: References: Date: Mon, 23 Feb 2015 11:32:43 +0530 Message-ID: From: kanu monga To: codel@lists.bufferbloat.net Content-Type: multipart/alternative; boundary=001a1135e68c90c64c050fbb26eb Subject: Re: [Codel] Codel Digest, Vol 29, Issue 6 X-BeenThere: codel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: CoDel AQM discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2015 06:03:13 -0000 --001a1135e68c90c64c050fbb26eb Content-Type: text/plain; charset=UTF-8 Thanks a lot @Kathleen Nichols for showing me the path. Best Regards On Mon, Feb 23, 2015 at 2:56 AM, wrote: > Send Codel mailing list submissions to > codel@lists.bufferbloat.net > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.bufferbloat.net/listinfo/codel > or, via email, send a message with subject or body 'help' to > codel-request@lists.bufferbloat.net > > You can reach the person managing the list at > codel-owner@lists.bufferbloat.net > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Codel digest..." > > > Today's Topics: > > 1. Re: Codel Digest, Vol 29, Issue 4 (Kathleen Nichols) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 22 Feb 2015 13:25:52 -0800 > From: Kathleen Nichols > To: codel@lists.bufferbloat.net > Subject: Re: [Codel] Codel Digest, Vol 29, Issue 4 > Message-ID: <54EA4960.8030709@pollere.com> > Content-Type: text/plain; charset=windows-1252 > > > I used TCP/Linux because it was closer to what is out there in a lot of > boxes > that people use and I think there may have been some ns-2 reason also but > I'm thankfully not using simulators currently, spending more time with > traces > and lab stuff. You can and should use anything you want. > > Reverse ftps are used to create a flow of acks in the the monitored > direction. This > can make a huge difference in what you observe. I believe the first work > on this might > be something Lixia Zhang published as a grad student and I also found > this in early > simulation work I did. You could read about it and you can also do > different experiments > yourself to see how results differ. You might also read > http://queue.acm.org/detail.cfm?id=2209336 and some of the references > cited. > > On 2/22/15 6:35 AM, kanu monga wrote: > > Thank you so much for replying. i really appreciate it. > > i have two more questions: > > (1) what is the concept of using TCP/Linux with codel. can't we use > > other TCP Variants > > (2) N what is purpose of using reverse ftps > > > > > > On Fri, Feb 20, 2015 at 11:32 PM, > > wrote: > > > > Send Codel mailing list submissions to > > codel@lists.bufferbloat.net codel@lists.bufferbloat.net> > > > > To subscribe or unsubscribe via the World Wide Web, visit > > https://lists.bufferbloat.net/listinfo/codel > > or, via email, send a message with subject or body 'help' to > > codel-request@lists.bufferbloat.net > > > > > > You can reach the person managing the list at > > codel-owner@lists.bufferbloat.net > > > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of Codel digest..." > > > > > > Today's Topics: > > > > 1. Re: Codel code (Kathleen Nichols) > > 2. Re: Codel code (Dave Taht) > > 3. Setpoint in CoDel (Anjali Chawla) > > 4. Re: Setpoint in CoDel (Dave Taht) > > 5. Re: Setpoint in CoDel (Dave Taht) > > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Thu, 19 Feb 2015 13:34:14 -0800 > > From: Kathleen Nichols > > > > To: codel@lists.bufferbloat.net > > Subject: Re: [Codel] Codel code > > Message-ID: <54E656D6.5010308@pollere.com > > > > > Content-Type: text/plain; charset=windows-1252 > > > > > > I'll reply list in case anyone else is interested. Just delete if you > > are fortunate enough to > > have nothing to do with ns-2. > > > > First of all, I'm as much a victim of ns-2's tcl as the next person > and > > secondly, I will > > tell you what I remember without looking at the c++ code, but would > > recommend > > you take a look at that for some of the settings. > > > > The first commented line just shows how you can set stuff on the > command > > line and what > > the different variables are. This particular script is using > PackMime to > > generate web > > traffic though there is also an update of a web script I wrote many > > years ago and > > CableLabs paid me to update. I also used that for some codel tests. > So > > this can run > > a mix of f ftp connections, w web connections per sec, c constant bit > > rate connections > > through a bottleneck of b Mbps. Use s to set the file size that the > ftps > > transfer and if > > set to -1 the ftps are infinite, that is don't terminate over the > > simulation run. This avoids > > lots of slow starts. d is something I used to get the dynamic > bandwidth > > thing to work, > > that is it makes the bottleneck link change periodically (you can see > > the plot of this > > in the ACM CoDel paper). Reverse ftps are sourced at the opposite > end of > > the bottleneck > > so they create acks in the "forward" direction. > > > > There is a routine called build_cbr and that's where the rate and > packet > > size for the CBRs is set. This sets dynamic bw to 0 so the bandwidth > > doesn't change unless set in the command line to do so. I don't > remember > > off hand what greedy is. I think it sets one > > ftp to be "greedy". > > > > A bunch of this you should try to figure out for yourself by looking > at > > ns2 documentation > > and perhaps at the agent .cc files. > > > > The nominal RTT is what is "expected" and is used as the interval but > > the real rtt is what > > is actually experienced in the particular experiment. I will use this > > opportunity once again > > to note that CoDel is actually more sensitive to this parameter than > to > > target in the sense > > that excess drops will happen if the real rtt is longer than the > > interval (I keep trying to > > explain this but no one hears it.) > > > > Code to set the random seed. Sometimes you want different runs to use > > different random > > seeds and sometimes you want to run exactly the same scenario. > > > > There's a bunch of parameters to the TCP agents. Some of these are in > > ns2 documentation, > > but you can find it in the code also. > > > > Just a note that I couldn't get the ns2 TCP/Linux code to work the > way > > it was supposed to, > > specifically the idle() routine never seemed to get called. (This > sort > > of thing is pretty > > common with ns2) and I didn't want to waste a lot of time untangling > the > > tcl-c++ > > relationship in ns2. Anyway, so I wrote those tcl procedures to get > the > > ftps to restart. > > I wanted to run more modern TCPs, hence use of the Linux TCP. > > > > The dynamic bandwidth thing changes the bandwidth and preset times. > It > > does it by multiplying the original bandwidth so I set up an array of > > the mulipliers. I'm sure there's > > a more elegant way to do it but, at this stage of my life, I have > > accepted that I don't do > > elegant. I'm more of a "get the job done" kind of coder. And I really > > don't like ns2 so I > > generally find it works better to just whack it with a hammer rather > > than to try to do > > something beautifully. Note, as above, that a lot of the stuff in ns2 > > just doesn't work. > > > > There is code to build up the topology which shouldn't be that hard > to > > figure out. > > > > Kathie > > > > On 2/18/15 11:19 PM, kanu monga wrote: > > > is there anyone who can help me in understanding tcl code of > > codel(given > > > below) > > > This one is quite complex for me. > > > please help if you can. > > > Thanks in advance. > > > > > > ################################################################### > > > > > > > > > # ns codel.tcl f w c {b}Mb s d r > > > # where: > > > #f = # ftps > > > #w = # PackMime connections per second > > > #c = # CBRs > > > #b = bottleneck bandwidth in Mbps > > > #s = filesize for ftp, -1 for infinite > > > #d = dynamic bandwidth, if non-zero, changes (kind of kludgey) > > > #have to set the specific change ratios in this file (below) > > > #r = number of "reverse" ftps > > > > > > set stopTime 300 > > > set ns [new Simulator] > > > > > > # These are defaults if values not set on command line > > > > > > set num_ftps 1 > > > set web_rate 0 > > > set revftp 0 > > > set num_cbrs 0 > > > #rate and packetSize set in build_cbr > > > set bottleneck 3Mb > > > #for a 10MB ftp > > > set filesize 10000000 > > > set dynamic_bw 0 > > > set greedy 0 > > > > > > # Parse command line > > > > > > if {$argc >= 1} { > > > set num_ftps [lindex $argv 0] > > > if {$argc >= 2} { > > > set web_rate [lindex $argv 1] > > > if {$argc >= 3} { > > > set num_cbrs [lindex $argv 2] > > > if {$argc >= 4} { > > > set bottleneck [lindex $argv 3] > > > if {$argc >= 5} { > > > set filesize [lindex $argv 4] > > > if {$argc >= 6} { > > > set dynamic_bw [lindex $argv 5] > > > if {$argc >= 7} { > > > set revftp [lindex $argv 6] > > > } > > > } > > > } > > > } > > > } > > > } > > > } > > > > > > set bw [bw_parse $bottleneck] > > > if { $revftp >= 1} { > > > set num_revs $revftp > > > } else { > > > set num_revs 0 > > > } > > > puts "ftps $num_ftps webrate $web_rate cbrs $num_cbrs bw $bw > filesize > > > $filesize reverse $num_revs" > > > > > > # experiment settings > > > set psize 1500 > > > if { $bw < 1000000} { set psize 500 } > > > set nominal_rtt [delay_parse 100ms] > > > set accessdly 20 > > > set bdelay 10 > > > set realrtt [expr 2*(2*$accessdly + $bdelay)] > > > puts "accessdly $accessdly bneckdly $bdelay realrtt $realrtt > > bneckbw $bw" > > > > > > # CoDel values > > > # interval to keep min over > > > set interval [delay_parse 100ms] > > > # target in ms. > > > set target [delay_parse 5ms] > > > > > > global defaultRNG > > > $defaultRNG seed 0 > > > ns-random 0 > > > #$defaultRNG seed 54321 > > > #ns-random 23145 > > > > > > # ------- config info is all above this line ---------- > > > > > > #bdp in packets, based on the nominal rtt > > > set bdp [expr round($bw*$nominal_rtt/(8*$psize))] > > > > > > Trace set show_tcphdr_ 1 > > > set startTime 0.0 > > > > > > #TCP parameters - have to set both for FTPs and PackMime > > > > > > Agent/TCP set window_ [expr $bdp*16] > > > Agent/TCP set segsize_ [expr $psize-40] > > > Agent/TCP set packetSize_ [expr $psize-40] > > > Agent/TCP set windowInit_ 4 > > > Agent/TCP set segsperack_ 1 > > > Agent/TCP set timestamps_ true > > > set delack 0.4 > > > Agent/TCP set interval_ $delack > > > > > > Agent/TCP/FullTcp set window_ [expr $bdp*16] > > > Agent/TCP/FullTcp set segsize_ [expr $psize-40] > > > Agent/TCP/FullTcp set packetSize_ [expr $psize-40] > > > Agent/TCP/FullTcp set windowInit_ 4 > > > Agent/TCP/FullTcp set segsperack_ 1 > > > Agent/TCP/FullTcp set timestamps_ true > > > Agent/TCP/FullTcp set interval_ $delack > > > > > > > > > Agent/TCP/Linux instproc done {} { > > > global ns filesize > > > #this doesn't seem to work, had to hack tcp-linux.cc to do repeat > ftps > > > $self set closed_ 0 > > > #needs to be delayed by at least .3sec to slow start > > > puts "[$ns now] TCP/Linux proc done called" > > > $ns at [expr [$ns now] + 0.3] "$self send $filesize" > > > } > > > > > > # problem is that idle() in tcp.cc never seems to get called... > > > Application/FTP instproc resume {} { > > > puts "called resume" > > > global filesize > > > $self send $filesize > > > #$ns at [expr [$ns now] + 0.5] "[$self agent] reset" > > > $ns at [expr [$ns now] + 0.5] "[$self agent] send $filesize" > > > } > > > > > > Application/FTP instproc fire {} { > > > global filesize > > > $self instvar maxpkts_ > > > set maxpkts_ $filesize > > > [$self agent] set maxpkts_ $filesize > > > $self send $maxpkts_ > > > puts "fire() FTP" > > > } > > > > > > #buffersizes > > > set buffersize [expr $bdp] > > > set buffersize1 [expr $bdp*10] > > > > > > Queue/CoDel set target_ $target > > > Queue/CoDel set interval_ $interval > > > > > > #set Flow_id 1 > > > > > > proc build_topology { ns } { > > > # nodes n0 and n1 are the server and client side gateways and > > > # the link between them is the congested slow link. n0 -> n1 > > > # handles all the server to client traffic. > > > # > > > # if the web_rate is non-zero, node n2 will be the packmime > > server cloud > > > # and node n3 will be the client cloud. > > > # > > > # num_ftps server nodes and client nodes are created for the > ftp > > > sessions. > > > # the first client node is n{2+w} and the first server node is > > n{2+f+w} > > > # where 'f' is num_ftps and 'w' is 1 if web_rate>0 and 0 > > otherwise. > > > # servers will be even numbered nodes, clients odd > > > # Warning: the numbering here is ridiculously complicated > > > > > > global bw bdelay accessdly buffersize buffersize1 filesize > > node_cnt > > > set node_cnt 2 > > > > > > # congested link > > > global n0 n1 > > > set n0 [$ns node] > > > set n1 [$ns node] > > > $ns duplex-link $n0 $n1 $bw ${bdelay}ms CoDel > > > $ns duplex-link-op $n0 $n1 orient right > > > $ns duplex-link-op $n0 $n1 queuePos 0.5 > > > $ns duplex-link-op $n1 $n0 queuePos 1.5 > > > $ns queue-limit $n0 $n1 $buffersize > > > $ns queue-limit $n1 $n0 $buffersize > > > set node_cnt 2 > > > > > > #dynamic bandwidth > > > # these are the multipliers for changing bw, times initial set > bw > > > # edit these values to get different patterns > > > global stopTime dynamic_bw > > > array names bw_changes > > > set bw_changes(1) 0.1 > > > set bw_changes(2) 0.01 > > > set bw_changes(3) 0.5 > > > set bw_changes(4) 0.01 > > > set bw_changes(5) 1.0 > > > > > > puts "bottleneck starts at [[[$ns link $n0 $n1] link] set > > > bandwidth_]bps" > > > for {set k 1} {$k <= $dynamic_bw} {incr k 1} { > > > set changeTime [expr $k*$stopTime/($dynamic_bw+1)] > > > set f $bw_changes($k) > > > set newBW [expr $f*$bw] > > > puts "change at $changeTime to [expr $newBW/1000000.]Mbps" > > > $ns at $changeTime "[[$ns link $n0 $n1] link] set bandwidth_ > $newBW" > > > $ns at $changeTime "[[$ns link $n1 $n0] link] set bandwidth_ > $newBW" > > > $ns at $changeTime "puts $newBW" > > > } > > > > > > set li_10 [[$ns link $n1 $n0] queue] > > > set li_01 [[$ns link $n0 $n1] queue] > > > > > > set tchan_ [open /tmp/redqvar.tr > > w] > > > $li_01 trace curq_ > > > $li_01 trace d_exp_ > > > $li_01 attach $tchan_ > > > > > > global num_ftps web_rate num_cbrs greedy num_revs > > > set linkbw [expr $bw*10] > > > > > > set w [expr $web_rate > 0] > > > if {$w} { > > > global n2 n3 > > > #server > > > set n2 [$ns node] > > > $ns duplex-link $n2 $n0 $linkbw ${accessdly}ms DropTail > > > $ns queue-limit $n2 $n0 $buffersize1 > > > $ns queue-limit $n0 $n2 $buffersize1 > > > > > > #client > > > set n3 [$ns node] > > > $ns duplex-link $n1 $n3 $linkbw ${accessdly}ms DropTail > > > $ns queue-limit $n1 $n3 $buffersize1 > > > $ns queue-limit $n3 $n1 $buffersize1 > > > set node_cnt 4 > > > } > > > #need to fix the angles if use nam > > > for {set k 0} {$k < $num_ftps} {incr k 1} { > > > # servers > > > set j $node_cnt > > > global n$j > > > set n$j [$ns node] > > > if {$greedy > 0 && $k == 0} { > > > $ns duplex-link [set n$j] $n0 $linkbw 1ms DropTail > > > } else { > > > $ns duplex-link [set n$j] $n0 $linkbw ${accessdly}ms > DropTail > > > } > > > $ns queue-limit [set n$j] $n0 $buffersize1 > > > $ns queue-limit $n0 [set n$j] $buffersize1 > > > set angle [expr $num_ftps>1? 0.75+($k-1)*.5/($num_ftps-1) > : 1] > > > $ns duplex-link-op $n0 [set n$j] orient $angle > > > incr node_cnt > > > > > > # clients > > > set j $node_cnt > > > global n$j > > > set n$j [$ns node] > > > set dly [expr ${accessdly} +($k+1)] > > > $ns duplex-link $n1 [set n$j] $linkbw ${dly}ms DropTail > > > $ns queue-limit $n1 [set n$j] $buffersize1 > > > $ns queue-limit [set n$j] $n1 $buffersize1 > > > set angle [expr $num_ftps>1? > > fmod(2.25-($k-1)*.5/($num_ftps-1), > > > 2) : 0] > > > $ns duplex-link-op $n1 [set n$j] orient $angle > > > incr node_cnt > > > } > > > for {set k 0} {$k < $num_cbrs} {incr k 1} { > > > # servers > > > set j $node_cnt > > > global n$j > > > set n$j [$ns node] > > > $ns duplex-link [set n$j] $n0 $linkbw ${accessdly}ms > DropTail > > > $ns queue-limit [set n$j] $n0 $buffersize1 > > > $ns queue-limit $n0 [set n$j] $buffersize1 > > > # set angle [expr $num_cbrs>1? 0.75+($k-1)*.5/($num_cbrs-1) > > : 1] > > > $ns duplex-link-op $n0 [set n$j] orient $angle > > > incr node_cnt > > > > > > # clients > > > set j $node_cnt > > > global n$j > > > set n$j [$ns node] > > > $ns duplex-link $n1 [set n$j] $linkbw ${accessdly}ms > > DropTail > > > $ns queue-limit $n1 [set n$j] $buffersize1 > > > $ns queue-limit [set n$j] $n1 $buffersize1 > > > # set angle [expr $num_cbrs>1? > > fmod(2.25-($k-1)*.5/($num_ftps-1), > > > 2) : 0] > > > $ns duplex-link-op $n1 [set n$j] orient $angle > > > incr node_cnt > > > } > > > #reverse direction ftps > > > for {set k 0} {$k < $num_revs} {incr k 1} { > > > # clients > > > set j $node_cnt > > > global n$j > > > set n$j [$ns node] > > > $ns duplex-link [set n$j] $n0 $linkbw ${accessdly}ms > DropTail > > > $ns queue-limit [set n$j] $n0 $buffersize1 > > > $ns queue-limit $n0 [set n$j] $buffersize1 > > > set angle [expr $num_ftps>1? 0.75+($k-1)*.5/($num_ftps-1) > : 1] > > > $ns duplex-link-op $n0 [set n$j] orient $angle > > > incr node_cnt > > > > > > # servers > > > set j $node_cnt > > > global n$j > > > set n$j [$ns node] > > > set dly [expr ($accessdly)*1.1 +($k+1)] > > > $ns duplex-link $n1 [set n$j] $linkbw ${dly}ms DropTail > > > $ns queue-limit $n1 [set n$j] $buffersize1 > > > $ns queue-limit [set n$j] $n1 $buffersize1 > > > set angle [expr $num_ftps>1? > > fmod(2.25-($k-1)*.5/($num_ftps-1), > > > 2) : 0] > > > $ns duplex-link-op $n1 [set n$j] orient $angle > > > incr node_cnt > > > } > > > } > > > > > > proc build_cbr {cnd snd startTime timeToStop Flow_id} { > > > global ns > > > set udp [$ns create-connection UDP $snd LossMonitor $cnd > $Flow_id] > > > set cbr [new Application/Traffic/CBR] > > > $cbr attach-agent $udp > > > # change these for different types of CBRs > > > $cbr set packetSize_ 100 > > > $cbr set rate_ 0.064Mb > > > $ns at $startTime "$cbr start" > > > $ns at $timeToStop "$cbr stop" > > > } > > > > > > # cnd is client node, snd is server node > > > proc build_ftpclient {cnd snd startTime timeToStop Flow_id} { > > > > > > global ns filesize greedy revftp > > > set ctcp [$ns create-connection TCP/Linux $snd TCPSink/Sack1 > $cnd > > > $Flow_id] > > > $ctcp select_ca cubic > > > set ftp [$ctcp attach-app FTP] > > > $ftp set enableResume_ true > > > $ftp set type_ FTP > > > > > > #set up a single infinite ftp with smallest RTT > > > if {$greedy > 0 || $filesize < 0} { > > > $ns at $startTime "$ftp start" > > > set greedy 0 > > > } else { > > > $ns at $startTime "$ftp send $filesize" > > > } > > > $ns at $timeToStop "$ftp stop" > > > } > > > > > > proc build_webs {cnd snd rate startTime timeToStop} { > > > set CLIENT 0 > > > set SERVER 1 > > > > > > # SETUP PACKMIME > > > set pm [new PackMimeHTTP] > > > $pm set-TCP Sack > > > $pm set-client $cnd > > > $pm set-server $snd > > > $pm set-rate $rate; # new connections per > > second > > > $pm set-http-1.1; # use HTTP/1.1 > > > > > > # create RandomVariables > > > set flow_arrive [new RandomVariable/PackMimeHTTPFlowArrive > $rate] > > > set req_size [new RandomVariable/PackMimeHTTPFileSize $rate > > $CLIENT] > > > set rsp_size [new RandomVariable/PackMimeHTTPFileSize $rate > > $SERVER] > > > > > > # assign RNGs to RandomVariables > > > $flow_arrive use-rng [new RNG] > > > $req_size use-rng [new RNG] > > > $rsp_size use-rng [new RNG] > > > > > > # set PackMime variables > > > $pm set-flow_arrive $flow_arrive > > > $pm set-req_size $req_size > > > $pm set-rsp_size $rsp_size > > > > > > global ns > > > $ns at $startTime "$pm start" > > > $ns at $timeToStop "$pm stop" > > > } > > > > > > proc uniform {a b} { > > > expr $a + (($b- $a) * ([ns-random]*1.0/0x7fffffff)) > > > } > > > > > > proc finish {} { > > > global ns > > > $ns halt > > > $ns flush-trace > > > exit 0 > > > } > > > > > > # $ns namtrace-all [open out.nam w] > > > # $ns color 2 blue > > > # $ns color 3 red > > > # $ns color 4 yellow > > > # $ns color 5 green > > > > > > build_topology $ns > > > > > > #$ns trace-queue $n0 $n1 [open out_n0ton1.tr > > w] > > > #set fname f${num_ftps}w${web_rate}b${bottleneck}.tr > > > set fname f.tr > > > puts $fname > > > $ns trace-queue $n0 $n1 [open /tmp/$fname w] > > > #reverse direction > > > #$ns trace-queue $n1 $n0 [open /tmp/$fname w] > > > > > > set node_cnt 2 > > > if {$web_rate > 0} { > > > build_webs $n3 $n2 $web_rate 0 $stopTime > > > set node_cnt 4 > > > } > > > > > > for {set k 1} {$k <= $num_ftps} {incr k 1} { > > > set j $node_cnt > > > incr node_cnt > > > set i $node_cnt > > > build_ftpclient [set n$i] [set n$j] \ > > > $startTime $stopTime $i > > > # [expr 1.0*($k-1)] $stopTime $i > > > # [expr $startTime+($k-1)*[uniform 0.0 2.0]] $stopTime $i > > > incr node_cnt > > > } > > > > > > for {set k 1} {$k <= $num_cbrs} {incr k 1} { > > > set j $node_cnt > > > incr node_cnt > > > set i $node_cnt > > > build_cbr [set n$i] [set n$j] \ > > > [expr $startTime+($k-1)*[uniform 0.0 2.0]] $stopTime $i > > > incr node_cnt > > > } > > > > > > #for reverse direction, give client smaller number > > > for {set k 1} {$k <= $num_revs} {incr k 1} { > > > set j $node_cnt > > > incr node_cnt > > > set i $node_cnt > > > build_ftpclient [set n$j] [set n$i] $startTime $stopTime $j > > > incr node_cnt > > > } > > > > > > $ns at [expr $stopTime ] "finish" > > > $ns run > > > exit 0 > > > ################################################################### > > > > > > > > > _______________________________________________ > > > Codel mailing list > > > Codel@lists.bufferbloat.net > > > https://lists.bufferbloat.net/listinfo/codel > > > > > > > > > > > ------------------------------ > > > > Message: 2 > > Date: Thu, 19 Feb 2015 13:38:53 -0800 > > From: Dave Taht > > > To: Kathleen Nichols nichols@pollere.com>> > > Cc: "codel@lists.bufferbloat.net > > " > > > > Subject: Re: [Codel] Codel code > > Message-ID: > > > > > > > > Content-Type: text/plain; charset=UTF-8 > > > > I am fairly happy with the example codel code that is now in the ns3 > > branch, > > which is pure c++, and quite a bit easier to understand than tcl, to > > my eye. > > > > https://www.nsnam.org/doxygen/codel-vs-droptail-asymmetric_8cc.html > > > > regrettably the fq_codel version for ns3 is still out of tree. > > > > > > ------------------------------ > > > > Message: 3 > > Date: Fri, 20 Feb 2015 00:46:11 -0800 > > From: Anjali Chawla > > > > To: codel@lists.bufferbloat.net > > Subject: [Codel] Setpoint in CoDel > > Message-ID: > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > Hi > > anyone please explain me what is concept behind setpoint in codel > > algorithm?? > > Thanks > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > > < > https://lists.bufferbloat.net/pipermail/codel/attachments/20150220/285d07dd/attachment-0001.html > > > > > > ------------------------------ > > > > Message: 4 > > Date: Fri, 20 Feb 2015 01:21:13 -0800 > > From: Dave Taht > > > To: Anjali Chawla > > > > Cc: "codel@lists.bufferbloat.net > > " > > > > Subject: Re: [Codel] Setpoint in CoDel > > Message-ID: > > > > > CAA93jw43TJdo9FK61HK0et3Mopq8-YKjjkNm_6_OF7%2Bg0iMipw@mail.gmail.com>> > > Content-Type: text/plain; charset=UTF-8 > > > > the best talk on the subject was van?s at ietf, it is well worth > > watching multiple times. > > > > http://www.bufferbloat.net/projects/cerowrt/wiki/Bloat-videos > > > > He goes deeply into the reasoning behind the sojourn time, and > setpoint. > > > > About the only other somewhat in-depth talk on how codel really works > > was my attempt at stanford. > > > > and there are of course other talks above that try to describe bits > of > > the elephant. > > > > One of these days I hope someone puts together the definitive talk on > > codel complete with even more elegant demos than stephen hemminger > > came up with..., but it does seem to be really hard for people to get > > at a deep level... most of my own talks are more about fq than > > fq_codel, and that is *tons* easier to explain. > > > > If you watch them all a bunch of times, and run a few experiments of > > your own, enlightenment will come. For me, it was seeing kathie give > > the first public explanation of codel - about midway through I > started > > vibrating in my seat - but I had just completed a slash and burn tour > > through all the aqm literature going back 30 years, and trying > > everything that seemed to make sense. I don?t know how to impart that > > in an email... > > > > > > On Fri, Feb 20, 2015 at 12:46 AM, Anjali Chawla > > > > wrote: > > > Hi > > > anyone please explain me what is concept behind setpoint in codel > > > algorithm?? > > > Thanks > > > > > > _______________________________________________ > > > Codel mailing list > > > Codel@lists.bufferbloat.net > > > https://lists.bufferbloat.net/listinfo/codel > > > > > > > > > > > -- > > Dave T?ht > > > > thttp://www.bufferbloat.net/projects/bloat/wiki/Upcoming_Talks > > > > > > > > ------------------------------ > > > > Message: 5 > > Date: Fri, 20 Feb 2015 10:01:54 -0800 > > From: Dave Taht > > > To: Anjali Chawla > > > > Cc: "codel@lists.bufferbloat.net > > " > > > > Subject: Re: [Codel] Setpoint in CoDel > > Message-ID: > > > > > > > > Content-Type: text/plain; charset=UTF-8 > > > > On Fri, Feb 20, 2015 at 1:21 AM, Dave Taht > > wrote: > > > the best talk on the subject was van?s at ietf, it is well worth > > > watching multiple times. > > > > > > http://www.bufferbloat.net/projects/cerowrt/wiki/Bloat-videos > > > > > > He goes deeply into the reasoning behind the sojourn time, and > > setpoint. > > > > > > About the only other somewhat in-depth talk on how codel really > works > > > was my attempt at stanford. > > > > The stanford talk took some digging to find. I would really like a > shot > > at a do-over one day - or for van to give his talk again to be > filmed at > > high quality. > > > > https://www.youtube.com/watch?v=Mxoa5Si4Ubw > > > > > > > > and there are of course other talks above that try to describe > bits of > > > the elephant. > > > > > > One of these days I hope someone puts together the definitive talk > on > > > codel complete with even more elegant demos than stephen hemminger > > > came up with..., but it does seem to be really hard for people to > get > > > at a deep level... most of my own talks are more about fq than > > > fq_codel, and that is *tons* easier to explain. > > > > > > If you watch them all a bunch of times, and run a few experiments > of > > > your own, enlightenment will come. For me, it was seeing kathie > give > > > the first public explanation of codel - about midway through I > started > > > vibrating in my seat - but I had just completed a slash and burn > tour > > > through all the aqm literature going back 30 years, and trying > > > everything that seemed to make sense. I don?t know how to impart > that > > > in an email... > > > > > > > > > On Fri, Feb 20, 2015 at 12:46 AM, Anjali Chawla > > > > > > wrote: > > >> Hi > > >> anyone please explain me what is concept behind setpoint in codel > > >> algorithm?? > > >> Thanks > > >> > > >> _______________________________________________ > > >> Codel mailing list > > >> Codel@lists.bufferbloat.net > > >> https://lists.bufferbloat.net/listinfo/codel > > >> > > > > > > > > > > > > -- > > > Dave T?ht > > > > > > thttp://www.bufferbloat.net/projects/bloat/wiki/Upcoming_Talks > > > > > > > > > > -- > > Dave T?ht > > > > thttp://www.bufferbloat.net/projects/bloat/wiki/Upcoming_Talks > > > > > > > > ------------------------------ > > > > _______________________________________________ > > Codel mailing list > > Codel@lists.bufferbloat.net > > https://lists.bufferbloat.net/listinfo/codel > > > > > > End of Codel Digest, Vol 29, Issue 4 > > ************************************ > > > > > > > > > > _______________________________________________ > > Codel mailing list > > Codel@lists.bufferbloat.net > > https://lists.bufferbloat.net/listinfo/codel > > > > > > ------------------------------ > > _______________________________________________ > Codel mailing list > Codel@lists.bufferbloat.net > https://lists.bufferbloat.net/listinfo/codel > > > End of Codel Digest, Vol 29, Issue 6 > ************************************ > --001a1135e68c90c64c050fbb26eb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks a lot @Kathleen Nichols for showing me the path.
Best Regards

On Mon, Feb 23, 2015 at 2:56 AM, <codel-request@lists.bufferbloat.net> wrote:<= br>
Send Codel mailing list submissions to =C2=A0 =C2=A0 =C2=A0 =C2=A0 = codel@lists.bufferbloat.net

To subscribe or unsubscribe via the World Wide Web, visit
=C2=A0 =C2=A0 =C2=A0 =C2=A0 https://lists.bufferbloat.net/listinfo/codel
or, via email, send a message with subject or body 'help' to
=C2=A0 =C2=A0 =C2=A0 =C2=A0
codel-request@lists.bufferbloat.net

You can reach the person managing the list at
=C2=A0 =C2=A0 =C2=A0 =C2=A0 codel-owner@lists.bufferbloat.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Codel digest..."


Today's Topics:

=C2=A0 =C2=A01. Re: Codel Digest, Vol 29, Issue 4 (Kathleen Nichols)


----------------------------------------------------------------------

Message: 1
Date: Sun, 22 Feb 2015 13:25:52 -0800
From: Kathleen Nichols <nichols@p= ollere.com>
To: codel@lists.bufferbloat.= net
Subject: Re: [Codel] Codel Digest, Vol 29, Issue 4
Message-ID: <54EA4960.80= 30709@pollere.com>
Content-Type: text/plain; charset=3Dwindows-1252


I used TCP/Linux because it was closer to what is out there in a lot of
boxes
that people use and I think there may have been some ns-2 reason also but I'm thankfully not using simulators currently, spending more time with<= br> traces
and lab stuff. You can and should use anything you want.

Reverse ftps are used to create a flow of acks in the the=C2=A0 monitored direction. This
can make a huge difference in what you observe. I believe the first work on this might
be something Lixia Zhang published as a grad student and I also found
this in early
simulation work I did. You could read about it and you can also do
different experiments
yourself to see how results differ. You might also read
= http://queue.acm.org/detail.cfm?id=3D2209336 and some of the references= cited.

On 2/22/15 6:35 AM, kanu monga wrote:
> Thank you so much for replying. i really appreciate it.
> i have two more questions:
> (1) what is the concept of using TCP/Linux with codel. can't we us= e
> other TCP Variants
> (2) N what is purpose of using reverse ftps
>
>
> On Fri, Feb 20, 2015 at 11:32 PM, <codel-request@lists.bufferbloat.net
> <mailto:code= l-request@lists.bufferbloat.net>> wrote:
>
>=C2=A0 =C2=A0 =C2=A0Send Codel mailing list submissions to
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0codel@lists.bufferbloat.net <mailto:codel@lists.bufferbloat.net>=
>
>=C2=A0 =C2=A0 =C2=A0To subscribe or unsubscribe via the World Wide Web,= visit
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0https://lists.bufferblo= at.net/listinfo/codel
>=C2=A0 =C2=A0 =C2=A0or, via email, send a message with subject or body = 'help' to
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0codel-request@lists.bufferbloat.net
>=C2=A0 =C2=A0 =C2=A0<mailto:codel-request@lists.bufferbloat.net>
>
>=C2=A0 =C2=A0 =C2=A0You can reach the person managing the list at
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0codel-owner@lists.bufferbloat.net
>=C2=A0 =C2=A0 =C2=A0<mailto:codel-owner@lists.bufferbloat.net>
>
>=C2=A0 =C2=A0 =C2=A0When replying, please edit your Subject line so it = is more specific
>=C2=A0 =C2=A0 =C2=A0than "Re: Contents of Codel digest..." >
>
>=C2=A0 =C2=A0 =C2=A0Today's Topics:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 1. Re: Codel code (Kathleen Nichols)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 2. Re: Codel code (Dave Taht)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 3. Setpoint in CoDel (Anjali Chawla)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 4. Re: Setpoint in CoDel (Dave Taht)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 5. Re: Setpoint in CoDel (Dave Taht)
>
>
>=C2=A0 =C2=A0 =C2=A0---------------------------------------------------= -------------------
>
>=C2=A0 =C2=A0 =C2=A0Message: 1
>=C2=A0 =C2=A0 =C2=A0Date: Thu, 19 Feb 2015 13:34:14 -0800
>=C2=A0 =C2=A0 =C2=A0From: Kathleen Nichols <nichols@pollere.com
>=C2=A0 =C2=A0 =C2=A0<mailto:n= ichols@pollere.com>>
>=C2=A0 =C2=A0 =C2=A0To: = codel@lists.bufferbloat.net <mailto:codel@lists.bufferbloat.net>
>=C2=A0 =C2=A0 =C2=A0Subject: Re: [Codel] Codel code
>=C2=A0 =C2=A0 =C2=A0Message-ID: <54E656D6.5010308@pollere.com
>=C2=A0 =C2=A0 =C2=A0<mailto:54E656D6.5010308@pollere.com>>
>=C2=A0 =C2=A0 =C2=A0Content-Type: text/plain; charset=3Dwindows-1252 >
>
>=C2=A0 =C2=A0 =C2=A0I'll reply list in case anyone else is interest= ed. Just delete if you
>=C2=A0 =C2=A0 =C2=A0are fortunate enough to
>=C2=A0 =C2=A0 =C2=A0have nothing to do with ns-2.
>
>=C2=A0 =C2=A0 =C2=A0First of all, I'm as much a victim of ns-2'= s tcl as the next person and
>=C2=A0 =C2=A0 =C2=A0secondly, I will
>=C2=A0 =C2=A0 =C2=A0tell you what I remember without looking at the c++= code, but would
>=C2=A0 =C2=A0 =C2=A0recommend
>=C2=A0 =C2=A0 =C2=A0you take a look at that for some of the settings. >
>=C2=A0 =C2=A0 =C2=A0The first commented line just shows how you can set= stuff on the command
>=C2=A0 =C2=A0 =C2=A0line and what
>=C2=A0 =C2=A0 =C2=A0the different variables are. This particular script= is using PackMime to
>=C2=A0 =C2=A0 =C2=A0generate web
>=C2=A0 =C2=A0 =C2=A0traffic though there is also an update of a web scr= ipt I wrote many
>=C2=A0 =C2=A0 =C2=A0years ago and
>=C2=A0 =C2=A0 =C2=A0CableLabs paid me to update. I also used that for s= ome codel tests. So
>=C2=A0 =C2=A0 =C2=A0this can run
>=C2=A0 =C2=A0 =C2=A0a mix of f ftp connections, w web connections per s= ec, c constant bit
>=C2=A0 =C2=A0 =C2=A0rate connections
>=C2=A0 =C2=A0 =C2=A0through a bottleneck of b Mbps. Use s to set the fi= le size that the ftps
>=C2=A0 =C2=A0 =C2=A0transfer and if
>=C2=A0 =C2=A0 =C2=A0set to -1 the ftps are infinite, that is don't = terminate over the
>=C2=A0 =C2=A0 =C2=A0simulation run. This avoids
>=C2=A0 =C2=A0 =C2=A0lots of slow starts. d is something I used to get t= he dynamic bandwidth
>=C2=A0 =C2=A0 =C2=A0thing to work,
>=C2=A0 =C2=A0 =C2=A0that is it makes the bottleneck link change periodi= cally (you can see
>=C2=A0 =C2=A0 =C2=A0the plot of this
>=C2=A0 =C2=A0 =C2=A0in the ACM CoDel paper). Reverse ftps are sourced a= t the opposite end of
>=C2=A0 =C2=A0 =C2=A0the bottleneck
>=C2=A0 =C2=A0 =C2=A0so they create acks in the "forward" dire= ction.
>
>=C2=A0 =C2=A0 =C2=A0There is a routine called build_cbr and that's = where the rate and packet
>=C2=A0 =C2=A0 =C2=A0size for the CBRs is set. This sets dynamic bw to 0= so the bandwidth
>=C2=A0 =C2=A0 =C2=A0doesn't change unless set in the command line t= o do so. I don't remember
>=C2=A0 =C2=A0 =C2=A0off hand what greedy is. I think it sets one
>=C2=A0 =C2=A0 =C2=A0ftp to be "greedy".
>
>=C2=A0 =C2=A0 =C2=A0A bunch of this you should try to figure out for yo= urself by looking at
>=C2=A0 =C2=A0 =C2=A0ns2 documentation
>=C2=A0 =C2=A0 =C2=A0and perhaps at the agent .cc files.
>
>=C2=A0 =C2=A0 =C2=A0The nominal RTT is what is "expected" and= is used as the interval but
>=C2=A0 =C2=A0 =C2=A0the real rtt is what
>=C2=A0 =C2=A0 =C2=A0is actually experienced in the particular experimen= t. I will use this
>=C2=A0 =C2=A0 =C2=A0opportunity once again
>=C2=A0 =C2=A0 =C2=A0to note that CoDel is actually more sensitive to th= is parameter than to
>=C2=A0 =C2=A0 =C2=A0target in the sense
>=C2=A0 =C2=A0 =C2=A0that excess drops will happen if the real rtt is lo= nger than the
>=C2=A0 =C2=A0 =C2=A0interval (I keep trying to
>=C2=A0 =C2=A0 =C2=A0explain this but no one hears it.)
>
>=C2=A0 =C2=A0 =C2=A0Code to set the random seed. Sometimes you want dif= ferent runs to use
>=C2=A0 =C2=A0 =C2=A0different random
>=C2=A0 =C2=A0 =C2=A0seeds and sometimes you want to run exactly the sam= e scenario.
>
>=C2=A0 =C2=A0 =C2=A0There's a bunch of parameters to the TCP agents= . Some of these are in
>=C2=A0 =C2=A0 =C2=A0ns2 documentation,
>=C2=A0 =C2=A0 =C2=A0but you can find it in the code also.
>
>=C2=A0 =C2=A0 =C2=A0Just a note that I couldn't get the ns2 TCP/Lin= ux code to work the way
>=C2=A0 =C2=A0 =C2=A0it was supposed to,
>=C2=A0 =C2=A0 =C2=A0specifically the idle() routine never seemed to get= called. (This sort
>=C2=A0 =C2=A0 =C2=A0of thing is pretty
>=C2=A0 =C2=A0 =C2=A0common with ns2) and I didn't want to waste a l= ot of time untangling the
>=C2=A0 =C2=A0 =C2=A0tcl-c++
>=C2=A0 =C2=A0 =C2=A0relationship in ns2. Anyway, so I wrote those tcl p= rocedures to get the
>=C2=A0 =C2=A0 =C2=A0ftps to restart.
>=C2=A0 =C2=A0 =C2=A0I wanted to run more modern TCPs, hence use of the = Linux TCP.
>
>=C2=A0 =C2=A0 =C2=A0The dynamic bandwidth thing changes the bandwidth a= nd preset times. It
>=C2=A0 =C2=A0 =C2=A0does it by multiplying the original bandwidth so I = set up an array of
>=C2=A0 =C2=A0 =C2=A0the mulipliers. I'm sure there's
>=C2=A0 =C2=A0 =C2=A0a more elegant way to do it but, at this stage of m= y life, I have
>=C2=A0 =C2=A0 =C2=A0accepted that I don't do
>=C2=A0 =C2=A0 =C2=A0elegant. I'm more of a "get the job done&q= uot; kind of coder. And I really
>=C2=A0 =C2=A0 =C2=A0don't like ns2 so I
>=C2=A0 =C2=A0 =C2=A0generally find it works better to just whack it wit= h a hammer rather
>=C2=A0 =C2=A0 =C2=A0than to try to do
>=C2=A0 =C2=A0 =C2=A0something beautifully. Note, as above, that a lot o= f the stuff in ns2
>=C2=A0 =C2=A0 =C2=A0just doesn't work.
>
>=C2=A0 =C2=A0 =C2=A0There is code to build up the topology which should= n't be that hard to
>=C2=A0 =C2=A0 =C2=A0figure out.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Kathie
>
>=C2=A0 =C2=A0 =C2=A0On 2/18/15 11:19 PM, kanu monga wrote:
>=C2=A0 =C2=A0 =C2=A0> is there anyone who can help me in understandi= ng tcl code of
>=C2=A0 =C2=A0 =C2=A0codel(given
>=C2=A0 =C2=A0 =C2=A0> below)
>=C2=A0 =C2=A0 =C2=A0> This one is quite complex for me.
>=C2=A0 =C2=A0 =C2=A0> please help if you can.
>=C2=A0 =C2=A0 =C2=A0> Thanks in advance.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> ##############################################= #####################
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> # ns codel.tcl f w c {b}Mb s d r
>=C2=A0 =C2=A0 =C2=A0> # where:
>=C2=A0 =C2=A0 =C2=A0> #f =3D # ftps
>=C2=A0 =C2=A0 =C2=A0> #w =3D # PackMime connections per second
>=C2=A0 =C2=A0 =C2=A0> #c =3D # CBRs
>=C2=A0 =C2=A0 =C2=A0> #b =3D bottleneck bandwidth in Mbps
>=C2=A0 =C2=A0 =C2=A0> #s =3D filesize for ftp, -1 for infinite
>=C2=A0 =C2=A0 =C2=A0> #d =3D dynamic bandwidth, if non-zero, changes= (kind of kludgey)
>=C2=A0 =C2=A0 =C2=A0> #have to set the specific change ratios in thi= s file (below)
>=C2=A0 =C2=A0 =C2=A0> #r =3D number of "reverse" ftps
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> set stopTime 300
>=C2=A0 =C2=A0 =C2=A0> set ns [new Simulator]
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> # These are defaults if values not set on comm= and line
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> set num_ftps 1
>=C2=A0 =C2=A0 =C2=A0> set web_rate 0
>=C2=A0 =C2=A0 =C2=A0> set revftp 0
>=C2=A0 =C2=A0 =C2=A0> set num_cbrs 0
>=C2=A0 =C2=A0 =C2=A0> #rate and packetSize set in build_cbr
>=C2=A0 =C2=A0 =C2=A0> set bottleneck 3Mb
>=C2=A0 =C2=A0 =C2=A0> #for a 10MB ftp
>=C2=A0 =C2=A0 =C2=A0> set filesize 10000000
>=C2=A0 =C2=A0 =C2=A0> set dynamic_bw 0
>=C2=A0 =C2=A0 =C2=A0> set greedy 0
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> # Parse command line
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> if {$argc >=3D 1} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set num_ftps [lindex $argv = 0]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0if {$argc >=3D 2} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set web_rate = [lindex $argv 1]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if {$argc >= ;=3D 3} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0set num_cbrs [lindex $argv 2]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0if {$argc >=3D 4} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0set bottleneck [lindex $argv 3]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 if {$argc >=3D 5} {
>=C2=A0 =C2=A0 =C2=A0> set filesize [lindex $argv 4]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0if {$argc >=3D 6} {
>=C2=A0 =C2=A0 =C2=A0> set dynamic_bw [lindex $argv 5]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0if {$argc >=3D 7} {
>=C2=A0 =C2=A0 =C2=A0> set revftp [lindex $argv 6]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 }
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 }
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> set bw [bw_parse $bottleneck]
>=C2=A0 =C2=A0 =C2=A0> if { $revftp >=3D 1} {
>=C2=A0 =C2=A0 =C2=A0> set num_revs $revftp
>=C2=A0 =C2=A0 =C2=A0> } else {
>=C2=A0 =C2=A0 =C2=A0> set num_revs 0
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0> puts "ftps $num_ftps webrate $web_rate cb= rs $num_cbrs bw $bw filesize
>=C2=A0 =C2=A0 =C2=A0> $filesize reverse $num_revs"
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> # experiment settings
>=C2=A0 =C2=A0 =C2=A0> set psize 1500
>=C2=A0 =C2=A0 =C2=A0> if { $bw < 1000000} { set psize 500 }
>=C2=A0 =C2=A0 =C2=A0> set nominal_rtt [delay_parse 100ms]
>=C2=A0 =C2=A0 =C2=A0> set accessdly 20
>=C2=A0 =C2=A0 =C2=A0> set bdelay 10
>=C2=A0 =C2=A0 =C2=A0> set realrtt [expr 2*(2*$accessdly + $bdelay)]<= br> >=C2=A0 =C2=A0 =C2=A0> puts "accessdly $accessdly bneckdly $bdel= ay realrtt $realrtt
>=C2=A0 =C2=A0 =C2=A0bneckbw $bw"
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> # CoDel values
>=C2=A0 =C2=A0 =C2=A0> # interval to keep min over
>=C2=A0 =C2=A0 =C2=A0> set interval [delay_parse 100ms]
>=C2=A0 =C2=A0 =C2=A0> # target in ms.
>=C2=A0 =C2=A0 =C2=A0> set target [delay_parse 5ms]
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> global defaultRNG
>=C2=A0 =C2=A0 =C2=A0> $defaultRNG seed 0
>=C2=A0 =C2=A0 =C2=A0> ns-random 0
>=C2=A0 =C2=A0 =C2=A0> #$defaultRNG seed 54321
>=C2=A0 =C2=A0 =C2=A0> #ns-random 23145
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> # ------- config info is all above this line -= ---------
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> #bdp in packets, based on the nominal rtt
>=C2=A0 =C2=A0 =C2=A0> set bdp [expr round($bw*$nominal_rtt/(8*$psize= ))]
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> Trace set show_tcphdr_ 1
>=C2=A0 =C2=A0 =C2=A0> set startTime 0.0
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> #TCP parameters - have to set both for FTPs an= d PackMime
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP set window_ [expr $bdp*16]
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP set segsize_ [expr $psize-40]
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP set packetSize_ [expr $psize-40]
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP set windowInit_ 4
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP set segsperack_ 1
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP set timestamps_ true
>=C2=A0 =C2=A0 =C2=A0> set delack 0.4
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP set interval_ $delack
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP/FullTcp set window_ [expr $bdp*16] >=C2=A0 =C2=A0 =C2=A0> Agent/TCP/FullTcp set segsize_ [expr $psize-40= ]
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP/FullTcp set packetSize_ [expr $psize= -40]
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP/FullTcp set windowInit_ 4
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP/FullTcp set segsperack_ 1
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP/FullTcp set timestamps_ true
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP/FullTcp set interval_ $delack
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> Agent/TCP/Linux instproc done {} {
>=C2=A0 =C2=A0 =C2=A0> global ns filesize
>=C2=A0 =C2=A0 =C2=A0> #this doesn't seem to work, had to hack tc= p-linux.cc to do repeat ftps
>=C2=A0 =C2=A0 =C2=A0> $self set closed_ 0
>=C2=A0 =C2=A0 =C2=A0> #needs to be delayed by at least .3sec to slow= start
>=C2=A0 =C2=A0 =C2=A0> puts "[$ns now] TCP/Linux proc done calle= d"
>=C2=A0 =C2=A0 =C2=A0> $ns at [expr [$ns now] + 0.3] "$self send= $filesize"
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> # problem is that idle() in tcp.cc never seems= to get called...
>=C2=A0 =C2=A0 =C2=A0> Application/FTP instproc resume {} {
>=C2=A0 =C2=A0 =C2=A0> puts "called resume"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global filesi= ze
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$self send $f= ilesize
>=C2=A0 =C2=A0 =C2=A0> #$ns at [expr [$ns now] + 0.5] "[$self ag= ent] reset"
>=C2=A0 =C2=A0 =C2=A0> $ns at [expr [$ns now] + 0.5] "[$self age= nt] send $filesize"
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> Application/FTP instproc fire {} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global filesi= ze
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$self instvar= maxpkts_
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set maxpkts_ = $filesize
>=C2=A0 =C2=A0 =C2=A0> [$self agent] set maxpkts_ $filesize
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$self send $m= axpkts_
>=C2=A0 =C2=A0 =C2=A0> puts "fire() FTP"
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> #buffersizes
>=C2=A0 =C2=A0 =C2=A0> set buffersize [expr $bdp]
>=C2=A0 =C2=A0 =C2=A0> set buffersize1 [expr $bdp*10]
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> Queue/CoDel set target_ $target
>=C2=A0 =C2=A0 =C2=A0> Queue/CoDel set interval_ $interval
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> #set Flow_id 1
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> proc build_topology { ns } {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# nodes n0 and n1 are the s= erver and client side gateways and
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# the link between them is = the congested slow link. n0 -> n1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# handles all the server to= client traffic.
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0#
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# if the web_rate is non-ze= ro, node n2 will be the packmime
>=C2=A0 =C2=A0 =C2=A0server cloud
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# and node n3 will be the c= lient cloud.
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0#
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# num_ftps server nodes and= client nodes are created for the ftp
>=C2=A0 =C2=A0 =C2=A0> sessions.
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# the first client node is = n{2+w} and the first server node is
>=C2=A0 =C2=A0 =C2=A0n{2+f+w}
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# where 'f' is num_= ftps and 'w' is 1 if web_rate>0 and 0
>=C2=A0 =C2=A0 =C2=A0otherwise.
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# servers will be even numb= ered nodes, clients odd
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# Warning: the numbering he= re is ridiculously complicated
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0global bw bdelay accessdly = buffersize buffersize1 filesize
>=C2=A0 =C2=A0 =C2=A0node_cnt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set node_cnt 2
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# congested link
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0global n0 n1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set n0 [$ns node]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set n1 [$ns node]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ns duplex-link $n0 $n1 $bw= ${bdelay}ms CoDel
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ns duplex-link-op $n0 $n1 = orient right
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ns duplex-link-op $n0 $n1 = queuePos 0.5
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ns duplex-link-op $n1 $n0 = queuePos 1.5
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ns queue-limit $n0 $n1 $bu= ffersize
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ns queue-limit $n1 $n0 $bu= ffersize
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set node_cnt 2
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0#dynamic bandwidth
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# these are the multipliers= for changing bw, times initial set bw
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# edit these values to get = different patterns
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0global stopTime dynamic_bw<= br> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0array names bw_changes
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set bw_changes(1) 0.1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set bw_changes(2) 0.01
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set bw_changes(3) 0.5
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set bw_changes(4) 0.01
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set bw_changes(5) 1.0
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0puts "bottleneck start= s at [[[$ns link $n0 $n1] link] set
>=C2=A0 =C2=A0 =C2=A0> bandwidth_]bps"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0for {set k 1} {$k <=3D $= dynamic_bw} {incr k 1} {
>=C2=A0 =C2=A0 =C2=A0> set changeTime [expr $k*$stopTime/($dynamic_bw= +1)]
>=C2=A0 =C2=A0 =C2=A0> set f $bw_changes($k)
>=C2=A0 =C2=A0 =C2=A0> set newBW [expr $f*$bw]
>=C2=A0 =C2=A0 =C2=A0> puts "change at $changeTime to [expr $new= BW/1000000.]Mbps"
>=C2=A0 =C2=A0 =C2=A0> $ns at $changeTime "[[$ns link $n0 $n1] l= ink] set bandwidth_ $newBW"
>=C2=A0 =C2=A0 =C2=A0> $ns at $changeTime "[[$ns link $n1 $n0] l= ink] set bandwidth_ $newBW"
>=C2=A0 =C2=A0 =C2=A0> $ns at $changeTime "puts $newBW"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set li_10 [[$ns link $n1 $n= 0] queue]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set li_01 [[$ns link $n0 $n= 1] queue]
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set tchan_ [open /tmp/redqvar.tr <http://redqvar.tr>
>=C2=A0 =C2=A0 =C2=A0<http://redqvar.tr> w]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$li_01 trace curq_
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$li_01 trace d_exp_
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$li_01 attach $tchan_
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0global num_ftps web_rate nu= m_cbrs greedy num_revs
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set linkbw [expr $bw*10] >=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set w [expr $web_rate > = 0]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0if {$w} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global n2 n3<= br> >=C2=A0 =C2=A0 =C2=A0> #server
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set n2 [$ns n= ode]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns duplex-li= nk $n2 $n0 $linkbw ${accessdly}ms DropTail
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it $n2 $n0 $buffersize1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it $n0 $n2 $buffersize1
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> #client
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set n3 [$ns n= ode]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns duplex-li= nk $n1 $n3 $linkbw ${accessdly}ms DropTail
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it $n1 $n3 $buffersize1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it $n3 $n1 $buffersize1
>=C2=A0 =C2=A0 =C2=A0> set node_cnt 4
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0> #need to fix the angles if use nam
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0for {set k 0} {$k < $num= _ftps} {incr k 1} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# servers
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set j $node_c= nt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global n$j >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set n$j [$ns = node]
>=C2=A0 =C2=A0 =C2=A0> if {$greedy > 0 && $k =3D=3D 0} { >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $ns duplex-l= ink [set n$j] $n0 $linkbw 1ms DropTail
>=C2=A0 =C2=A0 =C2=A0> } else {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $ns duplex-l= ink [set n$j] $n0 $linkbw ${accessdly}ms DropTail
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it [set n$j] $n0 $buffersize1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it $n0 [set n$j] $buffersize1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set angle [ex= pr $num_ftps>1? 0.75+($k-1)*.5/($num_ftps-1) : 1]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns duplex-li= nk-op $n0 [set n$j] orient $angle
>=C2=A0 =C2=A0 =C2=A0> incr node_cnt
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# clients
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set j $node_c= nt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global n$j >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set n$j [$ns = node]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set dly [expr= ${accessdly} +($k+1)]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns duplex-li= nk $n1 [set n$j] $linkbw=C2=A0 ${dly}ms=C2=A0 DropTail
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it $n1 [set n$j] $buffersize1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it [set n$j] $n1 $buffersize1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set angle [ex= pr $num_ftps>1?
>=C2=A0 =C2=A0 =C2=A0fmod(2.25-($k-1)*.5/($num_ftps-1),
>=C2=A0 =C2=A0 =C2=A0> 2) : 0]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns duplex-li= nk-op $n1 [set n$j] orient $angle
>=C2=A0 =C2=A0 =C2=A0> incr node_cnt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0for {set k 0} {$k < $num= _cbrs} {incr k 1} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# servers
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set j $node_c= nt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global n$j >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set n$j [$ns = node]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns duplex-li= nk [set n$j] $n0 $linkbw ${accessdly}ms DropTail
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it [set n$j] $n0 $buffersize1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it $n0 [set n$j] $buffersize1
>=C2=A0 =C2=A0 =C2=A0> #=C2=A0 =C2=A0 =C2=A0 =C2=A0 set angle [expr $= num_cbrs>1? 0.75+($k-1)*.5/($num_cbrs-1)
>=C2=A0 =C2=A0 =C2=A0: 1]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns duplex-li= nk-op $n0 [set n$j] orient $angle
>=C2=A0 =C2=A0 =C2=A0> incr node_cnt
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# clients
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set j $node_c= nt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global n$j >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set n$j [$ns = node]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns duplex-li= nk $n1 [set n$j] $linkbw=C2=A0 ${accessdly}ms
>=C2=A0 =C2=A0 =C2=A0DropTail
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it $n1 [set n$j] $buffersize1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it [set n$j] $n1 $buffersize1
>=C2=A0 =C2=A0 =C2=A0> #=C2=A0 =C2=A0 =C2=A0 =C2=A0 set angle [expr $= num_cbrs>1?
>=C2=A0 =C2=A0 =C2=A0fmod(2.25-($k-1)*.5/($num_ftps-1),
>=C2=A0 =C2=A0 =C2=A0> 2) : 0]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns duplex-li= nk-op $n1 [set n$j] orient $angle
>=C2=A0 =C2=A0 =C2=A0> incr node_cnt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0> #reverse direction ftps
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0for {set k 0} {$k < $num= _revs} {incr k 1} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# clients
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set j $node_c= nt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global n$j >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set n$j [$ns = node]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns duplex-li= nk [set n$j] $n0 $linkbw ${accessdly}ms DropTail
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it [set n$j] $n0 $buffersize1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it $n0 [set n$j] $buffersize1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set angle [ex= pr $num_ftps>1? 0.75+($k-1)*.5/($num_ftps-1) : 1]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns duplex-li= nk-op $n0 [set n$j] orient $angle
>=C2=A0 =C2=A0 =C2=A0> incr node_cnt
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# servers
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set j $node_c= nt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global n$j >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set n$j [$ns = node]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set dly [expr= ($accessdly)*1.1 +($k+1)]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns duplex-li= nk $n1 [set n$j] $linkbw=C2=A0 ${dly}ms=C2=A0 DropTail
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it $n1 [set n$j] $buffersize1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns queue-lim= it [set n$j] $n1 $buffersize1
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set angle [ex= pr $num_ftps>1?
>=C2=A0 =C2=A0 =C2=A0fmod(2.25-($k-1)*.5/($num_ftps-1),
>=C2=A0 =C2=A0 =C2=A0> 2) : 0]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns duplex-li= nk-op $n1 [set n$j] orient $angle
>=C2=A0 =C2=A0 =C2=A0> incr node_cnt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> proc build_cbr {cnd snd startTime timeToStop F= low_id} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0global ns
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set udp [$ns create-connect= ion UDP $snd LossMonitor $cnd $Flow_id]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set cbr [new Application/Tr= affic/CBR]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$cbr attach-agent $udp
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# change these for differen= t types of CBRs
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$cbr set packetSize_ 100 >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$cbr set rate_ 0.064Mb
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ns at $startTime "$cb= r start"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ns at $timeToStop "$c= br stop"
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> # cnd is client node, snd is server node
>=C2=A0 =C2=A0 =C2=A0> proc build_ftpclient {cnd snd startTime timeTo= Stop Flow_id} {
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0global ns filesize greedy r= evftp
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set ctcp [$ns create-connec= tion TCP/Linux $snd TCPSink/Sack1 $cnd
>=C2=A0 =C2=A0 =C2=A0> $Flow_id]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ctcp select_ca cubic
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set ftp [$ctcp attach-app F= TP]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ftp set enableResume_ true=
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ftp set type_ FTP
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> #set up a single infinite ftp with smallest RT= T
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0if {$greedy > 0 || $file= size < 0} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 $ns at $startTime "$f= tp start"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 set greedy 0
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0} else {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 $ns at $startTime "$f= tp send $filesize"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ns at $timeToStop "$f= tp stop"
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> proc build_webs {cnd snd rate startTime timeTo= Stop} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set CLIENT 0
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set SERVER 1
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# SETUP PACKMIME
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set pm [new PackMimeHTTP] >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$pm set-TCP Sack
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$pm set-client $cnd
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$pm set-server $snd
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$pm set-rate $rate;=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # new connec= tions per
>=C2=A0 =C2=A0 =C2=A0second
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$pm set-http-1.1;=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # use HT= TP/1.1
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# create RandomVariables >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set flow_arrive [new Random= Variable/PackMimeHTTPFlowArrive $rate]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set req_size [new RandomVar= iable/PackMimeHTTPFileSize $rate
>=C2=A0 =C2=A0 =C2=A0$CLIENT]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set rsp_size [new RandomVar= iable/PackMimeHTTPFileSize $rate
>=C2=A0 =C2=A0 =C2=A0$SERVER]
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# assign RNGs to RandomVari= ables
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$flow_arrive use-rng [new R= NG]
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$req_size use-rng [new RNG]=
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$rsp_size use-rng [new RNG]=
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0# set PackMime variables >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$pm set-flow_arrive $flow_a= rrive
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$pm set-req_size $req_size<= br> >=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$pm set-rsp_size $rsp_size<= br> >=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0global ns
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ns at $startTime "$pm= start"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0$ns at $timeToStop "$p= m stop"
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> proc uniform {a b} {
>=C2=A0 =C2=A0 =C2=A0> expr $a + (($b- $a) * ([ns-random]*1.0/0x7ffff= fff))
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> proc finish {} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0global ns
>=C2=A0 =C2=A0 =C2=A0> $ns halt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$ns flush-tra= ce
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0exit 0
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> # $ns namtrace-all [open out.nam w]
>=C2=A0 =C2=A0 =C2=A0> # $ns color 2 blue
>=C2=A0 =C2=A0 =C2=A0> # $ns color 3 red
>=C2=A0 =C2=A0 =C2=A0> # $ns color 4 yellow
>=C2=A0 =C2=A0 =C2=A0> # $ns color 5 green
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> build_topology $ns
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> #$ns trace-queue $n0 $n1 [open out_n0ton1.tr
>=C2=A0 =C2=A0 =C2=A0<http://out_n0ton1.tr> <http://out_n0ton1.tr> w]
>=C2=A0 =C2=A0 =C2=A0> #set fname f${num_ftps}w${web_rate}b${bottlene= ck}.tr
>=C2=A0 =C2=A0 =C2=A0> set fname f.tr <http://f.tr> <http://f.tr>
>=C2=A0 =C2=A0 =C2=A0> puts $fname
>=C2=A0 =C2=A0 =C2=A0> $ns trace-queue $n0 $n1 [open /tmp/$fname w] >=C2=A0 =C2=A0 =C2=A0> #reverse direction
>=C2=A0 =C2=A0 =C2=A0> #$ns trace-queue $n1 $n0 [open /tmp/$fname w]<= br> >=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> set node_cnt 2
>=C2=A0 =C2=A0 =C2=A0> if {$web_rate > 0} {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0build_webs $n= 3 $n2 $web_rate 0 $stopTime
>=C2=A0 =C2=A0 =C2=A0> set node_cnt 4
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> for {set k 1} {$k <=3D $num_ftps} {incr k 1= } {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set j $node_cnt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0incr node_cnt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set i $node_cnt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0build_ftpclient [set n$i] [= set n$j]=C2=A0 \
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 $startTime $stopTime $i
>=C2=A0 =C2=A0 =C2=A0> # [expr 1.0*($k-1)] $stopTime $i
>=C2=A0 =C2=A0 =C2=A0> # [expr $startTime+($k-1)*[uniform 0.0 2.0]] $= stopTime $i
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0incr node_cnt
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> for {set k 1} {$k <=3D $num_cbrs} {incr k 1= } {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set j $node_cnt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0incr node_cnt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set i $node_cnt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0build_cbr [set n$i] [set n$= j]=C2=A0 \
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 [expr $startTime+($k-1)*[uniform 0.0 2.0= ]] $stopTime $i
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0incr node_cnt
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> #for reverse direction, give client smaller nu= mber
>=C2=A0 =C2=A0 =C2=A0> for {set k 1} {$k <=3D $num_revs} {incr k 1= } {
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set j $node_cnt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0incr node_cnt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0set i $node_cnt
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0build_ftpclient [set n$j] [= set n$i] $startTime $stopTime $j
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0incr node_cnt
>=C2=A0 =C2=A0 =C2=A0> }
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> $ns at [expr $stopTime ] "finish" >=C2=A0 =C2=A0 =C2=A0> $ns run
>=C2=A0 =C2=A0 =C2=A0> exit 0
>=C2=A0 =C2=A0 =C2=A0> ##############################################= #####################
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> ______________________________________________= _
>=C2=A0 =C2=A0 =C2=A0> Codel mailing list
>=C2=A0 =C2=A0 =C2=A0> Codel@lists.bufferbloat.net <mailto:Codel@lists.bufferbloat.net>
>=C2=A0 =C2=A0 =C2=A0> https://lists.bufferbloat.net/listinfo/codel
>=C2=A0 =C2=A0 =C2=A0>
>
>
>
>=C2=A0 =C2=A0 =C2=A0------------------------------
>
>=C2=A0 =C2=A0 =C2=A0Message: 2
>=C2=A0 =C2=A0 =C2=A0Date: Thu, 19 Feb 2015 13:38:53 -0800
>=C2=A0 =C2=A0 =C2=A0From: Dave Taht <
dave.taht@gmail.com <mailto:dave.taht@gmail.com>>
>=C2=A0 =C2=A0 =C2=A0To: Kathleen Nichols <nichols@pollere.com <mailto:nichols@pollere.com>>
>=C2=A0 =C2=A0 =C2=A0Cc: "codel@lists.bufferbloat.net
>=C2=A0 =C2=A0 =C2=A0<mailto:codel@lists.bufferbloat.net>" <codel@lists.bufferbloat.net
>=C2=A0 =C2=A0 =C2=A0<mailto:codel@lists.bufferbloat.net>>
>=C2=A0 =C2=A0 =C2=A0Subject: Re: [Codel] Codel code
>=C2=A0 =C2=A0 =C2=A0Message-ID:
>
>=C2=A0 =C2=A0 =C2=A0<CAA93jw5dWzXfEX70w1PFmPudH+qfurq=3De4Srbth2+f4QC2h4Og@mail.gmail.co= m
>=C2=A0 =C2=A0 =C2=A0<mailto:e4Srbth2%2Bf4QC2h4Og@mail.gmail.com>>
>=C2=A0 =C2=A0 =C2=A0Content-Type: text/plain; charset=3DUTF-8
>
>=C2=A0 =C2=A0 =C2=A0I am fairly happy with the example codel code that = is now in the ns3
>=C2=A0 =C2=A0 =C2=A0branch,
>=C2=A0 =C2=A0 =C2=A0which is pure c++, and quite a bit easier to unders= tand than tcl, to
>=C2=A0 =C2=A0 =C2=A0my eye.
>
>=C2=A0 =C2=A0 =C2=A0https://www.nsnam.org/doxyge= n/codel-vs-droptail-asymmetric_8cc.html
>
>=C2=A0 =C2=A0 =C2=A0regrettably the fq_codel version for ns3 is still o= ut of tree.
>
>
>=C2=A0 =C2=A0 =C2=A0------------------------------
>
>=C2=A0 =C2=A0 =C2=A0Message: 3
>=C2=A0 =C2=A0 =C2=A0Date: Fri, 20 Feb 2015 00:46:11 -0800
>=C2=A0 =C2=A0 =C2=A0From: Anjali Chawla <anjaliachawla013@gmail.com
>=C2=A0 =C2=A0 =C2=A0<mailto:anjaliachawla013@gmail.com>>
>=C2=A0 =C2=A0 =C2=A0To: = codel@lists.bufferbloat.net <mailto:codel@lists.bufferbloat.net>
>=C2=A0 =C2=A0 =C2=A0Subject: [Codel] Setpoint in CoDel
>=C2=A0 =C2=A0 =C2=A0Message-ID:
>
>=C2=A0 =C2=A0 =C2=A0<CAL6QuG8ktPQgrGkA+wp9V=3DBHqdcQh4E19dsX02Pozh_fjfJ+0w@mai= l.gmail.com
>=C2=A0 =C2=A0 =C2=A0<mailto:BHqdcQh4E19dsX02Pozh_fjfJ%2B0w@mail.gmail.com>>
>=C2=A0 =C2=A0 =C2=A0Content-Type: text/plain; charset=3D"utf-8&quo= t;
>
>=C2=A0 =C2=A0 =C2=A0Hi
>=C2=A0 =C2=A0 =C2=A0anyone please explain me what is concept behind=C2= =A0 setpoint in codel
>=C2=A0 =C2=A0 =C2=A0algorithm??
>=C2=A0 =C2=A0 =C2=A0Thanks
>=C2=A0 =C2=A0 =C2=A0-------------- next part --------------
>=C2=A0 =C2=A0 =C2=A0An HTML attachment was scrubbed...
>=C2=A0 =C2=A0 =C2=A0URL:
>=C2=A0 =C2=A0 =C2=A0<
https://lists.bufferbloat.net/pipermail/codel/attachments/20150220/285= d07dd/attachment-0001.html>
>
>=C2=A0 =C2=A0 =C2=A0------------------------------
>
>=C2=A0 =C2=A0 =C2=A0Message: 4
>=C2=A0 =C2=A0 =C2=A0Date: Fri, 20 Feb 2015 01:21:13 -0800
>=C2=A0 =C2=A0 =C2=A0From: Dave Taht <dave.taht@gmail.com <mailto:dave.taht@gmail.com>>
>=C2=A0 =C2=A0 =C2=A0To: Anjali Chawla <anjaliachawla013@gmail.com
>=C2=A0 =C2=A0 =C2=A0<mailto:anjaliachawla013@gmail.com>>
>=C2=A0 =C2=A0 =C2=A0Cc: "codel@lists.bufferbloat.net
>=C2=A0 =C2=A0 =C2=A0<mailto:codel@lists.bufferbloat.net>" <codel@lists.bufferbloat.net
>=C2=A0 =C2=A0 =C2=A0<mailto:codel@lists.bufferbloat.net>>
>=C2=A0 =C2=A0 =C2=A0Subject: Re: [Codel] Setpoint in CoDel
>=C2=A0 =C2=A0 =C2=A0Message-ID:
>
>=C2=A0 =C2=A0 =C2=A0<CAA93jw43TJdo9FK61HK0et3Mopq8-YKjj= kNm_6_OF7+g0iMipw@mail.gmail.com
>=C2=A0 =C2=A0 =C2=A0<mailto:CAA93jw43TJdo9FK61HK0et3M= opq8-YKjjkNm_6_OF7%2Bg0iMipw@mail.gmail.com>>
>=C2=A0 =C2=A0 =C2=A0Content-Type: text/plain; charset=3DUTF-8
>
>=C2=A0 =C2=A0 =C2=A0the best talk on the subject was van?s at ietf, it = is well worth
>=C2=A0 =C2=A0 =C2=A0watching multiple times.
>
>=C2=A0 =C2=A0 =C2=A0http://www.bufferbloat.net/project= s/cerowrt/wiki/Bloat-videos
>
>=C2=A0 =C2=A0 =C2=A0He goes deeply into the reasoning behind the sojour= n time, and setpoint.
>
>=C2=A0 =C2=A0 =C2=A0About the only other somewhat in-depth talk on how = codel really works
>=C2=A0 =C2=A0 =C2=A0was my attempt at stanford.
>
>=C2=A0 =C2=A0 =C2=A0and there are of course other talks above that try = to describe bits of
>=C2=A0 =C2=A0 =C2=A0the elephant.
>
>=C2=A0 =C2=A0 =C2=A0One of these days I hope someone puts together the = definitive talk on
>=C2=A0 =C2=A0 =C2=A0codel complete with even more elegant demos than st= ephen hemminger
>=C2=A0 =C2=A0 =C2=A0came up with..., but it does seem to be really hard= for people to get
>=C2=A0 =C2=A0 =C2=A0at a deep level... most of my own talks are more ab= out fq than
>=C2=A0 =C2=A0 =C2=A0fq_codel, and that is *tons* easier to explain.
>
>=C2=A0 =C2=A0 =C2=A0If you watch them all a bunch of times, and run a f= ew experiments of
>=C2=A0 =C2=A0 =C2=A0your own, enlightenment will come. For me, it was s= eeing kathie give
>=C2=A0 =C2=A0 =C2=A0the first public explanation of codel - about midwa= y through I started
>=C2=A0 =C2=A0 =C2=A0vibrating in my seat - but I had just completed a s= lash and burn tour
>=C2=A0 =C2=A0 =C2=A0through all the aqm literature going back 30 years,= and trying
>=C2=A0 =C2=A0 =C2=A0everything that seemed to make sense. I don?t know = how to impart that
>=C2=A0 =C2=A0 =C2=A0in an email...
>
>
>=C2=A0 =C2=A0 =C2=A0On Fri, Feb 20, 2015 at 12:46 AM, Anjali Chawla
>=C2=A0 =C2=A0 =C2=A0<a= njaliachawla013@gmail.com <mailto:anjaliachawla013@gmail.com>> wrote:
>=C2=A0 =C2=A0 =C2=A0> Hi
>=C2=A0 =C2=A0 =C2=A0> anyone please explain me what is concept behin= d=C2=A0 setpoint in codel
>=C2=A0 =C2=A0 =C2=A0> algorithm??
>=C2=A0 =C2=A0 =C2=A0> Thanks
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> ______________________________________________= _
>=C2=A0 =C2=A0 =C2=A0> Codel mailing list
>=C2=A0 =C2=A0 =C2=A0> Codel@lists.bufferbloat.net <mailto:Codel@lists.bufferbloat.net>
>=C2=A0 =C2=A0 =C2=A0> https://lists.bufferbloat.net/listinfo/codel
>=C2=A0 =C2=A0 =C2=A0>
>
>
>
>=C2=A0 =C2=A0 =C2=A0--
>=C2=A0 =C2=A0 =C2=A0Dave T?ht
>
>=C2=A0 =C2=A0 =C2=A0thttp://
www.bufferbloat.net/projec= ts/bloat/wiki/Upcoming_Talks
>=C2=A0 =C2=A0 =C2=A0<http://www.bufferbloat.net/pro= jects/bloat/wiki/Upcoming_Talks>
>
>
>=C2=A0 =C2=A0 =C2=A0------------------------------
>
>=C2=A0 =C2=A0 =C2=A0Message: 5
>=C2=A0 =C2=A0 =C2=A0Date: Fri, 20 Feb 2015 10:01:54 -0800
>=C2=A0 =C2=A0 =C2=A0From: Dave Taht <dave.taht@gmail.com <mailto:dave.taht@gmail.com>>
>=C2=A0 =C2=A0 =C2=A0To: Anjali Chawla <anjaliachawla013@gmail.com
>=C2=A0 =C2=A0 =C2=A0<mailto:anjaliachawla013@gmail.com>>
>=C2=A0 =C2=A0 =C2=A0Cc: "codel@lists.bufferbloat.net
>=C2=A0 =C2=A0 =C2=A0<mailto:codel@lists.bufferbloat.net>" <codel@lists.bufferbloat.net
>=C2=A0 =C2=A0 =C2=A0<mailto:codel@lists.bufferbloat.net>>
>=C2=A0 =C2=A0 =C2=A0Subject: Re: [Codel] Setpoint in CoDel
>=C2=A0 =C2=A0 =C2=A0Message-ID:
>
>=C2=A0 =C2=A0 =C2=A0<CAA93jw7147Ucy=3DfRmt-65VuUSDyVwHwH9NCmOFjq4GULYGC6= 3A@mail.gmail.com
>=C2=A0 =C2=A0 =C2=A0<mailto:fRmt-65VuUSDyVwHwH9NCmOFjq4GULYGC63A@mail.gm= ail.com>>
>=C2=A0 =C2=A0 =C2=A0Content-Type: text/plain; charset=3DUTF-8
>
>=C2=A0 =C2=A0 =C2=A0On Fri, Feb 20, 2015 at 1:21 AM, Dave Taht <dave.taht@gmail.com
>=C2=A0 =C2=A0 =C2=A0<mailto:d= ave.taht@gmail.com>> wrote:
>=C2=A0 =C2=A0 =C2=A0> the best talk on the subject was van?s at ietf= , it is well worth
>=C2=A0 =C2=A0 =C2=A0> watching multiple times.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> http://www.bufferbloat.net/pr= ojects/cerowrt/wiki/Bloat-videos
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> He goes deeply into the reasoning behind the s= ojourn time, and
>=C2=A0 =C2=A0 =C2=A0setpoint.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> About the only other somewhat in-depth talk on= how codel really works
>=C2=A0 =C2=A0 =C2=A0> was my attempt at stanford.
>
>=C2=A0 =C2=A0 =C2=A0The stanford talk took some digging to find. I woul= d really like a shot
>=C2=A0 =C2=A0 =C2=A0at a do-over one day - or for van to give his talk = again to be filmed at
>=C2=A0 =C2=A0 =C2=A0high quality.
>
>=C2=A0 =C2=A0 =C2=A0https://www.youtube.com/watch?v=3DMxoa5Si4Ubw<= br> >
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> and there are of course other talks above that= try to describe bits of
>=C2=A0 =C2=A0 =C2=A0> the elephant.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> One of these days I hope someone puts together= the definitive talk on
>=C2=A0 =C2=A0 =C2=A0> codel complete with even more elegant demos th= an stephen hemminger
>=C2=A0 =C2=A0 =C2=A0> came up with..., but it does seem to be really= hard for people to get
>=C2=A0 =C2=A0 =C2=A0> at a deep level... most of my own talks are mo= re about fq than
>=C2=A0 =C2=A0 =C2=A0> fq_codel, and that is *tons* easier to explain= .
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> If you watch them all a bunch of times, and ru= n a few experiments of
>=C2=A0 =C2=A0 =C2=A0> your own, enlightenment will come. For me, it = was seeing kathie give
>=C2=A0 =C2=A0 =C2=A0> the first public explanation of codel - about = midway through I started
>=C2=A0 =C2=A0 =C2=A0> vibrating in my seat - but I had just complete= d a slash and burn tour
>=C2=A0 =C2=A0 =C2=A0> through all the aqm literature going back 30 y= ears, and trying
>=C2=A0 =C2=A0 =C2=A0> everything that seemed to make sense. I don?t = know how to impart that
>=C2=A0 =C2=A0 =C2=A0> in an email...
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> On Fri, Feb 20, 2015 at 12:46 AM, Anjali Chawl= a
>=C2=A0 =C2=A0 =C2=A0> <anjaliachawla013@gmail.com <mailto:anjaliachawla013@gmail.com>>
>=C2=A0 =C2=A0 =C2=A0wrote:
>=C2=A0 =C2=A0 =C2=A0>> Hi
>=C2=A0 =C2=A0 =C2=A0>> anyone please explain me what is concept b= ehind=C2=A0 setpoint in codel
>=C2=A0 =C2=A0 =C2=A0>> algorithm??
>=C2=A0 =C2=A0 =C2=A0>> Thanks
>=C2=A0 =C2=A0 =C2=A0>>
>=C2=A0 =C2=A0 =C2=A0>> __________________________________________= _____
>=C2=A0 =C2=A0 =C2=A0>> Codel mailing list
>=C2=A0 =C2=A0 =C2=A0>> Codel@lists.bufferbloat.net <mailto:Codel@lists.bufferbloat.net>
>=C2=A0 =C2=A0 =C2=A0>> https://lists.bufferbloat.net/listinfo/cod= el
>=C2=A0 =C2=A0 =C2=A0>>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> --
>=C2=A0 =C2=A0 =C2=A0> Dave T?ht
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> thttp://www.bufferbloat.net/p= rojects/bloat/wiki/Upcoming_Talks
>=C2=A0 =C2=A0 =C2=A0<http://www.bufferbloat.net/pro= jects/bloat/wiki/Upcoming_Talks>
>
>
>
>=C2=A0 =C2=A0 =C2=A0--
>=C2=A0 =C2=A0 =C2=A0Dave T?ht
>
>=C2=A0 =C2=A0 =C2=A0thttp://www.bufferbloat.net/projec= ts/bloat/wiki/Upcoming_Talks
>=C2=A0 =C2=A0 =C2=A0<http://www.bufferbloat.net/pro= jects/bloat/wiki/Upcoming_Talks>
>
>
>=C2=A0 =C2=A0 =C2=A0------------------------------
>
>=C2=A0 =C2=A0 =C2=A0_______________________________________________
>=C2=A0 =C2=A0 =C2=A0Codel mailing list
>=C2=A0 =C2=A0 =C2=A0Code= l@lists.bufferbloat.net <mailto:Codel@lists.bufferbloat.net>
>=C2=A0 =C2=A0 =C2=A0https://lists.bufferbloat.net/listinfo/codel >
>
>=C2=A0 =C2=A0 =C2=A0End of Codel Digest, Vol 29, Issue 4
>=C2=A0 =C2=A0 =C2=A0************************************
>
>
>
>
> _______________________________________________
> Codel mailing list
> Codel@lists.bufferbloat= .net
> https://lists.bufferbloat.net/listinfo/codel
>



------------------------------

_______________________________________________
Codel mailing list
Codel@lists.bufferbloat.net<= /a>
= https://lists.bufferbloat.net/listinfo/codel


End of Codel Digest, Vol 29, Issue 6
************************************

--001a1135e68c90c64c050fbb26eb--