๐ŸŽ“ BookMCQ
โ† Back to 24. Transport Layer Protocols

๐Ÿ“ Transport layer services and functions (10 MCQs)

Process Addressing Above Host-Level IP Delivery

The transport layer corresponds to OSI Layer 4 and provides communication between application processes on different hosts. IP addresses identify network interfaces or hosts for packet delivery, while transport port numbers identify application endpoints. Transport protocols may also provide segmentation, reassembly, multiplexing, reliability, flow control, and congestion control, but the available services depend on the selected protocol. It defines the boundary between application processes and packet delivery.

Why Applications Need More Than Network-Layer Delivery

The network layer can route packets to a destination host, but it does not decide which application should receive their payload or guarantee that a data stream arrives intact and ordered. Applications therefore need endpoint selection and, where required, recovery from loss. Transport services address these needs without requiring every application to implement packet-level communication independently.

Encapsulation, Multiplexing and Demultiplexing

At the sender, transport accepts application data, associates it with a socket or endpoint, and adds a protocol header containing port and control fields. It passes segments or datagrams to IP. At the receiver, transport validates the unit, uses endpoint information to demultiplex it, and performs sequencing, reassembly, or recovery only when the selected protocol provides those functions.

Two Applications Sharing One Network Interface

A laptop can simultaneously send a TCP connection from port 52000 to a web server at port 443 and a UDP query from port 53000 to a DNS server at port 53. IP carries both packets toward their destinations. The transport layer uses protocol and port information to keep the two application conversations separate.

Reliability, Flow Regulation and Congestion Effects

Multiplexing allows many applications to share network access, while demultiplexing directs received data to the correct endpoint. TCP adds reliability and receiver flow control, and it controls network load through congestion control. UDP has lower transport overhead but no built-in retransmission or ordering. Applications using UDP must still behave responsibly under congestion.

Distinguishing Similar Transport Functions

'Flow control protects the network from congestion' is inaccurate: it protects the receiver from excess incoming data. 'Every transport protocol retransmits losses' is false: UDP does not. 'A port number identifies a host' is false: IP addresses provide host-level routing, while ports distinguish transport endpoints on that host. These distinctions separate similar mechanisms that are often confused.

Exam Focus: Mapping Services to Layer 4 Functions

Classify port addressing, multiplexing, segmentation, reliability, flow control, and congestion control by function and protocol. Trace data from an application socket through transport encapsulation and IP delivery to receiver demultiplexing. When comparing protocols, state explicitly whether a property is universal to transport or specific to TCP, UDP, or SCTP. Use the assumptions stated in each question when calculating.

Key Terms for Transport Layer Services and Functions

  • Segmentation - Divides data into transport units.
  • Reassembly - Restores data at the receiver.
  • Multiplexing - Combines application traffic for transmission.
  • Demultiplexing - Selects the receiving application endpoint.
  • Flow control - Limits sending to receiver capacity.
  • Congestion control - Adapts traffic to network conditions.
3
Easy
4
Medium
3
Hard

๐Ÿ“ All Transport layer services and functions MCQs

Q1. If the sender transmits packets with sequence numbers 0,1,2,3 and receives ACKs for 0 and 1, but the timer for packet 2 expires before its ACK arrives, what action will the sender most likely take?

A.Increment the sequence number to 4 and continue
B.Retransmit packet 2 โœ…
C.Discard packet 2 and move to packet 3
D.Send a negative ACK
๐Ÿ’ก Difficulty: easy | โœ… Correct: B

๐Ÿ“– Explanation: When a timer expires, the transport layer assumes the packet was lost or corrupted. Because ACKs for earlier packets have already been received, the sender does not advance its window but instead retransmits the unacknowledged packet 2 to ensure reliable delivery.

Q2. If the sender has just transmitted a packet with sequence number 31 (the maximum for m=5m = 5 bits), what will be the sequence number of the subsequent new packet?

A.30
B.31
C.0 โœ…
D.1
๐Ÿ’ก Difficulty: medium | โœ… Correct: C

๐Ÿ“– Explanation: Sequence numbers are used modulo 2m2^{m}. With m=5m = 5 the allowable range is 0โ€‘31. After the highest value 31 is sent, the next packet number wraps around to 0, restarting the sequence without exceeding the allocated bit field.

Q3. A receiver using m=3m = 3 (sequence numbers 0โ€‘7) has already acknowledged up to sequence number 4 and currently stores packets 5 and 6. If another packet with sequence number 5 arrives, how can the receiver determine it is a duplicate?

A.Because 5 is less than the last acknowledged number
B.Because 5 is greater than the highest stored packet
C.Because 5 equals a sequence number already stored in the receiver's buffer
D.Because 5 modulo 8 equals 5, indicating a repeat of a previously seen number โœ…
๐Ÿ’ก Difficulty: hard | โœ… Correct: D

๐Ÿ“– Explanation: The receiver keeps a buffer of sequence numbers that have been received but not yet delivered. When a packet arrives, the protocol checks whether its sequence number matches any entry already in the buffer. A match, as in this case, signals a duplicate, prompting the receiver to discard the redundant copy.

Q4. Which statement best distinguishes a positive acknowledgment (ACK) from a negative acknowledgment (NACK) at the transport layer?

A.A positive ACK confirms successful receipt, while a NACK signals that the packet was received with errors.
B.A positive ACK indicates that the packet arrived correctly; a NACK indicates that the receiver detected a problem and requests retransmission. โœ…
C.Both ACK and NACK serve the same purpose, differing only in naming.
D.NACKs are used only for flow control, not for error control.
๐Ÿ’ก Difficulty: easy | โœ… Correct: B

๐Ÿ“– Explanation: A positive ACK tells the sender that the corresponding segment was received without error, allowing the sender to slide its window forward. In contrast, a NACK explicitly informs the sender that a problem occurred, prompting an immediate retransmission of the affected segment.

Q5. What is the primary advantage of combining flow control and error control using two numbered buffersโ€”one at the sender and one at the receiverโ€”compared to handling them separately?

A.It eliminates the need for sequence numbers.
B.It simplifies the protocol by removing acknowledgments.
C.It improves throughput by allowing simultaneous tracking of sent and received packets. โœ…
D.Reduces memory usage at both ends.
๐Ÿ’ก Difficulty: medium | โœ… Correct: C

๐Ÿ“– Explanation: Using numbered buffers at both ends lets the sender keep a copy of each transmitted packet until it is acknowledged, while the receiver can track which packets have been received and stored. This dual tracking synchronizes flow and error control, reducing idle time and increasing overall dataโ€‘transfer throughput.

Q6. If a receiver discards outโ€‘ofโ€‘order packets immediately, what is the most likely impact on overall transmission efficiency compared with storing them until the missing packet arrives?

A.Higher latency but fewer retransmissions
B.Lower latency but increased number of retransmissions
C.No change in efficiency
D.Reduced memory usage at the receiver, potentially decreasing throughput due to additional retransmissions โœ…
๐Ÿ’ก Difficulty: hard | โœ… Correct: D

๐Ÿ“– Explanation: When outโ€‘ofโ€‘order packets are dropped, the sender assumes they were lost and retransmits them, leading to extra network traffic and lower effective throughput. Although the receiver saves buffer space, the surge in retransmissions and associated delays generally reduces overall efficiency.

Q7. With a 4โ€‘bit sequence field (m=4m = 4), what sequence number follows 15?

A.0 โœ…
B.1
C.15
D.16
๐Ÿ’ก Difficulty: easy | โœ… Correct: A

๐Ÿ“– Explanation: A 4โ€‘bit field can represent 24=162^{4}=16 distinct values, ranging from 0 to 15. After the maximum value 15 is used, the sequence wraps around to the beginning of the range, so the next number is 0, preserving the moduloโ€‘242^{4} property.

Q8. How do timers and acknowledgments work together to provide reliable data transfer in a transport protocol?

A.The timer starts after an ACK is received, ensuring the next packet is sent on schedule.
B.The timer measures roundโ€‘trip time, and the ACK adjusts the window size.
C.The sender sends an ACK only when the timer expires.
D.The sender starts a timer when a packet is sent; if the ACK does not arrive before the timer expires, the packet is resent. โœ…
๐Ÿ’ก Difficulty: medium | โœ… Correct: D

๐Ÿ“– Explanation: When a segment is transmitted, the sender initiates a timer. If the corresponding ACK arrives before the timer expires, the timer is cancelled and the segment is considered successfully delivered. If the timer expires first, the sender assumes loss or corruption and retransmits the segment, ensuring reliability.

Q9. Using a 2โ€‘bit sequence number (m=2m = 2), what is the maximum size of a sliding window that can be used without causing ambiguity between new and retransmitted packets?

A.1
B.2 โœ…
C.3
D.4
๐Ÿ’ก Difficulty: hard | โœ… Correct: B

๐Ÿ“– Explanation: With m=2m = 2 the sequence space contains four values (0โ€‘3). To avoid confusion between old and new packets, the window size must be less than half the sequence space, i.e., 2mโˆ’1=22^{m-1}=2. This limits the sender to two outstanding unacknowledged packets.

Q10. When mm bits are allocated for a transportโ€‘layer sequence number, what is the inclusive range of possible values?

A.0 to 2mโˆ’12^{m} - 1 โœ…
B.1 to 2m2^{m}
C.0 to 2m2^{m}
D.1 to 2mโˆ’12^{m} - 1
๐Ÿ’ก Difficulty: medium | โœ… Correct: A

๐Ÿ“– Explanation: A sequence field of mm bits can represent 2m2^{m} distinct values. By convention the numbering starts at zero, so the valid values run from 0 up to 2mโˆ’12^{m} - 1 inclusive. This range defines the wrapโ€‘around behavior used by transport protocols.

๐Ÿ”— Related Topics (MCQs)