Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TCP - difference between Congestion window and Receive window

Tags:

tcp

ip

I try to understand the difference between Congestion window and Receive window.

As I understand, the receiver window is a buffer where the receiver can get the packets. The same is with the Congestion window which tell us the bound of the Receiver's abilities, and change according to lost packets, etc.

So what is the diffrence between them?

like image 875
Adam Sh Avatar asked Jul 19 '12 07:07

Adam Sh


People also ask

What is congestion window TCP?

In TCP, the congestion window (CWND) is one of the factors that determines the number of bytes that can be sent out at any time. The congestion window is maintained by the sender and is a means of stopping a link between the sender and the receiver from becoming overloaded with too much traffic.

What is the difference between congestion control and flow control in TCP?

The main difference between flow control and congestion control is that the flow control is a mechanism that controls the traffic between sender and receiver. On the other hand, the congestion control mechanism controls the traffic that is placed by the transport layer into the network.

What is congestion window size?

TCP Buffer Sizing TCP uses what is called the "congestion window", or CWND, to determine how many packets can be sent at one time. The larger the congestion window size, the higher the throughput. The TCP "slow start" and "congestion avoidance" algorithms determine the size of the congestion window.

How does TCP congestion control work?

TCP detects congestion when it fails to receive an acknowledgement for a packet within the estimated timeout. In such a situation, it decreases the congestion window to one maximum segment size (MSS), and under other cases it increases the congestion window by one MSS.


1 Answers

To give a short answer: the receive window is managed by the receiver, who sends out window sizes to the sender. The window sizes announce the number of bytes still free in the receiver buffer, i.e. the number of bytes the sender can still send without needing an acknowledgement from the receiver.

The congestion window is a sender imposed window that was implemented to avoid overrunning some routers in the middle of the network path. The sender, with each segment sent, increases the congestion window slightly, i.e. the sender will allow itself more outstanding sent data. But if the sender detects packet loss, it will cut the window in half. The rationale behind this is that the sender assumes that packet loss has occurred because of a buffer overflow somewhere (which is almost always true), so the sender wants to keep less data "in flight" to avoid further packet loss in the future.

For more, start here: http://en.wikipedia.org/wiki/Slow-start

like image 158
cxxl Avatar answered Oct 06 '22 00:10

cxxl