hi,everyone I am a new user to ns-2,I simulation the CBQ with the following script,but produce error,I do not konw why,who can help me ?thank you in advance! this is my script: set ns [new Simulator] set tf [open cbq.tr w]$ns trace-all $tf proc finish {} { global ns tf nf $ns flush-trace close $tf close $nf } set n0 [$ns node]set n1 [$ns node] $ns duplex-link $n0 $n1 1.0Mb 0ms CBQ/WRR #set cbqlink [$ns link $n0 $n1] Simulator instproc make_queue { cl qlim } { $self instvar cbq_qtype_ set q [new Queue/$cbq_qtype_] $q set limit_ $qlim $cl install-queue $q } Simulator instproc create_flat { audborrowok audxdelay} { $self instvar topclass_ vidclass_ audioclass_ dataclass_ $self instvar cbq_qtype_ set qlim 20 set cbq_qtype_ DropTail set topclass_ [new CBQClass] # (topclass_ doesn't have a queue) $topclass_ setparams none 0 0.98 auto 8 2 0 set vidclass_ [new CBQClass] $self make_queue $vidclass_ $qlim $vidclass_ setparams $topclass_ true 0.32 auto 1 1 0 set audioclass_ [new CBQClass] $self make_queue $audioclass_ $qlim $audioclass_ setparams $topclass_ $audborrowok 0.03 auto 1 1 $audxdelay set dataclass_ [new CBQClass] $self make_queue $dataclass_ $qlim $dataclass_ setparams $topclass_ true 0.65 auto 2 1 0} Simulator instproc insert_flat cbqlink { $self instvar topclass_ vidclass_ audioclass_ dataclass_ $cbqlink insert $topclass_ $cbqlink insert $vidclass_ $cbqlink insert $audioclass_ $cbqlink insert $dataclass_ $cbqlink bind $vidclass_ 1;# fid 1 $cbqlink bind $audioclass_ 2;# fid 2 $cbqlink bind $dataclass_ 3; # fid 3} # Create three CBR connections. set udp1 [new Agent/UDP] $ns attach-agent $n0 $udp1 set sink1 [new Agent/LossMonitor] $ns attach-agent $n1 $sink1 $ns connect $udp1 $sink1 $udp1 set fid_ 1 set cbr1 [new Application/Traffic/CBR] $cbr1 attach-agent $udp1 $cbr1 set packet_size_ 190 $cbr1 set rate_ 1.52Mb set udp2 [new Agent/UDP] $ns attach-agent $n0 $udp2 set sink2 [new Agent/LossMonitor] $ns attach-agent $n1 $sink2 $ns connect $udp2 $sink2 $udp1 set fid_ 2 set cbr2 [new Application/Traffic/CBR] $cbr2 attach-agent $udp2 $cbr2 set packet_size_ 500 $cbr1 set rate_ 2Mb set udp3 [new Agent/UDP] $ns attach-agent $n0 $udp3 set sink3 [new Agent/LossMonitor] $ns attach-agent $n1 $sink3 $ns connect $udp1 $sink3 $udp1 set fid_ 3 set cbr3 [new Application/Traffic/CBR] $cbr3 attach-agent $udp3 $cbr3 set packet_size_ 1000 $cbr3 set rate_ 1.6Mb $ns at 0.5 "$cbr1 start; $cbr2 start; $cbr3 start"$ns at 2.0 "$cbr1 stop; $cbr2 stop; $cbr3 stop" $ns at 2.0 "finish"$ns run the error: ns:_o17 unknow-flow 0 1 3: <_o17 cmd line 1> invoked from within"_o17 cmd unknow-flow 0 1 3" invoked from within "catch "$self cmd $args" ret" invoked from within"if [catch "$self cmd $args" ret] { set cls [$self info class] global errorInfo set savedInfo $errorInfoerror "error when calling class $cls:$args" $..." <procedure "_o17" line 2> <SplitObject unknown line 2> invoked from within"_o17 unknown-flow 0 1 3" I do konm the meaning of this error Thank you very much
------------------------------------------------------------------- 上海车展开幕在即,热点新车抢先揭秘( http://ad4.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20070410.html ) =================================================================== 注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html )