Layer Transfer Protocols Flashcards
What are the two main Layer 4 transport protocols?
Layer 4 Transport Layer
Transmission Control Protocol (TCP)
User Datagram Protocol (UDP)
What is the key characteristic of Transmission Control Protocol (TCP)?
Layer 4 Transport Layer
The key characteristic of TCP is that it provides reliable, connection-oriented data transmission with error checking, flow control, and congestion control.
What is the key characteristic of User Datagram Protocol (UDP)?
Layer 4 Transport Layer
UDP’s key characteristic is that it provides connectionless, best-effort data transmission without guarantees for delivery, order, or error checking, making it faster but less reliable than TCP.
What is a common use case for TCP?
Layer 4 Transport Layer
A common use case for TCP is web browsing (HTTP/HTTPS), email (SMTP, IMAP, POP3), and file transfers (FTP), where reliable and ordered data delivery is crucial.
What is a common use case for UDP?
Layer 4 Transport Layer
A common use case for UDP is real-time applications like video streaming, online gaming, and VoIP (Voice over IP), where low latency and speed are more important than reliable delivery.
How does TCP establish a connection between two devices?
Layer 4 Transport Layer
TCP establishes a connection using a three-way handshake process that involves:
SYN (synchronize) packet sent by the client.
SYN-ACK (synchronize-acknowledge) packet sent by the server.
ACK (acknowledge) packet sent by the client.
Does UDP require a connection to be established before data is sent?
Layer 4 Transport Layer
No, UDP does not require a connection to be established before data is sent, allowing for faster transmission but at the cost of reliability.
What mechanisms does TCP use for error recovery and flow control?
Layer 4 Transport Layer
TCP uses acknowledgments (ACKs), sequence numbers, and windowing mechanisms to ensure error recovery and flow control. This enables the receiver to manage the data rate and detect lost packets for retransmission.
Why might an application choose UDP over TCP?
Layer 4 Transport Layer
An application might choose UDP over TCP when it needs lower latency and reduced overhead and can tolerate some data loss, such as in live audio/video streaming or online gaming.
How do applications use port numbers to communicate over TCP and UDP?
Layer 4 Transport Layer
Applications use port numbers to specify endpoints for communication. The client and server agree on the port numbers, allowing the transport layer to direct traffic to the correct application.
What is the well-known port number for DHCP (Dynamic Host Configuration Protocol) using UDP?
The well-known port numbers for DHCP using UDP are 67 (server) and 68 (client).
What is the well-known port number for SSH (Secure Shell) using TCP?
The well-known port number for SSH using TCP is 22.
What is the well-known port number for Telnet using TCP?
The well-known port number for Telnet using TCP is 23.
What is the well-known port number for DNS (Domain Name System) using UDP and TCP?
The well-known port number for DNS using UDP and TCP is 53.
What is the well-known port number for FTP (File Transfer Protocol) using TCP?
The well-known port numbers for FTP using TCP are 20 (data transfer) and 21 (control).