[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] flow classifiers with error model
hello,
I need to experiment tcp's loss behaviour and recovery process. for this i
need to have multiple flows, each with a fixed drop probability going
through a bottleneck link. I think what i need to use for this is the
periodic error model with a per flow classifier. however when i
implemented this, the packet drops were not confined to the flow i gave
and even the drop probability was not waht i mentioned. the same code
worked fine when i tested it with a single flow. Am i missing something
here? Do i need to specificallly say something about the classifier ? i am
attaching the code that i used below. I will greatly appreicate any
suggestions or corrections to this code.
thank you
sumitha
proc drop_pkt { link flow n } {
set em [new ErrorModule Fid] # what is Fid for ?
set errmodel [new ErrorModel/Periodic]
$errmodel unit pkt
$errmodel set offset_ $n
$errmodel set period_ 100.0
$link errormodule $em
$em insert $errmodel
$em bind $errmodel $flow
}
set lossy_link [$ns link $n(0) $n(41)]
$ns at 0.0 "drop_pkt $lossy_link [$src(1) set fid_] 10"