全文预览

《通信网仿真与ns仿真器》作业报告

上传者:蓝天 |  格式:doc  |  页数:12 |  大小:0KB

文档介绍
set avg_ [expr 44000.0/(8*$mu)] 代码改成 set pktSize 5000 即可。 3.1.3 D/D/1 仿真程序 set ns [new Simulator] set tracefile1 [open out.tr w] $ns trace-all $tracefile1 #Open the NAM trace file set namfile [open out.nam w] $ns namtrace-all $namfile #Define a 'finish' procedure proc finish {}{ global ns tracefile1 namfile $ns flush-trace close $tracefile1 close $namfile exec nam out.nam & exit 0} 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 $udp set fid_ 2 set nul [new Agent/Null] $ns attach-agent $n2 $nul $ns connect $udp $nul $ns at 0.0 "$cbr start" $ns at 2.0 "finish" $ns run 3.2 仿真实验图 1.M/M/1 参数分析(1 )时延: (2 )抖动率: (3 )吞吐量: 2.M/D/1 参数分析(1 )时延: (2 )抖动率: (3 )吞吐量:

收藏

分享

举报
下载此文档