10011101120113011401SYNSYN-ACK10011201130114011101ACK 1101ACK 1101ACK 1101
Golden bricks: numbered bytes the client keeps until they are ACKedSlots: the server's receive window, 100 bytes eachEnvelopes: segments and ACKs; the label is the sequence or ACK numberCloud: the network, where a packet can be droppedThe client (192.0.2.7) opens a TCP connection to 203.0.113.10:443 with SYN, SYN-ACK and ACK, then sends 500 bytes numbered 1001 to 1500 in 100-byte segments. Each golden brick is one segment the client keeps until it is acknowledged; the server's tray is its 400-byte receive window. The segment starting at 1101 is dropped in the network. Every ACK names the next byte the server expects, so three duplicate ACK 1101s come back and the client resends it at once (fast retransmit). ACK 1501 then covers all 500 bytes, and FIN and ACK close each direction. 192.0.2.7 and 203.0.113.10 are RFC 5737 documentation addresses, the same connection the HTTPS lesson opens.

Opening a connection

  1. Before any data moves, the client asks to open a connection. Its SYN carries a starting sequence number, 1000 here. Real starting numbers are unpredictable, so leftover segments from an old connection, or forged ones, cannot pass as this one's.

Numbered bytes

Loss and recovery

Closing

The segments, step by step

;; step 1/12 · syn
;; client → server
TCP 192.0.2.7:51514 → 203.0.113.10:443
flags  SYN
seq    1000  (initial sequence number x; unpredictable in real life)
why    old or forged segments must not fit this connection (RFC 9293 §3.4.1, RFC 6528)
win    65535, options: MSS 1460
header 20 bytes + options

Illustrative numbers: real initial sequence numbers are random 32-bit values (RFC 6528), segments usually carry up to 1460 bytes on Ethernet, and windows are many kilobytes. Events are grouped for clarity: on a real link the ACKs for 1201 and 1301 leave as soon as each segment arrives, before 1401 is even sent.