Bitpath

Lesson 1 · Unit 02

TCP: a reliable stream

Handshake, sequence numbers, acks and resends

13 exercisesabout 3 min

What you practise

  • The three-way handshake, sequence numbers and acks, retransmission, ordering, closing with FIN, what a "connection" is when the network only moves packets

Try a question from this lesson

Pick one

IP promises nothing: packets may be lost, duplicated or arrive out of order. Yet a 2 GB download arrives perfect. Who fixes it?

The ideas

Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.

Concept

Three packets to say hello

Before any data moves, TCP opens a connection with a three-way handshake. Each side picks a starting sequence number, and the other side acknowledges it.

From then on both ends remember the conversation. The network in between remembers nothing.

Client                  Server
  | ------ SYN -------> |
  | <---- SYN-ACK ----- |
  | ------ ACK -------> |
  |   connection open   |

Concept

Numbered, acknowledged, resent

Every byte has a sequence number. The receiver acks with the number of the next byte it expects.

The sender keeps a copy of everything not yet acked and resends it when a timer runs out. The receiver sorts segments by number and drops duplicates.

The application sees none of this: it reads one clean, in-order stream of bytes.

10 more exercises in the app

  • 1× order the lines
  • 3× type the answer
  • 3× multiple choice
  • 1× true or false
  • 1× fill the blanks
  • 1× match the pairs

Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.

One email when Bitpath is ready to try. Nothing else. Privacy