版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、数据链路层协议仿真实验信息安全 092370 董琦【实验目的】了解各个协议的组成,原理以及帧传输方式,掌握每个协议之间的关系【实验准备】通过在下载的linux仿真器源码包进行编译,能够得到协议2-协议6的模拟器模拟数据链路协议。通过运行模拟器,能够仿真几个协议的运行模式,得到实验数据。【实现功能】分别运行协议2-协议6的模拟器模拟数据链路协议,输入不同的参数,观察运行结果【实验环境】core 2 t4200 2ghz 内存 2g内核:linux version 3.0.0-12-generic (builddvernadsky)操作系统:ubuntu 11
2、.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 percenta
3、ge 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 output file
4、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
6、payload=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 rec'd: 1 bad ack frames rec'd: 0 good data frames rec'd: 0 bad data frames r
7、ec'd: 0 payloads accepted: 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 rec'd: 0 bad ack frames rec'd: 0 good data
8、frames rec'd: 1 bad data frames rec'd: 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
9、.运行protocol3 参数设定为./protocol3 500 50 20 10 2 1protocol3是一个有错信道上的单工停等协议。帧可能会损坏,也可能会完全丢失。如果一帧在传输过程之中被破坏,则接收方硬件在计算校验和时会检测出来,如果一帧在被破坏之后校验和仍然是正确的,则这个协议将会失败。发送方在他送法送的每一个帧的头部放上一个序号。发送方发送一帧,等待确认到达后才能继续发送。其中100表示他将以50个tick的时间间隔运行100个协议实体进程。20的丢包率,10的校验和错误率(的80通过),它会打印出每帧的行发送或接收。汇总数据也将被追加到totdata.txt。运行结果:sim
10、ulating protocol 3 events: 500 parameters: 50 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
11、. proc 0 sent frame that got lost: type=data 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 go
12、od frame: type=data seq=1 ack=0 payload=1 tick 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
13、ack=0 payload=1 tick 308. proc 0 sent frame: 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 go
14、od frame: type=data seq=1 ack=0 payload=1 tick 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
15、. proc 1 sent frame that got lost: type=ack seq=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
16、ack=0 payload=0 tick 415. proc 0 sent frame: 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 g
17、ot lost: type=data seq=0 ack=0 payload=4 tick 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 d
18、ata frames not lost: 9 frames retransmitted: 9 good ack frames rec'd: 4 bad ack frames rec'd: 0 good data frames rec'd: 0 bad data frames rec'd: 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
19、 frames sent: 0 data frames lost: 0 data frames not lost: 0 frames retransmitted: 0 good ack frames rec'd: 0 bad ack frames rec'd: 0 good data frames rec'd: 8 bad data frames rec'd: 1 payloads accepted: 5 total ack frames sent: 8 ack frames lost: 4 ack frames not lost: 4 timeouts: 0
20、ack timeouts: 0 efficiency (payloads accepted/data pkts sent) = 35% end of simulation. time=500 从运行结果之中可以看出,有两个进程,分别指明了发送和接受的情况,丢包律、误码率等等都和事先设定好的参数一致。然而,其中也存在了一些不可预测的情况,有些晕行多次以后每次的运行结果是不同的。3.运行protocol4 参数设定为:./protocol 500 50 20 10 2 1protocol4是一个一位滑动窗口协议。由于发送方在发出一帧以后必须等待前一帧的确认到来以后才能发送下一帧。其中1000表示他
21、将以50个tick的时间间隔运行1000个协议实体进程。20的丢包率,10的校验和错误率(的80通过),它会打印出每帧的行发送或接收。汇总数据也将被追加到totdata.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
22、frame: tick 157. proc 0 got bad frame: type=data seq=0 ack=0 payload=0 type=data seq=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 ti
23、ck 167. proc 1 got good frame: type=data seq=1 ack=0 payload=1 tick 168. proc 0 got good 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
24、 seq=0 ack=1 payload=2 tick 176. proc 1 got good frame: type=data seq=0 ack=0 payload=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 go
25、t good frame: tick 186. proc 1 got good frame: type=data seq=1 ack=0 payload=3 type=data 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 payl
26、oad=4 tick 198. proc 1 got good frame: type=data seq=0 ack=1 payload=4 tick 200. proc 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: t
27、ype=data seq=1 ack=0 payload=5 tick 207. proc 0 got good frame: type=data seq=1 ack=1 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.
28、 proc 0 got bad frame: type=data seq=0 ack=0 payload=6 tick 218. proc 1 got bad frame: 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 ac
29、k=0 payload=7 tick 321. proc 0 got good frame: type=data seq=1 ack=0 payload=7 tick 324. 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 fr
30、ame: type=data seq=0 ack=1 payload=8 tick 337. proc 1 got bad frame: type=data seq=0 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
31、374. proc 1 got good frame: type=data seq=0 ack=0 payload=8 tick 376. proc 0 got good 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. pro
32、c 0 got bad frame: type=data seq=1 ack=1 payload=9 type=data seq=1 ack=1 payload=9 tick 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
33、good frame: type=data seq=0 ack=1 payload=10 tick 440. proc 1 got good frame: type=data 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 pa
34、yload=11 process 0: total data frames sent: 38 data frames lost: 9 data frames not lost: 29 frames retransmitted: 8 good ack frames rec'd: 0 bad ack frames rec'd: 0 good data frames rec'd: 23 bad data frames rec'd: 6 payloads accepted: 12 total ack frames sent: 0 ack frames lost: 0 a
35、ck frames not lost: 0 timeouts: 8 ack timeouts: 0 process 1: total data frames sent: 38 data frames lost: 9 data frames not lost: 29 frames retransmitted: 8 good ack frames rec'd: 0 bad ack frames rec'd: 0 good data frames rec'd: 23 bad data frames rec'd: 6 payloads accepted: 12 tota
36、l ack frames sent: 0 ack frames lost: 0 ack frames not lost: 0 timeouts: 8 ack timeouts: 0 efficiency (payloads accepted/data pkts sent) = 31% end of simulation. time=500 从运行结果之中可以看出,有两个进程,分别指明了发送和接受的情况,丢包律、误码率等等都和事先设定好的参数一致。这个一位的滑动窗口协议与前几个协议也有不同之处,他是以滑动窗口的形式发送的帧,所以不会发生帧的重复等情况。4.运行protocol5 参数设定:./p
37、rotocol5 500 50 20 10 3 1 protocol5是一个回退n帧协议。由于发送方在发出一帧以后必须等待前一帧的确认到来以后才能发送下一帧。允许发送方在阻塞之前发送多达w个帧,而不是一个帧。发送方可以连续发送帧。其中1000表示他将以50个tick的时间间隔运行1000个协议实体进程。20的丢包率,10的校验和错误率(的80通过),它会打印出每帧的行发送或接收。汇总数据也将被追加到totdata.txt。运行结果如下:simulating protocol 5 events: 500 parameters: 50 20 10 tick 2. proc 0 sent frame
38、: 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: type=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=
39、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 payload=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
40、: 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 sent 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=
41、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 payload=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 p
42、ayload=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 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 fram
43、e: 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: 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 s
44、ent 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. 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
45、 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 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=
46、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 got 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
47、 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 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. pr
48、oc 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. 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 p
49、ayload=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 payload=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=
50、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 ack=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 l
51、ost: 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 frame: 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 tha
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 农业废弃物资源化利用的肥料制造与应用考核试卷
- 学前教育中的跨文化教育考核试卷
- 信息系统的人员培训与技能发展方法考核试卷
- 中等教育与学困生教育考核试卷
- 苏州科技大学天平学院《合唱与指挥二》2022-2023学年第一学期期末试卷
- 专业技术掌握的重要性探析考核试卷
- 大型货物道路运输的能耗分析考核试卷
- Sesamol-Standard-生命科学试剂-MCE
- SB-649915-生命科学试剂-MCE
- Salvianolic-acid-D-Standard-生命科学试剂-MCE
- 三年级数学上册课件-9. 数学广角-集合 人教版(共14张PPT)
- 场地平整工程施工方案(完整版)
- 妇产科诊疗常规
- 《风景园林工程》word版
- 实验室生物安全委员会及其工作职责
- 天然气管道投产运行过程和相关技术要求
- JJF(鄂) 90-2021 电子辊道秤校准规范(高清版)
- ISO-IEC17025-2017实验室管理体系全套程序文件
- 上好一节消防课(课堂PPT)
- 钣金成品类检验标准作业指导书
- 六年级英语上册单词默写黑体
评论
0/150
提交评论