如何为TCP和UDP连接生成吞吐量与时间的NS2 xgraph?

时间:2017-10-24 09:25:21

标签: graph tcp udp simulation ns2

这是我的代码:

通过TCP连接设置FTP流量

If activedocument.ContentControls(1).LockContents = True Then ' Prevent edit
If activedocument.ContentControls(1).LockContentControl = True Then ' Prevent delete
' Note you don't actually need the " = True", it is just there for clarity

通过UDP连接设置CBR流量

set ftp [new Application/FTP]
$ftp attach-agent $tcpsource
$ftp set type_ FTP
$ftp set packet_size_ 1000
$ftp set rate_ 10mb
$ftp set random_ false # setting random false means no noise

1 个答案:

答案 0 :(得分:0)

“VIII。为Xgraph创建输出文件”http://www.isi.edu/nsnam/ns/tutorial/nsscript4.html

Xgraph示例https://drive.google.com/file/d/0B7S255p3kFXNczFLV0ZnNWdVY2s/view?usp=sharing

示例,具有“瞬时吞吐量”的APP工具随着时间的推移......来自文件w-udp__Inst.Thr.txt的片段

--Instantaneous throughput--
        1.12134           0.536522

        2.12363            106.844

        3.12715            439.453

        4.13067            783.984

        5.13419            1128.52

        6.13771            1473.05

        7.14123            1817.58

        8.14475            2162.11

        9.14827            2506.64

         10.149            3306.11

        11.1496            6844.12

        12.1504            8871.78

        .

Inst_Thr-wireless-udp.png:

enter image description here

APP-Tool将从默认跟踪文件中提取信息.tr。 链接:https://github.com/WiNG-NITK/APP-Tool