📖 Scenario: You are setting up a small office network. You want to understand different ways computers can be connected to share information efficiently and reliably.
🎯 Goal: Build a simple representation of four common network topologies: star, bus, ring, and mesh. You will create data structures that show how devices connect in each topology.
📋 What You'll Learn
Create a dictionary named devices with exactly four devices named 'PC1', 'PC2', 'PC3', and 'PC4'.
Create a variable named central_hub with the value 'Switch' to represent the central device in the star topology.
Create a dictionary named topologies that maps each topology name ('star', 'bus', 'ring', and 'mesh') to a list of connections representing how devices are linked.
Add a final variable named description with a short explanation string about the star topology.
💡 Why This Matters
🌍 Real World
Understanding network topologies helps in designing and troubleshooting computer networks in offices, schools, and homes.
💼 Career
Network administrators and IT professionals use knowledge of topologies to plan efficient and reliable network layouts.
Progress0 / 4 steps
1
Create the devices dictionary
Create a dictionary called devices with these exact keys and values: 'PC1': 'Computer 1', 'PC2': 'Computer 2', 'PC3': 'Computer 3', and 'PC4': 'Computer 4'.
Computer Networks
Hint
Use curly braces {} to create a dictionary with the given keys and values.
2
Add the central hub variable
Create a variable called central_hub and set it to the string 'Switch' to represent the central device in the star topology.
Computer Networks
Hint
Assign the string 'Switch' to the variable central_hub.
3
Define the topologies dictionary
Create a dictionary called topologies with these keys: 'star', 'bus', 'ring', and 'mesh'. Each key should map to a list of tuples showing connections between devices. Use the following connections exactly:
'star': connect each device to central_hub (e.g., ('PC1', central_hub)) 'bus': connect devices in a line: ('PC1', 'PC2'), ('PC2', 'PC3'), ('PC3', 'PC4') 'ring': connect devices in a circle: ('PC1', 'PC2'), ('PC2', 'PC3'), ('PC3', 'PC4'), ('PC4', 'PC1') 'mesh': connect every device to every other device (all pairs).
Computer Networks
Hint
Use lists of tuples to represent connections. For mesh, list all unique pairs of devices.
4
Add a description for the star topology
Create a variable called description and set it to the string 'In a star topology, all devices connect to a central hub.' to explain the star network.
Computer Networks
Hint
Assign the exact string to the variable description.
Practice
(1/5)
1. Which network topology connects all devices to a single central device like a switch or hub?
easy
A. Bus topology
B. Star topology
C. Ring topology
D. Mesh topology
Solution
Step 1: Understand the central device concept
Star topology connects all devices to one central device, which manages communication.
Step 2: Compare with other topologies
Bus uses a single cable, ring connects devices in a circle, mesh connects devices directly to many others.
Final Answer:
Star topology -> Option B
Quick Check:
Central device = Star topology [OK]
Hint: Central device means star topology [OK]
Common Mistakes:
Confusing bus with star because both use cables
Thinking ring has a central device
Mixing mesh with star due to multiple connections
2. Which of the following is the correct description of a bus topology?
easy
A. Devices connected in a closed loop
B. Devices connected to a central hub
C. All devices connected to a single cable
D. Each device connected to every other device
Solution
Step 1: Recall bus topology structure
Bus topology connects all devices along a single communication cable.
Step 2: Eliminate other options
Closed loop is ring, every device connected is mesh, central hub is star.
Final Answer:
All devices connected to a single cable -> Option C
Quick Check:
Single cable = Bus topology [OK]
Hint: Bus means one main cable for all devices [OK]
Common Mistakes:
Confusing ring (closed loop) with bus
Thinking mesh is a single cable
Mixing star's central hub with bus
3. In a ring topology with 5 devices, if one device fails, what happens to the network communication?
medium
A. Communication switches to a central hub
B. Only the failed device loses connection
C. Communication continues normally
D. The entire network communication is disrupted
Solution
Step 1: Understand ring topology communication
Devices are connected in a closed loop; data passes through each device.
Step 2: Analyze failure impact
If one device fails, the loop breaks, stopping communication for all devices.
Final Answer:
The entire network communication is disrupted -> Option D
Quick Check:
One failure breaks ring loop = disruption [OK]
Hint: Ring breaks if one device fails [OK]
Common Mistakes:
Assuming only failed device loses connection
Thinking ring has a backup path like mesh
Confusing with star topology behavior
4. A network uses a mesh topology but experiences frequent data collisions. What is the most likely cause?
medium
A. There is no central device to control traffic
B. Devices are connected in a ring causing loops
C. Devices are connected in a single cable
D. Only one device is connected to the network
Solution
Step 1: Understand mesh topology traffic
Mesh connects devices directly; without control, many devices send data simultaneously.
Step 2: Identify cause of collisions
Without a central controller or protocol, data packets collide causing errors.
Final Answer:
There is no central device to control traffic -> Option A
Quick Check:
No traffic control = collisions in mesh [OK]
Hint: No controller causes collisions in mesh [OK]
Common Mistakes:
Confusing mesh with bus single cable
Thinking ring causes collisions here
Assuming one device can't cause collisions
5. A company wants a network where each device connects to every other device directly for maximum reliability. Which topology should they choose and why?
hard
A. Mesh, because every device connects directly to all others
B. Star, because it uses a central hub for easy management
C. Bus, because it uses a single cable to connect all devices
D. Ring, because devices form a closed loop for data flow
Solution
Step 1: Identify topology with direct device-to-device connections
Mesh topology connects every device directly to all others, ensuring reliability.
Step 2: Compare other topologies for reliability
Star depends on central hub, bus uses one cable, ring forms a loop but not all direct connections.
Final Answer:
Mesh, because every device connects directly to all others -> Option A
Quick Check:
Direct connections = Mesh topology [OK]
Hint: Direct all-to-all connections mean mesh [OK]
Common Mistakes:
Choosing star for reliability ignoring central point failure
Thinking bus provides direct connections
Confusing ring loop with full direct connections
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.