0% found this document useful (0 votes)
248 views3 pages

Practice Questions For TT2-1

The document contains 22 practice problems related to TCP. The problems cover topics such as TCP and UDP headers, error handling, segment formats, sequence numbers, window sizes, connection states, acknowledgments, and round-trip time calculations. The problems range from filling in fields of TCP segments to analyzing network traces and calculating retransmission timeout values.

Uploaded by

Priyansh Rupani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
248 views3 pages

Practice Questions For TT2-1

The document contains 22 practice problems related to TCP. The problems cover topics such as TCP and UDP headers, error handling, segment formats, sequence numbers, window sizes, connection states, acknowledgments, and round-trip time calculations. The problems range from filling in fields of TCP segments to analyzing network traces and calculating retransmission timeout values.

Uploaded by

Priyansh Rupani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

for76042_ch15.

fm Page 498 Monday, February 16, 2009 5:10 PM

498 PART 3 TRANSPORT LAYER

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.

15.16 PRACTICE SET


Exercises
1. Compare the TCP header and the UDP header. List the fields in the TCP header
that are not part of the UDP header. Give the reason for each missing field.
2. An IP datagram is carrying a TCP segment destined for address 130.14.16.17. The
destination port address is corrupted and it arrives at destination 130.14.16.19.
How does the receiving TCP react to this error?
3. One ICMP message, discussed in Chapter 9, reports a destination port unreachable
error. How can TCP detect the error in the destination port?
4. UDP is a message-oriented protocol. TCP is a byte-oriented protocol. If an appli-
cation needs to protect the boundaries of its message, which protocol should be
used, UDP or TCP?
5. What is the maximum size of the TCP header? What is the minimum size of the
TCP header?
6. If the value of HLEN is 0111, how many bytes of option are included in the segment?
7. Show the entries for the header of a TCP segment that carries a message from an
FTP client to an FTP server. Fill the checksum field with 0s. Choose an appropriate
ephemeral port number and the correct well-known port number. The length of
data is 40 bytes.
8. What can you say about the TCP segment in which the value of the control field is
one of the following:
a. 000000
b. 000001
c. 010001
d. 000100
e. 000010
f. 010010
9. The following is a dump of a TCP header in hexadecimal format.
(05320017 00000001 00000000 500207FF 00000000)16

a. What is the source port number?


b. What is the destination port number?
c. What the sequence number?
d. What is the acknowledgment number?
e. What is the length of the header?
f. What is the type of the segment?
g. What is the window size?
for76042_ch15.fm Page 499 Monday, February 16, 2009 5:10 PM

CHAPTER 15 TRANSMISSION CONTROL PROTOCOL (TCP) 499

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

500 PART 3 TRANSPORT LAYER

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

You might also like