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

Re: random packet drops




Here is some sample code that applies random packet drops with different
drop probabilities in each direction:

# Create links
$ns simplex-link $n2 $n3 $rbw $prop_delay DropTail
$ns simplex-link $n3 $n2 $rbw $prop_delay DropTail

# Set ErrorModule to drop packets on links
set errmodule_pf [new ErrorModel/Uniform [expr $pf/100.0]]
[$ns link $n2 $n3] errormodule $errmodule_pf
set errmodule_pb [new ErrorModel/Uniform [expr $pb/100.0]]
[$ns link $n3 $n2] errormodule $errmodule_pb

It should be possible to get different drop distributions, but i haven't
played much with that.

neal

On Fri, 5 Feb 1999, Chris Parsa wrote:

> Hi,
> 
> Is there a way to apply random packet drops over a link?  Are 
> different drop distributions possible?
> 
> Thanks a lot,
> 
> Chris
> 
>