Bird
Raised Fist0
Computer Networksknowledge~20 mins

Switching and bridging in Computer Networks - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Switching and Bridging Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does a network switch learn device locations?

In a local area network, how does a switch know which device is connected to which port?

AIt uses a MAC address table built by observing source addresses of incoming frames.
BIt assigns IP addresses to devices and maps them to ports.
CIt broadcasts all incoming frames to every port to find the device.
DIt uses DNS to resolve device names to ports.
Attempts:
2 left
💡 Hint

Think about how switches learn from the traffic they receive.

📋 Factual
intermediate
2:00remaining
What is the main purpose of a network bridge?

What does a network bridge do in a LAN?

AIt assigns IP addresses to devices on the network.
BIt connects two or more network segments and filters traffic based on MAC addresses.
CIt converts digital signals to analog signals for transmission.
DIt encrypts data to secure communication between devices.
Attempts:
2 left
💡 Hint

Think about how bridges help reduce traffic between network parts.

🔍 Analysis
advanced
2:00remaining
Why might a switch cause a broadcast storm in a network?

Consider a network with multiple switches connected in a loop without any special protocol. What problem can occur and why?

ABroadcast frames can circulate endlessly causing a broadcast storm because loops create multiple paths without control.
BBroadcast storms happen only if devices have duplicate IP addresses, unrelated to switches.
CSwitches will automatically convert broadcast frames to unicast frames to avoid storms.
DSwitches will block all traffic to prevent loops, causing network downtime.
Attempts:
2 left
💡 Hint

Think about what happens when frames keep circulating without a stop.

❓ Comparison
advanced
2:00remaining
Difference between a switch and a hub in handling traffic

How does a switch differ from a hub when forwarding data in a network?

ABoth switch and hub forward data only to the destination port but use different speeds.
BA switch broadcasts data to all ports, while a hub forwards data only to the destination port.
CBoth switch and hub broadcast data to all ports but switches encrypt the data.
DA switch forwards data only to the destination port, while a hub broadcasts data to all ports.
Attempts:
2 left
💡 Hint

Consider how each device treats incoming data frames.

❓ Reasoning
expert
2:00remaining
How does Spanning Tree Protocol (STP) prevent network loops?

In a network with multiple switches connected in loops, how does STP prevent broadcast storms?

ASTP encrypts broadcast frames to prevent them from looping.
BSTP increases the speed of all ports to handle loops efficiently.
CSTP detects loops and blocks some switch ports to create a loop-free logical topology.
DSTP assigns unique IP addresses to each switch to avoid loops.
Attempts:
2 left
💡 Hint

Think about how STP controls which paths are active.

Practice

(1/5)
1. What is the main purpose of a network switch in a local area network?
easy
A. To block all incoming traffic
B. To send data directly to the intended device
C. To assign IP addresses to devices
D. To connect different networks over the internet

Solution

  1. Step 1: Understand the role of a switch

    A switch connects devices within the same network and forwards data only to the device it is meant for.
  2. Step 2: Compare with other options

    Assigning IP addresses is done by a DHCP server, connecting different networks is done by routers, and blocking all traffic is not a switch's function.
  3. Final Answer:

    To send data directly to the intended device -> Option B
  4. Quick Check:

    Switch forwards data to correct device [OK]
Hint: Switch sends data only to the target device [OK]
Common Mistakes:
  • Confusing switch with router
  • Thinking switch assigns IP addresses
  • Believing switch blocks all traffic
2. Which of the following is the correct function of a network bridge?
easy
A. To connect and filter traffic between two network segments
B. To assign IP addresses to devices
C. To provide wireless access to devices
D. To encrypt data packets

Solution

  1. Step 1: Define the role of a bridge

    A bridge connects two or more network segments and controls the flow of data between them by filtering traffic.
  2. Step 2: Eliminate incorrect options

    Assigning IP addresses is DHCP's job, wireless access is provided by access points, and encryption is done by security protocols, not bridges.
  3. Final Answer:

    To connect and filter traffic between two network segments -> Option A
  4. Quick Check:

    Bridge connects segments and filters traffic [OK]
Hint: Bridge links segments and filters data flow [OK]
Common Mistakes:
  • Confusing bridge with DHCP server
  • Thinking bridge provides wireless access
  • Assuming bridge encrypts data
3. Consider a network with two segments connected by a bridge. If a device on segment A sends data to a device on segment B, what will the bridge do?
medium
A. It will forward the data only if the destination is on segment B
B. It will block the data to prevent traffic
C. It will broadcast the data to all devices on both segments
D. It will assign a new IP address to the data packet

Solution

  1. Step 1: Understand bridge filtering

    The bridge learns which devices are on each segment and forwards data only to the segment where the destination device is located.
  2. Step 2: Analyze options

    Blocking data prevents communication, broadcasting to all devices wastes bandwidth, and assigning IP addresses is not a bridge function.
  3. Final Answer:

    It will forward the data only if the destination is on segment B -> Option A
  4. Quick Check:

    Bridge forwards data only to correct segment [OK]
Hint: Bridge forwards data only to destination segment [OK]
Common Mistakes:
  • Thinking bridge blocks all data
  • Assuming bridge broadcasts to all devices
  • Confusing bridge with DHCP server
4. A network administrator sets up a switch but notices that data is being sent to all devices instead of just the intended one. What is the most likely cause?
medium
A. The switch is assigning IP addresses incorrectly
B. The switch is blocking all traffic due to security settings
C. The switch is operating in hub mode or has a faulty MAC address table
D. The switch is connected to a wireless access point

Solution

  1. Step 1: Identify switch behavior

    If a switch sends data to all devices, it behaves like a hub, often due to a missing or corrupted MAC address table.
  2. Step 2: Rule out other causes

    Blocking all traffic would stop communication, IP assignment is unrelated to forwarding, and wireless access points do not cause this behavior.
  3. Final Answer:

    The switch is operating in hub mode or has a faulty MAC address table -> Option C
  4. Quick Check:

    Switch flooding due to MAC table issue [OK]
Hint: Switch flooding means MAC table problem or hub mode [OK]
Common Mistakes:
  • Confusing IP assignment with forwarding issues
  • Thinking wireless access point causes flooding
  • Assuming security blocks cause flooding
5. In a large office, two separate departments have their own network segments connected by a bridge. The bridge is configured to filter traffic between them. Which of the following is a key benefit of this setup?
hard
A. It automatically assigns IP addresses to all devices in both departments
B. It allows all devices to receive every data packet for better communication
C. It encrypts all data passing between the two segments
D. It reduces unnecessary traffic between departments, improving network performance

Solution

  1. Step 1: Understand bridge filtering benefits

    By filtering traffic, the bridge prevents unnecessary data from crossing between segments, reducing congestion and improving speed.
  2. Step 2: Eliminate incorrect options

    Allowing all devices to receive all packets causes congestion, IP assignment is DHCP's role, and encryption is handled by security protocols, not bridges.
  3. Final Answer:

    It reduces unnecessary traffic between departments, improving network performance -> Option D
  4. Quick Check:

    Bridge filtering reduces traffic [OK]
Hint: Bridge filtering cuts traffic, boosts speed [OK]
Common Mistakes:
  • Thinking bridge broadcasts all data
  • Confusing bridge with DHCP server
  • Assuming bridge encrypts data
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard