TCP provides reliable, ordered delivery over unreliable networks.
Three-way handshake:
. Client sends SYN . Server responds SYN-ACK . Client sends ACK
Connection established. Data can flow.
Key concepts:
- Sequence numbers: Track byte position in stream
- Acknowledgments: Confirm receipt of data
- Congestion control: Slow start, congestion avoidance
- Retransmission: Lost packets resent after timeout
Interview question: "Walk me through what happens when you establish a TCP connection."
Mention the handshake, explain why steps are needed (to synchronize sequence numbers both directions).