版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、数据链路层协议仿真实验信息安全 092370 董琦【实验目的】了解各个协议的组成,原理以及帧传输方式,掌握每个协议之间的关系【实验准备】通过在下载的linux仿真器源码包进行编译,能够得到协议2-协议6的模拟器模拟数据链路协议。通过运行模拟器,能够仿真几个协议的运行模式,得到实验数据。【实现功能】分别运行协议2-协议6的模拟器模拟数据链路协议,输入不同的参数,观察运行结果【实验环境】core 2 t4200 2ghz 内存 2g内核:linux version 3.0.0-12-generic (builddvernadsky)操作系统:ub
2、untu 11.10【实验步骤】1根据说明文当,可以使用以下方法运行程序。 ./protocol-program events timeout pct_loss pct_cksum debug_flags datafile_flagwhere * events tells how long to run the simulation * timeout gives the timeout interval in ticks * pct_loss gives the percentage of frames that are lost (0-99) * pct_cksum gives the p
3、ercentage of arriving frames that are bad (0-99) * debug_flags enables various tracing flags: 1frames sent 2frames received 4timeouts 8periodic printout for use with long runs* datafile_flag enables output of summary data to a data filefor later processing with a script (includingthe gui). the outpu
4、t file will be totdata.txt. values of this flag are 0 or 1:0do not append data to totdata.txt0append data to totdata.txtfor example ./protocol6 100000 40 20 10 3 1 【实验结果】1.运行protocol2 参数为./protocol2 100 50 20 10 1 1protocol2是一个无措信道上的单工停等协议。其基本原理是发送方以高于接收方处理能力的速度发送帧,导致接收方被淹没。我们假设通信信道不会出错,并且数据流量是单工的。发
5、送方发送一帧,等待确认到达后才能继续发送。其中100表示他将以50个tick的时间间隔运行100个协议实体进程。20的丢包率,10的校验和错误率(的80通过),它会打印出每帧的行发送或接收。汇总数据也将被追加到totdata.txt。运行结果如下: simulating protocol 2 events: 100 parameters: 50 20 10 tick 0. proc 0 sent frame: type=data seq=134529037 ack=0 payload=0 tick 3. proc 1 sent frame: type=ack seq=0 ack=0 paylo
6、ad=0 tick 7. proc 0 sent frame that got lost: type=data seq=134529038 ack=0 payload=1 process 0: total data frames sent: 2 data frames lost: 1 data frames not lost: 1 frames retransmitted: 0 good ack frames recd: 1 bad ack frames recd: 0 good data frames recd: 0 bad data frames recd: 0 payloads acce
7、pted: 0 total ack frames sent: 0 ack frames lost: 0 ack frames not lost: 0 timeouts: 0 ack timeouts: 0 process 1: total data frames sent: 0 data frames lost: 0 data frames not lost: 0 frames retransmitted: 0 good ack frames recd: 0 bad ack frames recd: 0 good data frames recd: 1 bad data frames recd
8、: 0 payloads accepted: 1 total ack frames sent: 1 ack frames lost: 0 ack frames not lost: 1 timeouts: 0 ack timeouts: 0 efficiency (payloads accepted/data pkts sent) = 50% end of simulation. time=100 从运行结果之中可以看出,有两个进程,分别指明了发送和接受的情况,丢包律、误码率等等都和事先设定好的参数一致。2.运行protocol3 参数设定为./protocol3 500 50 20 10 2
9、1protocol3是一个有错信道上的单工停等协议。帧可能会损坏,也可能会完全丢失。如果一帧在传输过程之中被破坏,则接收方硬件在计算校验和时会检测出来,如果一帧在被破坏之后校验和仍然是正确的,则这个协议将会失败。发送方在他送法送的每一个帧的头部放上一个序号。发送方发送一帧,等待确认到达后才能继续发送。其中100表示他将以50个tick的时间间隔运行100个协议实体进程。20的丢包率,10的校验和错误率(的80通过),它会打印出每帧的行发送或接收。汇总数据也将被追加到totdata.txt。运行结果:simulating protocol 3 events: 500 parameters: 50
10、 20 10 tick 0. proc 0 sent frame: type=data seq=0 ack=0 payload=0 tick 1. proc 1 got good frame: type=data seq=0 ack=0 payload=0 tick 1. proc 1 sent frame: type=ack seq=1 ack=0 payload=0 tick 7. proc 0 got good frame: type=ack seq=1 ack=0 payload=0 tick 7. proc 0 sent frame that got lost: type=data
11、seq=1 ack=0 payload=1 tick 50. proc 0 sent frame that got lost: type=data seq=1 ack=0 payload=1 tick 102. proc 0 sent frame that got lost: type=data seq=1 ack=0 payload=1 tick 153. proc 0 sent frame: type=data seq=1 ack=0 payload=1 tick 158. proc 1 got good frame: type=data seq=1 ack=0 payload=1 tic
12、k 158. proc 1 sent frame that got lost: type=ack seq=1 ack=1 payload=0 tick 206. proc 0 sent frame that got lost: type=data seq=1 ack=0 payload=1 tick 257. proc 0 sent frame: type=data seq=1 ack=0 payload=1 tick 268. proc 1 got bad frame: type=data seq=1 ack=0 payload=1 tick 308. proc 0 sent frame:
13、type=data seq=1 ack=0 payload=1 tick 311. proc 1 got good frame: type=data seq=1 ack=0 payload=1 tick 311. proc 1 sent frame that got lost: type=ack seq=1 ack=1 payload=0 tick 358. proc 0 sent frame: type=data seq=1 ack=0 payload=1 tick 365. proc 1 got good frame: type=data seq=1 ack=0 payload=1 tic
14、k 365. proc 1 sent frame: type=ack seq=1 ack=1 payload=0 tick 368. proc 0 got good frame: type=ack seq=1 ack=1 payload=0 tick 368. proc 0 sent frame: type=data seq=0 ack=0 payload=2 tick 373. proc 1 got good frame: type=data seq=0 ack=0 payload=2 tick 373. proc 1 sent frame that got lost: type=ack s
15、eq=1 ack=0 payload=0 tick 408. proc 0 sent frame: type=data seq=0 ack=0 payload=2 tick 412. proc 1 got good frame: type=data seq=0 ack=0 payload=2 tick 412. proc 1 sent frame: type=ack seq=1 ack=0 payload=0 tick 415. proc 0 got good frame: type=ack seq=1 ack=0 payload=0 tick 415. proc 0 sent frame:
16、type=data seq=1 ack=0 payload=3 tick 420. proc 1 got good frame: type=data seq=1 ack=0 payload=3 tick 420. proc 1 sent frame: type=ack seq=1 ack=1 payload=0 tick 421. proc 0 got good frame: type=ack seq=1 ack=1 payload=0 tick 421. proc 0 sent frame that got lost: type=data seq=0 ack=0 payload=4 tick
17、 468. proc 0 sent frame: type=data seq=0 ack=0 payload=4 tick 471. proc 1 got good frame: type=data seq=0 ack=0 payload=4 tick 471. proc 1 sent frame that got lost: type=ack seq=1 ack=0 payload=0 process 0: total data frames sent: 14 data frames lost: 5 data frames not lost: 9 frames retransmitted:
18、9 good ack frames recd: 4 bad ack frames recd: 0 good data frames recd: 0 bad data frames recd: 0 payloads accepted: 0 total ack frames sent: 0 ack frames lost: 0 ack frames not lost: 0 timeouts: 9 ack timeouts: 0 process 1: total data frames sent: 0 data frames lost: 0 data frames not lost: 0 frame
19、s retransmitted: 0 good ack frames recd: 0 bad ack frames recd: 0 good data frames recd: 8 bad data frames recd: 1 payloads accepted: 5 total ack frames sent: 8 ack frames lost: 4 ack frames not lost: 4 timeouts: 0 ack timeouts: 0 efficiency (payloads accepted/data pkts sent) = 35% end of simulation
20、. time=500 从运行结果之中可以看出,有两个进程,分别指明了发送和接受的情况,丢包律、误码率等等都和事先设定好的参数一致。然而,其中也存在了一些不可预测的情况,有些晕行多次以后每次的运行结果是不同的。3.运行protocol4 参数设定为:./protocol 500 50 20 10 2 1protocol4是一个一位滑动窗口协议。由于发送方在发出一帧以后必须等待前一帧的确认到来以后才能发送下一帧。其中1000表示他将以50个tick的时间间隔运行1000个协议实体进程。20的丢包率,10的校验和错误率(的80通过),它会打印出每帧的行发送或接收。汇总数据也将被追加到totdata.
21、txt。运行结果:simulating protocol 4 events: 500 parameters: 50 20 10 tick 2. proc 0 got good frame: tick 3. proc 1 got good frame: type=data seq=0 ack=1 payload=0 type=data seq=0 ack=1 payload=0 tick 158. proc 1 got bad frame: tick 157. proc 0 got bad frame: type=data seq=0 ack=0 payload=0 type=data seq=
22、0 ack=0 payload=0 tick 159. proc 1 got good frame: type=data seq=0 ack=0 payload=0 tick 163. proc 0 got good frame: type=data seq=0 ack=0 payload=0 tick 164. proc 0 got good frame: type=data seq=1 ack=0 payload=1 tick 167. proc 1 got good frame: type=data seq=1 ack=0 payload=1 tick 168. proc 0 got g
23、ood frame: type=data seq=1 ack=1 payload=1 tick 173. proc 1 got good frame: type=data seq=1 ack=1 payload=1 tick 174. proc 0 got good frame: tick 175. proc 1 got good frame: type=data seq=0 ack=1 payload=2 type=data seq=0 ack=1 payload=2 tick 176. proc 1 got good frame: type=data seq=0 ack=0 payload
24、=2 tick 181. proc 0 got good frame: type=data seq=0 ack=0 payload=2 tick 183. proc 1 got bad frame: tick 184. proc 0 got bad frame: type=data seq=1 ack=0 payload=3 type=data seq=1 ack=0 payload=3 tick 187. proc 0 got good frame: tick 186. proc 1 got good frame: type=data seq=1 ack=0 payload=3 type=d
25、ata seq=1 ack=0 payload=3 tick 188. proc 1 got good frame: type=data seq=1 ack=1 payload=3 tick 195. proc 0 got good frame: type=data seq=1 ack=1 payload=3 tick 196. proc 0 got good frame: type=data seq=0 ack=1 payload=4 tick 198. proc 1 got good frame: type=data seq=0 ack=1 payload=4 tick 200. proc
26、 1 got good frame: tick 201. proc 0 got good frame: type=data seq=0 ack=0 payload=4 type=data seq=0 ack=0 payload=4 tick 203. proc 1 got good frame: type=data seq=1 ack=0 payload=5 tick 206. proc 0 got good frame: type=data seq=1 ack=0 payload=5 tick 207. proc 0 got good frame: type=data seq=1 ack=1
27、 payload=5 tick 213. proc 1 got good frame: type=data seq=1 ack=1 payload=5 tick 214. proc 1 got good frame: type=data seq=0 ack=1 payload=6 tick 216. proc 0 got good frame: type=data seq=0 ack=1 payload=6 tick 217. proc 0 got bad frame: type=data seq=0 ack=0 payload=6 tick 218. proc 1 got bad frame
28、: type=data seq=0 ack=0 payload=6 tick 220. proc 1 got good frame: type=data seq=0 ack=0 payload=6 tick 223. proc 0 got good frame: type=data seq=0 ack=0 payload=6 tick 322. proc 1 got good frame: type=data seq=1 ack=0 payload=7 tick 321. proc 0 got good frame: type=data seq=1 ack=0 payload=7 tick 3
29、24. proc 0 got good frame: tick 326. proc 1 got good frame: type=data seq=1 ack=1 payload=7 type=data seq=1 ack=1 payload=7 tick 327. proc 1 got bad frame: type=data seq=0 ack=1 payload=8 tick 333. proc 0 got bad frame: type=data seq=0 ack=1 payload=8 tick 337. proc 1 got bad frame: type=data seq=0
30、ack=1 payload=8 tick 336. proc 0 got bad frame: type=data seq=0 ack=1 payload=8 tick 338. proc 0 got good frame: type=data seq=0 ack=1 payload=8 tick 346. proc 1 got good frame: type=data seq=0 ack=1 payload=8 tick 374. proc 1 got good frame: type=data seq=0 ack=0 payload=8 tick 376. proc 0 got good
31、 frame: type=data seq=0 ack=0 payload=8 tick 377. proc 0 got good frame: type=data seq=1 ack=0 payload=9 tick 381. proc 1 got good frame: type=data seq=1 ack=0 payload=9 tick 425. proc 1 got bad frame: tick 426. proc 0 got bad frame: type=data seq=1 ack=1 payload=9 type=data seq=1 ack=1 payload=9 ti
32、ck 427. proc 1 got good frame: type=data seq=1 ack=1 payload=9 tick 433. proc 0 got good frame: type=data seq=1 ack=1 payload=9 tick 435. proc 0 got good frame: type=data seq=0 ack=1 payload=10 tick 439. proc 1 got good frame: type=data seq=0 ack=1 payload=10 tick 440. proc 1 got good frame: type=da
33、ta seq=0 ack=0 payload=10 tick 441. proc 0 got good frame: type=data seq=0 ack=0 payload=10 tick 491. proc 1 got good frame: type=data seq=1 ack=0 payload=11 tick 492. proc 0 got good frame: type=data seq=1 ack=0 payload=11 process 0: total data frames sent: 38 data frames lost: 9 data frames not lo
34、st: 29 frames retransmitted: 8 good ack frames recd: 0 bad ack frames recd: 0 good data frames recd: 23 bad data frames recd: 6 payloads accepted: 12 total ack frames sent: 0 ack frames lost: 0 ack frames not lost: 0 timeouts: 8 ack timeouts: 0 process 1: total data frames sent: 38 data frames lost:
35、 9 data frames not lost: 29 frames retransmitted: 8 good ack frames recd: 0 bad ack frames recd: 0 good data frames recd: 23 bad data frames recd: 6 payloads accepted: 12 total ack frames sent: 0 ack frames lost: 0 ack frames not lost: 0 timeouts: 8 ack timeouts: 0 efficiency (payloads accepted/data
36、 pkts sent) = 31% end of simulation. time=500 从运行结果之中可以看出,有两个进程,分别指明了发送和接受的情况,丢包律、误码率等等都和事先设定好的参数一致。这个一位的滑动窗口协议与前几个协议也有不同之处,他是以滑动窗口的形式发送的帧,所以不会发生帧的重复等情况。4.运行protocol5 参数设定:./protocol5 500 50 20 10 3 1 protocol5是一个回退n帧协议。由于发送方在发出一帧以后必须等待前一帧的确认到来以后才能发送下一帧。允许发送方在阻塞之前发送多达w个帧,而不是一个帧。发送方可以连续发送帧。其中1000表示他将
37、以50个tick的时间间隔运行1000个协议实体进程。20的丢包率,10的校验和错误率(的80通过),它会打印出每帧的行发送或接收。汇总数据也将被追加到totdata.txt。运行结果如下:simulating protocol 5 events: 500 parameters: 50 20 10 tick 2. proc 0 sent frame: type=data seq=0 ack=7 payload=0 tick 1. proc 1 sent frame: type=data seq=0 ack=7 payload=0 tick 3. proc 1 got good frame: t
38、ype=data seq=0 ack=7 payload=0 tick 4. proc 1 sent frame that got lost: type=data seq=1 ack=0 payload=1 tick 5. proc 1 sent frame that got lost: type=data seq=2 ack=0 payload=2 tick 7. proc 0 sent frame: type=data seq=1 ack=7 payload=1 tick 6. proc 1 sent frame that got lost: type=data seq=3 ack=0 p
39、ayload=3 tick 9. proc 1 got good frame: tick 8. proc 0 got good frame: type=data seq=1 ack=7 payload=1 type=data seq=0 ack=7 payload=0 tick 10. proc 1 sent frame that got lost: type=data seq=4 ack=1 payload=4 tick 11. proc 0 sent frame that got lost: type=data seq=2 ack=0 payload=2 tick 12. proc 1 s
40、ent frame: type=data seq=5 ack=1 payload=5 tick 13. proc 0 sent frame that got lost: type=data seq=3 ack=0 payload=3 tick 14. proc 1 sent frame: type=data seq=6 ack=1 payload=6 tick 16. proc 0 got good frame: type=data seq=5 ack=1 payload=5 tick 17. proc 0 got bad frame: type=data seq=6 ack=1 payloa
41、d=6 tick 18. proc 0 sent frame: type=data seq=4 ack=0 payload=4 tick 19. proc 0 sent frame: type=data seq=5 ack=0 payload=5 tick 20. proc 0 sent frame: type=data seq=6 ack=0 payload=6 tick 23. proc 1 got good frame: type=data seq=4 ack=0 payload=4 tick 22. proc 0 sent frame that got lost: type=data
42、seq=7 ack=0 payload=7 tick 24. proc 1 got good frame: tick 25. proc 0 sent frame: type=data seq=5 ack=0 payload=5 type=data seq=0 ack=0 payload=8 tick 28. proc 1 got good frame: type=data seq=6 ack=0 payload=6 tick 29. proc 1 got good frame: type=data seq=0 ack=0 payload=8 tick 30. proc 1 sent frame
43、: type=data seq=7 ack=1 payload=7 tick 33. proc 0 got good frame: type=data seq=7 ack=1 payload=7 tick 56. proc 1 sent frame: type=data seq=1 ack=1 payload=1 tick 56. proc 1 sent frame: type=data seq=2 ack=1 payload=2 tick 56. proc 1 sent frame that got lost: type=data seq=3 ack=1 payload=3 tick 56.
44、 proc 1 sent frame: type=data seq=4 ack=1 payload=4 tick 56. proc 1 sent frame that got lost: type=data seq=5 ack=1 payload=5 tick 56. proc 1 sent frame: type=data seq=6 ack=1 payload=6 tick 56. proc 1 sent frame: type=data seq=7 ack=1 payload=7 tick 57. proc 0 got good frame: type=data seq=1 ack=1
45、payload=1 tick 58. proc 0 got good frame: type=data seq=2 ack=1 payload=2 tick 59. proc 0 got good frame: type=data seq=4 ack=1 payload=4 tick 63. proc 0 got good frame: type=data seq=6 ack=1 payload=6 tick 65. proc 0 got good frame: type=data seq=7 ack=1 payload=7 tick 67. proc 0 sent frame that go
46、t lost: type=data seq=2 ack=2 payload=2 tick 67. proc 0 sent frame: type=data seq=3 ack=2 payload=3 tick 67. proc 0 sent frame: type=data seq=4 ack=2 payload=4 tick 67. proc 0 sent frame: type=data seq=5 ack=2 payload=5 tick 67. proc 0 sent frame: type=data seq=6 ack=2 payload=6 tick 67. proc 0 sent
47、 frame: type=data seq=7 ack=2 payload=7 tick 67. proc 0 sent frame: type=data seq=0 ack=2 payload=8 tick 74. proc 1 got good frame: type=data seq=3 ack=2 payload=3 tick 76. proc 1 got good frame: type=data seq=4 ack=2 payload=4 tick 79. proc 1 got good frame: type=data seq=5 ack=2 payload=5 tick 81.
48、 proc 1 got good frame: type=data seq=6 ack=2 payload=6 tick 87. proc 1 got good frame: type=data seq=7 ack=2 payload=7 tick 88. proc 1 got good frame: type=data seq=0 ack=2 payload=8 tick 90. proc 1 sent frame: type=data seq=0 ack=1 payload=8 tick 93. proc 0 got good frame: type=data seq=0 ack=1 pa
49、yload=8 tick 95. proc 1 sent frame: type=data seq=1 ack=1 payload=9 tick 96. proc 0 got good frame: type=data seq=1 ack=1 payload=9 tick 107. proc 1 sent frame: type=data seq=3 ack=1 payload=3 tick 107. proc 1 sent frame: type=data seq=4 ack=1 payload=4 tick 107. proc 1 sent frame: type=data seq=5 a
50、ck=1 payload=5 tick 107. proc 1 sent frame: type=data seq=6 ack=1 payload=6 tick 107. proc 1 sent frame: type=data seq=7 ack=1 payload=7 tick 107. proc 1 sent frame that got lost: type=data seq=0 ack=1 payload=8 tick 107. proc 1 sent frame: type=data seq=1 ack=1 payload=9 tick 110. proc 0 got good f
51、rame: type=data seq=3 ack=1 payload=3 tick 111. proc 0 got good frame: type=data seq=4 ack=1 payload=4 tick 112. proc 0 got good frame: type=data seq=5 ack=1 payload=5 tick 114. proc 0 got good frame: type=data seq=6 ack=1 payload=6 tick 115. proc 0 got good frame: type=data seq=7 ack=1 payload=7 tick 119. proc 0 got good frame: type=data seq=1 ack=1 payload=9 tick 121. proc 0 sent frame: type=data seq=2 ack=7 payload=2 tick 121. proc 0 sent frame that got lost: t
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 《中央空调系统设计》课件
- 营销组合策略优化-洞察分析
- 十大消防英雄事迹(5篇)
- 物联网设备入侵检测-洞察分析
- 舆情情感倾向识别-洞察分析
- 仪表行业智能化标准研究-洞察分析
- 农村教育问题调研报告(5篇)
- 创建文明城市倡议书范文(7篇)
- 化妆品行业助理的职责介绍
- 以家庭为单位推动体育文化发展
- 小学劳动教育实施三年规划(2024-2026)
- 网课智慧树知道《英汉口译(四川大学)》章节测试答案
- 生产建设项目水土保持设施验收技术规程-编制说明
- 人工智能设计伦理智慧树知到期末考试答案章节答案2024年浙江大学
- 2024春期国开电大本科《经济学(本)》在线形考(形考任务1至6)试题及答案
- 四川省公需科目(数字经济与驱动发展)考试题库及答案
- 2024年中国eVTOL产业(低空经济)发展报告
- 智慧医疗信息化建设项目技术标准建设方案
- 2024-2030年国内医用诊断显示器行业市场深度分析及发展前景及投资机会研究报告
- 电化学储能电站安全规程
- 摩托车品牌文化营销与品牌故事的构建
评论
0/150
提交评论