COMP 491 stop-and-wait “ RDT” protocol

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.
 WX:codehelp

  • 6
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值