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

[ns] 2 point to point links =? switch



Hello all,

##############
FIRST QUESTION
##############

I'm trying to simulate a network consisting of 3 workstations connected to 3
ports on a switching hub

radio_n0 <---> switch <---> cardio_n2
                  ^
                  |
                  |
                  |
                  ^
               mammo_n3

Will the following piece of code do it ?

set radio_n0 [$ns node]
set switch [$ns node]
set cardio_n2 [$ns node]
set mammo_n3 [$ns node]

$ns duplex-link $radio_n0 $switch 100Mb 10ms DropTail
$ns duplex-link $switch $cardio_n2 10Mb 10ms DropTail
$ns duplex-link $switch $mammo_n3 10Mb 10ms DropTail

###############
SECOND QUESTION
###############

Is there any layer2 agent in Ns which i could use to get #collisions and
#frames transmitted ??

Thank you

Thomas