[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
question on CBQ
hi,
I created two nodes, and define the duplex link of CBQ type betw. nodes
n0 and n1. Then i define two traffic class audioclass_ (priority 1) &
dataclass_(priority 2), and attach a cbr source at n0 and a ftp source
at n1. i bind the cbr source as audioclass_ & ftp source as
dataclass_. When i tried to run this test script, the following error
message appears :
ns test-cbqsimple.tcl
ns: _o21 unknown-flow 257 1 2 2:
(_o21 cmd line 1)
invoked from within
"_o21 cmd unknown-flow 257 1 2 2"
invoked from within
"catch "$self cmd $args" ret"
(procedure "_o21" line 2)
(SplitObject unknown line 2)
invoked from within
"_o21 unknown-flow 257 1 2 2"
Does anyone have any idea what can be wrong? my test script is attached
below. Thanks.
########### MY testscript ###########
set ns [new Simulator]
set n0 [$ns node]
set n1 [$ns node]
######################
# Link definition
######################
$ns duplex-link $n0 $n1 10Mb 2ms CBQ
################
# Layout in Nam
################
$ns duplex-link-op $n0 $n1 orient left
#####################################
# set cbr source
#####################################
set cbr0 [new Agent/CBR]
$ns attach-agent $n0 $cbr0
#set pkt-interval to 100ms, pkt size of 200 bytes
$cbr0 set interval_ 0.1
$cbr0 set packetSize_ 200
$cbr0 set fid_ 1
set cbrsink1 [new Agent/LossMonitor]
$ns attach-agent $n1 $cbrsink1
#####################################
# set tcp source
#####################################
set tcp0 [$ns create-connection TCP $n0 TCPSink $n1 2]
#set TCP window size and pkt size
$tcp0 set window_ 50
$tcp0 set packetSize_ 1024
set ftp0 [$tcp0 attach-source FTP]
####################
# queue class creation
####################
set qlim 20
set cbq_qtype_ DropTail
set topclass_ [new CBQClass]
$topclass_ setparams none 0 1.0 auto 8 2 0
### audio class
set audioclass_ [new CBQClass]
set q1 [new Queue/$cbq_qtype_]
$q1 set limit_ $qlim
$audioclass_ install-queue $q1
$audioclass_ setparams $topclass_ true 0.1 auto 1 1 0
### data class
set dataclass_ [new CBQClass]
set q2 [new Queue/$cbq_qtype_]
$q2 set limit_ $qlim
$dataclass_ install-queue $q2
$dataclass_ setparams $topclass_ true 0.9 auto 2 1 0
####
set cbqlink [$ns link $n0 $n1]
$cbqlink insert $topclass_
$cbqlink insert $audioclass_
$cbqlink insert $dataclass_
$cbqlink bind $audioclass_ 1
$cbqlink bind $dataclass_ 2
###################
# event definition
###################
$ns at 0.3 "$ftp0 start"
$ns at 10.0 "$ftp0 stop"
$cbr0 set dst_ [$cbrsink1 set addr_]
$ns at 0.0 "$cbr0 start"
$ns at 10.0 "$cbr0 stop"
$ns run