關於NS檔

9 views
Skip to first unread message

Dong

unread,
Jul 11, 2015, 5:05:04 AM7/11/15
to twisc-tes...@googlegroups.com
get ns[new Simulator]
source tb_compat.tcl

set cache [$ns node]
tb-set-node-os $cache UBUNTU14-64-STD

set udpsender [$ns node]
tb-set-node-os $udpsender UBUNTU14-64-STD

set tcpsender [$ns node]
tb-set-node-os $tcpsender UBUNTU14-64-STD

set link0 [$ns duplex-link $cache $udpsender 100Mb 0ms DropTail]

set link1 [$ns duplex-link $cache $tcpsender 100Mb 0ms DropTail]
 

set udp [new Agent/UDP]
$ns attach-agent $udpsender $udp
set null[new Agent/Null]
$ns attach-agent $cache $null
$ns connect $udp #null

set cbr [new Application/Traffic/CBR]
$cbr attach-agent $udp
$cbr set type_ CBR
$cbr set packet_size_ 1000
$cbr set rate_ 1mb
$cbr set random_ false

set tcp [new Agent/TCP]
$tcp set class_ 2
$ns attach-agent $tcpsender $tcp
set sink [new Agent/TCPSink]
$ns attach-agent $cache $sink
$ns connect $tcp $sink

set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ftp set type_ FTP

$ns at 59 "cbr start"
$ns at 60 "ftp start"

$ns rtproto Static
$ns run

您好,以上是我設置的ns file,
請問在建置時為什麼會出現error如下:
Unknown: get nsSimulator1
while executing
"error "Unknown: $args""
(procedure "::unknown" line 2)
invoked from within
"get ns[new Simulator]"
(file "15615.ns" line 550)
invoked from within
"real_source ${GLOBALS::nsfile}"
invoked from within
"if { ${GLOBALS::errors} != 1 } {
file copy -force ${GLOBALS::tbcompat} .
real_source ${GLOBALS::nsfile}

if {${GLOBALS::ran} == 0} {
perr..."
(file "/usr/testbed/lib/ns2ir/parse.tcl" line 675)
*** ERROR: parse-ns: Parsing failed (error code 256)!
*** ERROR: nscheck: NS Parse failed!

請問是否有哪裡設計出問題?
能否請您幫忙解惑,感恩。
Reply all
Reply to author
Forward
0 new messages