Build a TCP/IP Stack from Scratch · Module 00

How to Use This Course

How to Use This Course

Each module in this series is a mini-project — short enough to finish in a few sittings, but complete enough to do something visible.

The Rhythm

Here's what you'll see throughout:

Theory

A brief, beginner-friendly explanation of what happens at that layer — what problem it solves, what its header looks like, and how packets flow through it.

We'll keep it light on math and heavy on intuition and diagrams.

Hands-On Implementation

You'll open the accompanying Git repo and implement that layer step by step.

Each module ends with a working demo — maybe a successful ping, an open TCP port, or a web page served from your stack.

Quiz and Exercises

Short, practical questions to make sure you actually understand what you built.

Then one or two small coding challenges (e.g., "add checksum validation" or "print the header fields to the console").

Solutions and Discussion

We'll walk through the key parts of the solution and point out common pitfalls or extensions you can try next.

Versioning and Checkpoints

Each module corresponds to:

  • A Git tag (e.g. v00_orientation, v01_setup, v02_ethernet, …)
  • A Docker image tag (e.g. netstack:mod00, netstack:mod01, …)

That means you can:

# Check out any point in history
git checkout v03_icmp
 
# Rebuild the exact Docker setup
docker-compose up --build

Info: You'll always know exactly where you are and what "success" looks like before moving on.

Pedagogical Pacing

PhaseModulesFocusEst. Time
Phase 1: Foundations0–4OSI, setup, L2/L3 basics1 week
Phase 2: Routing5–7Forwarding & NAT1 week
Phase 3: Transport8–10UDP/TCP2 weeks
Phase 4: Applications11–12HTTP server1 week
Phase 5: Extras13–14ICMP errors, IPv6optional