Project 3: Transport It Your Way
In this project, you will design and implement a transport layer protocol (like TCP). Your protocol will be based on one of three different provided scenarios: a Low Earth Orbit (LEO) satellite network, LLM training in a data center, and a distributed sensor network.
The lectures needed for this project are Transport 1: TCP, Transport 2: TCP II, Transport 3: Congestion Control I, and Transport 4: Congestion Control II.
You will work on this project in teams of 2-3. You can keep the same partner from an earlier project, or choose a different partner. Reminder: Our course policies page has a collaboration policy that you must follow.
Project Overview
This project is split into 4 stages.
- Stage 0: As a warm up, you will read excerpts of “The Design Philosophy of the DARPA Internet Protocols” paper and respond to questions on gradescope.
- Stage 1: You will form teams and write a design document for your protocol.
- Stage 2: You will implement your protocol as a team!
- Stage 3: You will evaluate and refine your protocol as a team.
Scenarios:
- LEO Satellite Networking: A ground station connected to the Internet sends data through fast-moving LEO satellites to remote terminals, such as wilderness rescue beacons or ships at sea, and the terminals send smaller amounts of data back. Each satellite is in view for only a few seconds before the terminal must hand over to the next one.
- Data Center Backbone: A hyperscaler is optimizing the network inside one of its data centers for training a new LLM. At the end of every training step, all servers exchange data with each other at the same time. This step can’t finish until the last piece of data arrives, so it must be completed as quickly as possible. One missing message makes the round unstable, meaning the round will be discarded.
- Sensor Network: A research team is working to measure the water temperature and salinity in the Bay Area using floating buoys which are each connected over a low data rate, long range network to a gateway. The gateway forwards data on to the Internet using WiFi.
Coding Agent Policy and Access
You are welcome to use coding agents for this project for implementation in Stage 2 and 3. All writing (Stage 0 and Stage 1) must be in your own words, although you are welcome to discuss design questions with both bots and humans.
That being said, you are not required to use AI tools to complete this project. We recommend you scope your design according to the tools that you choose to use.
You can sign up for student access to a coding agent here: chatgpt student. The deadline to sign up for this is October 31st.
Google also offers a 1 year free student plan which is another option: google student. If you know of other free resources, please let us know.
Stage 0
Paper reading and response.
Paper Reading
Read Section 1, 2, 3 and 10,11. (Intro, Goals, TCP, Conclusion) of “The Design Philosophy of the DARPA Internet Protocols” paper.
Questions to Respond To
Respond to the following four questions on Gradescope.
- What is the fundamental goal of the DARPA Internet Architecture?
- Order the secondary goals of the DARPA Internet Architecture from highest to lowest priority.
- What are two TCP design decisions that the authors argue may have been incorrect? Do you agree? Explain why or why not in three sentences or less.
- For each of the project workload scenarios, how would you modify the design of a transport layer protocol compared to TCP? Use approximately 100-200 words for each scenario.
Deliverables and Points
The deliverable for this stage is answering the questions on Gradescope individually. This Stage is worth 10 pts out of the total 100 pts for the full project.
Stage 1
Transport protocol design document.
Team Formation
You will need to form a team of 2-3. You can pick your own team, but if you’re having difficulties finding a team, please reach out on the Ed thread.
Design Document Guidelines
Your design document should describe:
- Which scenario you selected
- An overview of your protocol
- The design tradeoffs you made
- A state machine or timing diagram for your protocol
- A protocol test plan
- A timeline for the rest of the project
- A breakdown of what different team members are working on
Your document that you submit on Gradescope should be no more than 2 pages.
Deliverables and Points
As a team, you’ll need to submit your design document on Gradescope. Please specify all team members as part of your submission.
You will also need to schedule a 5 minute design review discussion with a TA during office hours. During the review, TAs will ask questions about your design and each team member will have to respond to at least one question.
The rubric for the design review and document is shown below. The total points for this Stage is 20 pts out of the total 100 pts for the full project.
| Description | Points |
|---|---|
| Provides in the document and can explain design tradeoffs for the chosen scenario | 4 |
| Provides in the document and can explain detailed state machine and/or timing diagram which show data delivery mechanisms | 6 |
| Provides in the document and can explain their test plan and what metrics they plan to measure | 4 |
| Outlines a concrete plan in the document with team member roles and timelines | 4 |
| Each team member participates in discussion | 2 |
| Total Score | __ / 20 |
Stage 2/3 Setup
You’ll need access to AI coding tools (if you want to use them), the project repo with the ns-3 network simulator built (on your own computer or on the instructional machines), Wireshark to look at the packet captures, and a web browser to watch your traffic.
Class Environment Setup
The network in this project is simulated with ns-3. You can use either:
- Your own computer (macOS, Linux, or Windows with WSL2). This is the recommended path.
- EECS instructional machines, which run a class VM with ns-3 already installed, if you would rather not install anything.
Option 1: Using Your Own Computer
You need git, Python 3.10 or newer, a C++ compiler, and CMake 3.25 or newer. The Python packages will go in a virtual environment inside the repo.
macOS (Intel or Apple silicon):
xcode-select --install
brew install cmake python
The Python packages are installed with uv. Install it with brew install uv (or curl -LsSf https://astral.sh/uv/install.sh | sh).
Next, make a team repo. Open the starter repo on GitHub, click Use this template → Create a new repository, make it private, and add your teammates as collaborators.
git clone <your team's repo URL>
cd <your repo>
uv venv
source .venv/bin/activate
uv pip install pyyaml matplotlib pytest
make setup # downloads and builds ns-3, takes a few minutes
make doctor # every check should pass
Run source .venv/bin/activate again in every new terminal before using make.
make setup puts ns-3 in the repo’s build/ folder, which git ignores. If you switch to a different Python or move the repo, run it again.
Linux, or Windows inside WSL2 (run wsl --install -d Ubuntu-24.04 in PowerShell, then work in the Ubuntu terminal):
sudo apt install git build-essential cmake python3-dev
Install uv with curl -LsSf https://astral.sh/uv/install.sh | sh
Next, make a team repo. Open the starter repo on GitHub, click Use this template → Create a new repository, make it private, and add your teammates as collaborators.
git clone <your team's repo URL>
cd <your repo>
uv venv
source .venv/bin/activate
uv pip install pyyaml matplotlib pytest
uv pip install cmake # Ubuntu 22.04 only: packaged CMake is too old
make setup # downloads and builds ns-3, takes a few minutes
make doctor # every check should pass
Run source .venv/bin/activate again in every new terminal before using make.
make setup puts ns-3 in the repo’s build/ folder, which git ignores. If you switch to a different Python or move the repo, run it again.
Option 2: Using the Instructional Machines
The EECS instructional machines have a class VM with ns-3 already installed. If you’d like to use these machines:
1) First, you will need a class account. You can get this by visiting WebAcct and then logging in with your CalNet ID and passphrase. You should then see an option for creating an account for CS168.
2) Next, you’ll need to ssh to the instructional machines using your account. The following servers are available for your use:
- ashby.eecs.berkeley.edu
- cedar.eecs.berkeley.edu
- cory.eecs.berkeley.edu
- derby.eecs.berkeley.edu
3) Once you are on the instructional machine, you will need to start the VM. Do this by running the script qemu-cs168.sh. This will take a couple minutes. Leave this terminal running.
4) Once the VM is ready, log in to the VM from another terminal on the same instructional machine by running the script ssh-cs168-vm.
5) Once you are done testing please shut down the VM using Ctrl-C on the terminal where you started the VM. This allows the server to recover the resources for other student teams.
Once on the VM, access the starter code:
First, navigate to the folder vmfiles. This is the one folder on the VM which persists when the VM shuts down, and it is shared with the instructional machine (where it is ~/proj3-vm/vmfiles). Everything else on the VM is reset. However, please do regularly save your code, as best practice.
In vmfiles, clone your team’s repo (see Option 1 for how to make it from the template):
git clone <your team's repo URL>
cd <your repo>
make setup
make doctor # every check should pass
Wireshark Setup
You can use Wireshark on your own machine to view and reason about the pcap outputs from the simulator.
# Linux
sudo apt install wireshark
# macOS
brew install --cask wireshark
# Windows
winget install WiresharkFoundation.Wireshark
If you are working on the instructional machines, you’ll need to copy the output to your computer. From your own computer:
scp -r <login>@<instructional machine>:proj3-vm/vmfiles/<your repo>/runs/leo-basic_workload .
Project Environment Tour
There are a few different components of this project, so here we’ll try and summarize how you’ll use the different components that you’ve set up.
The scenario you pick defines the network topology that ns-3 simulates. This includes the links, their bandwidth, delay, loss, and queue sizes. You can read more about ns-3 here. Your predicted workload will be used to define the traffic and the link events. We’ve included a simple workload for each scenario, but we recommend you think of more complex workloads to test with. You will write your protocol in protocol.py, which is the only code that you will need to submit to Gradescope. The repo is set up to output results and logs, packet captures which you can examine in Wireshark, and an animated viewer of your traffic which you can open in a browser.

Workflow
Once you’re ready to test your code run:
make run SCENARIO=<scenario>
Where scenario is leo, datacenter or sensor.
You can test with your own workloads using:
make run SCENARIO=<scenario> WORKLOAD=workload.yaml
Results will be in runs/<scenario>-basic_workload/ (or runs/<scenario>-workload/): summary.txt, results.json, plots.png, and a log per host, where your self.log() and print() output goes. Add SEED=2 (or any number) to rerun the same workload with different random choices, impacting when messages arrive and which packets the network drops.
To look at your traffic, add PCAP=1 to write a packet capture per network device for Wireshark, and VIS=1 to write vis.html, a viewer that animates packets moving through your scenario’s network, queues filling, and drops:
make run SCENARIO=<scenario> PCAP=1 VIS=1
You can also run the provided examples, for instance the stop-and-wait baseline, with PROTOCOL=example/baseline_stopwait.
You can submit your protocol.py to the Gradescope autograder as much as you’d like.
You will ultimately be graded on our hidden workloads.
Stage 2
In this stage, you will implement your protocol. While you only will submit protocol.py, we also really recommend that you write a test workload in workload.yaml and evaluate your protocol by watching your traffic in the viewer, and examining packets in Wireshark to test how your protocol performs.
Deliverables and Points
The deliverable for this stage is protocol.py submitted on Gradescope. Your protocol will be evaluated against our hidden scenario workloads which the staff will run in ns-3 on the same network topology that you designed your protocol for.
The total points for Stage 2 is 30 pts out of the total 100 pts for the full project. 10 pts will be given for a “correct” protocol that runs on a well behaved network. The remaining 20 pts will be given for performance metrics as shown below. You can resubmit protocol.py to Gradescope as many times as you’d like.
Stage 3
In this stage, you will have a chance to change your design based on additional results which you can see on Gradescope. You can resubmit protocol.py to Gradescope as many times as you’d like to get more metrics and be regraded on the same workloads from Stage 2.
Deliverables and Points
The total points for Stage 3 is 40 pts out of the total 100 pts for the full project. 10 pts will be given for a “correct” protocol that runs on a well behaved network. The remaining 30 pts will be given for performance metrics as shown below.
Performance Metrics
The correctness points are measured on your scenario’s provided basic workload with no loss, handovers, or link events: your protocol loads, runs to the end, delivers everything, and follows the API’s rules. The performance points are measured on the hidden workloads, which use the same scenario and requirements but are longer and harsher than the basic workload.
Each requirement is scored by how close you got. Meeting the requirement earns 100%, 80% of the way there earns 80% of the points, and halfway earns 50%.
LEO satellite
| Metric | Description | Requirement | Share of Points |
|---|---|---|---|
reliability.min_ratio |
Messages that are delivered with the right id and the exact bytes, divided by the total messages. | 1.0 | 40% |
throughput_bps.min_active |
Delivered application bits per second over the active window | 28 Mbps | 30% |
reliability.min_deadline_met_ratio |
Fraction of total messages that arrived inside their deadline. | 0.90 | 20% |
overhead.max_ratio |
Wire bytes sent by both ends over delivered message bytes, including headers, acks, and retransmissions. | 1.15 | 10% |
Datacenter
| Metric | Description | Requirement | Share of Points |
|---|---|---|---|
reliability.min_ratio |
Messages that are delivered with the right id and the exact bytes, divided by the total messages. | 1.0 | 40% |
step_slowdown.mean_max |
Each round’s time (until its last message arrives) divided by the fastest the network could possibly finish it. 1.0 is perfect; the requirement is on the mean over all rounds. | 2.5 | 45% |
overhead.max_ratio |
Wire bytes sent by both ends over delivered message bytes, including headers, acks, and retransmissions. | 1.30 | 15% |
Sensor buoys
| Metric | Description | Requirement | Share of Points |
|---|---|---|---|
overhead.max_ratio |
Wire bytes sent by both ends over delivered message bytes, including headers, acks, and retransmissions. | 1.7 | 45% |
reliability.min_ratio |
Messages delivered with the right id and the exact bytes, divided by the total messages. | 0.97 | 25% |
latency_ms.p95_max |
95th percentile latency in scenario units, the 5 minute delivery budget. The simulated clock runs 60x faster, so this is 5 s measured. | 300000 ms (5 min) | 15% |
deadline_met.min_alarm |
Of the messages labelled alarm, the fraction delivered within their deadline (30 s in scenario units). |
0.90 | 15% |
The graded workloads are generally harsher than basic_workload, so a protocol that just meets these metrics on basic_workload will likely not get full points.