SYCS 450: Data Communication and Network Programming Written Assignment 4 Due April 2nd (Thursday), 4PM EST. Note: Kbps = kilobits (103 bits) per second Mbps = megabits (106 bits) per second Gbps = gigabits (109 bits) per second Note: 1. Answers without justifications will result in significant loss of credit points at the discretion of the instructor. 2. Handwritten submissions (including scanned copies) and plaintext submissions will NOT be accepted. 3. Equations and formulas must be properly formatted. For example, x raised to the power of n should appear as xn, not x^n, the square root of x + y should appear as √𝑥 + 𝑦, not x+y, etc. 1. Consider the TCP procedure for estimating RTT. Suppose the current estimated RTT is 20 milliseconds (ms) and the current estimated deviation is 2 milliseconds. Suppose five segments are transmitted at time 0 ms, 10 ms, 20 ms, 30 ms and 40 ms respectively, and the fifth segment is the retransmission of the second one. The ACKs are received at time 22 ms (for 1st segment), 28 ms (for 3rd segment), 42ms (for 4th segment) and 55 ms (for 2nd segment) respectively. What is the timeout value used by TCP after the RTT samples are processed? Show you calculation. 2. Computer A and B are communicating over a TCP connection. After receiving the SYNACK segment, Computer A sends three segments to Computer B. The first segment contains 500 bytes of data, the second segment contains 400 bytes and the third segment contains 300 bytes. The hexadecimal value of the first 12 bytes of the second segment is 0600 0050 0001 000A 0000 3456. Between sending the first and second segment, Computer A does not receive any thing from Computer B. Between sending the second and third segment, Computer A receives a segment from Computer B. The segment from Computer B contains 400 bytes of data. Answer the following questions and explain your answers. 1) What is the source port number, destination port number and sequence number, acknowledgement number of the SYN segment sent from Computer A to B? 2) What is the source port number, destination port number and sequence number, acknowledgement number of the SYNACK segment sent from Computer B to A? 3) What is the source port number, destination port number and sequence number, acknowledgement number of the first segment with data sent from Computer A to B? 4) If before sending the segment, Computer B has received both the first and second segment from Computer A, what is the source port number, destination port number and sequence number, acknowledgement number of the segment from Computer B? 5) If before sending the segment, Computer B has received only the second segment from Computer A, what is the source port number, destination port number and sequence number, acknowledgement number of the segment from Computer B? 6) Suppose Computer B has received both the first and second segment from Computer A before sending the segment. After that, the segment arrives at Computer A before the timeout for the first segment occurs, what is the source port number, destination port number and sequence number, acknowledgement number of the third segment sent from Computer A? 7) Suppose Computer B has received both the first and second segment from Computer A before sending the segment. After that, the segment arrives at Computer A after the timeout for the first segment occurs, what is the source port number, destination port number and sequence number, acknowledgement number of the third segment sent from Computer A? Source port 1) SYN segment from A to B Explanation: 2) SYNACK segment from B to A Explanation: 3) First segment from A to B Explanation: 4) Segment from B after receiving the first two segments from A Explanation: 5) Segment from B after receiving only the second segment from A Explanation: 6) Third segment from A before timeout Explanation: 7) Third segment from A after timeout Explanation: Destination port Seq. number Ack. number 3. Assume the initial ssthresh value is 16 MSS, the advertised receiver window size in ACKs is 100 MSS unless otherwise specified, and each segment is sized one MSS. The cwnd is 4 MSS at present. Assume there is no packet loss unless otherwise specified. Answer the following questions and explain your answers. 1) What is the TCP window size after 4 new ACKs have been received in a row? 2) How many new ACKs must be received continuously before the TCP window size reaches 18 MSS? 3) After the TCP window size reaches 24 MSS, 24 new consecutive ACKs are received. What is the TCP window size following the receipt of these 24 new ACKs? 4) After the TCP window size reaches 24 MSS, 24 new consecutive ACKs are received. However, the advertised window size in the last ACK is 22 MSS. What is the TCP window size following the receipt of these 24 new ACKs? 5) After the TCP window size reaches 24 MSS, four duplicate ACKs are received in a row. In TCP Tahoe (which does not have fast recovery), what is the TCP windows size following the receipt of these duplicate ACKs? 6) After the TCP window size reaches 24 MSS, four duplicate ACKs are received in a row. In TCP Reno (which incorporates fast recovery), what is the TCP windows size following the receipt of these duplicate ACKs? 7) After the TCP window size reaches 24 MSS, there is a timeout. How many new ACKs must be received continuously before the TCP window size reaches 24 MSS again? 4. Consider a simplified TCP’s AIMD algorithm where the congestion window size is measured in number of segments, not in bytes. In additive increase, the congestion window size increases by one segment in each RTT. In multiplicative decrease, the congestion window size decreases by half (if the result is not an integer, round down to the nearest integer). Suppose that two TCP connections, C1 and C2, share a single link of speed 80 segments per second. Assume that both C1 and C2 are always in the congestion avoidance phase. Connection C1’s RTT is 250 msec (millisecond) and connection C2’s RTT is 150 msec. Assume that when the data rate in the link exceeds the link’s speed, all TCP connections experience data segment loss. Suppose both C1 and C2 at time 0 have a congestion window of 6 segments. Show the evolution of their congestion window sizes over the first 1500 msec's and calculate their respective average throughput (in segments per second) of the period. (Hint: For the analysis, use the following simplified model of TCP. At the end of each RTT a connection determines if it should increase window size or not. For each of C1 and C2, compute the average sending rate in the link in a previous period. If the total rate ever exceeds the link capacity in the previous RTT, then assume that connection detects loss and reduces its window size.)