HW 3
HW 3
1. (a) Suppose you have the following 2 bytes: 01011100 and 01100101. What is the 1s comple-
ment of the sum of these 2 bytes?
(b) b. Suppose you have the following 2 bytes: 11011010 and 01100101. What is the 1s com-
plement of the sum of these 2 bytes? Now suppose a cache is installed in the institutional
LAN. Supposethe the miss rate is 0.4. Find the total response time.
(c) 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 doesnt change.
2. Consider an idealized case of two hosts, one located on the West Coast of the United States and
the other located on the East Coast, as shown in the following figure. The speed-of-light round-
trip propagation delay between these two end systems, RTT, is approximately 30 milliseconds.
Suppose that they are connected by a channel with a transmission rate, R, of 1 Gbps (109 )
bits per second). With a packet size, L, of 1,000 bytes (8,000 bits) per packet, including both
header fields and data, the time needed to actually transmit the packet into the 1 Gbps link
is dtran = L/R = 8 microseconds. How big would the window size have to be for the channel
3.4 • PRINCIPLES OF RELIABLE DATA TRANSFER 217
utilization to be greater than 98 percent? Suppose that the size of a packet is 1,500 bytes,
including both header fields and data.
ACK packets
3. Host A and B are communicating over a TCP connection, and Host B has already received from
A all bytes up through byte 126. Suppose Host A then sends two segments to Host B back-to-
(8,000 bits) per packet, including both header fields and data, the time needed to
back. The first and second segments contain 80 and 40 bytes of data, respectively. In the first
actually transmit the packet into the 1 Gbps link is
segment, the sequence number is 127, the source port number is 302, and the destination port
number is 80. Host BLsends 8000
anbits>packet
acknowledgment whenever it receives a segment from Host A.
dtrans = = 9
= 8 microseconds
R
(a) In the second segment 10 bits/sec
sent from Host A to B, what are the sequence number, source port
Figure 3.18(a)
number, andshows that with port
destination our stop-and-wait
number? protocol, if the sender begins
sending
(b) If thethe packet at t = 0, then
first segment at t =before
arrives L/R = 8the
microseconds, the last bit
second segment, enters
in the the
acknowledgment of the first
channel at the sender side. The packet then makes its 15-msec cross-country jour-
arriving segment, what is the acknowledgment number, the source port number, and the
ney, with the last bit of the packet emerging at the receiver at t = RTT/2 + L/R =
destination port number?
15.008 msec. Assuming for simplicity that ACK packets are extremely small (so that
we
(c)canIf ignore their transmission
the second time) and
segment arrives that the
before the receiver can sendinanthe
first segment, ACK as
acknowledgment of the first
soon as the last bit of a data packet is received, the
arriving segment, what is the acknowledgment number?ACK emerges back at the sender
at t = RTT + L/R = 30.008 msec. At this point, the sender can now transmit the next
message. Thus, in 30.008 msec, the sender was sending for only 0.008 msec. If we
define the utilization of the sender (or the channel) as the fraction of time the sender
is actually busy sending bits into the channel, the analysis in Figure 3.18(a) shows
that the stop-and-wait protocol has a rather dismal sender utilization, Usender, of
duplicate ACK or by a timeout?
e. What is the initial value of ssthresh at the first transmission round?
f. What is the value of ssthresh at the 18th transmission round?
Network Architecturesg. 3329 Homework
What is the value 3 - Pageat2the
of ssthresh of 24th
2 transmission round? 02/28/2018
h. During what transmission round is the 70th segment sent?
4. Consider the following figure. Assuming TCP Reno is the protocol experiencing the behavior
i. Assuming a packet loss is detected after the 26th round by the receipt of a
shown above, answer the following questions. In all cases, you should provide a short discussion
triple duplicate ACK, what will be the values of the congestion window
justifying your answer.
size and of ssthresh?
45
35
30
25
20
15
10
0
0 2 4 6 8 10 12 14 16 18 20 22 24 26
Transmission round
Figure 3.58
Figure!2:TCP
TCPwindow size
window sizeasasa afunction
functionofoftime
time
(a) Identify the intervals of time when TCP slow start is operating.
(b) After the 16th transmission round, is segment loss detected by a triple duplicate ACK or
by a timeout?
(c) What is the value of ssthresh at the 18th transmission round?
(d) Suppose TCP Tahoe is used (instead of TCP Reno), and assume that triple duplicate
ACKs are received at the 16th round. What are the ssthresh and the congestion window
size at the 19th round?