Review Questions (not graded, do not turn in)
- Kurose & Ross, Chapter 3, Review Question R4.
Describe why an application developer might choose to run an application over UDP rather than TCP.
- Kurose & Ross, Chapter 3, Review Question R7.
Suppose a process in Host C has a UDP socket with port number 6789. Suppose both Host A and Host B each send a UDP segment to Host C with destination port number 6789. Will both of these segments be directed to the same socket at Host C? If so, how will the process at Host C know that these two segments originated from two different hosts?
- Kurose & Ross, Chapter 3, Review Question R8.
Suppose that a Web server runs in Host C on port 80. Suppose this Web server uses persistent connections, and is currently receiving requests from two different Hosts, A and B. Are all of the requests being sent through the same socket at Host C? If they are being passed through different sockets, do both of the sockets have port 80? Discuss and explain.
- Kurose & Ross, Chapter 3, Review Question R14.
True or false?
- Host A is sending Host B a large file over a TCP connection. Assume Host B has no data to send Host A. Host B will not send acknowledgments to Host A because Host B cannot piggyback the acknowledgments on data.
- The size of the TCP
rwndnever changes throughout the duration of the connection.
- Suppose Host A is sending Host B a large file over a TCP connection. The number of unacknowledged bytes that A sends cannot exceed the size of the receive buffer.
- Suppose Host A is sending a large file to Host B over a TCP connection. If the sequence number for a segment of this connection is m, then the sequence number for the subsequent segment will necessarily be m + 1.
- The TCP segment has a field in its header for rwnd.
- Suppose that the last
SampleRTTin a TCP connection is equal to 1 sec. The current value of
TimeoutIntervalfor the connection will necessarily be >= 1 sec.
- Suppose Host A sends one segment with sequence number 38 and 4 bytes of data over a TCP connection to Host B. In this same segment the acknowledgment number is necessarily 42.
- Kurose & Ross, Chapter 3, Review Question R15.
Suppose Host A sends two TCP segments back to back to Host B over a TCP connection. The first segment has sequence number 90; the second has sequence number 110.
- How much data is in the first segment?
- Suppose that the first segment is lost but the second segment arrives at B. In the acknowledgment that Host B sends to Host A, what will be the acknowledgment number?
- Kurose & Ross, Chapter 3, Review Question R17.
Suppose two TCP connections are present over some bottleneck link of rate R bps. Both connections have a huge file to send ( in the same direction over the bottleneck link). The transmissions of the files start at the same time. What transmission rate would TCP like to give to each of the connections?
- Answer the following with regard to the TCP variables
ssthresh. What is slow start? What is additive increase? What happens when a TCP sender detects congestion? Copy Figure 3.53 and indicate an example of each of these events on the graph.
- A UDP application and TCP application share the same link. Why is it possible for UDP to get a larger share of the link's bandwidth?
Problems (10 points each)
- Kurose & Ross, Chapter 3, Problem P4.
- Suppose you have the following 2 bytes: 01011100 and 01010110. What is the 1s complement of the sum of these 2 bytes?
- Suppose you have the following 2 bytes: 11011010 and 00110110. What is the 1s complement of the sum of these 2 bytes?
- For the bytes in part (a), give an example where one bit is flipped in each of the 2 bytes and yet the 1s complement doesn't change.
- Kurose & Ross, Chapter 3, Problem P12.
Consider the rdt 3.0 protocol (stop-and-wait). Draw a diagram showing that if the network connection between the sender and receiver can reorder messages (that is, that two messages propagating in the medium between the sender and receiver can be reordered), then the alternating-bit protocol will not work correctly (make sure you clearly identify the sense in which it will not work correctly). Your diagram should have the sender on the left and the receiver on the right, with the time axis running down the page, showing data (D) and acknowledgment (A) message exchange. Make sure you indicate the sequence number associated with any data or acknowledgment segment.
- Kurose & Ross, Chapter 3, Problem P13.
Consider a reliable data transfer protocol that uses only negative acknowledgments. Suppose the sender sends data only infrequently. Would a NAK-only protocol be preferable to a protocol that uses ACKs? Why? Now suppose the sender has a lot of data to send and the end-to-end connection experiences few losses. In this second case, would a NAK-only protocol be preferable to a protocol that uses ACKs? Why?
- Kurose & Ross, Chapter 3, Problem P22.
Answer true or false to the following questions and briefly justify your answer:
- With the SR protocol, it is possible for the sender to receive an ACK for a packet that falls outside of its current window.
- With GBN, it is possible for the sender to receive an ACK for a packet that falls outside of its current window.
- The alternating-bit protocol is the same as the SR protocol with a sender and receiver window size of 1.
- The alternating-bit protocol is the same as the GBN protocol with a sender and receiver window size of 1.
- Kurose & Ross, Chapter 3, Problem P37.
Consider the following figure:
Assuming TCP Reno is the protocol experiencing the behavior shown above, answer the following questions. In all cases, you should provide a short discussion justifying your answer.
- Identify the intervals of time when TCP slow start is operating.
- Identify the intervals of time when TCP congestion avoidance is operating.
- After the 16th transmission round, is segment loss detected by a triple duplicate ACK or by a timeout?
- After the 22nd transmission round, is segment loss detected by a triple duplicate ACK or by a timeout?
- What is the initial value of
ssthreshat the first transmission round?
- What is the value of
ssthreshat the 18th transmission round?
- What is the value of
ssthreshat the 24th transmission round?
- During what transmission round is the 70th segment sent?
- Assuming a packet loss is detected after the 26th round by the
receipt of a triple duplicate ACK, what will be the values of the
congestion window size and of
- Suppose TCP Tahoe is used (instead of TCP Reno), and assume that
triple duplicate ACKs are received at the 16th round. What are the
ssthreshand the congestion window size at the 19th round?
- Again suppose TCP Tahoe is used, and there is a timeout event at 22nd round. How many packets have been sent out from 17th round till 22nd round, inclusive?
- Kurose & Ross, Chapter 3, Problem P38.
Refer to the figure below, which illustrates the convergence of TCP's AIMD algorithm:
Suppose that instead of a multiplicative decrease, TCP decreased the window size by a constant amount. Would the resulting AIAD algorithm converge to an equal share algorithm? Justify your answer using a diagram similar to the one shown above.
- Kurose & Ross, Chapter 3, Problem P51.
In our discussion of TCP congestion control in Section 3.7, we implicitly assumed that the TCP sender always had data to send. Consider now the case that the TCP sender sends a large amount of data and then goes idle (since it has no more data to send) at t1. TCP remains idle for a relatively long period of time and then wants to send more data at t2 . What are the advantages and disadvantages of having TCP use the
ssthreshvalues from t1 when starting to send data at t2? What alternative would you recommend? Why?