联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2024-03-06 03:15

COMP 4911 Winter 2024 - Assignment 4


Introduction


For this assignment you will extend the stop-and-wait “ RDT” protocol to implement a pipelined “Go-Back-N” protocol as described in chapter 3. You should use Python 3, and your Mininet environment is well-suited as a test platform. The files below are available on Moodle:


rdt.py


Some useful functions: rdt_send(), rdt_recv(), make_data_pkt(), etc.


rdt-send.py


Sample sender code


rdt-recv.py


Sample receiver code


You can modify any of the files, and you must document all changes that you make. You are also free to start from scratch, use a completely different approach, etc.


Start by becoming familiar with and running the sample code RDT code. You will need to implement a window mechanism with an appropriate range of sequence numbers. You can decide how large you want the window to be. Define variables (e.g. nextseqnum, expectedseqnum, etc.) so that your sender and receiver can maintain any required state information. You will need a timeout mechanism. There are several ways to do this. Use Google and find some examples to work from. The sample code uses the built-in socket timeout mechanism. Consider the Timer object from the standard Python threading library.


You should use a simple Mininet network (“sudo -E mn” will give you a network with hosts h1 and h2) as your development and test environment. You can also test your program on real computers.


You must document your code well. Use lots of comments and provide any additional documentation that you think will be helpful to explain how your code works. Take note of the grading scheme below. Some advice: document your code in such a way that your peers could read and understand your code – i.e. write comments in a way that you would find useful if you were reading someone else’s code.


You must demonstrate that your protocol operates correctly when packets are lost or corrupted. You can use Mininet to simulate adverse network conditions. Specifically, Mininet interfaces can be configured to add delay and drop packets. An example command line would be “sudo -E mn --link tc,loss=5”, which will drop 5% of packets on every interface. See the example in the Mininet walkthrough and the Mininet API documentation for details.


Make sure your code outputs information that shows the operation of your GBN protocol.


Grading


Code


50%


Code comments and other documentation


25%


Documented test cases that demonstrate correct protocol operation


25%


If you use code that you find on the Internet, indicate that you have done so by citing it appropriately. Obviously, you cannot use someone else’s completed GBN protocol that you find on Github. I have looked at dozens of them, so it will be obvious to me if you do so.


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp