The Transport Layer Flashcards
Q: What is the purpose of the transport layer?
A: To provide reliable or best-effort delivery of data between applications across a network.
Q: What are the two main transport layer protocols?
A: TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
Q: How does an application choose between TCP and UDP?
A: Based on the application’s requirements for reliability, speed, and overhead.
Q: What is TCP?
A: A connection-oriented protocol that ensures reliable, ordered delivery of data.
Q: What is UDP?
A: A connectionless protocol that offers faster, best-effort delivery with minimal overhead.
Q: Name applications that typically use TCP.
A: HTTP, FTP, SMTP, Telnet.
Q: Name applications that typically use UDP.
A: Video streaming, VoIP, DNS, DHCP, online gaming.
Q: What functions do both TCP and UDP share?
A: Segmentation, multiplexing, encapsulation, reassembly, and error detection.
Q: What are additional features of TCP?
A: - Connection establishment and termination
- Reliable delivery with acknowledgments
- Flow control using window sizes
- Retransmission of lost packets
Q: What is the TCP 3-way handshake?
A: A process where the sender and receiver exchange SYN and ACK flags to establish a connection.
Q: What is the TCP 4-way termination?
A: A process involving FIN and ACK flags to gracefully close a connection.
Q: What is flow control in TCP?
A: A mechanism to adjust the rate of data transmission to prevent overwhelming the receiver.
Q: What happens if a TCP segment isn’t acknowledged?
A: It is retransmitted after a timeout.
Q: Why is UDP considered lightweight?
A: It has low overhead and does not track connection state, order, or retransmissions.
Q: What is the main downside of using UDP?
A: No guarantee of delivery, order, or duplication prevention.
Q: Why is UDP suitable for real-time applications?
A: Its low latency makes it ideal where speed is more critical than reliability.
Q: What is a socket?
A: A combination of an IP address and a port number (e.g., 192.168.0.1:80).
Q: What are well-known port ranges?
A: 0 to 1023 — reserved for common services like HTTP (80), HTTPS (443), SMTP (25).
Q: What are user/registered ports?
A: 1024 to 49151 — assigned to specific applications.
Q: What are dynamic (ephemeral) ports?
A: 49152 to 65535 — temporarily used for client-side communication.
Q: Where can official port assignments be found?
A: https://www.iana.org/assignments/service-names-port-numbers