Worksheet: Chapter 3 - Transport Layer Analysis
Part 1: TCP Sequence and Acknowledgment Numbers
Scenario: Host A and Host B are establishing a TCP connection. Host A's
initial sequence number (ISN) is 5000. Host B's ISN is 10000. Host A sends a
segment with 1000 bytes of data.
1. What is the sequence number of Host A's first data segment?
2. After receiving this segment correctly, what acknowledgment number
will Host B send back to Host A?
Part 2: Flow Control
Scenario: Host B tells Host A its rwnd (receive window) is 6000 bytes. Host
A's cwnd (congestion window) is 9000 bytes.
3. What is the maximum amount of data Host A can have "in flight" (sent
but not yet acknowledged) before it must wait for an ACK from Host B?
4. Host B's application reads 2000 bytes from its TCP receive buffer. It
then sends an ACK to Host A that includes a new rwnd value. What is
the new rwnd value likely to be?
Part 3: Short Essay
5. Describe two different ways a TCP sender can detect that a
segment has been lost and needs to be retransmitted. Which
method typically results in a faster recovery?
6. TCP uses cumulative acknowledgments. What does the
acknowledgment number field in a TCP header actually signify?
How does this mechanism implicitly acknowledge data and
simplify the protocol design compared to acknowledging every
individual segment?
7. Both flow control and congestion control in TCP involve slowing
a sender down. Precisely distinguish the
fundamental goal and cause of each mechanism. Who is each
mechanism protecting?
8. Both UDP and TCP include a checksum in their segment
headers. However, this checksum is known to be a relatively
weak form of error detection. Explain why it is considered
weak. Why is it included if it's not perfect?
9. TCP provides reliable, in-order delivery, while UDP offers a
minimal, best-effort service. This reliability comes at a cost:
connection setup overhead, header size, acknowledgment
packets, and potential delays due to retransmissions and
congestion control. For what types of modern applications is
TCP's reliability essential? For what types of applications might
the overhead of TCP be too great, making UDP a better choice
despite its lack of guarantees? Justify your choices with
specific examples.