tcp代写-COSC 328
时间:2021-10-27

Version: October 2021 Page 1 of 3 COSC 328 – LAB 4 Introduction to Networks 2021 Winter Term 1 Due Date: October 26th, 2021 at 4:30 AM Pacific Time Introduction Start this Lab early as it will prepare you for the midterm exam as well. All work must be shown for marks. This lab should be electronically submitted on Canvas. Warm-up Problems: The authors of the text have provided interactive problems to help you with understanding the concepts presented in chapter 3. Please take the time to review these problems before attempting the questions as they will help. These problems are for your own learning and practice (no marks) but will allow you to review solutions. • Internet checksum • Reliable data transfer: rdt22 • TCP sequence and ACK numbers, with segment loss • TCP RTT and timeout • TCP congestion window evolution • TCP retransmissions (reliable data transmission with ACK loss) • UDP Mux and Demux • TCP Mux and Demux TCP ACks and sequence numbers (25 marks) Question 1) Given the following communication, provide the ACK# and sequence# transmitted in each TCP packet. It may be useful to draw the sequence diagram. Assume all transmissions are successful (no corruption or loss). The byte sizes provided are data bytes (header size is ignored). Review all the steps as there is a timing difference between when packets are transmitted and received. It will help to draw out the interactions and make a table to track what is happening (ie: Packet#/Type, Sequence#, Ack# and Size(bytes)). For your submission, you do not have to draw the diagram as long as all packet sequence # and acknowledgement numbers are correct (but a diagram would help). 1. After TCP handshake, sequence number for host A is 100 and Ack=200, and sequence number for host B is 200 and Ack = 100. 2. Send Packet 1: Host A sends 25 bytes to Host B. 3. Send Packet 2: Host B sends 20 bytes to Host A before packet 1 arrives at Host B. 4. Receive Packet 1: Packet 1 arrives at Host B. Sends ACK immediately with no data in packet. Version: October 2021 Page 2 of 3 5. Send Packet 3: Host A sends 50 bytes to Host B. 6. Receive Packet 2: Host A receives packet 2. Delays ACK. 7. Receive ACK 1: Host A receives ACK for packet 1. 8. Send Packet 4: Host A sends packet 4 of 10 bytes and ACKs packet 2. 9. Receive Packet 3: Host B receives packet 3. Delays ACK. 10. Receive Packet 4: Host B receives packet 4. Sends ACK. 11. Receive ACK 4: Host A receives ACK for packet 4. environment. Your solution looks like filling a table as follows. Note that the table and number of rows are not complete: Packet/Ack Seq# Ack# Size (bytes) Packet 1 100 200 25 Packet2 200 .. .. Ack1 .. .. TCP Flow and Congestion Control (25 marks) Question 2) Consider the following plot of TCP window size as a function of time. a) Identify the intervals of time when TCP slow start is operating. Version: October 2021 Page 3 of 3 b)Identify the intervals of time when TCP congestion avoidance is operating. c) After the 16th transmission round, is segment loss detected by a triple duplicate ACK or by a timeout? d)After the 22nd transmission round, is segment loss detected by a triple duplicate ACK or by a timeout? e) What is the initial value of Threshold at the first transmission round? f) What is the value of Threshold at the 18th transmission round? g)What is the value of Threshold at the 24th transmission round? h)During what transmission round is the 70th segment sent? i) Assuming a packet loss is detected after the 26th round by the receipt of a triple duplicate ACK, what will be the value of the congestion-window size and of Threshold? RTT (25 Marks) Suppose that the five measured SampleRTT values (see Section 3.5.3) are 106 ms, 120 ms, 140 ms, 90 ms, and 115 ms. Compute the EstimatedRTT after each of these SampleRTT values is obtained, using a value of α = 0.125 and assuming that the value of EstimatedRTT was 100 ms just before the first of these five samples were obtained. Compute also the DevRTT after each sample is obtained, assuming a value of β = 0.25 and assuming the value of DevRTT was 5 ms just before the first of these five samples was obtained. Last, compute the TCP TimeoutInterval after each of these samples is obtained. GoBack-N, Selective Repeat (SR) and TCP (25 Marks) 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? 


































































































学霸联盟

Version: October 2021 Page 1 of 3 COSC 328 – LAB 4 Introduction to Networks 2021 Winter Term 1 Due Date: October 26th, 2021 at 4:30 AM Pacific Time Introduction Start this Lab early as it will prepare you for the midterm exam as well. All work must be shown for marks. This lab should be electronically submitted on Canvas. Warm-up Problems: The authors of the text have provided interactive problems to help you with understanding the concepts presented in chapter 3. Please take the time to review these problems before attempting the questions as they will help. These problems are for your own learning and practice (no marks) but will allow you to review solutions. • Internet checksum • Reliable data transfer: rdt22 • TCP sequence and ACK numbers, with segment loss • TCP RTT and timeout • TCP congestion window evolution • TCP retransmissions (reliable data transmission with ACK loss) • UDP Mux and Demux • TCP Mux and Demux TCP ACks and sequence numbers (25 marks) Question 1) Given the following communication, provide the ACK# and sequence# transmitted in each TCP packet. It may be useful to draw the sequence diagram. Assume all transmissions are successful (no corruption or loss). The byte sizes provided are data bytes (header size is ignored). Review all the steps as there is a timing difference between when packets are transmitted and received. It will help to draw out the interactions and make a table to track what is happening (ie: Packet#/Type, Sequence#, Ack# and Size(bytes)). For your submission, you do not have to draw the diagram as long as all packet sequence # and acknowledgement numbers are correct (but a diagram would help). 1. After TCP handshake, sequence number for host A is 100 and Ack=200, and sequence number for host B is 200 and Ack = 100. 2. Send Packet 1: Host A sends 25 bytes to Host B. 3. Send Packet 2: Host B sends 20 bytes to Host A before packet 1 arrives at Host B. 4. Receive Packet 1: Packet 1 arrives at Host B. Sends ACK immediately with no data in packet. Version: October 2021 Page 2 of 3 5. Send Packet 3: Host A sends 50 bytes to Host B. 6. Receive Packet 2: Host A receives packet 2. Delays ACK. 7. Receive ACK 1: Host A receives ACK for packet 1. 8. Send Packet 4: Host A sends packet 4 of 10 bytes and ACKs packet 2. 9. Receive Packet 3: Host B receives packet 3. Delays ACK. 10. Receive Packet 4: Host B receives packet 4. Sends ACK. 11. Receive ACK 4: Host A receives ACK for packet 4. environment. Your solution looks like filling a table as follows. Note that the table and number of rows are not complete: Packet/Ack Seq# Ack# Size (bytes) Packet 1 100 200 25 Packet2 200 .. .. Ack1 .. .. TCP Flow and Congestion Control (25 marks) Question 2) Consider the following plot of TCP window size as a function of time. a) Identify the intervals of time when TCP slow start is operating. Version: October 2021 Page 3 of 3 b)Identify the intervals of time when TCP congestion avoidance is operating. c) After the 16th transmission round, is segment loss detected by a triple duplicate ACK or by a timeout? d)After the 22nd transmission round, is segment loss detected by a triple duplicate ACK or by a timeout? e) What is the initial value of Threshold at the first transmission round? f) What is the value of Threshold at the 18th transmission round? g)What is the value of Threshold at the 24th transmission round? h)During what transmission round is the 70th segment sent? i) Assuming a packet loss is detected after the 26th round by the receipt of a triple duplicate ACK, what will be the value of the congestion-window size and of Threshold? RTT (25 Marks) Suppose that the five measured SampleRTT values (see Section 3.5.3) are 106 ms, 120 ms, 140 ms, 90 ms, and 115 ms. Compute the EstimatedRTT after each of these SampleRTT values is obtained, using a value of α = 0.125 and assuming that the value of EstimatedRTT was 100 ms just before the first of these five samples were obtained. Compute also the DevRTT after each sample is obtained, assuming a value of β = 0.25 and assuming the value of DevRTT was 5 ms just before the first of these five samples was obtained. Last, compute the TCP TimeoutInterval after each of these samples is obtained. GoBack-N, Selective Repeat (SR) and TCP (25 Marks) 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? 

essay、essay代写