thanks, but I'm affraid this won't help me...because it has only 2 nodes.
Instead, I need to implement multiple nodes and the problem is that ns can't
understand the command:
$ns at $i "$ftp($i) start"
I mean, it can only compile : $ns at $i "$ftp start" (you see, there's no
ftp($i)).
What do you think?
Sergio Morillo <[EMAIL PROTECTED]> wrote:
Hi Sorin,
There is a code that runs. Adapt it to your case.
----------------------------------------------------------------
# Create a topology
Set ns [new Simulator]
set n0 [$ns node]
set n1 [$ns node]
$ns duplex-link $n0 $n1 1Mb 10ms DropTail
# Add Transport agents
set tcp [new Agent/TCP]
$ns attach-agent $n0 $tcp
set tcpsink [new Agent/TCPSink]
$ns attach-agent $n1 $tcpsink
$tcp connect $tcpsink
# Add application
set ftp [new Application/FTP]
$ftp attach-agent $tcp
# Create a schedule
$ns at 0.5 "$ftp start"
$ns at 4.5 "$ftp stop"
#Run the simulation
$ns run
--------------------------------------------------------------------------
---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.