Transmission Control Protocol (TCP) 1 2 Sending and receiving buffers Stream of bytes 3 TCP segments Segment N Segment 1 H H Numbering: Byte Number Sequence Number Data + Ctrl, Data, Ctrl (response) - Valid Sequence number Acknowledge Number 4 TCP segment format 5 Control field TCP Connections ✓ Connection Establishment ✓ Data Transfer ✓ Connection Termination ✓ Connection Reset 7 Connection establishment using three-way handshake seq: 8000 UAPRS F SYN seq: 15000 ack: 8001 nd: 5000 U A P R S F rw SYN + ACK seq: 8000 ack: 15001 UAPRS F rwnd: 10000 ACK Means “no data” ! seq: 8001 if piggybacking 8 Data Transfer Pushing data Urgent data Connection Termination 9 Connection termination using three-way handshake 10 Half-Close 11 STATE TRANSITION DIAGRAM 12 Simultaneous open 13 Simultaneous close ex 14 WINDOWS IN TCP Send window in TCP 15 Receive window in TCP 16 FLOW CONTROL An example of flow control 17 ERROR CONTROL Normal operation 18 Lost segment 19 Fast retransmission 20 Lost acknowledgment 21 Lost acknowledgment corrected by resending a segment 22 CONGESTION CONTROL Slow start, exponential increase 23 Congestion avoidance, additive increase 24 TCP Taho TCP Taho - Example TCP Reno TCP Reno - Example