Skip to main content

Transport and Connection Clinic

Retrieval Prompts

  1. State what UDP adds on top of IP, in three items.
  2. Name the four distinct mechanisms TCP provides.
  3. Write the sequence of flags for a clean TCP open (three-way handshake).
  4. Write the sequence of flags for a clean TCP close (four-way).
  5. State what TIME_WAIT is for and which side enters it.

Compare and Distinguish

Separate these pairs clearly:

  • connection-oriented versus connectionless
  • reliability versus ordering
  • flow control versus congestion control
  • CLOSE_WAIT versus TIME_WAIT
  • RST versus FIN

Common Mistake Check

For each statement, identify the error:

  1. "UDP is unreliable, so it is for toy apps."
  2. "TCP makes all packets arrive in the order they were sent."
  3. "The sender's congestion window and the receiver's advertised window are the same thing."
  4. "CLOSE_WAIT means the kernel is closing the socket."
  5. "Retransmissions only happen on timeout."

Protocol Choice Workshop

For each scenario, pick UDP, TCP, or QUIC. Justify in one sentence.

  1. A live video call between two users.
  2. Uploading a 2 GB dataset.
  3. A DNS lookup for api.example.com.
  4. A real-time game sending position updates 60 times per second.
  5. A REST API that returns JSON payloads up to ~20 KB.
  6. A CDN serving many small static assets to a browser.

Connection Lifecycle Tracing

Given this capture (timestamps are seconds):

0.000  A.4321 > B.9000  Flags [S]    seq 1000
0.001 B.9000 > A.4321 Flags [S.] seq 4000 ack 1001
0.002 A.4321 > B.9000 Flags [.] ack 4001
0.050 A.4321 > B.9000 Flags [P.] seq 1001 ack 4001 len 5 "hello"
0.051 B.9000 > A.4321 Flags [.] ack 1006
0.100 B.9000 > A.4321 Flags [P.] seq 4001 ack 1006 len 5 "HELLO"
0.101 A.4321 > B.9000 Flags [.] ack 4006
0.500 A.4321 > B.9000 Flags [F.] seq 1006 ack 4006
0.501 B.9000 > A.4321 Flags [.] ack 1007
0.600 B.9000 > A.4321 Flags [F.] seq 4006 ack 1007
0.601 A.4321 > B.9000 Flags [.] ack 4007

Answer:

  1. Who initiated the close?
  2. What state does A enter after packet 9?
  3. What state does B enter after packet 10?
  4. Where would TIME_WAIT appear?
  5. If packet 5 had been lost, what would have happened next, and when?

Evidence Check

This page is complete only if you can narrate a TCP connection from SYN through CLOSED, naming every state and the reason for each transition.