mirror of
https://github.com/PKUFlyingPig/cs-self-learning.git
synced 2026-06-26 03:17:01 +08:00
* [Course][Update/Refactor] Refactor Standford CS144 documentation; Add new resources; Update course introduction/description * update format for proper rendering
68 lines
No EOL
5.4 KiB
Markdown
68 lines
No EOL
5.4 KiB
Markdown
# 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](http://yuba.stanford.edu/~nickm/index.html), 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](https://github.com/jiangyy)'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](https://github.com/CS144/minnow) 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](https://github.com/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](https://zhuanlan.zhihu.com/p/20551290958).
|
||
|
||
- [PKUFlyingPig](https://github.com/PKUFlyingPig/CS144-Computer-Network)
|
||
- [Lexssama's Blogs](https://lexssama.github.io/tags/CS144/)
|
||
- [huangrt01](https://github.com/huangrt01/CS-Notes/blob/master/Notes/Output/Computer-Networking-Lab-CS144-Stanford.md)
|
||
- [kiprey](https://kiprey.github.io/tags/CS144/)
|
||
- [康宇PL's Blog](https://www.cnblogs.com/kangyupl/p/stanford_cs144_labs.html)
|
||
- [doraemonzzz](http://doraemonzzz.com/tags/CS144/)
|
||
- [ViXbob's libsponge](https://vixbob.moe/25.html)
|
||
- [吃着土豆坐地铁的博客](https://www.epis2048.net/categories/Code/Stanford-CS144/)
|
||
- [Smith](https://www.inlighting.org/archives/2021-cs144-notes/)
|
||
- [星遥见](https://www.cnblogs.com/weijunji/tag/CS144/)
|
||
- [EIMadrigal](https://www.cnblogs.com/EIMadrigal/p/15500472.html)
|
||
- [Joey](http://yuzijun.life/2021-02/CS144) |