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

[ns] Problem with $ftp start



Hi,

I am running an FTP simulation.
According to the ns-doc, "Application/FTP start" causes the source to produce maxpkts_(which I have set to 100) packets. My problem is that the simulation stops abruptly after sending only one packet(and receiving one ack).

Part of my code is:
#Create FullTCP/TCPSink agents and attach them to nodes n(0,2,10,12)
set source0 [new Agent/TCP/FullTcp]
set source2 [new Agent/TCP/FullTcp]
set sink10 [new Agent/TCPSink]
set sink12 [new Agent/TCPSink]
$ns attach-agent $n(0) $source0
$ns attach-agent $n(2) $source2
$ns attach-agent $n(10) $sink10
$ns attach-agent $n(12) $sink12
$source0 set fid_ 1
$source2 set fid_ 2

#Connect the traffic source with the traffic sink
$ns connect $source0 $sink10
$ns connect $source2 $sink12

#Set up TCP level connections
$sink10 listen;
$source0 set window_ 10
$sink12 listen;
$source2 set window_ 10

set ftp0 [new Application/FTP]
set ftp2 [new Application/FTP]
$ftp0 attach-agent $source0
$ftp2 attach-agent $source2
$ftp0 set maxpkts_ 100
$ftp2 set maxpkts_ 100

#Schedule events
$ns at 0.1 "$ftp0 start"
$ns at 0.1 "$ftp2 start"
$ns at 2.0 "$ftp0 stop"
$ns at 2.0 "$ftp2 stop"
#Call the finish procedure after 2.5 seconds simulation time
$ns at 2.5 "finish"

#Run the simulation
$ns run

And here's part of the error msg:
0.541600: FullTCPAgent::recv(_o276): no SYN for our SYN(1)
0.541813: FullTCPAgent::recv(_o277): no SYN for our SYN(1)
2.000000: (_o276) unexpected timeout 3 in state 0
2.000000: (_o277) unexpected timeout 3 in state 0

Any help will be appreciated!!

SY

==================================================
�츮 ���ͳ�, Daum
��� ���� ���� E-mail �ּ� �Ѹ��ϳ�
������ �ѱ� �˻����� Daum FIREBALL
http://www.daum.net