LearnViz CompSci
Home / Learn / Computer Networks / UDP

Intermediate Topic 20 of 50 Computer Networks

UDP

Lightweight connectionless transport without delivery guarantees.

How it works

The User Datagram Protocol sends independent datagrams with minimal overhead: an 8-byte header with ports, length and a checksum. It offers no handshake, no retransmission, no ordering and no congestion control, so datagrams may be lost, duplicated or reordered. This makes it fast and lightweight, and well suited to broadcast and multicast.

Step-by-step walkthrough

  1. The sender builds a small datagram.
  2. It is sent with no handshake.
  3. No acknowledgements come back.
  4. A lost datagram is simply gone.
  5. This is fast and ideal for video calls, games and DNS.

Where it is used

DNS queries, video and voice calls, online games, streaming, DHCP, NTP and protocols like QUIC built on top of UDP use it. Applications that need timeliness more than perfect reliability prefer it.

Common pitfall

Applications must handle loss and ordering themselves if needed. Without congestion control, a UDP sender can flood the network. Datagrams larger than the path MTU get fragmented or dropped. UDP can be abused for amplification attacks and spoofed source addresses. Keep messages small and add application-level acknowledgements where required.

Where it fits in the course

UDP is topic 20 of 50 in Computer Networks, rated Intermediate. It follows TCP. The next topic is Three-Way Handshake.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Computer Networks quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is UDP?
Lightweight connectionless transport without delivery guarantees. It belongs to Computer Networks and is an intermediate-level topic.
Where do people use UDP?
DNS queries, video and voice calls, online games, streaming, DHCP, NTP and protocols like QUIC built on top of UDP use it.
What is the most common mistake with UDP?
Applications must handle loss and ordering themselves if needed.
What should I learn before this topic?
Start with TCP, the topic just before it in Computer Networks.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Computer Networks quiz.
Is UDP hard to learn?
It is an Intermediate topic. Be comfortable with the Beginner topics in this area first, then read the common pitfall carefully, since it is where most mistakes happen.
How long does it take to learn UDP?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to UDP?
TCP, Three-Way Handshake, Wi-Fi are closely connected. The full list is in the related topics section of this page.
What should I study after UDP?
Continue with Three-Way Handshake, the next topic in Computer Networks.

Related topics