[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] some clarifications plz ...
Again ;-)
I'm studying management, i dont know anything about c++ ... plz dont tell me
to refer to some c codes because I dont understand what I read ;-)
######
# Q1 #
######
I would like to gather statistics of a queue at a node/link.
The stats i'd like to get are :
how full is the buffer at any time / on average ?
how many packets have been dropped ?
Page 73 of the NS manual, I spotted a couple variables i could query
regarding queue state so i wrote this little piece of code :
$ns monitor-queue $n2 $n3 size_ pkts_ barrivals_ bdepartures_ parrivals_
pdepartures_ bdrops_ pdrops_ bytesInt_ pktsInt_
which generated an error
The following 2 lines didnt generate any error :
$ns monitor-queue $n2 $n3 size_ pkts_
OR
$ns monitor-queue $n2 $n3 barrivals_ bdepartures_
It appears I can only monitor 2 variables at the same time ... Did i do
something wrong or is that a limitation in NS ?
Anyways I can manage with 2 variables at a time but now i've managed to set
up a queue monitoring object, how do i get values for the variables ?
Should i retrieve those values in the same way its done for LossMonitor ?
like this
set lost0 [$sink0 set nlost_] ?
######
# Q2 #
######
I've read the readme for the latest seg and reassembly code ... It appears
it was designed for ns 2.1b5 ... Did you try it on ns 2.1b7A ?
######
# Q3 #
######
Is it abusive to say that a simplex-link can be thought as a half-duplex
link in context of Ethernet ?
Is it abusive to say that a duplex-link can be thought as a full-duplex link
in context of Ethernet ?
######
# Q4 #
######
Would this piece of code actually simulate correctly the operation of a
switching hub operating in full-duplex mode ?
Or should I use some other way ?
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
######
# Q5 #
######
this will create a CSMA/CD based lan (repeater hub) am i right ?
$ns make-lan "$radio_ftpd $radio_ftpc $radio_boss $radio_hub" 100Mb 2ms LL
Queue/DropTail Mac/802_3 Channel
######
# Q6 #
######
I'd like to connect a CSMA/CD based LAN to a port on a switching hub. So the
link has to be half-duplex.
I tried this and i didnt work ... any idea ?
#Create 2 LANS, one port on each hub is used to connect to a switch. Both
switches are linked thru a full-duplex link
$ns make-lan "$radio_ftpd $radio_ftpc $radio_boss $radio_hub" 100Mb 2ms LL
Queue/DropTail Mac/802_3 Channel
$ns make-lan "$mammo_ftpd $mammo_ftpc $mammo_boss $mammo_hub" 100Mb 2ms LL
Queue/DropTail Mac/802_3 Channel
$ns simplex-link $radio_hub $radio_switch 100Mb 2ms DropTail
$ns simplex-link $mammo_hub $mammo_switch 100Mb 2ms DropTail
$ns duplex-link $radio_switch $mammo_switch 100Mb 2ms DropTail
THX ALOT ALOT ALOT ;-)
Thomas