TCP · the byte stream and its windows

TCP does not send “packets”: it numbers the bytes of the application and slides a window over them. Every band shares the same byte axis; step through and watch the variables of the sender and the receiver.

Sender TCP (A): state variables

Receiver TCP (B): state variables

Sequence diagram (one row per tick; segments take half a tick)
Segments exchanged so far
Scenario parameters

Model used in class: time in ticks, one segment per host and tick, half a tick of propagation, a single retransmission timer, cumulative ACKs, fast retransmit on the third duplicate ACK, no window probe (the sender waits for the window update). The connection is assumed open; A's segments carry AN=2048 and W=512. With congestion control: cwnd in MSS, slow start adds 1 per acknowledged segment up to ssthresh, congestion avoidance counts N + c/N, fast recovery on the third duplicate ACK (ssthresh = cwnd/2, cwnd = ssthresh + 3) and back to slow start with cwnd = 1 when the timer expires.