Homework #3 U1910287 Arabbek Tulanboyev Q23-5. In a network, the size of the receive window is 1 packet. Which of the following protocols is being used by the network? Stop-and-Wait Q23-6. In a network, the size of the send window is 20 packets. Which of the following protocols is being used by the network? Go-Back-N and Selective-Repeat are correct P23-4. In each of the following protocols, how many packets can have independent sequence numbers before wraparound occurs (see the previous problems). a. Stop-and-Wait. The [0, 1] range is where the stop-and-wait protocol operates. Therefore, two packets may each have a unique SEQ number. b. Go-Back-N with m = 8. The maximum sequence number's bit usage is determined by the variable m. S=28 -1=255, which is the highest possible sequence number. The sequence numbers fall inside the [0,255] range, which has 256 distinct SEQ numbers. c. Select-Repeat with m = 8. The maximum sequence number's bit usage is determined by the variable m. S=28 -1=255, which is the highest possible sequence number. The sequence numbers fall inside the [0,255] range, which has 256 distinct SEQ numbers. The size of the receive and send windows is 2m-1 = 27 = 128. P23-18. Answer the following questions related to the FSMs for the Selective-Repeat protocol with m = 7 bits. Assume the window size is 64. (Figure 23.34): a. The sending machine is in the ready state with Sf = 10 and Sn = 15. What is the sequence number of the next packet to send? Ans: The SEQ number of the following packet, Sn = 15. b. The sending machine is in the ready state with Sf = 10 and Sn = 15. The timer for packet 10 times out. How many packets are to be resent? What are their sequence numbers? Ans: Each packet in the selective-repeat protocol has its own timer. Consequently, only packet 10 will be sent again. c. The sending machine is in the ready state with Sf = 10 and Sn = 15. An ACK with ackNo = 13 arrives. What are the next values of Sf and Sn? What is the action in response to this event? Ans: The packet 13 timer has been terminated. The sender is aware that the packet was successfully received, and Sf will increase to 14 when ACKs 10, 11, and 12 arrive. d. The sending machine is in the blocking state with Sf = 14 and Sn = 21. What is the size of the window? Ans: The size of the window is 64 as stated in the task. e. The sending machine is in the blocking state with Sf = 14 and Sn = 21. An ACK with ackNo = 14 arrives. Packets 15 and 16 have already been acknowledged. What are the next values of Sf and Sn? What is the state of the sending machine? Ans: When the SR protocol is in the block state, that means that the window is full. In other words, all packet in the range [Sf,Sn−1] are outstanding. The range in this case is [14,20]. Packets in the range [14,16] have been ACKd. So, Sf slides to 17. Therefore the state of the machine is "Ready". The value of Sn does not change. f. The receiving machine is in the ready state with Rn = 16. The size of the window is 8. A packet with sequence number 16 arrives. What is the next value of Rn? What is the response of the machine to this event? Ans: The SEQ number size is represented by the number of bits, or m. The maximum SEQ number would be 11112=15 if m is 4. Accordingly, m must be at least 5. resulting in 111112=31. The next SEQ number that the receiver anticipates is Rn. The receiver slides Rn to Rn+1=17 since the SEQ number is identical to Rn. After that, the device sends an ACK packet with ackNo=16. P23-24. In a network using the Selective-Repeat protocol with m = 4 and the sending window of size 8, the value of variables are Sf = 62, Sn = 67, and Rn = 64. Packet 65 has already been acknowledged at the sender site; packets 65 and 66 are received out-of-order at the receiver site. Assume that the network does not duplicate the packets. a. The first unfinished packet is Sf. Sf = 62, indicating that packet 62 is the first unread packet. We must identify the SEQ number that corresponds to packet 62 as our SEQ numbers only range from [0, 7]. The formula we use for that is as follows: PacketIndex% windowSize = SEQ Adding the specified values: SEQ = 62 % 8 = 6 The SEQ number for packet 62 is 6, therefore this indicates. The initial non-outstanding packet is Sn. This indicates that every packet in the range [Sf,Sn1] is currently in motion. The transit packet indexes are: 62, 63, 64, 65, 66. The packets' SEQ numbers are: 6, 7, 0, 1, and 2. Rn=64, as we can see, though. This indicates that there are no packets in transit because all packets up to 64 have been received at the receiver. The receiver has also gotten packets 65 and 66. Consequently, the transit packet indices are as follows: 64,66 The packets' SEQ numbers are 0, 2. b. The fact that Rn is 64 and Sf is 62 indicates that packets 63 and 64 have been acknowledged, but the sender has not yet received the acknowledgements. Although packet 66 has likewise been received by the receiver, the sender has not yet received its ACK packet. As a result, the ACK packets in transit have the following indexes: 62,63,66. The ACK packets' SEQ numbers are: 6, 7, 2.