User Datagram Protocol (UDP)

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

User Datagram Protocol (UDP)

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which protocol sends packets without first setting up a connection?
A TCP
B UDP
2. A packet is lost while using UDP. What happens?
A It is not resent, so the data is missing
B UDP asks for it to be sent again
3. Which statement about UDP is true?
A The receiver sends an acknowledgement for every packet
B It does not use acknowledgements
4. Why is UDP usually faster than TCP?
A It skips connection setup and resending
B It checks and resends every lost packet
5. What is the trade-off of choosing UDP over TCP?
A More speed but less reliability
B More reliability but less speed

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1UDP AThe reliable protocol that sets up a connection and resends lost packets, but is slower than UDP
2TCP Bprotocol = TCP
3A live online game needs fast updates and can ignore a lost packet, so it should use the fast, no-resend protocol Cprotocol = UDP
4Downloading a file needs every packet to arrive, so it should use the protocol that acknowledges and resends DA bank transfer cannot afford lost data, so it needs reliable TCP. UDP is only suited to live video, voice and games where speed matters more.
5UDP resends any lost packet EUDP does not resend lost packets. It has no acknowledgements, so lost data is simply gone. Resending is what TCP does.
6Use UDP to send a bank transfer because it is faster FUser Datagram Protocol: sends packets with no connection and no resending, so it is fast but some data may be lost

Definitions

UDP

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
SET protocol TO ___
2.
IF task = "file download" THEN use ___
3.
resendLost ← _____
4.
UDP sends no ________________ to the sender
5.
Speed: UDP is faster, TCP is more ________

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A protocol ← "UDP"
B connection ← false
C resend_lost ← true
Question 2
A IF task = "email" THEN
B protocol ← "UDP"
C ELSE
D protocol ← "TCP"
E ENDIF
Question 3
A FOR each frame IN video
B SEND frame by UDP
C WAIT for ACK
D NEXT
Question 4
A speed_UDP ← "fast"
B speed_TCP ← "slower"
C reliability_UDP ← "high"
D reliability_TCP ← "high"
Question 5
A IF packet is lost THEN
B ask sender to resend it
C ELSE
D play the packet
E ENDIF

Answer Key

User Datagram Protocol (UDP)
Section A: Quick Questions
Q1
B — UDP
Q2
A — It is not resent, so the data is missing
Q3
B — It does not use acknowledgements
Q4
A — It skips connection setup and resending
Q5
A — More speed but less reliability
Section B: Match the Pairs
Q1
UDP → User Datagram Protocol: sends packets with no connection and no resending, so it is fast but some data may be lost
Q2
TCP → The reliable protocol that sets up a connection and resends lost packets, but is slower than UDP
Q3
A live online game needs fast updates and can ignore a lost packet, so it should use the fast, no-resend protocol → protocol = UDP
Q4
Downloading a file needs every packet to arrive, so it should use the protocol that acknowledges and resends → protocol = TCP
Q5
UDP resends any lost packet → UDP does not resend lost packets. It has no acknowledgements, so lost data is simply gone. Resending is what TCP does.
Q6
Use UDP to send a bank transfer because it is faster → A bank transfer cannot afford lost data, so it needs reliable TCP. UDP is only suited to live video, voice and games where speed matters more.
Section C: Definitions
Q1
UDP — User Datagram Protocol: sends packets with no connection and no resending. It is faster than TCP but data may be lost, so it suits live video, voice calls and online games.
Section D: Fill in the Blanks
Q1
SET protocol TO UDP
Q2
IF task = "file download" THEN use TCP
Q3
resendLost ← FALSE
Q4
UDP sends no acknowledgements to the sender
Q5
Speed: UDP is faster, TCP is more reliable
Section E: Spot the Error
Q1
C — UDP does not resend lost packets. The line should be resend_lost ← false.
Q2
A — UDP suits live video, voice and games, where speed matters most. Email needs every part to arrive, so it uses TCP. The condition should be task = "live video".
Q3
C — UDP has no acknowledgements, so the sender does not wait for a reply. The line should say not to wait for an ACK.
Q4
C — UDP is faster but less reliable than TCP because it never resends lost data. The reliability of UDP should be "low".
Q5
B — UDP never asks for lost packets to be sent again. It skips them and carries on, so the line should be skip it and carry on.