TCP Flashcards
What is TCP?
TCP (Transmission Control Protocol) is a connection-oriented protocol used for reliable data transmission between devices on a network.
How does TCP ensure reliable delivery?
TCP ensures reliable delivery through acknowledgment, retransmission of lost packets, and sequencing to maintain order.
What is the TCP three-way handshake?
The three-way handshake involves three steps: SYN, SYN-ACK, and ACK to establish a connection between client and server.
What does the TCP header contain?
The TCP header contains fields like source port, destination port, sequence number, acknowledgment number, flags, window size, and checksum.
How does TCP handle packet loss?
TCP handles packet loss through retransmission after a timeout if an acknowledgment is not received.
What are the main flags used in TCP?
The main flags in TCP are SYN, ACK, FIN, RST, PSH, and URG.
What is a TCP segment?
A TCP segment is a unit of data transmitted between two devices, containing both a header and a data payload.
What does flow control in TCP ensure?
Flow control ensures the sender does not overwhelm the receiver by adjusting the rate of data transmission using a sliding window mechanism.
What is TCP congestion control?
TCP congestion control adjusts the data transmission rate to avoid network congestion using algorithms like slow-start and congestion avoidance.
What is the Maximum Segment Size (MSS) in TCP?
MSS is the largest amount of data (excluding the TCP header) that can be sent in a TCP segment.
What is the difference between TCP and UDP?
TCP is reliable, connection-oriented, and ensures ordered delivery, whereas UDP is connectionless, unreliable, and does not guarantee order.
How does TCP detect errors in data?
TCP uses a checksum to detect errors in the header and data of packets.
What is TCP window size?
The TCP window size specifies the amount of data the sender is allowed to transmit before receiving an acknowledgment.
How is a TCP connection terminated?
TCP connection termination involves a four-way handshake using the FIN and ACK flags to close the connection.
What happens if a TCP connection is not properly closed?
If a TCP connection is not properly closed, resources like memory or ports may not be released, potentially causing issues like port exhaustion.