# Project 3: reliable transport ## What is what | File | Role | | :--- | :--- | | `gbn.py` | yours: `Sender.send()`; the receiver is given | | `sr.py` | yours: `Sender.send()` and `Receiver.receive()` | | `stopwait.py` | given: stop-and-wait, with the timer, cumulative ACKs and the FIN/FINACK close | | `packet.py` | given: packet format, Internet checksum, MSS 1000 | | `channel.py` | given: simulated link for the offline checks | | `selfcheck.py` | given: public checks over that link | | `transfer.py` | given: file transfer over UDP | | `experiments.py` | given: loss and window sweeps, writes `results.json` | | `challenge.py` | given: client for the class challenge server | | `PROTOCOL.md` | given: the challenge control exchange | The grader restores every given file from a clean copy, so leave them as they are. ## Run Python 3, standard library only. ```text python3 selfcheck.py # both protocols python3 selfcheck.py gbn # one side python3 experiments.py # both sweeps python3 experiments.py loss # loss sweep only python3 experiments.py window # window sweep only python3 challenge.py B-gbn --student your_id ``` A side that is still unwritten prints SKIP after about 30 seconds per check, so run one side at a time while you write code. The experiments need `ip netns` and `tc netem`. In the course container: ```text docker run --rm --privileged -v "$PWD/..":/work -w /work/starter cs4220-net python3 experiments.py ``` The challenge client needs the class server: run it on your own machine, or in the container without `--network none`. We host no local peer. ## Tool references - [Python socket module](https://docs.python.org/3/library/socket.html) - [ip-netns](https://man7.org/linux/man-pages/man8/ip-netns.8.html) - [tc-netem](https://man7.org/linux/man-pages/man8/tc-netem.8.html) - [Course container help](../../../labs/tools/course-container.canvas.html) and [docker run](https://docs.docker.com/reference/cli/docker/container/run/)