UDP (User Datagram Protocol) Flashcards
What is UDP?
UDP (User Datagram Protocol) is a connectionless, unreliable protocol used for fast data transmission without guarantees of delivery or order.
Why is UDP faster than TCP?
UDP is faster because it does not require connection establishment, acknowledgments, or retransmissions.
What are the main differences between TCP and UDP?
TCP is reliable, connection-oriented, and ensures ordered delivery, while UDP is connectionless, unreliable, and does not guarantee order.
What is the use of UDP in streaming applications?
UDP is used in streaming because it provides lower latency, which is crucial for real-time applications like live video or voice.
Does UDP guarantee packet delivery?
No, UDP does not guarantee packet delivery. If packets are lost, they are not retransmitted.
How does UDP handle errors?
UDP uses a checksum to detect errors in transmitted data, but it does not ensure error recovery or retransmission.
What is the purpose of the UDP header?
The UDP header contains source and destination ports, length, and checksum to help direct packets to the correct application and ensure data integrity.
Is UDP suitable for file transfers?
UDP is not ideal for file transfers due to its lack of reliability features like error correction and retransmission.
When is UDP preferred over TCP?
UDP is preferred when low latency is critical and occasional data loss is acceptable, such as in VoIP or online gaming.
Does UDP support flow control?
No, UDP does not implement flow control, which can lead to congestion if the sender transmits data too quickly.
What is the maximum size of a UDP packet?
The maximum size of a UDP packet is 65,535 bytes, but the typical size is limited by the underlying network protocol, such as IP.
How does UDP manage packet sequencing?
UDP does not handle sequencing, and packets may arrive out of order, making it unsuitable for applications requiring ordered delivery.
Does UDP support retransmission of lost packets?
No, UDP does not support retransmission of lost packets, unlike TCP.
What is the typical use case of UDP?
UDP is commonly used in applications where speed is crucial, such as live streaming, DNS queries, and online gaming.
How are UDP ports categorized?
UDP ports are categorized into well-known ports (0-1023), registered ports (1024-49151), and dynamic/private ports (49152-65535).