清華大學 計算機網路 第6週小考

(+10)
(10%) 1. Which of the following statements are correct for using “stop-and-wait” protocol” with 1-bit sequence number of “0” and “1”? (多選)
(a)When a sender transmits frame 0, before receiving the ACK 0, the sender can transmit frame 1 to speedup the transmission.
(b) When a sender transmits frame 0, it will transmit frame 1 after the ACK 0 received.
(c)When the sender retransmits frame 0, the receiver can determine that this is a second copy of frame 0 and therefore can ignore it.
(d) When the sender retransmits frame 1, the receiver can determine that this is a second copy of frame 1 and therefore can ignore it.
(e)When a second copy of frame is received, the receiver will discard the duplicated frame and therefore no need to send back an acknowledgement (ACK) for this frame.
(+5)
(5%) 2. Consider a link of 2 Mbps with an RTT (Round Trip Time) of 40 ms. Assume that the frame size is of 2 KBytes. What is the maximum sending rate (kbps) of the sender if the “stop-and-wait” protocol is used ? (Note that 1 Byte = 8 bits). Ans: ____(Ans)____(kbps).
AnsANS:400
(+5)
(5%) 3. Consider a link of 2 Mbps with an RTT of 40 ms. Assume that the frame size is of 1 KBytes. To fully use the link, the sender should transmit up to ___(Ans)_____ frames before having to wait for an ACK ?
AnsANS:10
(+10)
(10%) 4. In the sliding window protocol, the sender assigns a sequence number (denoted as SeqNum) to each frame and also maintains three variables: Sending Window Size (SWS): Upper bound on the number of outstanding (unacknowledged) frames that the sender can transmit; Last Acknowledgement Received (LAR): Sequence number of the last acknowledgement received, and Last Frame Sent (LFS): Sequence number of the last frame sent.
test6-4
 Which of the following conditions are right timing for the sender to slide (move) its window ?  (單選)
(a) When the acknowledgement of any frame within the sliding window is received
(b) When the acknowledgement of LAR+SWS-1 is received
(c) When the acknowledgement of LAR+SWS is received
(d) When the acknowledgement of LAR+2 is received
(e) When the acknowledgement of LAR+1 is received
(+10)
(10%) 5. In the sliding window protocol, the receiver maintains three variables: Receiving Window Size (RWS): Upper bound on the number of out-of-order frames that the receiver is willing to accept; Largest Acceptable Frame (LAF): Sequence number of the largest acceptable frame, and Last Frame Received (LFR): Sequence number of the last frame received.
test6-5
Which of the following conditions are right timing for the receiver to slide its window ?  (單選)
(a) When a frame with sequence number within the sliding window is received
(b) When a frame with sequence number of LFR +RWS - 1 is received
(c) When a frame with sequence number of LFR+1 is received
(d) When a frame with sequence number of LFR +RWS is received
(e) When a frame with sequence number LFR +RWS +1 is received
(+20)
(20%) 6. Consider the following communication sequence between sender and receiver. Assume the “cumulative acknowledgement” scheme is used and the frame with sequence number of 4 is lost. The lost frame is retransmitted again when the timer timeouts
test6-6
Then what is the sequence number to acknowledge for the following ACKs ? (每個空格四分)
aANS:3
bANS:4
cANS:4
dANS:4
eANS:7
(+10)
(10%) 7. In order to distinguish between different frames of the same sequence number, the number of possible sequence numbers must be larger than the number of allowed outstanding frames. Let MaxSeqNum be the number of total available sequence numbers.  In case of SWS + 1 ≤ MaxSeqNum, which of the following statements are correct ? (多選)
(a) It is NOT sufficient to distinguish between different frames of the same sequence number
(b) It is sufficient to distinguish between different frames of the same sequence number.
(c) If RWS = 1 then it is sufficient to distinguish between different frames of the same sequence number.
(d) If RWS = SWS then it is sufficient to distinguish between different frames of the same sequence number.
(e) If RWS = SWS then it is NOT sufficient to distinguish between different frames of the same sequence number.
(+10)
(10%)8. Consider an example that we have eight available sequence numbers:                
0, 1, 2, 3, 4, 5, 6, and 7. Assume that RWS = SWS = 6. Now, we have the following steps:
Step 1. Sender sends frames 0, 1, …, 5
Step 2. Receiver receives frames 0, 1, … ,5, and acknowledges 0, 1, …, 5.
Step 3. All ACKs (0, 1, …, 5) are lost
Step 4. Sender finally timeouts and retransmits frames 0, 1, …, 5
Then, how many frames retransmitted in Step 4 will be accepted by receiver ? ____(1)______ (五分)
How many frames retransmitted in Step 4 will be discarded by receiver ? ____(2)____ (五分)
(1)ANS:4
(2)ANS:2
(+10)
(10%)9. Let MaxSeqNum be the total number of available sequence numbers.  Assume RWS = SWS, then which of the following relationship is sufficient to distinguish between different frames of the same sequence number ? (單選)
(a) SWS + 1 ≤ MaxSeqNum
(b) SWS ≤ (MaxSeqNum+1)/2
(c) SWS = (MaxSeqNum+1)/2
(d) SWS < MaxSeqNum x 2
(e) SWS < (MaxSeqNum+1)/2
(+10)
(10%)10. Consider an example that we have seven available sequence numbers:  
0, 1, 2, 3, 4, 5, and 6. Assume that RWS = SWS = 3. Now, we have the following steps:
Step 1. Sender sends frames 0, 1, 2
Step 2. Receiver receives frames 0, 1, 2 and acknowledges 0, 1, 2.
Step 3. All ACKs (0, 1, 2) are lost
Step 4. Sender finally timeouts and retransmits frames 0, 1, 2
Then, how many frames retransmitted in Step 4 will be accepted by receiver ? ____(1)______ (五分)
How many frames retransmitted in Step 4 will be discarded by receiver ? ____(2)____ (五分)
(1)ANS:0
(2)ANS:3

沒有留言:

張貼留言