TCP Flashcards

1
Q

What is TCP?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the key features of TCP?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the TCP Three-Way Handshake?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does TCP ensure reliability?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between segmentation and fragmentation in TCP?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does error control work in TCP?

A

TCP uses a checksum to verify data integrity. If the checksum doesn’t match, the data is retransmitted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is piggybacking in TCP?

A

Piggybacking involves including ACKs in outgoing data packets to reduce overhead and increase efficiency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are TCP ports used for?

A

TCP ports uniquely identify connections between applications. For example:

Port 80: HTTP
Port 25: SMTP
Port 443: HTTPS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the role of sockets in TCP?

A

Sockets represent endpoints for network communication. TCP sockets establish either active (client-side) or passive (server-side) connections.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does TCP handle retransmission and timeouts?

A

Retransmissions: Triggered after increasing timeouts to handle congestion.
Unacknowledged data is resent until either successfully delivered or deemed undeliverable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What information is included in a TCP header?

A

The TCP header contains:

Source and Destination Ports
Sequence and Acknowledgment Numbers
Window Size
Checksum for error detection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the summary of TCP characteristics?

A

TCP provides a robust transport-layer protocol suitable for reliable communication, ensuring order, integrity, and delivery through acknowledgments, segmentation, and error control mechanisms.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does TCP differ from UDP?

A

TCP: Reliable, connection-oriented communication, with guaranteed data integrity and ordering.
UDP: Connectionless, with low overhead and fast delivery, but without reliability guarantees.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly