🎓 BookMCQ
← Back to 24. Transport Layer Protocols

📝 Transmission Control Protocol (TCP) ovreview (9 MCQs)

Connection-Oriented Byte Stream at Transport Layer

TCP is a connection-oriented transport protocol in the TCP/IP suite and corresponds to OSI Layer 4. It provides full-duplex, reliable, ordered process-to-process delivery as a byte stream. Port numbers identify endpoints, while sequence numbers, acknowledgments, checksums, retransmissions, receiver windows, and congestion control coordinate data transfer over IP's best-effort packet service. It defines the boundary between application processes and packet delivery.

Reliable Communication over an Unreliable Network Layer

IP may lose, duplicate, delay, or reorder packets, and it offers no process-level recovery. Applications such as file transfer and web transactions need complete ordered data. TCP addresses these needs by maintaining connection state, numbering bytes, acknowledging progress, retransmitting missing data, and regulating sending rates according to receiver capacity and network congestion.

Three-Way Setup and Reliable Data Transfer

TCP begins with SYN, SYN-ACK, and ACK segments to synchronize initial sequence numbers and establish connection state. Application bytes are then numbered in the stream. The receiver acknowledges the next byte expected, advertises available receive space, and checks a checksum. The sender retransmits data when acknowledgments or timers indicate possible loss.

A TCP Connection Carrying a Short File

A client at 192.0.2.25 opens a connection to server 198.51.100.40 on port 443. After the three-way handshake, it sends 2,000 bytes beginning at sequence number 1000. If all bytes arrive, the receiver acknowledges 3000, indicating that byte 3000 is the next expected position.

Reliability, Ordering and Resource Costs

TCP supports web traffic, email transfer, remote login, and file delivery where missing or reordered bytes cannot be exposed as a completed stream. Its connection state, acknowledgments, buffering, and retransmissions consume resources and may increase delay during loss. TCP also cannot guarantee that an application receives data before a deadline or that the network path is secure.

Three Frequent TCP Misconceptions

'TCP preserves application write boundaries' is false: TCP delivers a byte stream. 'A successful send call means the peer received the data' is false: it means local transport accepted the bytes. 'TCP prevents all congestion' is false: congestion control responds to network conditions but cannot eliminate congestion. These distinctions separate similar mechanisms that are often confused.

Exam Focus: Handshake, Byte Numbering and TCP Services

Trace the three-way handshake, interpret sequence and acknowledgment numbers as byte positions, and identify the receiver's advertised window. Explain the difference between reliability, flow control, and congestion control. Be able to compare TCP with UDP, including connection setup, message boundaries, ordering, retransmissions, and typical application requirements. Use the assumptions stated in each question when calculating.

Key Terms for Transmission Control Protocol (TCP) Overview

  • Byte stream - Ordered sequence of application bytes.
  • SYN - Requests TCP connection establishment.
  • ACK - Acknowledges the next expected byte.
  • Sequence number - Identifies a byte position in the stream.
  • Receive window - Advertises available receiver buffer space.
  • Retransmission - Resends data judged lost.
3
Easy
4
Medium
2
Hard

📝 All Transmission Control Protocol (TCP) ovreview MCQs

Q1. If a TCP sender does not receive an acknowledgment for a transmitted segment within the retransmission timeout, what is the most likely immediate action taken by the sender?

A.Retransmit the unacknowledged segment ✅
B.Close the connection
C.Increase the congestion window
D.Send a FIN packet
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: When the retransmission timer expires, TCP assumes the segment was lost or corrupted. The protocol's reliability mechanism then schedules an immediate retransmission of that segment, preserving ordered delivery. Closing the connection or sending a FIN would be premature, and congestion‑window adjustments are handled separately after loss detection.

Q2. Suppose a TCP connection experiences packet loss, causing the cumulative ACK to indicate receipt up to byte 1500, while the sender had transmitted up to byte 2000. Which inference about the sender’s buffer state is correct?

A.Bytes 1501‑2000 have been discarded from the send buffer
B.Bytes 1501‑2000 remain in the send buffer awaiting acknowledgment ✅
C.The sender’s buffer is empty because all data has been acknowledged
D.The sender will immediately reset the connection
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A cumulative ACK of 1500 tells the sender that all bytes up to 1499 have been successfully received. The bytes that follow (1501‑2000) have not been acknowledged, so TCP must keep them in the send buffer until positive acknowledgment arrives or a timeout triggers retransmission. They are not discarded, nor does the connection terminate automatically.

Q3. Consider a TCP sender that employs selective acknowledgments (SACK). If the receiver reports that it has correctly received non‑contiguous blocks of bytes 0‑500 and 1000‑1500, what can the sender deduce about the segment covering bytes 500‑1000?

A.The segment is corrupted and must be retransmitted
B.The segment was received out of order but is intact
C.The segment has been successfully delivered and needs no further action
D.The segment is missing and should be retransmitted ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: SACK information tells the sender precisely which ranges have arrived. Since the receiver acknowledges 0‑500 and 1000‑1500 but omits 500‑1000, the sender infers that the latter segment was not received. Consequently, TCP will schedule a retransmission of the missing bytes while preserving the already acknowledged data, ensuring reliable delivery.

Q4. Which of the following statements correctly contrasts TCP’s stream‑oriented delivery with UDP’s message‑oriented delivery?

A.TCP delivers a continuous byte stream without preserving boundaries, whereas UDP delivers distinct datagrams. ✅
B.TCP preserves application message boundaries while UDP does not.
C.Both protocols preserve boundaries, but only TCP provides reliability.
D.UDP provides ordering of bytes, unlike TCP.
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: TCP treats the data as an uninterrupted sequence of bytes, allowing the application to read any number of bytes regardless of how the sender segmented them. In contrast, UDP retains the exact datagram boundaries created by the sender, delivering each packet as a separate message. This fundamental difference influences how applications handle buffering and reassembly.

Q5. A TCP connection has a receiver window of 64 KB and a round‑trip time (RTT) of 100 ms. Using the approximation throughput ≈ receiver‑window / RTT, which throughput value is closest to the actual maximum achievable rate?

A.0.5 Mbps
B.0.64 Mbps
C.5.12 Mbps ✅
D.64 Mbps
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Throughput can be approximated by dividing the advertised window by the round‑trip time. Converting 64 KB to bits gives 64×8=51264 \times 8 = 512 kilobits. Dividing 512 kb by 0.1 s (100 ms) yields 5 120 kb/s, which is roughly 5.12 Mbps. This matches option C, demonstrating how flow‑control limits dominate performance when latency is moderate.

Q6. In a TCP connection with initial congestion window cwnd=1cwnd = 1 MSS and slow‑start threshold ssthresh=8ssthresh = 8 MSS, after four consecutive ACKs are received without any loss, what is the congestion window size and in which phase is TCP operating?

A.4 MSS, congestion avoidance
B.8 MSS, slow start
C.16 MSS, congestion avoidance
D.5 MSS, slow start ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: During slow start, each ACK increments the congestion window by one MSS. Starting from 1 MSS, four ACKs increase cwnd to 5 MSS (1 + 4). Since the value remains below the slow‑start threshold of 8 MSS, TCP is still in the slow‑start phase. Therefore the window size is 5 MSS and the connection has not yet entered congestion avoidance.

Q7. Which TCP mechanism is primarily responsible for detecting corrupted segments and triggering their retransmission?

A.Checksum ✅
B.Sequence numbers
C.Port numbers
D.Window scaling
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Each TCP segment includes a 16‑bit checksum calculated over the header and payload. The receiver recomputes this value; if the result differs from the transmitted checksum, the segment is deemed corrupted and discarded. The sender then detects the missing acknowledgment and, after the timeout expires, retransmits the affected segment, ensuring data integrity.

Q8. When a TCP receiver sends an ACK number 3000, what does this cumulative acknowledgment indicate about the data received so far?

A.All bytes up to and including 3000 have been received
B.Only byte 3000 has been received
C.All bytes up to 2999 have been received ✅
D.The receiver is requesting retransmission starting at 3000
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: TCP uses cumulative acknowledgments, meaning the ACK number signifies the next expected byte. An ACK of 3000 tells the sender that the receiver has successfully obtained all bytes whose sequence numbers are less than 3000, i.e., up to 2999. Bytes from 3000 onward are still pending and may need retransmission if loss occurs.

Q9. How does TCP combine elements of Go‑Back‑N (GBN) and Selective Repeat (SR) to achieve reliable delivery?

A.It employs cumulative acknowledgments like GBN but also allows selective retransmission via SACK options ✅
B.It uses only GBN semantics with no selective retransmission
C.It relies solely on SR, discarding GBN concepts
D.It alternates between GBN and SR on each RTT
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: TCP’s default behavior resembles Go‑Back‑N because acknowledgments are cumulative; a missing segment forces the sender to consider all subsequent data as unacknowledged. However, the optional SACK extension lets the receiver specify exactly which blocks have arrived, enabling the sender to retransmit only the missing pieces, a hallmark of Selective Repeat. This hybrid strategy balances simplicity with efficiency.

🔗 Related Topics (MCQs)