Broadcasting data packets

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

Broadcasting data packets

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which describes broadcasting data packets?
A One source sends packets to a single chosen receiver only
B One source sends the same packets to many receivers at once
2. A school streams a live assembly to 500 student laptops. Which method uses less bandwidth on the source's connection?
A Broadcast: one stream of packets for everyone
B Unicast: a separate copy of the stream for each laptop
3. Which statement about unicast is correct?
A All receivers share one copy of the packets sent once
B Each receiver gets its own separate copy of the packets
4. What is the main network benefit of broadcasting the same data to many devices?
A It reduces the number of packets sent, so network efficiency improves
B It encrypts every packet so only one device can read it
5. A server must send a personal bank statement to one customer. Which method suits this better?
A Unicast, because the data is for one receiver only
B Broadcast, because every device should receive the statement

Match the Pairs

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

Left columnRight column
1broadcast ASends the same data packets from one source to many receivers at once
2unicast BUnicast does not save bandwidth. It sends 500 separate copies. Broadcasting sends the same packets once to all viewers, which saves bandwidth.
3Broadcasting is one-to-many: one source sends one stream to all receivers Cfor viewer in viewers: send(viewer, stream)
4Unicast needs a separate copy of the data for each receiver Dsend_to_all(stream)
5A live match is sent to 500 viewers using 500 unicast copies to save bandwidth EBroadcasting is one-to-many, so everyone receives the packets. A message for only one receiver should be sent by unicast.
6Broadcasting is used to send a private message to one person only FSends a separate copy of the data to each individual receiver

Definitions

broadcast

Fill in the Blanks

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

1.
_________(packet) # one copy reaches all
2.
___ device in devices: unicast(device, packet)
3.
_______(laptop, packet) unicast(phone, packet) unicast(tablet, packet)
4.
unicastCopies = ___(devices) broadcastCopies = 1
5.
if broadcastCopies _ unicastCopies: print("Less bandwidth used")

Spot the Error

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

Question 1
A packets = 10
B receivers == 50
C unicast = packets * receivers
D broadcast = packets
E print(unicast, broadcast)
Question 2
A def broadcast(packet):
B send(ALL, packet
C return 1
Question 3
A define one_to_many(src, dst):
B ok = src == 1 and dst > 1
C return ok
Question 4
A sources = 30
B receivers = 30
C print("one-to-many")
D print(sources, receivers)
Question 5
A receivers = 20
B copies = receivers
C total = copies * 8
D print(total)

Answer Key

Broadcasting data packets
Section A: Quick Questions
Q1
B — One source sends the same packets to many receivers at once
Q2
A — Broadcast: one stream of packets for everyone
Q3
B — Each receiver gets its own separate copy of the packets
Q4
A — It reduces the number of packets sent, so network efficiency improves
Q5
A — Unicast, because the data is for one receiver only
Section B: Match the Pairs
Q1
broadcast → Sends the same data packets from one source to many receivers at once
Q2
unicast → Sends a separate copy of the data to each individual receiver
Q3
Broadcasting is one-to-many: one source sends one stream to all receivers → send_to_all(stream)
Q4
Unicast needs a separate copy of the data for each receiver → for viewer in viewers: send(viewer, stream)
Q5
A live match is sent to 500 viewers using 500 unicast copies to save bandwidth → Unicast does not save bandwidth. It sends 500 separate copies. Broadcasting sends the same packets once to all viewers, which saves bandwidth.
Q6
Broadcasting is used to send a private message to one person only → Broadcasting is one-to-many, so everyone receives the packets. A message for only one receiver should be sent by unicast.
Section C: Definitions
Q1
broadcast — Sending the same data packets from one source to many receivers at once, instead of a separate unicast copy for each, which saves network bandwidth.
Section D: Fill in the Blanks
Q1
broadcast(packet) # one copy reaches all
Q2
for device in devices: unicast(device, packet)
Q3
unicast(laptop, packet) unicast(phone, packet) unicast(tablet, packet)
Q4
unicastCopies = len(devices) broadcastCopies = 1
Q5
if broadcastCopies < unicastCopies: print("Less bandwidth used")
Section E: Spot the Error
Q1
B — A single = is needed to assign a value. == compares values, so receivers would never be set. It should be receivers = 50.
Q2
B — The send call is missing its closing bracket. It should be send(ALL, packet), which sends one packet to every receiver.
Q3
A — Functions are declared with the keyword def, not define. The line should be def one_to_many(src, dst):.
Q4
A — Broadcasting is one-to-many, so there is only one source sending the packets. It should be sources = 1.
Q5
B — Broadcast sends one copy that all receivers share. Giving every receiver its own copy describes unicast. It should be copies = 1.