[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Diffserv implementation in NS



> Hi all,
> 
> I've some queries regarding the cbr-tb.tcl example file provided with the
> Diffserv distribution.
> 
> I tried to run a simulation after changing a few paramaters in this file.
> The changes I made were:
> 
> 1) I changed the values of "cir1, cbs1 & rate1" and made them equal to
> those for source 0, namely (1000000, 3000 & 2000000 resp.)
> 
> 2) I changed the Policy table entry so that all packets originating at
> "s2" and terminating at "dest" would be marked with an initial code point
> 11.
> $qE1C addPolicyEntry [$s2 id] [$dest id] TokenBucket $cir1 $cbs1
> (similar change was made for RED parameters from Core to Edge2 for the
> reverse traffic)
> 
> 3) A corresponding Policer table entry was added for code point 11
> $qE1C addPolicerTableEntry TokenBucket 11 11
> (similar change was made for RED parameters from Core to Edge2 for the
> reverse traffic)
> 
> 4) I marked each source with a different colored flow id
> $ns color 1 red
> $ns color 2 blue
> 
> $udp0 set fid_ 1
> $udp1 set fid_ 2 
> 
> 4) Added code to generate a trace file
> 
> Rest of the code remains same as the original copy.
> 
> Finally, I parse the trace file to count:
> 1) Total # of dropped packets from source node 3 (core) to dest node 4
> (edge2)
> 2) Percentage of source 0 (fid_ = 1) packets dropped
> 3) Percentage of source 1 (fid_ = 2) packets dropped
> 
> The problem I'm facing is that the percentage value is 50% for sources 0 &
> 1. Since I'm setting the intial CP of pkts from source 1 to be 11, I
> expected a higher drop percentage for packets from source 1.
> 
> Am I missing something? Would apprecaite your feedback.
> 
> Thanks,
> Ishan.
> P.S.: I'm attaching the TCL script and the AWK script (for parsing trace
> file) for reference. 
> 
>  <<count>>  <<diffserv.tcl>> 

count

diffserv.tcl