KomuraSoft LLC
TCP101

Understand TCP with Diagrams and Exercises

"I can see the timeout in the logs, but I can't investigate any further." "I open a packet capture, but I have no idea what the seq and ack numbers are telling me." — We use TCP every day, yet it is surprisingly hard to explain what is inside. Instead of memorizing TCP, this course aims to make you able to follow captures and incident logs yourself, through the eyes of sequence numbers and windows. Diagrams give you the big picture, and short exercises with hand calculations placed throughout each chapter let you verify your understanding as you go.

Diagrams → hand calculations → simulator → case exercises 43 questions in total Graded in-browser Saved to localStorage
Time
3–4 hours
Question count
43 questions
Format
7 chapters + short exercises + simulator
Cost
Free
Layer diagram: TCP and UDP sit on top of an IP layer that loses, reorders, and duplicates packets, with TCP providing three promises

IP promises no more than "it will probably arrive." TCP sits on top of it and keeps three promises on behalf of the application. Keep this division of labor in mind and every later chapter becomes easier to read.

What makes this course different

Short exercises right below the text
You answer 2–3 questions immediately after each passage, so it is hard to move on while merely feeling like you understood.
Compute seq / ack by hand
You actually calculate sequence numbers, ACK numbers, the remaining window, and cwnd growth with small numbers, building the sense that lets you read the numbers in a capture.
A sliding-window simulator
In the Chapter 4 simulator, moving RTT, window, and bandwidth lets you see with your own eyes how "the amount you can send per RTT" and the throughput ceiling change.
Graded in-browser, no sign-up
All 43 questions are graded in your browser, and results are stored only in your browser's localStorage. Nothing is sent to a server.

The three promises that run through this course

TCP looks like a pile of mechanisms, but every one of them exists to keep one of three promises. As the chapters progress, picture more and more parts being added under each promise.

1. Reliable delivery — and noticing when it fails
Every byte sent gets a number, and the receiver reports how far it has received. If no report comes back, the sender retransmits. (Chapters 2–3)
2. In order
Even if packets overtake each other or get duplicated along the way, the receiver uses the numbers to reassemble the original byte sequence before handing it to the application. (Chapters 3 and 6)
3. Paced to the peer and the network
Never send faster than both the peer's buffer allows (flow control) and the path's congestion allows (congestion control). (Chapters 4–5)

This course's motto: when you look at a capture or an incident log, do not stop thinking there — ask: which promise is being broken right now — delivery, ordering, or pacing?

Chapter overview

Tips for studying

  1. Go in the order text → the exercises right below it. Answering immediately after reading sticks far better than saving questions for later.
  2. Do not do the calculation questions in Chapters 3–5 in your head — write out the byte numbers and the window edges on paper. The feeling that capture numbers are "readable" comes from your hands.
  3. Play with the Chapter 4 simulator both before and after the exercises. The formula "window ÷ RTT" turns into intuition.
  4. If a Chapter 7 case stumps you, go back to the corresponding chapter and review just one or two passes. You do not need to redo everything.

Prerequisites before you start

  • A little experience writing programs in any language is enough. No networking expertise is assumed.
  • If you can multiply, divide, and add byte counts, you can do every hand calculation in the course.
  • Knowing that an IP address is "the address that points at a destination" is all you need. We do not go into routing details.