Network hub

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

Network hub

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A network hub has several ports. What do you plug into those ports?
A Only one cable from one device
B Cables from several wired devices
2. A computer sends a message to a hub. What does the hub do with it?
A Passes it on to every connected device
B Sends it only to the device it is meant for
3. Which device sends a message to just ONE device?
A A network hub
B A network switch
4. Which sentence describes a hub best?
A A simple box that joins wired devices
B A clever box that picks one device to send to
5. Four computers are plugged into a hub. Computer 1 sends a file. Who gets a copy of the message?
A Computers 2, 3 and 4
B Only Computer 3

Match the Pairs

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

Left columnRight column
1hub AA hub does not send to just one device. It passes the message to all connected devices. Sending to one device is what a switch does.
2switch BA smarter box than a hub that sends each message to just the one device it is meant for
3A hub has several ports, so you can plug many cables into the one box CA simple box with several ports that joins wired devices and passes every message on to all connected devices
4A hub sends every message to all connected devices, even ones that do not need it Dhub.plug(cable1, cable2, cable3)
5hub.send(message, one_device) EA hub is an older, simpler device, not a smart one. It cannot work out where a message should go.
6hub = newest_and_smartest_box Fhub.send(message, all_devices)

Definitions

hub

Fill in the Blanks

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

1.
connect(computer1, ___)
2.
hub.send(message, ___)
3.
switch.send(message, ___)
4.
plug(cable, hub.____)
5.
___ EACH device IN hub.ports send(message, device) END FOR

Spot the Error

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

Question 1
A box = Hub(ports=1)
B box.plug(laptop)
C box.plug(printer)
Question 2
A message = 'Hello'
B hub.receive(message)
C hub.send_to_one(message)
Question 3
A hub.type = 'wireless tower'
B hub.cables = 'wired'
C hub.smart = False
Question 4
A message = 'Hi from Ava'
B for pc in hub.devices:
C pc.ignore(message)
Question 5
A switch = Switch(ports=8)
B switch.send_to(all_devices)
C hub.send_to(all_devices)

Answer Key

Network hub
Section A: Quick Questions
Q1
B — Cables from several wired devices
Q2
A — Passes it on to every connected device
Q3
B — A network switch
Q4
A — A simple box that joins wired devices
Q5
A — Computers 2, 3 and 4
Section B: Match the Pairs
Q1
hub → A simple box with several ports that joins wired devices and passes every message on to all connected devices
Q2
switch → A smarter box than a hub that sends each message to just the one device it is meant for
Q3
A hub has several ports, so you can plug many cables into the one box → hub.plug(cable1, cable2, cable3)
Q4
A hub sends every message to all connected devices, even ones that do not need it → hub.send(message, all_devices)
Q5
hub.send(message, one_device) → A hub does not send to just one device. It passes the message to all connected devices. Sending to one device is what a switch does.
Q6
hub = newest_and_smartest_box → A hub is an older, simpler device, not a smart one. It cannot work out where a message should go.
Section C: Definitions
Q1
hub — A simple box with several ports that joins wired devices. It passes every message on to all connected devices, unlike a switch, which sends it to just one.
Section D: Fill in the Blanks
Q1
connect(computer1, hub)
Q2
hub.send(message, all)
Q3
switch.send(message, one)
Q4
plug(cable, hub.port)
Q5
FOR EACH device IN hub.ports send(message, device) END FOR
Section E: Spot the Error
Q1
A — A hub has several ports so that many wired devices can plug in. A hub with only one port could not join the laptop and the printer. It should be ports=4.
Q2
C — A hub passes every message on to all of the connected devices. It does not pick just one. The line should be hub.send_to_all(message).
Q3
A — A hub is a simple box with ports for cables. It is not a wireless tower. The line should be hub.type = 'simple box'.
Q4
C — A hub sends the message to every connected device, so each one receives it. The line should be pc.receive(message).
Q5
B — A switch sends a message to just one device. It is the hub that sends to all devices. The line should be switch.send_to(one_device).