# Analysis of Congestion Window Test Questions of TCP Sending Window

Topic 1:

Source 2015 408 Computer Synthesis

Host A and Host B create a new TCP connection. A's initial congestion control threshold is 32KB. A to B always sends data in a segment of MSS=1KB, and data is always sent; B allocates a 16KB receiving buffer for the connection and responds to it. Acknowledge each data segment, ignoring segment transmission delay. If all the data received by B is stored in the cache and is not taken away, then from the moment when the connection is established successfully and the timeout is not sent, after 4 RTTs, A's sending window is (A).

A.1KB

B.8KB

C.16KB

D.32KB

The size of the sending window depends on min(rwnd, cwnd).

Among them, rwnd is the vacant size of the receiving buffer, which indicates how much the receiver can receive.
cwnd is the vertical axis value that we often draw slow growth curve, congestion avoidance curve and so on.

Here, in fact, it is very clear that the receiving buffer can only enter but not exit, so it is constantly decreasing. But we have a thinking inertia that we like to think about the interesting parts, drawing the changes of cwnd, thinking that the problem will be solved after analyzing the problem, and we must not ignore the rwnd. Here is an example.

cwnd starts from 1MSS = 1KB, becomes 2KB after one RTT, 4KB after two RTTs, 8KB after 3RTT, and 16KB after 4 RTTs

At the same time, the reception delay is changed from 16KB→15KB→13KB→9KB→1KB 16KB→15KB→13KB→9KB→1KB

 Notification window value, representing the remaining value of the receiving buffer (KB) Congestion window size (KB) Sending window size (KB) initial 16 1 1 After the first RTT 16-1=15 2 min (15, 2) = 2 After the second RTT 15-2=13 4 min (13.4) = 4 After the third RTT 13-4=9 8 min (9.8) = 8 After the fourth RTT 9-8=1 16 The notification receiving buffer is only 1KB, and the sending window is min(1, 16)=1KB

After one RTT, when sending for the second time, rwnd = 15KB, cwnd = 2KB, and the sending window takes the smaller value: 2KB

After two RTTs, when sending for the third time, rwnd = 13KB, cwnd = 4KB, and the sending window takes the smaller value: 4KB

After three RTTs, when sending for the fourth time, rwnd = 9KB, cwnd = 8KB, and the sending window takes the smaller value: 8KB

After four RTTs, when sending for the fifth time, rwnd = 1KB, cwnd = 16KB, and the sending window takes the smaller value: 1KB

Of course, the acceptance window is full after the fifth transmission, and host A will periodically send only one byte of data segment. Once the buffer of host B is empty, a non-zero notification window will appear to confirm the segment. Value, of course, this is the subject request, the data of host B will not be taken away, just for calculation, not the actual situation.

### Guess you like

Origin blog.csdn.net/wangrenhaioylj/article/details/113097756
Recommended
Ranking
Daily