hw2

advertisement
Homework 2 (ECS 152B)
Due: in class Wedn. Nov. 26, 2003
Note: NO late hand-in accepted
1. Consider a link of bandwidth 1Gbps. The maximum window size at the sender is
100M bytes. The round trip time RTT is 10ms. The maximum lifetime of a
segment is 30ms. Assume that the sequence number counts the number of bytes as
in TCP. How large should the sequence number be to prevent against wrapped
sequence number. Recalculate the answer when the maximum window size at the
sender is 1M bytes?
2. Short questions:
a. What are the advantages of using accumulative acks?
b. Name four applications that use TCP/UDP respectively. In general, what
are the reasons for an application to choose UDP/TCP?
3. Checksum. UDP and TCP use 1’s complement for their checksums. Suppose you
have the following three 16-bit words: 01010101010101, 1111011101011101,
0101000101100111. Calculate the checksum. With the 1’s complement scheme,
how does the receiver detect errors? Is it possible that a one-bit error will go
undetected? How about a two-bit error? Give examples.
4. TCP fairness. Consider two TCP connections sharing a same link. Assume the
link is the only bottleneck in the network. Assume both connections start at the
same time with the same MSS. Let RTT1 and RTT2 be the round trip times of
connections 1 and 2 respectively. Will these two connections share the link fairly,
e.g., having the same average rate? Why? Draw a simple graph to illustrate it.
What are the options to make connections with different RTTs to share a link
fairly? (Hint: you may need to search some research literature for the answer.)
5. TCP congestion control. Consider the following plot of TCP window size as a
function of time. Assume TCP Reno is the protocol used. Answer the following
questions and provide brief justification of your answers.
a. Identify the intervals of time when TCP slow start is operating.
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 timeout?
d. After the 22nd transmission round, is segment loss detected by a triple
duplicate ACK or by timeout?
e. What is the initial value of Threshold at the first transmission round?
f. What is the value of Threshold at the 18th round and 24th round
respectively?
g. During what transmission round is the 70th segment sent?
45
Congestion window size (segments)
40
35
30
25
20
15
10
5
0
1
3
5
7
9
11 13 15 17 19 21 23
25
Transmission round
6. TCP delay. Consider a TCP connection with RTT=100ms and the file size
O=100kbytes. Assume MSS=536bytes. Compare the minimum latency (i.e., O/R)
with the latency with slow start (denoted as Q) for a link with rate R=28kbps,
100kbps, and 1Gbps. If the file size O=10Mbytes, will the total delay be 100Q?
Why?
7. Timers. The following four timers are used in TCP: retransmission timer, persist
timer, keepalive timer, 2MSL timer. Briefly explain their functionalities. (Hint:
read Chp. 21.1 for clues.)
Download