TCP FloW Control TCP is a sliding window protocol For window size n, can send up to n bytes without receiving an acknowledgement When the data is acknowledged then the window slides forward Each packet advertises a window size Indicates number of bytes the receiver has space for Original tcp always sent entire window But receiver buffer space I= available net capacity! Congestion control now limits this window= min(receiver window, congestion window) Lecture 17: TCP Congestion Control
6 Lecture 17: TCP & Congestion Control TCP Flow Control • TCP is a sliding window protocol • For window size n, can send up to n bytes without receiving an acknowledgement • When the data is acknowledged then the window slides forward • Each packet advertises a window size • Indicates number of bytes the receiver has space for • Original TCP always sent entire window • But receiver buffer space != available net. capacity! • Congestion control now limits this • window = min(receiver window, congestion window)
Window flow control: send side window Sent and acked Sent but not acked Not yet sent Next to be sent Lecture 17: TCP Congestion Control 7
7 Lecture 17: TCP & Congestion Control Window Flow Control: Send Side Sent but not acked Not yet sent window Next to be sent Sent and acked
Window flow control: send side Packet Sent Packet Received Source Port Dest, Port Source Port Dest. port Sequence Number Sequence Number Acknowledgment Acknowledgment HL/Flags Window HL/Flags Window D Checksum Urgent pointer D Checksum Urgent Pointer Options Options App write acknowledged sent to be sent outside window ecture 17: TCP& Congestion Control
8 Lecture 17: TCP & Congestion Control acknowledged sent to be sent outside window Source Port Dest. Port Sequence Number Acknowledgment HL/Flags Window D. Checksum Urgent Pointer Options… Source Port Dest. Port Sequence Number Acknowledgment HL/Flags Window D. Checksum Urgent Pointer Options... Packet Sent Packet Received App write Window Flow Control: Send Side
Window flow control: receive side What should receiver do? New Receive buffer Acked but not Not yet delivered to user acked window ecture 17: TCP& Congestion Control
9 Lecture 17: TCP & Congestion Control Acked but not delivered to user Not yet acked Receive buffer window Window Flow Control: Receive Side New What should receiver do?
TCP Persist What happens if window is 0? Receiver updates window when application reads data What if this update is lost? TCP Persist state Sender periodically sends 1 byte packets Receiver responds with aCK even if it can 't store the packet Lecture 17: TCP Congestion Control
10 Lecture 17: TCP & Congestion Control TCP Persist • What happens if window is 0? • Receiver updates window when application reads data • What if this update is lost? • TCP Persist state • Sender periodically sends 1 byte packets • Receiver responds with ACK even if it can’t store the packet