Transport Layer Flashcards
What is the primary role of the Transport Layer?
To establish a conversation between two applications running on two network devices.
How does the Transport Layer support concurrent applications?
By using port numbers to uniquely identify separate flows of data.
What are the basic characteristics of TCP?
TCP is reliable, connection-oriented, and ensures ordered data transmission with acknowledgments.
What are the basic characteristics of UDP?
UDP is connectionless, does not guarantee ordered delivery, and does not provide reliability or flow control.
What applications typically use UDP?
Real-time applications like DNS, video streaming, and VoIP.
How does the Transport Layer ensure data integrity?
By using checksums in the header to verify data integrity.
What is the difference between well-known ports and registered ports?
Well-known ports are standardized for specific services (0-1023), while registered ports (1024-49151) are assigned for specific applications by IANA.
What is the range for dynamic or private ports?
49152-65535
What does the UDP header contain?
Source port, destination port, length, and checksum.
What is a datagram in the context of UDP?
A unit of data transmission, which can be sent without establishing a connection.
Why might UDP be chosen over TCP for certain applications?
UDP has lower overhead and allows for faster data transmission, suitable for real-time applications.
What is the purpose of port numbers in the Transport Layer?
To identify source and destination applications and support concurrent data flows.
How does TCP provide reliability?
By using acknowledgments, sequence numbers, and retransmission of lost packets.
What does it mean for UDP to be a stateless protocol?
Neither the client nor the server keeps track of the conversation state or connectivity status.
What type of applications prioritize fast transmission over reliability?
Real-time applications like VoIP and video streaming.
What is the significance of the UDP checksum?
It is used for error-checking the header and data.
What does it mean when UDP is described as providing ‘best-effort’ delivery?
There is no guarantee that the data will be delivered or that it will be delivered in order.
How do transport layer protocols impact application performance?
They determine how applications handle data transmission under varying network conditions.
What is the primary purpose of segmenting and reassembling data in the Transport Layer?
To prepare data for transmission across the network and reassemble it at the destination.
How are port numbers used to differentiate multiple conversations between the same hosts?
By assigning unique source and destination port numbers for each conversation.
Why is there no need for flow control in UDP?
Because UDP sends data at the source’s capacity without considering the destination’s processing capability.
What mechanism does TCP use to ensure data is received in order?
Sequence numbers in the TCP header.
Which layer of the OSI model does the Transport Layer correspond to?
Layer 4
What is the role of the checksum in the UDP header?
To detect errors in the transmitted segment.
What is the maximum number of port numbers available in the Transport Layer?
65,535
What are some examples of well-known TCP ports?
80 for HTTP, 443 for HTTPS, 21 for FTP, 25 for SMTP.
What are some examples of well-known UDP ports?
53 for DNS, 69 for TFTP, 161 for SNMP.
What is the primary difference between TCP and UDP in terms of reliability?
TCP is reliable and ensures delivery of packets, while UDP is not reliable and does not guarantee delivery.
What does a TCP header include that a UDP header does not?
Sequence number, acknowledgment number, flags for controlling the state of the connection.
What is a three-way handshake in TCP?
A process to establish a TCP connection involving SYN, SYN-ACK, and ACK packets.
How does the Transport Layer handle data segmentation?
It breaks down data streams into smaller segments that can be transmitted over the network.
What happens if a segment is lost during transmission in TCP?
TCP will retransmit the lost segment based on the acknowledgment and sequence numbers.
Why is UDP considered faster than TCP?
Because it has less overhead and does not perform error checking or retransmission.
What is flow control in TCP?
A mechanism to control the rate of data transmission between sender and receiver to prevent congestion.
What are some common applications that use TCP?
Web browsing (HTTP/HTTPS), email (SMTP), file transfer (FTP).
How does UDP handle datagram reassembly?
UDP does not guarantee datagram reassembly in order, and it must be handled by the application layer.
What is the significance of the source port in the Transport Layer?
It identifies the sending application on the source host.
What is the significance of the destination port in the Transport Layer?
It identifies the receiving application on the destination host.
How does the Transport Layer interact with the Network Layer?
The Transport Layer uses IP addresses from the Network Layer to route segments to the correct destination.
What is an ephemeral port?
A temporary, short-lived port number assigned by the client’s operating system for communication.
What does ‘connection-oriented’ mean in the context of TCP?
It means that a connection is established and maintained until all data is transmitted and acknowledged.
What does ‘connectionless’ mean in the context of UDP?
It means that each datagram is sent independently without establishing a connection.
How does TCP ensure data integrity?
Through checksums, sequence numbers, and acknowledgments.
Why might a developer choose to use UDP over TCP?
For applications where speed is critical and some data loss is acceptable, such as live video streaming.
How does the Transport Layer support error detection and correction?
TCP uses mechanisms like checksums and retransmissions; UDP provides minimal error detection with checksums.
What is a socket in networking?
An endpoint for sending or receiving data across a network, consisting of an IP address and port number.
What is a tuple in the context of the Transport Layer?
A pair of source and destination IP addresses and port numbers that uniquely identify a communication session.
What is the function of the TCP window size?
It controls the flow of data and helps manage congestion by specifying the amount of data that can be sent before receiving an acknowledgment.
What is meant by ‘out-of-order’ packets in UDP?
Packets that arrive at the destination in a different order than they were sent, due to the lack of sequence numbers in UDP.
How does TCP handle congestion control?
Through algorithms like slow start, congestion avoidance, fast retransmit, and fast recovery.
What are some challenges associated with using UDP?
No guarantee of delivery, no order of delivery, no congestion control, and error handling must be managed by the application.
What does the TCP flag ‘SYN’ indicate?
It indicates a request to establish a new connection.
What does the TCP flag ‘ACK’ indicate?
It acknowledges the receipt of a packet.
What does the TCP flag ‘FIN’ indicate?
It indicates a request to terminate an existing connection.
What is a TCP segment?
A unit of data transmission in TCP, consisting of a header and data payload.
What is a UDP datagram?
A self-contained, independent packet of data sent via UDP.
What is the primary use case for TCP?
Applications that require reliable communication, such as web browsing, email, and file transfers.
What is the primary use case for UDP?
Applications that require fast, real-time communication, such as video streaming and online gaming.
How does TCP handle lost packets?
By retransmitting lost packets after detecting missing acknowledgments.
How does UDP handle lost packets?
UDP does not handle lost packets; it is up to the application layer to manage any required retransmissions.
What is the difference between a socket and a port?
A socket is an endpoint for communication, defined by an IP address and port number; a port is a numerical identifier for a specific process or service.
What is multiplexing in the context of the Transport Layer?
The ability to handle multiple communication sessions simultaneously by differentiating them with unique port numbers.
What is demultiplexing in the context of the Transport Layer?
The process of delivering received data to the correct application process based on the destination port number.