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

[ns] problem with input data



hi all,
       i am curently trying to simulate a simple lan
(ethernet) and i keep getting an error "problems found
with input data". does anyone know what this means?
can anyone help pls?
thanks to all   (here is the script)

set ns [new Simulator]

set go [open out.tr w]
$ns trace-all $go
set nf [open out.nam w]
$ns namtrace-all $nf



proc finish {} {
	global  go

	#$ns flush-trace
	close $go
        
	#exec nam out.nam &
	#exit 0


#call xgraph to display the results
          exec xgraph out.tr -geometry 800x400 &
          exit 0

}
set opt(seed)	0
set opt(stop)	5
set opt(node)	8

set opt(qsize)	100
set opt(bw)	10Mb
set opt(delay)	1ms
set opt(ll)	LL
set opt(ifq)	Queue/DropTail
set opt(mac)	Mac/802_3
set opt(chan)	Channel
set opt(tcp)	TCP/Reno
set opt(sink)	TCPSink

set opt(app)	FTP

set node0 [$ns node]


proc create-topology {} {
	global ns opt
	global lan node source node0

	set num $opt(node)
	for {set i 0} {$i < $num} {incr i} {
		set node($i) [$ns node]
		lappend nodelist $node($i)
	}

	set lan [$ns newLan $nodelist $opt(bw) $opt(delay) \
			-llType $opt(ll) -ifqType $opt(ifq) \
			-macType $opt(mac) -chanType $opt(chan)]

	
	$ns duplex-link $node0 $node(0) 2Mb 2ms DropTail

	$ns duplex-link-op $node0 $node(0) 


set tcp0 [$ns create-connection TCP/Reno $node0
TCPSink $node(7) 0]
$tcp0 set window_ 15

set ftp0 [new Application/FTP]
$ftp0 attach-agent $tcp0

#set ftp0 [$tcp0 attach-app FTP]

$ns at 0.0 "$ftp0 start"
$ns at $opt(stop) "stop"
}

#$ns at 0.0 "record"
$ns at 50.0 "finish"

$ns run


____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie