Computer Networking MOOC Assignment 5

1.

Suppose host A sends 5 consecutive segments to host B, host B acknowledges each segment, the second segment is lost, and the remaining segments and the retransmitted second segment are Correctly received by host B, host A correctly receives all ACK message segments; the message segments are consecutively numbered from 1 (ie 1, 2, 3...), and the timeout period of host A is long enough. please answer the following question:

1). If GBN, SR and TCP protocols are used respectively, how many segments does host A send in total for these three protocols? How many ACKs did host B send in total? What are their serial numbers? (answers are given separately for the 3 protocols)

2). If the timeout is much longer than 5RTT for the above three protocols, which protocol will successfully deliver 5 segments in the shortest time interval?


answer:

When using GBN protocol:

    ​A sends a total of 9 segments; first sends 1,2,3,4,5, and then resends 2,3,4,5.

    B sends a total of 8 ACKs; first 4 ACK1, then ACK2, ACK3, ACK4, ACK5.

When using the SR protocol:

    A sends a total of 6 segments; first sends 1, 2, 3, 4, 5, and then resends 2.

    ​B sends a total of 5 ACKs; ACK1, ACK3, ACK4, ACK5 are sent first, then ACK2.

When using the TCP protocol:

     A sends a total of 6 segments; first sends 1, 2, 3, 4, 5, and then resends 2.

     B sends a total of 5 ACKs; 4 ACK2s are sent first, and then 1 ACK6 is sent.

2). TCP protocol; because TCP has a fast retransmission mechanism (that is, it starts to retransmit the lost segment 2 without timeout).


2.

Assuming that the two end systems A and B are connected through a unique 8Mbps link (M=10^6), the two-way propagation delay of the link is 150ms; A sends a large file to B through a TCP connection, and B receives The cache is large enough, each TCP segment has a maximum segment length (MSS) of 1500 bytes, TCP uses the Reno version, and is always in the congestion avoidance phase (i.e. ignores slow start). please answer the following question:

1). What is the maximum window size (in terms of TCP segments) that this TCP connection can obtain?

2). What is the average window size (in TCP segments) and average throughput (in bps) for this TCP connection?

3).该TCP连接的拥塞窗口从发生丢包到恢复到最大窗口尺寸要经历多长时间?


答:

1)设W是最大窗口尺寸,当最大发送速率超过链路带宽时会发生丢包,因此:W*MSS/RTT=8Mbps,于是W=100。

2)拥塞窗口从W/2到W之间变化,平均窗口尺寸:W'=0.75W=75;因此平均吞吐量为:75*1500*8/0.15=6Mbps。

3)0.15*100/2=7.5秒,因为每个RTT窗口尺寸增加1个MSS。


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324624925&siteId=291194637