NS2网络模拟(2)-丢包率
1: #NS2_有线部分\LossRate.awk
2:
3: BEGIN {
4: #Initialize the variable
5: Lost = 0; #the Sum of Lost packet
6: Send = 0; #the Sum of Send packet
7: }
8:
9: {
10: #Event Abbreviation Type Value
11: #%g %d %d %s %d %s %d %d.%d %d.%d %d %d
12: #Normal Event
13: #r: Receive
14: #d: Drop
15: #e: Error
16: #+: Enqueue
17: #-: Dequeue
18: #double Time
19: #int (Link-layer) Source Node
20: #int (Link-layer) Destination Node
21: #string Packet Name
22: #int Packet Size
23: #string Flags
24: #int Flow ID
25: #int (Network-layer) Source Address
26: #int Source Port
27: #int (Network-layer) Destination Address
28: #int Destination Port
29: #int Sequence Number
30: #int Unique Packet ID
31:
32: #Evaluate the fields to new viariables
33: EVENT = $1;
34: TIME = $2;
35: SRCNODE = $3
36: DSTNODE = $4;
37: PKTNAME = $5;
38: PKTSIZE = $6;
39: FLAGS = $7;
40: FLOWID = $8;
41: SRCADDPORT = $9;
42: DSTADDPORT = $10;
43: SEQNO = $11;
44: PKTID = $12;
45:
46: #Count up the packets send from n1
47: if (EVENT == "+" && SRCNODE == 1 && DSTNODE == 0 && PKTNAME == "tcp")
48: Send ++;
49: #Count up the drop packet
50: if (EVENT == "d" && SRCNODE == 0 && DSTNODE == 1 && PKTNAME == "ack")
51: Lost ++;
52: }
53:
54: END {
55: printf("TCP:number of packets send: %d lost: %d\n", Send, Lost);
56: printf("TCP:the loss rate of packets: %.5f\n", Lost/Send);
57: }
NS2网络模拟(2)-丢包率的更多相关文章
- 无线路由器wds桥接技术+丢包率
半根毛线http://www.cnblogs.com/hsd-/ 今天下午鼓捣了一下无线路由的wds桥接 算是计算机网络的作业 码来分享一下 1.首先设置主路由 我的主路由是斐讯4线 路由ip为192 ...
- [转]网络性能评估工具Iperf详解(可测丢包率)
原文链接:安全运维之:网络性能评估工具Iperf详解:http://os.51cto.com/art/201410/454889.htm 参考博文:http://linoxide.com/monito ...
- zabbix使用ICMP Ping模版实现对客户端网络状态的监控,监控丢包率、响应时间
参考网站: https://www.cnblogs.com/saneri/p/6706578.html 使用fping报错注意事项: https://blog.csdn.net/oqqssh/arti ...
- 用ping命令简单的测试 延时、抖动、丢包率
在DOS命令状态下输入 :ping 202.105.135.211 -t (连续的对该IP地址执行Ping命令,直到被用户以Ctrl+C中断)就会得到下面的结果:Pinging 202.105.135 ...
- [转载]UDP丢包率提升
UDP丢包及无序问题 转载自:http://hi.baidu.com/gamedot/item/96cb9bf1a717eb14d6ff8cd5 最近在做一个项目,在这之前,做了个验证程序. 发现客户 ...
- zabbix使用fping监控任意两个节点之间的网络质量、丢包率和响应时间
zabbix使用fping监控任意两个节点之间的网络质量.丢包率和响应时间 之前的博文 使用zabbix3..4的ICMP Ping模版实现对客户端网络状态的监控 https://www.cnblog ...
- shell 获取指定ip的丢包率
shell 获取指定ip的丢包率 丢包率大于10%就重新网络 使用sed 替换字符串 [[ $(ping -c 10 -W 1 baidu.com | awk '$6 ~ /%/{print $6}' ...
- 收集TCP端口的访问延迟和丢包率
需求: 找一款工具可以对TCP 80端口 收集 访问延迟和丢包率 找到的工具: 1.Hping : http://www.hping.org/ 2.paping : https://docs.azu ...
- RFC2544丢包率测试——信而泰网络测试仪实操
文章关键词:RFC2544.丢包率.吞吐量. 丢包率概述: 丢包率(Frame Loss Rate)测试的目的是确定DUT在不同的负载和帧长度条件下的丢包率.在稳定负载下,由于网络设备资源缺乏,应该正 ...
随机推荐
- css3-11 如何实现2D动画
css3-11 如何实现2D动画 一.总结 一句话总结:就是transform属性,属性值为1.translate() 2.rotate() 3.scale(),而这是哪个属性值是带参数的 ...
- A Guide to Python's Magic Methods
Book Source:[https://rszalski.github.io/magicmethods/] magic methods: 名称前后有双下划线的方法 构造函数和初始化 初始化类实例时, ...
- adobe-flash-player离线下载方法
https://www.neowin.net/news/adobe-flash-player-3000134 http://fpdownload.adobe.com/get/flashplayer/p ...
- MIPS Instruction Set
https://www.mips.com/develop/training-courses/mips-basic-training-course/ The MIPS64 Instruction Set ...
- 【53.61%】【BZOJ 2302】[HAOI2011]Problem c
Time Limit: 30 Sec Memory Limit: 256 MB Submit: 526 Solved: 282 [Submit][Status][Discuss] Descriptio ...
- SNMP 配置
http://blog.sina.com.cn/s/blog_593bf1da0100xsvu.html
- 在Android实现client授权
OAuth对你的数据和服务正在变成实际上的同意訪问协议在没有分享用户password. 实际上全部的有名公司像Twitter.Google,Yahoo或者LinkedIn已经实现了它.在全部流行的程序 ...
- C#趣味程序---个位数为6,且能被3整出的五位数
using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int ...
- 《学习opencv》笔记——关于一些画图的函数
画图函数 (1)直线cvLine函数 其结构 void cvLine(//画直线 CvArr* array,//画布图像 CvPoint pt1,//起始点 CvPoint pt2,//终点 CvSc ...
- Warning: file_put_contents(常用单词1.txt): failed to open stream: Invalid argument in
Warning: file_put_contents(常用单词1.txt): failed to open stream: Invalid argument in 一.总结 1.上述问题是因为Win ...