Practice Questions For TT2-1
Practice Questions For TT2-1
TCP use two more options, SACK-permitted option and SACK option. These two
options allow the selective acknowledgment of the received segments by the
receiver.
10. The control field in a TCP segment is 6 bits. We can have 64 different combina-
tions of bits. List some combinations that are valid.
11. To make the initial sequence number a random number, most systems start the
counter at 1 during bootstrap and increment the counter by 64,000 every half second.
How long does it take for the counter to wrap around?
12. In a TCP connection, the initial sequence number at the client site is 2,171. The cli-
ent opens the connection, sends only one segment carrying 1,000 bytes of data, and
closes the connection. What is the value of the sequence number in each of the fol-
lowing segments sent by the client?
a. The SYN segment?
b. The data segment?
c. The FIN segment?
13. In a connection, the value of cwnd is 3000 and the value of rwnd is 5000. The host
has sent 2,000 bytes, which have not been acknowledged. How many more bytes
can be sent?
14. TCP opens a connection using an initial sequence number (ISN) of 14,534. The
other party opens the connection with an ISN of 21,732.
a. Show the three TCP segments during the connection establishment.
b. Show the contents of the segments during the data transmission if the initiator
sends a segment containing the message “Hello dear customer” and the other
party answers with a segment containing “Hi there seller.”
c. Show the contents of the segments during the connection termination.
15. A client uses TCP to send data to a server. The data consist of 16 bytes. Calculate
the efficiency of this transmission at the TCP level (ratio of useful bytes to total
bytes). Calculate the efficiency of transmission at the IP level. Assume no options
for the IP header. Calculate the efficiency of transmission at the data link layer.
Assume no options for the IP header and use Ethernet at the data link layer.
16. TCP is sending data at 1 megabyte per second. If the sequence number starts with
7,000, how long does it take before the sequence number goes back to zero?
17. A TCP connection is using a window size of 10,000 bytes and the previous
acknowledgment number was 22,001. It receives a segment with acknowledgment
number 24,001 and window size advertisement of 12,000. Draw a diagram to show
the situation of the window before and after.
18. A window holds bytes 2001 to 5000. The next byte to be sent is 3001. Draw a fig-
ure to show the situation of the window after the following two events.
a. An ACK segment with the acknowledgment number 2500 and window size
advertisement 4000 is received.
b. A segment carrying 1,000 bytes is sent.
19. A TCP connection is in the ESTABLISHED state. The following events occur one
after another:
a. A FIN segment is received.
b. The application sends a “close” message.
What is the state of the connection after each event? What is the action after each
event?
for76042_ch15.fm Page 500 Monday, February 16, 2009 5:10 PM
20. A TCP connection is in the ESTABLISHED state. The following events occur one
after another:
a. The application sends a “close” message.
b. An ACK segment is received.
What is the state of the connection after each event? What is the action after each
event?
21. A host has no data to send. It receives the following segments at the times shown
(hour:minute:second:milliseconds after midnight). Show the acknowledgments
sent by the host.
a. Segment 1 received at 0:0:0:000.
b. Segment 2 received at 0:0:0:027.
c. Segment 3 received at 0:0:0:400.
d. Segment 4 received at 0:0:1:200.
e. Segment 5 received at 0:0:1:208.
22. A host sends five packets and receives three acknowledgments. The time is shown
as hour:minute:seconds.
a. Segment 1 was sent at 0:0:00.
b. Segment 2 was sent at 0:0:05.
c. ACK for segments 1 and 2 received at 0:0:07.
d. Segment 3 was sent at 0:0:20.
e. Segment 4 was sent at 0:0:22.
f. Segment 5 was sent at 0:0:27.
g. ACK for segments 1 and 2 received at 0:0:45.
h. ACK for segment 3 received at 0:0:65.
Calculate the values of RTTM, RTTS, RTTD, and RTO if the original RTO is 6 sec-
onds. Did the sender miss the retransmission of any segment? Show which seg-
ments should have been retransmitted and when. Rewrite the events including the
retransmission time.
23. Show the contents of a SACK option to be sent if a host has received bytes 2001 to 3000
in order. Bytes 4001 to 6000 are out of order, and bytes 3501 to 4000 are duplicate.
24. Show a congestion control diagram like Figure 15.37 using the following scenario.
Assume a maximum window size of 64 segments.
a. Three duplicate ACKs are received after the fourth RTT.
b. A time-out occurs after the sixth RTT.
25. Show the transition diagrams (FSMs) for simultaneous-close scenario (See
Figure 15.19).
26. Show the transition diagrams (FSMs) for denying-a-connection scenario (See
Figure 15.20).
27. Show the transition diagrams (FSMs) for aborting-a-connection scenario (See
Figure 15.21).
28. In a send window, Sf = 401 and Sn = 701. If window size is 1,000 bytes, show the
send window before and after the station receives an ACK segment with ackNo = 601