TCP vs UDP

This study set covers the fundamental differences between TCP and UDP, detailing their characteristics, use cases, and performance metrics essential for understanding networking protocols.

James49·72 flashcards·72 questions
collegecomputer_sciencenetworks
0
Known
1 / 72
0
Learning
Front

What does TCP stand for?

Tap to flip
Back

Transmission Control Protocol.

Tap to flip
Got it
Still learning

Quiz(72 questions)

Question 1 of 72

1. What is the primary characteristic of UDP?

Terms in this Study Set(72)

TCP Characteristics(20)

What does TCP stand for?

Transmission Control Protocol.

True or False: TCP is connection-oriented.

True. It establishes a connection before transmitting data.

Describe the reliability of TCP.

TCP ensures reliable data transmission through acknowledgments and retransmissions.

What is a TCP segment?

A TCP segment is a unit of data transmitted over TCP, containing header and payload.

Compare TCP and UDP in terms of error recovery.

TCP has built-in error recovery; UDP does not.

Fill in the blank: TCP uses __________ to manage data flow.

flow control mechanisms.

What is the purpose of TCP handshaking?

To establish a reliable connection before data transfer begins.

True or False: TCP allows for duplicate packets.

False. TCP ensures that packets are delivered in order without duplicates.

What is a port number in TCP?

A port number identifies specific processes or services on a host.

Explain the role of the TCP header.

The TCP header contains control information such as source and destination ports, sequence numbers, and flags.

What is flow control in TCP?

Flow control prevents a sender from overwhelming a receiver by managing data transmission rates.

True or False: TCP is suitable for real-time applications.

False. TCP's reliability may introduce delays unsuitable for real-time scenarios.

What does sequence number indicate in TCP?

It indicates the order of bytes sent, helping to assemble the data correctly.

What is the TCP window size?

The TCP window size determines how much data can be sent before needing an acknowledgment.

Describe the three-way handshake process.

- SYN: Client requests connection. - SYN-ACK: Server acknowledges. - ACK: Client confirms connection.

Fill in the blank: TCP connections are established through a __________.

three-way handshake.

What is a TCP timeout?

A TCP timeout occurs when an acknowledgment is not received in a specified time, leading to retransmission.

Describe TCP's congestion control mechanism.

It adjusts the rate of data transmission based on network congestion to prevent packet loss.

True or False: TCP is faster than UDP.

False. TCP's features make it slower than UDP.

What are TCP flags?

TCP flags are control bits used to manage connection state, such as SYN, ACK, FIN.

UDP Characteristics(20)

What is the main feature of UDP?

UDP is a connectionless protocol, meaning it does not establish a connection before sending data.

True or False: UDP guarantees message delivery.

False. UDP does not guarantee delivery, making it suitable for applications where speed is prioritized over reliability.

What does it mean that UDP is 'unreliable'?

UDP may lose packets, deliver them out of order, or duplicate packets without any notification.

How does UDP handle error checking?

UDP uses a simple checksum for error detection, but it does not provide mechanisms for correction.

List two use cases for UDP.

- Video streaming - Online gaming

Fill in the blank: UDP is faster than TCP due to its ___ protocol structure.

connectionless

Compare UDP and TCP in terms of overhead.

UDP has lower overhead compared to TCP because it has no connection establishment or teardown processes.

What is the maximum size of a UDP packet?

The maximum size of a UDP packet is 65,535 bytes, including header and data.

True or False: UDP supports flow control.

False. UDP does not implement flow control, which can lead to congestion in high-speed networks.

What type of applications benefit from UDP's speed?

Applications like VoIP and live broadcasts benefit from UDP's low latency and quick transmission.

What is the UDP header size?

The UDP header is 8 bytes in size, consisting of source port, destination port, length, and checksum.

Cause → Effect: Sending data via UDP.

Cause: Data is sent without a connection; Effect: Faster transmission, but possible packet loss.

What is a significant drawback of using UDP?

UDP's lack of delivery guarantees can result in lost data packets, making it less suitable for critical data transfers.

How does UDP handle multiple streams of data?

UDP can handle multiple streams by using different port numbers, allowing simultaneous transmissions without interference.

What is the relationship between UDP and DNS?

DNS often uses UDP for queries due to its fast, connectionless nature, ensuring quick responses.

List one advantage of using UDP.

- Low latency

Fill in the blank: UDP is often used for ___ applications.

real-time

What happens if a UDP packet arrives out of order?

The application must handle reordering, as UDP does not provide this functionality.

True or False: UDP is suitable for file transfers.

False. UDP is not suitable for file transfers due to its unreliability and lack of order guarantees.

True or False: UDP is connectionless.

True. UDP does not establish a connection before sending data, resulting in lower overhead and faster transmission.

Comparative Analysis(16)

TCP guarantees delivery; does UDP?

No, UDP does not guarantee delivery. It is a connectionless protocol.

Which protocol is faster, TCP or UDP?

UDP is generally faster than TCP due to its reduced overhead and lack of connection establishment.

True or False: TCP is more reliable than UDP.

True. TCP ensures reliable delivery through acknowledgments and retransmissions.

Comparative analysis of TCP and UDP reliability.

TCP: - Reliable - Ordered delivery - Error checking UDP: - Unreliable - No ordering - Minimal error checking

Fill in the blank: TCP is a _____ protocol.

connection-oriented

True or False: UDP is suitable for live video streaming.

True. UDP's low latency makes it ideal for real-time applications like live streaming.

Performance of TCP: what affects it?

TCP performance can be affected by: - Congestion control - Handshake delays - Packet loss

Which protocol uses checksums for error detection?

Both TCP and UDP use checksums, but TCP has more extensive error recovery mechanisms.

Cause → Effect: TCP connection establishment.

Cause: TCP uses a three-way handshake. Effect: Ensures a reliable connection before data transfer.

Usage of TCP vs UDP in applications.

TCP is used for: - Web browsing - Email UDP is used for: - Online gaming - VoIP

Comparison of TCP and UDP data segmentation.

TCP: - Segments data into smaller packets. UDP: - Sends data as a whole without segmentation.

What happens if a TCP packet is lost?

TCP will retransmit the lost packet, ensuring all data is received correctly.

Fill in the blank: UDP is a _____ protocol.

connectionless

True or False: TCP is better for file transfers than UDP.

True. TCP's reliability is crucial for accurate file transfers.

Which protocol is best for time-sensitive applications?

UDP is preferred for time-sensitive applications like video calls and gaming due to minimal delay.

Define the maximum size of a TCP segment.

The maximum segment size (MSS) for TCP is typically 1460 bytes, depending on the MTU.

Real-World Applications(16)

Web browsing uses which protocol?

TCP is used for web browsing to ensure reliable delivery of web pages.

Online gaming typically relies on?

UDP is preferred for online gaming due to low latency requirements.

True or False: TCP is faster than UDP.

False. TCP is slower due to error-checking and connection management.

Streaming video uses which protocol?

UDP is commonly used for streaming video to minimize delays.

Email transmission primarily uses?

TCP is used for email protocols like SMTP to ensure complete message delivery.

VoIP calls rely on which protocol?

UDP is used for VoIP to prioritize speed over reliability.

Comparison: TCP vs UDP in file transfer.

TCP: reliable, ordered. UDP: faster, no guarantee.

Fill in the blank: DNS uses ____.

UDP, to resolve domain names quickly.

True or False: TCP is connectionless.

False. TCP is a connection-oriented protocol.

Which protocol is used for remote login?

TCP is used for remote login protocols like SSH for secure connections.

Real-time applications often prefer?

UDP, as it allows for faster transmission without re-transmissions.

Comparison: TCP and UDP error handling.

TCP: error correction. UDP: no error correction.

File sharing applications utilize?

TCP for reliable transfer of large files.

Streaming audio typically utilizes?

UDP to ensure continuous playback without buffering delays.

Instant messaging services use?

TCP for reliable message delivery between users.

Cause → Effect: Using TCP in financial transactions.

Cause: Need for reliability. Effect: Ensures transaction integrity.

Questions in this Study Set(72)

1. What is the primary characteristic of UDP?

A.Connectionless
B.Connection-oriented
C.Reliable
D.Slow

2. What does TCP ensure about data transmission?

A.Reliability
B.Speed
C.Simplicity
D.Invisibility

3. Which protocol is primarily used for transferring web pages?

A.TCP
B.UDP
C.HTTP
D.FTP

4. Which protocol is connection-oriented?

A.TCP
B.UDP
C.ICMP
D.HTTP

5. Which statement is true regarding UDP's delivery guarantees?

A.UDP guarantees delivery
B.UDP may lose packets
C.UDP guarantees order
D.UDP uses acknowledgments

6. Which characteristic of TCP helps maintain the order of packets?

A.Flow control
B.Error detection
C.Sequence numbers
D.Congestion control

7. Online multiplayer games mostly prefer which protocol?

A.TCP
B.UDP
C.HTTP
D.HTTPS

8. What is the primary advantage of UDP over TCP?

A.Reliability
B.Speed
C.Data integrity
D.Connection establishment

9. What does the term 'unreliable' mean in the context of UDP?

A.Packets are guaranteed
B.Packets may be lost or duplicated
C.Data is always secured
D.Packets are encrypted

10. What is the main purpose of the TCP three-way handshake?

A.To ensure data is encrypted
B.To establish a connection
C.To compress data
D.To check for errors

11. True or False: TCP is considered a faster protocol than UDP.

A.True
B.False
C.Depends on the application
D.Both are equally fast

12. Which protocol is typically used for secure file transfers?

A.UDP
B.TCP
C.FTP
D.SMTP

13. How does UDP perform error checking?

A.Using checksums
B.With error correction codes
C.By requiring acknowledgment
D.Not performing error checks

14. Which of the following is NOT a feature of TCP?

A.Connection-oriented
B.Reliable data delivery
C.Unordered data delivery
D.Congestion control

15. Which protocol is more commonly used for streaming video services?

A.TCP
B.UDP
C.FTP
D.ICMP

16. In terms of data delivery, which statement is true?

A.TCP guarantees delivery, UDP does not
B.UDP guarantees delivery, TCP does not
C.Both guarantee delivery
D.Neither guarantees delivery

17. Which of the following applications is best suited for UDP?

A.File transfer
B.Web browsing
C.Video streaming
D.Email

18. What role does the TCP header play?

A.It encrypts the data
B.It contains control information
C.It reduces data size
D.It manages power consumption

19. Email protocols like SMTP primarily utilize which protocol?

A.UDP
B.HTTP
C.TCP
D.FTP

20. Which protocol is more suitable for online gaming?

A.TCP
B.UDP
C.HTTP
D.FTP

21. What is a key advantage of using UDP over TCP?

A.Higher reliability
B.Faster transmission
C.Guaranteed packet order
D.More data integrity

22. What happens during a TCP timeout?

A.Data is lost forever
B.The connection is terminated
C.Retransmission occurs
D.The window size is reduced

23. VoIP (Voice over Internet Protocol) calls rely on which protocol?

A.TCP
B.UDP
C.SCTP
D.FTP

24. What happens during a TCP connection establishment?

A.Data is sent immediately
B.A three-way handshake occurs
C.Connection is closed
D.Error checking is performed

25. What is the maximum size of a UDP datagram?

A.32,768 bytes
B.65,535 bytes
C.128,000 bytes
D.256,000 bytes

26. In TCP, what does flow control prevent?

A.Data encryption
B.Packet loss
C.Data overflow
D.Protocol mismatches

27. In file transfer, how does TCP differ from UDP?

A.TCP is faster
B.UDP is more reliable
C.TCP is reliable and ordered
D.UDP has connection management

28. Which of the following statements about UDP is false?

A.It is faster than TCP
B.It provides error recovery
C.It is used for streaming
D.It is connectionless

29. Which statement accurately describes UDP's overhead?

A.Higher than TCP
B.Lower than TCP
C.Equal to TCP
D.Depends on the network

30. Which statement about TCP and real-time applications is true?

A.TCP is ideal for real-time apps
B.TCP is not suitable for real-time apps
C.TCP is faster than UDP for real-time
D.TCP guarantees real-time delivery

31. Fill in the blank: The Domain Name System (DNS) primarily uses ____.

A.TCP
B.UDP
C.HTTP
D.FTP

32. How does TCP handle lost packets?

A.It ignores them
B.It retransmits them
C.It marks them as corrupted
D.It sends them again at a later time

33. What happens when a packet is sent via UDP?

A.It waits for acknowledgment
B.It is sent without a connection
C.It is encrypted
D.It is buffered until a connection is established

34. What is the TCP window size?

A.Maximum data size sent at once
B.Minimum data size to be acknowledged
C.Maximum number of connections
D.Size of the TCP header

35. True or False: TCP operates in a connectionless manner.

A.True
B.False
C.Only in certain scenarios
D.Depends on the implementation

36. What type of error checking does TCP utilize?

A.No error checking
B.Basic checksum
C.Checksum with recovery
D.Redundant packets

37. What is the UDP header size?

A.4 bytes
B.8 bytes
C.12 bytes
D.16 bytes

38. What is the function of TCP flags?

A.To encrypt data
B.To manage connection state
C.To compress packets
D.To increase speed

39. Which protocol is used for secure remote login?

A.UDP
B.TCP
C.ICMP
D.SMTP

40. Which protocol would you choose for a video call?

A.TCP
B.UDP
C.FTP
D.SMTP

41. In what scenario might UDP not be the best choice?

A.Streaming video
B.VoIP calls
C.Transferring large files
D.Online gaming

42. How does TCP handle congestion?

A.By discarding packets
B.By adjusting transmission rates
C.By establishing more connections
D.By prioritizing certain packets

43. Which type of applications often prefer using UDP?

A.File sharing
B.Real-time applications
C.Email services
D.Web browsing

44. TCP segments data into packets, whereas UDP...

A.Sends data in blocks
B.Sends data as a whole
C.Does not send data
D.Segments with error checking

45. Which of the following best describes UDP flow control?

A.Implemented
B.Not implemented
C.Strictly enforced
D.Optional

46. What is indicated by the sequence number in a TCP segment?

A.The size of the segment
B.The source IP address
C.The order of bytes
D.The destination port

47. How does error handling differ between TCP and UDP?

A.TCP has no error correction
B.UDP offers error correction
C.TCP guarantees error correction
D.UDP is more reliable

48. What is the maximum segment size for TCP?

A.1500 bytes
B.1460 bytes
C.1400 bytes
D.1600 bytes

49. How does UDP handle simultaneous data streams?

A.Through multiplexing
B.By using different port numbers
C.By establishing connections
D.With data encryption

50. Which of the following is a correct description of TCP segments?

A.They contain only headers
B.They are fixed size
C.They contain both headers and payload
D.They are only for acknowledgments

51. File sharing applications predominantly utilize which protocol for their operations?

A.UDP
B.TCP
C.HTTP
D.SMTP

52. Which protocol is typically used for email transmission?

A.UDP
B.TCP
C.ICMP
D.RTP

53. Which statement about the relationship between UDP and DNS is true?

A.DNS uses TCP exclusively
B.DNS queries often utilize UDP
C.DNS does not use UDP
D.DNS packets are guaranteed delivery

54. What is a TCP acknowledgment?

A.A notification of packet loss
B.A confirmation of received data
C.A request for more data
D.A termination signal

55. Streaming audio services typically favor which protocol?

A.TCP
B.UDP
C.SMTP
D.FTP

56. True or False: UDP is suitable for applications where speed is more critical than reliability.

A.True
B.False
C.Depends on the application
D.Not applicable

57. Which of the following is NOT a characteristic of UDP?

A.Connectionless
B.Low latency
C.Guaranteed delivery
D.Simple checksum

58. In which situation would TCP's error recovery be most beneficial?

A.Streaming video
B.File transfers
C.Real-time gaming
D.Voice calls

59. Instant messaging services typically use which protocol to ensure message delivery?

A.UDP
B.TCP
C.ICMP
D.HTTP

60. Which of the following protocols typically features a three-way handshake to establish a connection?

A.TCP
B.UDP
C.HTTP
D.FTP

61. What type of applications typically use UDP?

A.Real-time applications
B.Batch processing
C.Database transactions
D.Static file hosting

62. How does TCP ensure no duplicate packets are received?

A.By using sequence numbers
B.By limiting packet size
C.By sending fewer packets
D.By ignoring errors

63. What is the primary cause for using TCP in financial transactions?

A.Speed
B.Cost
C.Reliability
D.Convenience

64. In which scenario would UDP be the preferred choice over TCP?

A.Transferring files
B.Streaming a live sports event
C.Sending an email
D.Downloading a web page

65. What must an application do if a UDP packet arrives out of order?

A.Ignore it
B.Reorder it manually
C.Request a resend
D.Wait for all packets

66. What does the term 'connection-oriented' signify about TCP?

A.No connection setup is required
B.Connections are established for a data transfer
C.Data may arrive out of order
D.Data is sent in bursts

67. True or False: UDP supports connection-oriented communication.

A.True
B.False
C.Sometimes
D.Depends on the application

68. Which TCP feature allows for efficient data transmission based on network conditions?

A.Error correction
B.Flow control
C.Congestion control
D.Data compression

69. Which of the following statements accurately describes UDP's error handling capabilities?

A.UDP uses a simple checksum for error detection but does not correct errors.
B.UDP guarantees error-free delivery of packets.
C.UDP retransmits lost packets automatically.
D.UDP uses a complex error correction algorithm.

70. What does the TCP window size control during data transmission?

A.The amount of data that can be sent before an acknowledgment is required
B.The total number of connections that can be active at one time
C.The maximum size of a single TCP packet
D.The speed at which data is transmitted over the network

71. In which scenario would UDP be the least suitable choice for data transmission?

A.Streaming a live sports event.
B.Transmitting a real-time voice call.
C.Sending a large software update file.
D.Sending a DNS query.

72. Which of the following correctly describes TCP's reliability mechanism?

A.It relies on error-correcting codes to fix corrupted data
B.It uses acknowledgments and retransmissions to ensure data is received correctly
C.It sends data without any guarantees and relies on the application for error checking
D.It discards any data that is delayed longer than 5 seconds

Related Study Sets

Create Your Own Study Set

Upload a PDF, paste your notes, or describe a topic – AI generates flashcards, quizzes and more in seconds.