Skip to content

# CS144: Computer Network

## Introduction

- Offered by: Stanford
- Prerequisites: Computer System Fundamentals, CS106L
- Programming Language: C++
- Difficulty: 🌟🌟🌟🌟🌟
- Class Hour: 100 hours

One of the lecturers of this course is Professor Nick McKeown, a giant in the field of Networking. At the end of each chapter of MOOC, he will interview an executive in the industry or an expert in the academia, which can certainly broaden your horizons.

In this course's project, you will incrementally build an entire TCP/IP protocol stack using C++.

- `checkpoint 0` serves as a warmup lab to familiarize you with the development environment. You'll experiment with network commands (e.g., `telnet`, `netcat`), write a basic web crawler webget using Linux Kernel's `tcp_socket` abstraction, and finally implement an (In-Memory) Reliable Byte Stream.
- `checkpoint 1-3` will guide you through implementing a simplified yet core-semantics-preserving, (almost fully) standards-compliant TCP Protocol that can interoperate with industrial-grade TCP implementations.
- In `checkpoint 4`, you'll replace the Linux Kernel's `tcp_socket` used by `webget` in `checkpoint 0` with your own TCP implementation via framework encapsulation (TCPMinnowSocket). You'll also analyze real-world network traffic patterns (i.e., with RTT ≥ ~100ms) and perform visualized data analysis using Python — I highly recommend diving deep into this analysis; it's genuinely fascinating.
- After completing the first half, `checkpoint 5` takes you to the lowest layer of the TCP/IP stack. You'll implement a `NetworkInterface` that bridges IP Datagrams and Ethernet Frames using the ARP protocol.
- `checkpoint 6` builds upon your "network card" (NetworkInterface), requiring you to implement an IP Router that forwards received IP Datagrams appropriately.
- Mirroring `checkpoint 4`, `checkpoint 7` uses framework-provided glue code (`endtoend.cc`) to simulate underlying network infrastructure in memory via `network_thread`. This connects all previously implemented components through a relay server (`cs144.keithw.org`), enabling real-time communication between client and server endpoints using your custom TCP/IP stack.

This course feels less like a computer networking class and more like the best modern C++ primer for young developers.

If you merely "skim through" the 8 checkpoints (two of which don't even require coding! 😂😅), you'll miss most of its essence.

The true brilliance lies in the framework code. Without meticulously reading every line, many implementation details will remain shrouded in mystery—like magic!

- How exactly do we combine your implemented `TCPSender` and `TCPReceiver` into a (bi-directionally) reliable byte stream in `checkpoint 4`?
- How does `TCPMinnowSocket` replace the kernel's default TCP implementation?
- Where did the famed three-way handshake go?
- How does multithreading work here?
- Do you truly understand the final `endtoend.cc` provided in `checkpoint 7`?

I deeply resonate with Prof. Yan-Yan Jiang's mantra: "There's no magic in the computer world." All these questions find answers in the framework code — if you study it closely.

For networking/system programming beginners, remember we now have LLMs like O1, Claude, and DeepSeek — far more efficient than the old "RTFM" approach!

There's no magic in the computer world. Go explore it!

## Resources

A minor caveat: As of January 2025, the course's GitHub Repository gets cleared completely every academic year. If you haven't forked a copy beforehand, you'll have to follow the current version.

The course website also appears to lack official archives—each year's iteration is entirely fresh. Through the Wayback Machine, I've found archived versions of the course site up to 2021. The link for the Winter 2024 version is preserved here: https://web.archive.org/web/20241209004804/https://cs144.github.io/.

- Course Website: https://cs144.github.io/
- Video: https://www.youtube.com/watch?v=r2WZNaFyrbQ&list=PL6RdenZrxrw9inR-IJv-erlOKRHjymxMN
- Textbook: None
- Assignments: refer to the course website

## Reference

For relatively recent (post-2024) detailed walkthrough guides for this course, we recommend consulting @xzhseh's comprehensive article (ps. you may need a translator to read it): Stanford CS144 (Winter 2024) Computer Networks – Possibly the Best Modern C++ Primer for Young Developers.

- PKUFlyingPig
- Lexssama's Blogs
- huangrt01
- kiprey
- 康宇PL's Blog
- doraemonzzz
- ViXbob's libsponge
- 吃着土豆坐地铁的博客
- Smith
- 星遥见
- EIMadrigal
- Joey

2025-01-31