TCP Flashcards
What is TCP?
TCP (Transmission Control Protocol) is a reliable, connection-oriented transport-layer protocol that ensures error-free, ordered, and complete data delivery between applications over potentially unreliable networks.
What are the key features of TCP?
Connection-Oriented: Requires a handshake to establish a logical connection.
Stream-Oriented: Hides packetization from applications, providing continuous data.
Reliability: Achieved through acknowledgments (ACKs), retransmissions, and checksums.
Full Duplex: Supports bidirectional data transfer
What is the TCP Three-Way Handshake?
SYN: Client requests a connection.
SYN-ACK: Server acknowledges and requests connection.
ACK: Client confirms connection.
This process ensures both parties are ready to communicate.
How does TCP ensure reliability?
Acknowledgments (ACKs): Confirmation that data has been received.
Retransmissions: Unacknowledged packets are resent after a timeout.
Sliding Window Protocol: Allows multiple packets to be sent before an ACK is required, improving throughput.
What is the difference between segmentation and fragmentation in TCP?
Segmentation: Divides data streams into smaller packets at the TCP layer.
Fragmentation: Divides packets into smaller pieces at the IP layer if they exceed the network’s Maximum Transmission Unit (MTU).
How does error control work in TCP?
TCP uses a checksum to verify data integrity. If the checksum doesn’t match, the data is retransmitted.
What is piggybacking in TCP?
Piggybacking involves including ACKs in outgoing data packets to reduce overhead and increase efficiency.
What are TCP ports used for?
TCP ports uniquely identify connections between applications. For example:
Port 80: HTTP
Port 25: SMTP
Port 443: HTTPS
What is the role of sockets in TCP?
Sockets represent endpoints for network communication. TCP sockets establish either active (client-side) or passive (server-side) connections.
How does TCP handle retransmission and timeouts?
Retransmissions: Triggered after increasing timeouts to handle congestion.
Unacknowledged data is resent until either successfully delivered or deemed undeliverable.
What information is included in a TCP header?
The TCP header contains:
Source and Destination Ports
Sequence and Acknowledgment Numbers
Window Size
Checksum for error detection.
What is the summary of TCP characteristics?
TCP provides a robust transport-layer protocol suitable for reliable communication, ensuring order, integrity, and delivery through acknowledgments, segmentation, and error control mechanisms.
How does TCP differ from UDP?
TCP: Reliable, connection-oriented communication, with guaranteed data integrity and ordering.
UDP: Connectionless, with low overhead and fast delivery, but without reliability guarantees.