Using NS2 for Simulating RED and DiffServ
Using NS2 for Simulating RED and DiffServ
Using NS2 for Simulating RED and DiffServ
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Why TCL as well as C++➲ TCL is a script language, C++ is compiled, <strong>and</strong>efficient.➲ TCL is excellent <strong>for</strong> specifying the simulation <strong>and</strong>specifying simple algorithms, at a high level.➲ TCL is interpreted by the simulator, so simplicity isimportant.
<strong>DiffServ</strong> Per Hop Behaviour➲ Expedited Forwarding (EF) Guaranteed delivery at a certain rate➲ Assured Forwarding (AF) Guaranteed delivery at a certain rate Separate AF classes, protected from each other Packets marked or dropped when flowspec exceeded Spare capacity allocated in priority order➲ Best Ef<strong>for</strong>t Gets whatever per<strong>for</strong>mance can be delivered after otherclasses.
<strong>DiffServ</strong> Objects➲ Edge router – marks packets as inspec or outofspec➲ Core router – implements AF PHB. Packets meetingthe flowspec are <strong>for</strong>warded within the desired rate;others might wait; Best Ef<strong>for</strong>t packets get the worsttreatment.
How to specify <strong>DiffServ</strong> nodes in ns2➲ Edge router – example code$ns simplexlink $node_(s1) $node_(r1) 10Mb 2ms ds<strong>RED</strong>/edge # set up DSset q1 [[$ns link $node_(s1) $node_(r1)] queue]# set var q1$q1 addPolicyEntry [$node_(s1) id] [$node_(s3) id] TokenBucket 10 100000 10000$q1 addPolicerEntry TokenBucket 10 11 # these stmts set the params# first stmt sets rate <strong>and</strong> depth of token bucket# second stmt says what happens to pkts which don't comply
How to specify <strong>DiffServ</strong> nodes in ns2Core router – example code:$ns simplexlink $node_(r1) $node_(s1) 10Mb 2ms ds<strong>RED</strong>/coreset q2 [[$ns link $node_(r1) $node_(s1)] queue]$q2 meanPktSize 1000 # <strong>for</strong> stats$q2 set numQueues_ 1 # only one class of service$q2 setNumPrec 3 # but 3 loss precedence levels$q2 addPHBEntry 10 0 0 # DS 10 goes to q 0, drop prec 0$q2 addPHBEntry 11 0 1 # DS 11 goes to q 0, drop prec 1$q2 addPHBEntry 0 0 2 # DS 0 goes to q 0, drop prec 2$q2 configQ 0 0 20 40 0.02 # Red parameters of q 0 prec 0$q2 configQ 0 1 15 30 0.10 # “ 1$q2 configQ 0 2 10 20 0.20 # “ 2
Recommendation➲ Recommend one or several strategies➲ Give a summary of the expected results➲ Name the next steps to be taken➲ Delegate the various tasks