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

[ns] FTP and Telnet Application - Please help me



Hi all,

I am trying to create a model with a FTP, a telnet, and CBR sources. But
I can get no flow at all from the FTP and telnet applications. What did
I do wrong. Please, is there anyone you can help me?????

Thank you
Regards
Daniela

#
#Create a traffic sink and attach it to the node node8
#

set Dst0 [new Agent/LossMonitor]
$ns attach-agent $Destino0 $Dst0

set Dst1 [new Agent/LossMonitor]
$ns attach-agent $Destino1 $Dst1

set Dst2 [new Agent/LossMonitor]
$ns attach-agent $Destino2 $Dst2

set Dst3 [new Agent/LossMonitor]
$ns attach-agent $Destino3 $Dst3

###############################################################################

#
#Create a Traffic Source
#

set Src0 [new Agent/TCP/FullTcp]
$ns attach-agent $Fonte0 $Src0
#$Src0 set packetSize_ 250
#$Src0 set interval_ 0
#$Src0 set rate_ 2Mb
set telnet [new Application/Telnet]
$telnet attach-agent $Src0
$ns connect $Src0 $Dst0
$Src0 set fid_ 0

set Src1 [new Agent/UDP]
$ns attach-agent $Fonte1 $Src1
#$Src1 set packetSize_ 250
#$Src1 set rate_ 1.8Mb
set cbr1 [new Application/Traffic/CBR]
$cbr1 set packetSize_ 250
$cbr1 set rate- 1.8Mb
$cbr1 attach-agent $Src1
$ns connect $Src1 $Dst1
$Src1 set fid_ 1

set Src2 [new Agent/TCP/FullTcp]
$ns attach-agent $Fonte2 $Src2
$Src2 set packetSize_ 250
$Src2 set interval_ 0
$Src2 set rate_ 2Mb
set ftp [new Application/FTP]
$ftp attach-agent $Src2
$ns connect $Src2 $Dst2
$Src2 set fid_ 2

set Src3 [new Agent/UDP]
$ns attach-agent $Fonte3 $Src3
#$Src3 set packetSize_ 250
#$Src3 set rate_ 1Mb
set cbr3 [new Application/Traffic/CBR]
$cbr3 set packetSize_ 250
$cbr3 set rate_ 1Mb
$cbr3 attach-agent $Src3
$ns connect $Src3 $Dst3
$Src3 set fid_ 3

###############################################################################


$ns at 0.3   "record"

$ns at 0.1 "$telnet start"
$ns at 0.1 "$cbr1   start"
$ns at 0.1 "$ftp    start"
$ns at 0.1 "$cbr3   start"

$ns at 1.1 "$telnet stop"
$ns at 1.1 "$cbr1   stop"
$ns at 1.1 "$ftp    stop"
$ns at 1.1 "$cbr3   stop"

$ns at 1.0 "recv-pkts"
$ns at 1.0 "finish"

$ns run

###############################################################################