resource:https://cmpe150-fall17-01.courses.soe.ucsc.edu/system/files/attachments/Midterm%20Solution%20.pdf
## Question 1 (6 points)
Compare circuit-switching and packet-switching networks based
on the following criteria:
(a) Reserving network resources ahead of data being sent: (2pts)
(b) Utilizing network resources efficiently: (2pts)
(c) Guaranteeing uniform network quality of service during the connection: (2pts)
## Question 2 (6 points)
(a) What are “loss-intolerant” applications? Give an example of a loss-intolerant Internet
application. (2pts)
(b) What are “delay intolerant” applications? Give an example of a delay-intolerant
Internet application. (2pts)
(c) Based on your comparative analysis in Question 1, does the Internet adequately
support loss-intolerant applications? And delay-intolerant applications? Explain. (2pts)
## Question 3 (6 points)
Consider an Internet application running on two Internet hosts,
Host1 and Host2, which are communicating using a path through router R. Assume that
the average service time at R is 10 ms, packets are 2,000 bits long, and the propagation
delay between Host1 and Host2 is 150ms
(a) Based on the latency expression we covered in class, how is service time defined?
Write the mathematical expression for it explaining its terms. (2 points)
(b) If the application running on Host1 and Host2 cannot tolerate latencies over 200ms,
what is the minimum capacity of the link connecting the two hosts? Show your work. (4
points)
## Question 4 (4 points)
Another way to measure end-to-end network latency is to use the
round- trip time (RTT).
(a) What is the RTT? Use a time diagram to illustrate your explanation
(b) What is the one-way trip time? Illustrate your answer with a time diagram.
## Question 5 (8 points)
List one advantage and one disadvantage of:
(a) Peer-to-peer model for networked applications (when compared to the client-server
model). Explain. (2 points)
(b) Web caching. Explain. (2 points)
(c) Layering. Explain. (2 points)
(d) DNS (compared to a centralized name service). Explain. (2 points)
## Question 6 (14 points)
TCP
(a) Is TCP a full-duplex protocol? Explain
(b) When Host1 initiates a TCP connection to Host2, it sends a SYN segment to Host2.
As part of the SYN segment, it includes a sequence number SEQX. What is the
purpose of sequence number SEQX?
(c) Suppose that the Host1 application that initiated the TCP connection has data to
send to Host2. Can Host1’s SYN segment carry the data? Explain.
(d) When Host2 replies to the SYN segment from Host2, it uses a SYN-ACK segment
and also includes a sequence number SEQY . What is the purpose of SEQY ? Is SEQX
= SEQY ? Explain.
(e) The original TCP protocol only retransmitted upon a timeout event. More modern
variants of TCP use the Fast Retransmit mechanism. Explain how Fast Retransmit
works and how it can improve TCP performance.
(f) TCP can “pigyyback” acknowledgments on data segments. What field(s) in the TCP
segment header are used to do that? Explain.
(g) What is the main advantage of “piggybacked” acknowledgments?
## Question 7 (12 points)
The reliable data transfer, or rdt, protocols we covered in class
provide reliable in-order data delivery with duplicate detection.
(a) What mechanism(s) used by rdt protocols cause duplicates to be generated?
Explain. (2 points)
(b) What mechanism(s) used by rdt protocols detect duplicates? Explain. (2 points)
(c) rdt protocols can recover from two types of network losses. What mechanism(s) are
used to recover from each type of loss? Explan. (3 points)
(d) What is the retransmission timeout, also known as RTO? (2 points)
(e) In class we discussed why retransmission timers are critical to the performance of
reliable data transfer. Why are they set as a function of the RTT? (3 points)
## Question 8 (14 points)
Two hosts X and Y are communicating over the Internet using
TCP. Suppose that the TCP connection has already been opened.
(a) Assume host X’s window size is 6 and segments 5001 through 5006 have already
been sent. Host X then receives an ACK with ACK sequence number set to 5003.
Segments 5007 through 5011 are waiting to be transmitted by host X. Draw the time
diagram showing this scenario including which segments, if any, X can transmit after
getting the ACK with ACK sequence number set to 5003, and explain why. (4 points)
(b) Some time later, X sends segments 5020 to 5025 (having received
acknowledgments for all previously sent segments). Host Y receives segments 5020,
5022, 5024, and 5025. Assuming that segments that were not received were lost, draw
the time diagram for this scenario, including the acknowledgments that host Y
generates assuming it uses a Go-Back-N based variant of TCP. What does host Y do
with segments received out of order and which are these segments? Explain. (4 points)
(c) When X gets Y ’s acknowledgments, what will it do? Explain. (3 points)
(d) Suppose the same situation described in (b), but both X and Y use a
Selective-Repeat variant of TCP. What acknowledgments will Y send to X? What does
Y do with out-of-order segments? Explain. And, what will X do when it gets Y ’s
acknowledgments? Explain. (3 points)
## Question 9 (20 points)
You are studying for the CE 150/L midterm using one of the
computers at the UCSC Science Library. During one of your breaks, you want to check
out the Soccer4All.org Web site for the latest videos of the Soccer World Cup 2018
Qualifyers.
(a) What would be the steps needed before your computer at ucsc.edu can issue a
request for Soccer4All.org? Assume this is the first time anyone at ucsc.edu requests
contents from that Web site and name resolution is done iteratively. (4 points)
(b) Immediately after you downloaded videos, another friend, Gabriela, who is also at
UCSC, wants to watch the videos as well. What are the steps needed before Gabriela’s
request to Soccer4All.org is issued? Explain. (4 points)
(c) You finally manage to access the Soccer World Cup 2018 Qualifyers page from the
Soccer4All.org site. The page has 10 videos embedded in it. The processing/service
time within the network is 10ms each way, and the one-way propagation delay is
100ms. Assume that transmission delay is negligible. What would be the response time,
i.e., the time it takes between when your browser requests the page and when the
videos are delivered, if your browser uses non-persistent HTTP (with no parallel
connections)? Explain. (4 points)
(d) What would be the response time if the browser uses persistent HTTP? Explain. (4
points)
(e) It is now Gabriela’s turn to download the videos. Assuming that the steps in (b) have
already been executed and that you have already been able to download the videos,
what is the average response time Gabriela will experience for each video in Seth’s
Web page if the ucsc.edu’s cache hit ratio is 60%? Suppose that the delay to access an
object within ucsc.edu’s network is 20ms. Assume persistent HTTP is used. (4 points)