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

[ns] FTP and CBQ



Hi all,
 
I'm trying to use FTP with CBQ
Do I have to set a class for FTP and another one for the ACKs.
I tried the scrip below but it keeps giving me the following error:
 
Any help will be appreciated.
Nasser
 
 
ns: _o114 unknown-flow 1 0 0:
    (_o114 cmd line 1)
    invoked from within
"_o114 cmd unknown-flow 1 0 0"
    invoked from within
"catch "$self cmd $args" ret"
    (procedure "_o114" line 2)
    (SplitObject unknown line 2)
    invoked from within
"_o114 unknown-flow 1 0 0"
#=========== related script =========
# ........

#Create six nodes
set fs [$ns node] ;# node 0
set fd [$ns node] ;# node 1
set ps [$ns node] ;# node 2
set pd [$ns node] ;# node 3
set r0 [$ns node] ;# node 4
set r1 [$ns node] ;# node 5
 
#Create links between the nodes
# ........
#Set the CBQ
$ns duplex-link $r0 $r1 10Mb 20ms CBQ
 
set cbqlink1 [$ns link $r0 $r1]
set cbqlink2 [$ns link $r1 $r0]
 
#Set the CBQClass
set topclass [new CBQClass]
$topclass setparams none 0 1 auto 4 2 0
set classe_0 [new CBQClass]
set queue_0 [new Queue/DropTail]
$classe_0 install-queue $queue_0
$classe_0 setparams $topclass 1 1 auto 1 1 0
 
set classe_1 [new CBQClass]
set queue_1 [new Queue/DropTail]
$classe_1 install-queue $queue_1
$classe_1 setparams $topclass 1 1 auto 1 1 0
 
$cbqlink1 insert $topclass
$cbqlink1 insert $classe_0
$cbqlink2 insert $classe_1
 
$cbqlink1 bind $classe_0 0 ; # fid 0
$cbqlink2 bind $classe_1 1 ; # fid 1
 
#Create a TCP agent and attach an FTP to it at node fs
set tcp0 [new Agent/TCP]
$ns attach-agent $fs $tcp0
$tcp0 set fid_ 0
set sink0 [new Agent/TCPSink]
$ns attach-agent $fd $sink0
$sink0 set fid_ 1
$ns connect $tcp0 $sink0
 
set ftp0 [new Application/FTP]
$ftp0 attach-agent $tcp0
 

#Schedule events
$ns at 0.0 "$ftp0 start"
$ns at 3.0 "$ftp0 stop"
 
======= end of script ===============