Preface

Disclaimer: This translated content is generated by a large language model.

This is the second article in the series sharing experiences of self-studying online computer courses.

 

Course Introduction

Stanford CS144 Introduction to Computer Networking is a classic internet course. My main learning method was to complete the minnow project. First, I will share some learning resources:

  1. Course Website: The public resources for the course. Note that the content for each semester will be cleared in the next semester, so to study older versions, you need to use resources like Wayback Machine.
  2. Course Recordings: The course recordings are not publicly available, so I supplemented my knowledge using the video content from UCB CS168 Summer 2025.
  3. Online Textbooks: The course website recommends several classic internet networking textbooks, but I suggest treating them only as references. The handouts and notes provided with the course are also very detailed.
  4. Project Code: This is the minnow project framework for the course. Note that this repository will also be cleared after the semester ends, so to study it, you need to find a backup or learn synchronously.
  5. I have not open-sourced my code implementation, which is also in accordance with the course policy. Additionally, the project already provides a complete testing framework and rich test cases.

Learning Content Summary

  1. Project 0 is an introductory project. The first part involves conducting some network access experiments, such as wget, on Stanford's internal course website. The second part is to implement a reliable byte stream using C++.
  2. Project 1 requires implementing a Reassembler, which reassembles out-of-order TCP packets and returns an ordered stream. Many issues may be encountered during the first attempt, but the handouts provide very detailed explanations, and the testing framework often helps debug implementation problems.
  3. Project 2 requires implementing a TCP Receiver, whose main function is to reassemble content based on incoming packet sequence numbers, etc., and reply with ACK and window size information to the sender.
  4. Project 3 requires implementing a TCP Sender, which I felt was the most challenging part of the entire project. This part requires maintaining a list of sent items and choosing to retransmit based on the reply results. Although it has been greatly simplified compared to an actual TCP protocol implementation, it still requires very careful consideration of various boundary conditions and meticulous debugging. After implementing these four parts, you can combine the wget implemented in the first part with the current implementation, or send it to the course's example website to test the results.
  5. Project 4 is a data analysis experiment, analyzing ping values, RTT, etc. under actual network conditions. These analyses are very interesting, and I believe they will be somewhat helpful to friends in China who "scientifically surf the internet."
  6. Project 5 is to implement an ARP protocol, which is a protocol between the TCP layer and the IP layer. Its purpose is to link an IP address with the MAC address of the next sender. This also helps in understanding the roles and connections of various abstraction layers of the internet.
  7. Project 6 is to implement a Router, which maintains a routing table internally and performs operations on incoming packets based on the routing table's match results.
  8. Project 7 combines all of the above. I used my local machine and a cloud server to send messages to each other. When "hello world" truly appeared on the other end, it was quite fulfilling.

Below are the test results for my Project 0 and Project 1, which I ran on GitHub Action: benchmark

C++ Learning

This course uses modern C++ as the course language, significantly reducing C-style memory management issues. The process of studying this course also familiarized me with many basic C++ library functions and class template methods, and helped cultivate good programming habits. Although, overall, many details of the project are "programming towards test cases," it still takes some effort to pass all tests. This course project also made many simplifications to the actual implementation (for example, the older sponge version of TCP Connection is no longer required), so it might not cover many new computer networking concepts. In this regard, I recommend the UCB CS168 course videos as a supplement for knowledge content.

评论系统尚未配置。请在 .env 中填写 giscus 所需的环境变量。