问下ns2的这些命令应该写在哪里面?我用的ubuntu,是ubuntu终端?……
下面是ns2的Tcl程序,这些代码应该写在哪里面?ubuntu的终端?我在终端里输入前三条命令还通过,第四条就提示duplex-link:找不到命令?setns[newS...
下面是ns2的Tcl程序,这些代码应该写在哪里面?ubuntu的终端?我在终端里输入前三条命令还通过,第四条就提示duplex-link:找不到命令?
set ns [new Simulator]
set n1 [$ns node]
set n2 [$ns node]
$ns duplex-link $n1 $n2 1Mb 1ms DropTail
set udp [new Agent/UDP]
$ns attach-agent $n1 $udp
set cbr [new Application/Traffic/CBR]
$cbr attach-agent $udp
set nul [new Agent/Null]
$ns attach-agent $n2 $nul
$ns connect $udp $nul
$ns at 0.0 "$cbr start“
$ns at 2.0 "exit 0“
$ns run 展开
set ns [new Simulator]
set n1 [$ns node]
set n2 [$ns node]
$ns duplex-link $n1 $n2 1Mb 1ms DropTail
set udp [new Agent/UDP]
$ns attach-agent $n1 $udp
set cbr [new Application/Traffic/CBR]
$cbr attach-agent $udp
set nul [new Agent/Null]
$ns attach-agent $n2 $nul
$ns connect $udp $nul
$ns at 0.0 "$cbr start“
$ns at 2.0 "exit 0“
$ns run 展开
1个回答
展开全部
建一tcl文件...然后在terminal里面打ns 文件名.tcl
http://www.isi.edu/nsnam/ns/ns-documentation.html
教程...我猜你大概可能也许会需要它- -...
http://www.isi.edu/nsnam/ns/ns-documentation.html
教程...我猜你大概可能也许会需要它- -...
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询