《网络实验报告一》由会员分享,可在线阅读,更多相关《网络实验报告一(7页珍藏版)》请在金锄头文库上搜索。
1、网络实验报告一网络实验报告一数据链路层协议的设计与实现数据链路层协议的设计与实现计计 83 班班 981361 同志强同志强 实验目的实验目的 计算机网络的数据链路层协议保证通信双方在有差错的通信线路上进行无差 错的数据传输,是计算机网络各层协议中通信控制功能最典型的一种协议。 本实验实现一个数据链路层协议的数据传送部分,目的在于使学生更好地理 解数据链路层协议中的“滑动窗口”技术的基本工作原理,掌握计算机网络协议 的基本实现技术。 实验内容实验内容 在一个数据链路层的模拟实现环境中,用C 语言实现下面两个数据链路层协 议。 (1)“退回到N 重发”的滑动窗口协议(参考文献1第四章的协议5);
2、 (2)“选择重发”的滑动滑动窗口协议(参考文献1第四章的协议6); 实验原理,过程以及分析实验原理,过程以及分析 首先,我们来分析一下试验原理和所得到的数据,从以下的数据我们不难分析出以下 的 结论:Protocol 5. Events: 10000 Parameters: 100 20 30Process 1:Total data frames sent: 802Data frames lost: 162Data frames not lost: 640Frames retransmitted: 679Good ack frames recd: 0Bad ack frames recd:
3、0Good data frames recd: 429Bad data frames recd: 201Payloads accepted: 129Total ack frames sent: 0Ack frames lost: 0Ack frames not lost: 0Timeouts: 97Ack timeouts: 0Process 0:Total data frames sent: 807Data frames lost: 177Data frames not lost: 630Frames retransmitted: 672Good ack frames recd: 0Bad
4、ack frames recd: 0Good data frames recd: 444Bad data frames recd: 193Payloads accepted: 117Total ack frames sent: 0Ack frames lost: 0Ack frames not lost: 0Timeouts: 96Ack timeouts: 0Efficiency (payloads accepted/data pkts sent) = 15% End of simulation. Time=10000Protocol 6. Events: 10000 Parameters:
5、 100 20 30Process 1:Total data frames sent: 539Data frames lost: 119Data frames not lost: 420Frames retransmitted: 296Good ack frames recd: 13Bad ack frames recd: 8Good data frames recd: 302Bad data frames recd: 132Payloads accepted: 202Total ack frames sent: 34Ack frames lost: 6Ack frames not lost:
6、 28Timeouts: 296Ack timeouts: 34Process 0:Total data frames sent: 557Data frames lost: 123Data frames not lost: 434Frames retransmitted: 315Good ack frames recd: 20Bad ack frames recd: 8Good data frames recd: 300Bad data frames recd: 120Payloads accepted: 206Total ack frames sent: 25Ack frames lost:
7、 4Ack frames not lost: 21Timeouts: 315Ack timeouts: 25Efficiency (payloads accepted/data pkts sent) = 37% End of simulation. Time=10000Protocol 5. Events: 10000 Parameters: 200 20 30Process 1:Total data frames sent: 415Data frames lost: 89Data frames not lost: 326Frames retransmitted: 343Good ack fr
8、ames recd: 0Bad ack frames recd: 0Good data frames recd: 237Bad data frames recd: 101Payloads accepted: 73Total ack frames sent: 0Ack frames lost: 0Ack frames not lost: 0Timeouts: 49Ack timeouts: 0Process 0:Total data frames sent: 415Data frames lost: 77Data frames not lost: 338Frames retransmitted:
9、 336Good ack frames recd: 0Bad ack frames recd: 0Good data frames recd: 218Bad data frames recd: 108Payloads accepted: 65Total ack frames sent: 0Ack frames lost: 0Ack frames not lost: 0Timeouts: 48Ack timeouts: 0Efficiency (payloads accepted/data pkts sent) = 16% End of simulation. Time=10000Protoco
10、l 5. Events: 10000 Parameters: 200 20 30Process 1:Total data frames sent: 415Data frames lost: 89Data frames not lost: 326Frames retransmitted: 343Good ack frames recd: 0Bad ack frames recd: 0Good data frames recd: 237Bad data frames recd: 101Payloads accepted: 73Total ack frames sent: 0Ack frames l
11、ost: 0Ack frames not lost: 0Timeouts: 49Ack timeouts: 0Process 0:Total data frames sent: 415Data frames lost: 77Data frames not lost: 338Frames retransmitted: 336Good ack frames recd: 0Bad ack frames recd: 0Good data frames recd: 218Bad data frames recd: 108Payloads accepted: 65Total ack frames sent: 0Ack frames lost: 0Ack frames not lost: 0Timeouts: 48Ack timeouts: 0Efficiency (payloads accepted/data pkts sent) = 16% End of simulation. Time=10000Protocol 6. Events: 10000 Parameters: 200 40 30Process 1:Total data frames sent: 253Data frames lost: 115Data frames not lost: