Open In App

How Flow Control is Achieved in TCP?

Answer: In computer networks, reliable data delivery is important. The Transmission Control Protocol guarantees in-order and error-free data transfer using flow control. This is to prevent the sender from flooding the receiver so as to make sure it can work efficiently in turn.TCP utilizes a sliding window protocol for flow control. The receiver advertises a window size, indicating the number of bytes its buffer can hold. The sender transmits data segments up to this advertised window.

TCP Flow Control Working

1. Handshake: During connection establishment, the receiver sends its initial window size to the one who is sender 2.

2. Sending and Acknowledging: The sender transmits data segments up to the window size. For each received segment, the receiver sends an acknowledgment (ACK).



3. Window Adjustment: As the receiver processes data, the window size adjusts dynamically. A full buffer prompts the receiver to advertise a smaller window, slowing the sender. Conversely, a free buffer space leads to a larger advertised window, allowing the sender to transmit faster. This dynamic window prevents data loss and optimizes network performance.

Additionally, TCP uses window scaling to handle larger window sizes efficiently on high-bandwidth connections. Employs a persist timer that triggers small data transmissions even when the window is zero, ensuring the connection stays alive. By regulating data flow, TCP prevents receiver overload and contributes to congestion avoidance within the network.



Article Tags :