Transport and Connection Clinic
Retrieval Prompts
- State what UDP adds on top of IP, in three items.
- Name the four distinct mechanisms TCP provides.
- Write the sequence of flags for a clean TCP open (three-way handshake).
- Write the sequence of flags for a clean TCP close (four-way).
- State what
TIME_WAITis 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_WAITversusTIME_WAITRSTversusFIN
Common Mistake Check
For each statement, identify the error:
- "UDP is unreliable, so it is for toy apps."
- "TCP makes all packets arrive in the order they were sent."
- "The sender's congestion window and the receiver's advertised window are the same thing."
- "
CLOSE_WAITmeans the kernel is closing the socket." - "Retransmissions only happen on timeout."
Protocol Choice Workshop
For each scenario, pick UDP, TCP, or QUIC. Justify in one sentence.
- A live video call between two users.
- Uploading a 2 GB dataset.
- A DNS lookup for
api.example.com. - A real-time game sending position updates 60 times per second.
- A REST API that returns JSON payloads up to ~20 KB.
- 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:
- Who initiated the close?
- What state does A enter after packet 9?
- What state does B enter after packet 10?
- Where would
TIME_WAITappear? - 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.