12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

In <strong>ns</strong>, packets are defaulted to a code point of zero. <strong>The</strong>refore, user must add a PHB entry for the zero code point in order toh<strong>and</strong>le best effort traffic.In addition, comm<strong>and</strong>s are available to allow the user to choose the scheduling mode between physical queues. For example:$dsredq setSchedularMode WRR$dsredq addQueueWeights 1 5<strong>The</strong> above pair of comm<strong>and</strong>s sets the scheduling mode to Weighted Round Robin <strong>and</strong> the weight for queue 1 to 5. Otherscheduling modes supported are Weighted Interleaved Round Robin (WIRR), Round Robin (RR), <strong>and</strong> Priority (PRI). <strong>The</strong>default scheduling mode is Round Robin.For Priority scheduling, priority is arranged in sequential order with queue 0 having the highest priority. Also, one can set thea limit on the maximum b<strong>and</strong>width a particular queue can get using as follows:$dsredq setSchedularMode PRI$dsredq addQueueR<strong>at</strong>e 0 5000000<strong>The</strong>se comm<strong>and</strong>s specify the maximum b<strong>and</strong>width th<strong>at</strong> queue 0 can co<strong>ns</strong>ume is 5Mb.<strong>The</strong> addPolicyEntry comm<strong>and</strong> is used to add an entry to the Policy Table. It takes different parameters depending onwh<strong>at</strong> policer type is used. <strong>The</strong> first two parameters after the comm<strong>and</strong> name are always the source <strong>and</strong> destin<strong>at</strong>ion node IDs,<strong>and</strong> the next parameter is the policer type. Following the policer type are the parameters needed by th<strong>at</strong> policer as summarizedbelow:Null Initial code pointTSW2CM Initial code point CIRTSW3CM Initial code point CIR PIRTokenBucket Initial code point CIR CBSsrTCM Initial code point CIR CBS EBStrTCM Initial code point CIR CBS PIR PBSNote th<strong>at</strong> the Null policer requires only the initial code point. Since this policer does not downgrade packets, other inform<strong>at</strong>ionis not necessary. Co<strong>ns</strong>ider a Tcl script for which $q is a variable for an edge queue, <strong>and</strong> $s <strong>and</strong> $d are source <strong>and</strong> destin<strong>at</strong>ionnodes. <strong>The</strong> following comm<strong>and</strong> adds a TSW2CM policer for traffic going from the source to the destin<strong>at</strong>ion:$q addPolicyEntry [$s id] [$d id] TSW2CM 10 2000000Other parameters could be used for different policers in place of "TSW2CM":Null 10TSW3CM 10 2000000 3000000TokenBucket 10 2000000 10000srTCM 10 2000000 10000 20000trTCM 10 2000000 10000 3000000 10000Note, however, th<strong>at</strong> only one policy can be applied to any source destin<strong>at</strong>ion pair.91

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!