Hi Guys:
I am trying to run the following code using ns-2.35 in obuntu 10.04 and it says
"Floating Point Exception", any one with a better suggestion:
#Open the NAM trace file
set tf1 [open out.tr w]
$ns trace-all $tf1
set nf1 [open out.nam w]
$ns namtrace-all $nf1
# open the Trace file
#Define a 'finish' procedure
proc finish {} {
global ns tf1 nf1
$ns flush-trace
#Close the NAM trace file
close $tf1
# close the trace file
close $nf1
exit 0
}
#Create Two nodes
set n1 [$ns node]
set n2 [$ns node]
#Create link between the nodes
$ns duplex-link $n1 $n2 1.5Mb 10ms DropTail
#Setup a TCP connection
set tcp [new Agent/TCP]
$ns attach-agent $n1 $tcp
set sink [new Agent/TCPSink]
$ns attach-agent $n2 $sink
$ns connect $tcp $sink
$tcp set fid_ 1
$tcp set packetSize_ 500
#Setup a FTP over TCP connectioncd
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ns at 1.0 "$ftp start"
$ns at 50.0 "$ftp stop"
puts "Simulation Starts"
$ns run
Regards