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

Re: Error Models



Below is the code I use for this purpose.  Note that the default random
number generator within ErrorModel doesn't appear to be actually random so I
have substituted a new one.
This is on a Linux Redhat 5.1 system.

Eric.

$ns duplex-link $node1  $node1 10Mb 10ms DropTail

#Set up bit errors
set em [new ErrorModel]
set rng [new RNG]
$rng seed 0
set rv [new RandomVariable/Uniform]
$rv use-rng $rng
$rv set min_ 0.0
$rv set max_ 1.0
$em ranvar $rv
$em set rate_ 0.0012

set err [open err.tr w]
set tr [$ns create-trace Loss $err $node1 $node2]

$ns lossmodel $em $node1 $node2




Footer, Isabel wrote:

> Hello
>
> I'm a new user of ns.  I have tried in vain to use the Error Module.
> Can anyone explain to me how to go about implementing an error model.
> All I want is a simple topology with a 2 node TCP duplex-link, with a
> 10^ -7 BER.  I have tried to use the Error module to do this, but have
> failed.  The model appears to just ignore the error module.
>
> Can anyone help me?
>
> Thanks
>
> Isabel
> ------------------------------------------------------------------------
> -----------------
> Isabel Footer
> Roke Manor Research Ltd
> Romsey, Hampshire, SO51 0ZN
>
> Tel(work)  +44 (0)1794 833664
> Tel(home) +44 (0)1794 522768
> email: [email protected]