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

howto make lossy-link?



Is there anyone know how to make lossy-link?
I'm using ns2.1-b2, and preparing for reliable multicast simulation.
I've modified the content of test-suite-mcast.tcl to put in some part of
test-suite-mcast.tcl to make 4 node topology and one link lossy.
But I don't think this actually works.
Please give me a hand to make a lossy-link.
Below I've appended making-topology part of my tcl file and want to make
link between n0 and n1 lossy.
I'm not sure this is correct, I'm afraid.

...
Topology/net4a instproc init ns {
    $self next $ns
    $self instvar node_
    Simulator set NumberInterfaces_ 1
    $ns duplex-link $node_(n0) $node_(n1) 1.5Mb 10ms DropTail
    $ns duplex-link $node_(n0) $node_(n2) 1.5Mb 10ms DropTail
    $ns duplex-link $node_(n0) $node_(n3) 1.5Mb 10ms DropTail

    $self instvar lossylink_
    set lossylink_ [$ns link $node_(n0) $node_(n1)]
    set em [new ErrorModule Fid]
    set errmodel [new ErrorModel/Periodic]
    $errmodel unit pkt
    $errmodel set offset_ 1.0
    $errmodel set period_ 0.25
    $lossylink_ errormodule $em
    $em insert $errmodel
    $em bind $errmodel 0

    if {[$class info instprocs config] != ""} {
    $self config $ns
    }
}
...

Plz, tell me about lossy-link or point me out where can I find the
information about it.

Thank you..


--
Hae-Woon Nam
Telecommunications and Signal Processing Lab.
(E-mail)  [email protected]
(Tel)     +82-2-880-8429
(Fax)     +82-2-880-8209