Applications need reliable, ordered, connection-oriented data delivery between hosts. The underlying IP protocol is connectionless and unreliable, so a transport protocol is needed to provide these guarantees.
A connection-oriented, reliable transport protocol that provides ordered, error-checked, flow-controlled, and congestion-controlled byte-stream delivery between applications.
- Establishes connection via three-way handshake (SYN, SYN-ACK, ACK)
- Breaks data into segments with sequence numbers
- Provides reliable delivery via acknowledgments and retransmission
- Implements flow control via receive window (advertised by receiver)
- Implements congestion control via congestion window (adjusted by sender)
- Terminates connection with FIN/ACK exchange
- Connection-oriented: requires setup and teardown
- Reliable: guarantees delivery, order, error-checking
- Stateful: maintains connection state at both endpoints
- Full-duplex: bidirectional data flow
- Used by HTTP, HTTPS, FTP, SMTP, SSH
- Built from: Connection-Oriented Service — implements this service
- Built from: Three-Way Handshake — connection setup
- Built from: Sliding Window Protocol — flow/congestion control
- Built from: IP Protocol — runs on top of IP
- Related: UDP — unreliable alternative transport protocol
- Related: Flow Control and Congestion Control
- Head-of-line blocking: lost packet delays all subsequent packets even if received
- SYN flood attacks exploit connection setup state
- TCP meltdown: aggressive retransmission in poor networks can worsen congestion