Q1. Which two protocols operate at the transport layer?
- A.ARP and RARP
- B.IP and ICMP
- C.HTTP and FTP
- D.TCP and UDP✓ Correct
Explanation
TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are the two main transport layer protocols.
Topic in Computer Networks & Cloud Computing
The transport layer provides end-to-end communication between processes on different hosts, using port numbers to deliver segments to the correct application. Most questions contrast TCP, which is reliable and connection-oriented, with UDP, which is connectionless and lightweight, and explain why streaming and DNS often prefer UDP. TCP mechanics dominate: the three-way handshake and connection teardown, sequence and acknowledgment numbers, the receive window for flow control, and congestion control through slow start, congestion avoidance, AIMD, fast retransmit and fast recovery. You may also see Nagle's algorithm, retransmission timeouts, well-known port ranges and the UDP header fields.
Below are 30 practice questions from a pool of 210 Transport Layer MCQs, one of 10 topics in Computer Networks & Cloud Computing. Each shows the correct answer with an explanation; when you are ready, take a timed quiz to test recall under exam conditions.
Each question below shows the correct answer with a full explanation. Use these to build conceptual understanding before attempting a timed quiz.
Q1. Which two protocols operate at the transport layer?
TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are the two main transport layer protocols.
Q2. Which transport layer protocol provides reliable, connection-oriented service?
TCP provides reliable, connection-oriented service with features like error detection, retransmission, flow control, and ordered delivery.
Q3. What is the range of port numbers?
Port numbers range from 0 to 65535 (16 bits). They are divided into well-known (0-1023), registered (1024-49151), and dynamic/private (49152-65535).
Q4. Which well-known port is used by HTTP?
HTTP uses well-known port 80. HTTPS uses port 443, FTP uses port 21, and SMTP uses port 25.
Q5. What type of service does UDP provide?
UDP provides unreliable, connectionless service. It does not guarantee delivery, ordering, or error recovery, making it faster but less reliable than TCP.
Q6. How many steps are in the TCP three-way handshake?
The TCP three-way handshake has 3 steps: SYN, SYN-ACK, and ACK, used to establish a connection between client and server.
Q7. What is a socket in networking?
A socket is the combination of an IP address and a port number, uniquely identifying an endpoint for communication.
Q8. Which application typically uses UDP?
DNS typically uses UDP for queries because they are small and the overhead of establishing a TCP connection is unnecessary. DNS uses TCP for zone transfers and large responses.
Q9. What does the checksum field in the UDP header provide?
The UDP checksum provides error detection to verify that the data has not been corrupted during transmission.
Q10. What is the purpose of the transport layer?
The transport layer provides process-to-process (end-to-end) delivery using port numbers to identify specific applications.
Q11. In TCP, what is the purpose of the window size field?
The window size field implements flow control by telling the sender how many bytes the receiver is willing to accept, preventing the sender from overwhelming the receiver.
Q12. What is the TCP mechanism for handling out-of-order segments?
TCP uses sequence numbers to detect and reorder out-of-order segments. The receiver buffers them and reassembles the data in the correct order.
Q13. What is the purpose of the TCP FIN flag?
The FIN (Finish) flag is used to gracefully terminate a TCP connection. Each side sends a FIN to indicate it has no more data to send.
Q14. How many steps are involved in graceful TCP connection termination?
TCP connection termination uses a 4-step process (four-way handshake): FIN from initiator, ACK from other side, FIN from other side, and final ACK.
Q15. What is Nagle's algorithm in TCP?
Nagle's algorithm reduces the overhead of sending many small packets by buffering small segments and sending them together, improving network efficiency.
Q16. What is the difference between TCP's flow control and congestion control?
Flow control prevents the sender from overwhelming the receiver's buffer. Congestion control prevents the sender from overwhelming the network by adjusting the sending rate based on network conditions.
Q17. What port number does HTTPS use?
HTTPS (HTTP Secure) uses port 443. It runs HTTP over TLS/SSL for encrypted web communication.
Q18. What is the maximum size of a TCP segment's data payload if the MSS is 1460 bytes?
The Maximum Segment Size (MSS) defines the largest amount of data that can be carried in a single TCP segment. If MSS is 1460, the payload is at most 1460 bytes.
Q19. What is the size of the UDP header?
The UDP header is 8 bytes (64 bits) consisting of four fields: source port, destination port, length, and checksum, each 2 bytes.
Q20. In TCP, what does a RST (Reset) flag indicate?
The RST flag is used to abruptly abort a TCP connection. It can be sent when a connection request is received for a non-listening port or to immediately terminate an existing connection.
Q21. In TCP congestion control, what triggers the slow start algorithm to switch to congestion avoidance?
TCP switches from slow start (exponential growth) to congestion avoidance (linear growth) when the congestion window (cwnd) reaches the slow start threshold (ssthresh).
Q22. What happens in TCP fast retransmit?
TCP fast retransmit triggers retransmission after receiving three duplicate ACKs, indicating a likely packet loss, without waiting for the retransmission timeout.
Q23. In the TCP state diagram, what state does a client enter after sending a SYN?
After a client sends a SYN to initiate a connection, it enters the SYN_SENT state and waits for a SYN-ACK from the server.
Q24. What is the TIME_WAIT state in TCP used for?
TIME_WAIT ensures that delayed segments from the closed connection do not interfere with a new connection using the same socket pair. It lasts for 2*MSL (Maximum Segment Lifetime).
Q25. What is TCP SACK (Selective Acknowledgment)?
TCP SACK allows the receiver to acknowledge non-contiguous blocks of data, enabling the sender to retransmit only the missing segments rather than everything from the lost segment onward.
Q26. What is the Silly Window Syndrome in TCP?
Silly Window Syndrome occurs when the receiver advertises a very small window, causing the sender to send tiny segments with high overhead relative to the data. Clark's solution and Nagle's algorithm help prevent this.
Q27. In TCP Reno, what happens when three duplicate ACKs are received?
In TCP Reno, three duplicate ACKs trigger fast retransmit and fast recovery: ssthresh is set to cwnd/2, and cwnd is set to ssthresh + 3 MSS, then linear increase continues.
Q28. What is the purpose of the TCP PSH (Push) flag?
The PSH flag tells the receiving TCP to push the buffered data to the application layer immediately without waiting for the buffer to fill, reducing latency for interactive applications.
Q29. What is a SYN flood attack?
A SYN flood attack sends many SYN packets with spoofed source addresses. The server allocates resources for each half-open connection, eventually exhausting memory and being unable to serve legitimate requests.
Q30. What distinguishes QUIC from TCP?
QUIC runs over UDP, integrates TLS 1.3 encryption, supports connection migration, eliminates head-of-line blocking via stream multiplexing, and reduces handshake latency compared to TCP+TLS.
Take a timed quiz drawn from 210+ questions on this topic. No signup required — your progress saves in your browser.
Start Transport Layer Quiz