[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] problem with rtproto DV on CBQ
Hi all,
I tried to use CBQ on my work and have the problem when I tried to use
command "$ns rtproto DV" with it.
I just figure it out that the messege from routing algorithm might not
have it own queue for them. But I might be wrong.
Anyone please help me out on this. Below is the code that I wrote with
normal use of CBQ like ones in test-suite-cbq.tcl. It will go nicely if I
get rid of rtproto command.
The topogy is like this :
8
/
0--------1----2
\
9
And I try to put 2 flow inside with this tree structure
topclass
/ \
PFclass BEclass
/ \
LSPclass1 LSPclass2
I bind the flow1 to queue in LSPclass1 and bind flow2 in LSPclass2
I also paste the error below. :)
Thank you very much in advance
-Surapich Phuvoravan
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
set ns [new Simulator]
set nf [open fail-reroute.nam w]
set f1 [open cbq-linear.tr w]
$ns trace-all $f1
$ns namtrace-all $nf
proc finish {} {
global ns nf f1
$ns flush-trace
close $nf
close $f1
exec nam fail-reroute.nam &
exit 0
}
$ns rtproto DV
#
set node0 [$ns node]
set LSR(1) [$ns node]
set LSR(2) [$ns node]
set node8 [$ns node]
set node9 [$ns node]
#
# make links
#
$ns duplex-link $LSR(1) $LSR(2) 1Mb 10ms CBQ
set cbqlink [$ns link $LSR(1) $LSR(2)]
set topclass [new CBQClass]
set BEclass [new CBQClass]
set PFclass [new CBQClass]
$topclass setparams none 0 1.0 auto 8 2 0
$BEclass setparams $topclass true 0.6 auto 1 1 0
$PFclass setparams $topclass true 0.4 auto 2 1 0
$cbqlink insert $topclass
$cbqlink insert $BEclass
$cbqlink insert $PFclass
$ns duplex-link $node0 $LSR(1) 10Mb 10ms DropTail
$ns duplex-link $LSR(2) $node8 1Mb 10ms DropTail
$ns duplex-link $LSR(2) $node9 1Mb 10ms DropTail
proc attach-expoo-traffic { node sink size burst idle rate } {
global ns
set source [new Agent/CBR/UDP]
$ns attach-agent $node $source
set traffic [new Traffic/Expoo]
$traffic set packet-size $size
$traffic set burst-time $burst
$traffic set idle-time $idle
$traffic set rate $rate
$source attach-traffic $traffic
$ns connect $source $sink
return $source
}
#Create a traffic sink and attach it to the node node8
set sink0 [new Agent/LossMonitor]
$ns attach-agent $node8 $sink0
set sink1 [new Agent/LossMonitor]
$ns attach-agent $node9 $sink1
#Create a traffic source
set src0 [attach-expoo-traffic $node0 $sink0 1400 0 0 500k]
set src1 [attach-expoo-traffic $node0 $sink1 1400 0 0 500k]
puts "source ID is [$src0 set fid_ 1]"
$src1 set fid_ 2
$ns color 2 orange
$ns color 1 yellow
#add new procedure for cbq add BW.
proc create_PF_LSP {allotbw flowID} {
global LSPclass cbqlink LSPclass PFclass
set LSPclass [new CBQClass]
$LSPclass setparams $PFclass true $allotbw auto 1 1 0
set q [new Queue/DropTail]
$q set limit_ 20
$LSPclass install-queue $q
$cbqlink insert $LSPclass
$cbqlink bind $LSPclass $flowID
}
proc create_BE_LSP {allotbw flowID} {
global LSPclass cbqlink LSPclass BEclass
set LSPclass [new CBQClass]
$LSPclass setparams $BEclass true $allotbw auto 1 1 0
set q [new Queue/DropTail]
$q set limit_ 20
$LSPclass install-queue $q
$cbqlink insert $LSPclass
$cbqlink bind $LSPclass $flowID
}
create_PF_LSP 0.6 1
create_BE_LSP 0.4 2
$ns at 0.3 "$src0 start"
$ns at 0.35 "$src1 start"
#$ns at 0.15 "[create_PF_LSP 0.6 1]"
#$ns at 0.2 "[create_BE_LSP 0.4 2]"
$ns at 0.6 "$src0 stop"
$ns at 0.65 "$src1 stop"
$ns at 0.7 "finish"
$ns run
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ns: _o33 unknown-flow 513 257 0 0:
(_o33 cmd line 1)
invoked from within
"_o33 cmd unknown-flow 513 257 0 0"
invoked from within
"catch "$self cmd $args" ret"
(procedure "_o33" line 2)
(SplitObject unknown line 2)
invoked from within
"_o33 unknown-flow 513 257 0 0"