๐ 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.
๐ 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?
๐ 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 bits), what will be the sequence number of the subsequent new packet?
๐ Explanation: Sequence numbers are used modulo . With 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 (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?
๐ 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?
๐ 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?
๐ 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?
๐ 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 (), what sequence number follows 15?
๐ Explanation: A 4โbit field can represent 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โ property.
Q8. How do timers and acknowledgments work together to provide reliable data transfer in a transport protocol?
๐ 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 (), what is the maximum size of a sliding window that can be used without causing ambiguity between new and retransmitted packets?
๐ Explanation: With 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., . This limits the sender to two outstanding unacknowledged packets.
Q10. When bits are allocated for a transportโlayer sequence number, what is the inclusive range of possible values?
๐ Explanation: A sequence field of bits can represent distinct values. By convention the numbering starts at zero, so the valid values run from 0 up to inclusive. This range defines the wrapโaround behavior used by transport protocols.