← Years 5–6 Digital Systems

Network switch

A device that connects computers on the same network and sends data only to the device it is meant for, using its ports. A router links different networks.

Understanding Network switch in Years 5–6 Digital Systems

What it does: The switch joins several devices on one local network so that they can share data. A switch checks where data is going and sends it to the right port, not to every device. Wired school and office networks use switches so many computers can share one network. A webcam is an input device.

Common mistakes: Free ports are the ports left after devices are plugged in, so you subtract devices from ports. It should be ports - devices. A switch sends data only to the port of the device it is meant for. Sending to every port is not how a switch works. It should be send(port, packet).

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 21–30) and word search (Modules 21–52).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A network switch sends data only to the device it is meant for.
TrueFalse
Matches
switch.send(data, to="everyone")
↓
A switch does not send data to every device. It sends data only to the device it is meant for.
Applying
Meanings
Term
network switch
Meaning
A device that connects computers on the same network and sends data only to the device it is meant for, using its ports. A router links different networks.
Practice
switch connects devices on one network
Testing
Gaps
connect(laptop, )
Check Answer
Spots
2ports = 8
3free_ports = ports + devices

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Woodpecker' badge — Tap Tap Tap, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A network switch sends data only to the device it is meant for.
A. False
B. True ✓
A switch checks where data is going and sends it to the right port, not to every device.
2. Which device connects computers on the same network?
A. Network switch ✓
B. Monitor
A network switch links devices on the same network. A monitor is an output device that only shows pictures.
3. What do you plug a network cable into on a switch?
A. A keyboard
B. A port ✓
Each device connects to its own port on the switch. A keyboard is an input device.
4. Which device links different networks together?
A. Router ✓
B. Switch
A router links different networks, like a school network and the internet. A switch connects devices on the same network.
5. A school computer lab has 30 wired computers on one network. What helps connect them to each other?
A. A switch ✓
B. A webcam
Wired school and office networks use switches so many computers can share one network. A webcam is an input device.

Match the Pairs

switch.port(3) → A socket on the switch where one device is plugged in with a cable
switch.send(data, to="Printer") → The switch passes data only to the device it is meant for, not to every device
A switch connects devices on the same network, such as computers in a school lab → switch.connect(lab_pc1, lab_pc2, lab_printer)
A router links different networks, but a switch only links devices within one network → router.link(school_lan, internet)
switch.send(data, to="everyone") → A switch does not send data to every device. It sends data only to the device it is meant for.
switch.link(school_lan, internet) → A switch does not link different networks. Linking a school network to the internet is the job of a router.

Key Term

network switch
A device that connects computers on the same network and sends data only to the device it is meant for, using its ports. A router links different networks.

Fill in the Blanks

1. connect(laptop, switch)
Hint: Type the device that joins computers on the same network.
2. switch.forward(data, port)
Hint: Type the name for the socket on a switch that a device plugs into.
3. router.link(school_lan, internet)
Hint: Type the device that links different networks together.
4. for device in ports: if device == target: send(data, device)
Hint: Type the operator that checks whether this device is the one the data is meant for.
5. connect(pc, cable, switch)
Hint: Type the wired link used to plug a school computer into a switch port.

Spot the Error

Question 1
A devices = 4
B ports = 8
C free_ports = ports + devices
D print(free_ports)
Line C — Free ports are the ports left after devices are plugged in, so you subtract devices from ports. It should be ports - devices.
Question 2
A packet = get_packet()
B dest = packet.to
C port = ports[dest]
D send_all(ports, packet)
Line D — A switch sends data only to the port of the device it is meant for. Sending to every port is not how a switch works. It should be send(port, packet).
Question 3
A switch = Switch()
B switch.connect(laptop, 1
C switch.connect(printer, 2)
Line B — The closing bracket is missing, so the call is a syntax error. It should be switch.connect(laptop, 1).
Question 4
A if dest in lan:
B use_switch(dest)
C else:
D use_switch(dest)
Line D — A switch only connects devices on the same network. Data for a different network must go through a router, so the else branch should be use_router(dest).
Question 5
A print('Switch ports:')
B 8 = ports
C print(ports)
Line B — A variable name goes on the left of = and the value goes on the right. It should be ports = 8.

Student with a class code? Join your class →