Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Chapter 3 Sample Questions

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Chapter 3

1) Compare GBN, SR, and TCP (no delayed ACK). Assume that the timeout values
for all three protocols are sufficiently long such that 5 consecutive data segments
and their corresponding ACKs can be received (if not lost in the channel) by the
receiving host (Host B) and the sending host (Host A) respectively. Suppose Host
A sends 5 data segments to Host B, and the 2nd segment (sent from A) is lost. In
the end, all 5 data segments have been correctly received by Host B.
a. How many segments has Host A sent in total and how many ACKs has Host B
sent in total? What are their sequence numbers? Answer this question for all
three protocols.
b. If the timeout values for all three protocol are much longer than 5 RTT, then
which protocol successfully delivers all five data segments in shortest time
interval?

Answer:
a) Go Back N:
A sends 9 segments in total. They are initially sent segments 1, 2, 3, 4, 5 and later
re-sent segments 2, 3, 4, and 5.
B sends 8 ACKs. They are 4 ACKS with sequence number 1, and 4 ACKS with
sequence numbers 2, 3, 4, and 5.

Selective Repeat:
A sends 6 segments in total. They are initially sent segments 1, 2, 3, 4, 5 and later
re-sent segments 2.
B sends 5 ACKs. They are 4 ACKS with sequence number 1, 3, 4, 5. And there is
one ACK with sequence number 2.

TCP:
A sends 6 segments in total. They are initially sent segments 1, 2, 3, 4, 5 and later
re-sent segments 2.
B sends 5 ACKs. They are 4 ACKS with sequence number 2. There is one ACK
with sequence numbers 6. Note that TCP always send an ACK with expected
sequence number.

b) TCP. This is because TCP uses fast retransmit without waiting until time out.
2) Consider that only a single TCP (Reno) connection uses one 15Mbps link which
does not buffer any data. Suppose that this link is the only congested link between
the sending and receiving hosts. Assume that the TCP sender has a huge file to
send to the receiver, and the receiver’s receive buffer is much larger than the
congestion window. We also make the following assumptions: each TCP segment
size is 1,200 bytes; the two-way propagation delay of this connection is 160 msec;
and this TCP connection is always in congestion avoidance phase, that is, ignore
slow start.
a. What is the maximum window size (in segment) that this TCP connection can
achieve?
b. What is the average window size (in segment) and average throughput (in bps) of
this TCP connection?
c. How long would it take for this TCP connection to reach its maximum window
again after recovering from a packet loss?

Answer:
a) Let W denote the max window size measured in segments. Then, W*MSS/RTT =
15Mbps, as packets will be dropped if the maximum sending rate exceeds link
capacity. Thus, we have W*1200*8/0.16=15*10^6, then W is about 250.
b) As congestion window size varies from W/2 to W, then the average window size
is 0.75W=187.5 segments. Average throughput is
187.5*1200*8/0.16=11.25Mbps.
c) (250/2) *0.16= 20 seconds, as the number of RTTs (that this TCP connections
needs in order to increase its window size from W/2 to W) is given by W/2. Recall
the window size increases by one in each RTT.

You might also like