1.5 TCP and UDP Flashcards

Compare and Contrast TCP andUDP. (14 cards)

1
Q

Define:

TCP

(Transmission Control Protocol)

A

A connection-oriented protocol ensuring reliable data transmission.

TCP establishes a connection, ensuring data integrity and successful delivery through error detection, acknowledgment, and retransmission.

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

List the features of TCP.

A
  1. Connection-oriented
  2. Reliable data transfer
  3. Ordered data delivery
  4. Error checking and correction
  5. Flow and congestion control

These features make TCP suitable for applications requiring reliable data delivery, such as web browsing and file transfers.

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

Define:

UDP

(User Datagram Protocol)

A

A connectionless protocol with no delivery, order, or error guarantees.

UDP sends data without a connection, not ensuring order or delivery, making it suitable for speed-critical applications with acceptable data loss.

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

List the features of UDP.

A
  1. Connectionless
  2. Unreliable transfer
  3. Faster speeds
  4. No error checking
  5. No flow control

UDP is suitable for applications that prioritize speed, such as DNS queries or live video calls, where reliability can be compromised.

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

In which OSI model layer do the protocols TCP and UDP operate?

A

Transport layer

Both TCP and UDP are found in the transport layer of the OSI model, where TCP is utilized for connection-oriented communication and UDP for connectionless communication.

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

True or False:

TCP is faster than UDP.

A

False

TCP has higher overhead due to connection setup, error checking, and retransmissions, whereas UDP’s simplicity and minimal overhead allow for faster communication.

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

What is the main difference in how TCP and UDP handle packet delivery?

A
  • TCP: Uses a handshake and acknowledgment for packet delivery.
  • UDP: Sends packets without connection or acknowledgment.

TCP’s connection-oriented nature ensures reliability, while UDP’s connectionless approach minimizes overhead for speed.

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

Identify three applications that benefit from using UDP.

A
  • Online gaming
  • Video conferencing
  • VoIP

UDP is preferable for applications where speed is critical and some data loss is acceptable, such as in online gaming, video conferencing, and voice over IP (VoIP).

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

Why is UDP preferred for online gaming?

A

It is faster due to no acknowledgment or error checking.

Online gaming requires low latency, and slight packet loss is tolerable, whereas TCP’s overhead would introduce unacceptable delays.

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

What is the three-way handshake in TCP?

A

A method to establish a reliable connection between sender and receiver.

The handshake involves SYN, SYN-ACK, and ACK steps to ensure both devices are ready for data transmission, ensuring reliability and no data loss.

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

Fill in the blank:

TCP ensures data integrity through ____-________ ________.

A

error-recovery features

TCP includes error-checking and recovery mechanisms to ensure all packets are delivered correctly.

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

How does TCP recognize lost data?

A

By using sequence numbers and acknowledgments.

If a segment is not received, the recipient requests the sender to resend it.

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

Why is UDP preferred for DNS queries?

A

It is faster, and DNS queries require minimal data.

DNS requests are typically small, and speed is more important than reliability. Since DNS operates over short-lived connections, the lack of error-checking in UDP speeds up the query process.

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

True or False:

UDP requires more bandwidth than TCP.

A

False

UDP requires less bandwidth because it does not include connection setup, acknowledgments, or error recovery, whereas TCP’s overhead consumes more bandwidth.

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