Sample questions
Question 1Easy
What problem does the Spanning Tree Protocol (STP) solve?
- IP address conflicts
- Routing loops between autonomous systems
- Slow DNS lookups
- Layer-2 switching loops
Answer: D. Layer-2 switching loops
Explanation
STP blocks redundant ports so that exactly one active path exists between switches, preventing broadcast storms and MAC table instability.
Step-by-step solution
- Redundant physical links between switches can create a loop in the topology.
- Ethernet frames have no TTL, so a broadcast circulating around such a loop never expires on its own.
- The Spanning Tree Protocol blocks just enough redundant ports to leave exactly one active, loop-free path, preventing broadcast storms.
Why the other options are wrong
- A. IP address conflicts are a separate configuration issue, unrelated to switching loops.
- B. Routing loops between autonomous systems are prevented by BGP's AS_PATH mechanism, a completely different layer and problem.
- C. DNS lookup speed has nothing to do with switch topology or loops.
Tip: STP's whole job: keep exactly one active path between any two switches, blocking the rest.
Question 2Easy
How does a layer-2 switch decide which port to forward a frame on?
- By looking up the destination IP in a routing table
- By checking the TCP port number
- From its MAC address table
- By flooding every frame to all ports
Answer: C. From its MAC address table
Explanation
A switch forwards on MAC addresses learned from earlier frames; only unknown or broadcast destinations are flooded.
Step-by-step solution
- A layer-2 switch maintains a table mapping MAC addresses to the ports they are reachable through.
- When a frame arrives, the switch looks up the destination MAC in that table.
- If found, it forwards the frame out only that one port instead of every port.
Why the other options are wrong
- A. Looking up a routing table by IP is what a router does, not a layer-2 switch.
- B. TCP port numbers are a transport-layer detail the switch never even looks at.
- D. Only unknown or broadcast frames get flooded; known destinations go straight out the learned port.
Tip: Switch forwarding decision = MAC address table lookup, built from observed source addresses.
Question 3Easy
What is the main purpose of a VLAN?
- To create separate broadcast domains
- To increase the speed of every port
- To encrypt the traffic exchanged between switches
- To assign IP addresses to hosts automatically from a pool
Answer: A. To create separate broadcast domains
Explanation
Ports in different VLANs cannot exchange frames directly; traffic between VLANs must be routed.
Step-by-step solution
- A VLAN groups switch ports into separate logical broadcast domains on the same physical hardware.
- Devices in different VLANs cannot exchange broadcast or unicast frames directly without routing.
- This lets administrators group devices by function or department without needing separate physical switches.
Why the other options are wrong
- B. VLANs do not change any port's physical speed; that is unrelated to their purpose.
- C. VLANs provide logical separation, not encryption; traffic within a VLAN is not automatically protected by any cipher.
- D. Automatic IP assignment is DHCP's job, unrelated to VLAN configuration.
Tip: VLAN = logical broadcast domain separation on shared physical switch hardware.
Question 4Easy
Which device can connect two LAN segments and filter frames by MAC address, like a switch with few ports?
- Hub
- Bridge
- Modem
- Repeater
Answer: B. Bridge
Explanation
A bridge is a layer-2 device that learns MAC addresses and forwards only frames destined for the other segment.
Step-by-step solution
- A bridge is a layer-2 device, like a switch, that learns MAC addresses and filters frames accordingly.
- Historically bridges had only a few ports, connecting two or a small number of LAN segments.
- A modern switch is essentially a multi-port bridge, which is why the term 'bridge' is less commonly used today.
Why the other options are wrong
- A. A hub has no addressing awareness at all and simply repeats signals to every port.
- C. A modem converts between digital data and signals suited to a particular medium, such as telephone lines; it does not filter by MAC address.
- D. A repeater just regenerates a signal at the physical layer, with no address filtering.
Tip: Bridge = early/simple version of a switch: same MAC-learning, MAC-filtering concept, just fewer ports.
Question 5Medium
In classic STP, which port state forwards user frames?
- Blocking
- Forwarding
- Learning
- Listening
Answer: B. Forwarding
Explanation
Ports move blocking -> listening -> learning -> forwarding; only forwarding ports pass data frames (learning ports only build the MAC table).
Step-by-step solution
- STP moves a port through several states before it can carry user data: blocking, listening, learning, forwarding.
- Blocking, listening and learning all exist just to avoid loops while the topology is still settling.
- Only the forwarding state actually passes ordinary user frames.
Why the other options are wrong
- A. Blocking ports deliberately drop all data frames to prevent a loop; they never forward anything.
- C. Learning ports build the MAC address table from incoming frames but still do not forward user data yet.
- D. Listening ports are just preparing to participate in STP calculations; they also do not forward data yet.
Tip: Only the forwarding state passes user data; the earlier states exist purely to avoid temporary loops during convergence.
Question 6Medium
Which statement correctly compares a switch and a router?
- A router forwards using MAC addresses only, while a switch reads and rewrites the IP header of every packet
- A router floods broadcasts to all of its attached networks
- Switch: MACs within a LAN; router: IPs between networks
- A switch separates broadcast domains by default, a router does not
Answer: C. Switch: MACs within a LAN; router: IPs between networks
Explanation
Switches (layer 2) form one broadcast domain per VLAN; routers (layer 3) block broadcasts and choose paths between networks.
Step-by-step solution
- A switch forwards frames within one LAN using MAC addresses.
- A router forwards packets between different networks using IP addresses.
- This single division, MAC within a LAN versus IP between networks, is the defining difference between the two devices.
Why the other options are wrong
- A. This swaps the two devices' real roles entirely; it is backwards.
- B. Routers specifically do not forward broadcasts between their interfaces; that is exactly what separates broadcast domains.
- D. This is also backwards; routers naturally separate broadcast domains (one per interface), while plain switches do not, unless VLANs are configured.
Tip: Switch = layer 2, MACs, within a LAN. Router = layer 3, IPs, between networks.
Question 7Medium
What is the difference between cut-through and store-and-forward switching?
- They are identical but use different cables
- Cut-through checks the CRC before forwarding anything, while store-and-forward never verifies the frame check sequence at all
- Store-and-forward is used only by routers, never by switches
- Cut-through forwards early; store-and-forward checks the FCS first
Answer: D. Cut-through forwards early; store-and-forward checks the FCS first
Explanation
Cut-through has lower latency but may forward corrupted frames; store-and-forward drops frames with bad FCS.
Step-by-step solution
- Cut-through switching starts forwarding a frame as soon as it has read the destination address, before the rest of the frame has even arrived.
- Store-and-forward switching waits for the entire frame to arrive and checks its FCS before forwarding.
- Cut-through trades reliability for lower latency; store-and-forward trades latency for guaranteed error-checking.
Why the other options are wrong
- A. They are genuinely different switching methods with different latency and error-handling tradeoffs, not just a cabling difference.
- B. This reverses the real behaviour: cut-through does not wait to check the FCS, while store-and-forward does check it before forwarding.
- C. Store-and-forward is a switching method used by switches too, not something exclusive to routers.
Tip: Cut-through = fast but may forward errors; store-and-forward = slower but always checks the FCS first.
Question 8Medium
Hosts in VLAN 10 and VLAN 20 on the same switch need to communicate. What is required?
- Changing both hosts to the same MAC address
- A hub between the two VLANs
- A router or layer-3 switch
- Nothing; they share the switch
Answer: C. A router or layer-3 switch
Explanation
VLANs are separate broadcast domains (usually separate subnets), so inter-VLAN traffic must be routed, e.g. router-on-a-stick or an SVI on a layer-3 switch.
Step-by-step solution
- VLANs are separate broadcast domains, usually mapped to separate IP subnets.
- Hosts in different VLANs cannot exchange frames directly at layer 2, even on the same physical switch.
- A router, or a layer-3 switch with an SVI for each VLAN, must forward traffic between them.
Why the other options are wrong
- A. MAC addresses have nothing to do with VLAN membership or inter-VLAN routing; changing them would not help at all.
- B. A hub operates at layer 1 and has no concept of VLANs; it could not route between them either.
- D. VLANs are deliberately separate broadcast domains; sharing a physical switch does not let them talk directly without routing.
Tip: Same VLAN = switch can forward directly. Different VLANs = need a router or layer-3 switch (SVI) in between.
Question 9Hard
What does an attacker achieve by flooding a switch with frames from thousands of fake source MAC addresses?
- The switch shuts down all of its VLANs to protect itself from the flood
- The switch floods frames like a hub
- The attacker learns the admin password stored in the switch configuration file
- The switch begins routing between VLANs without a router
Answer: B. The switch floods frames like a hub
Explanation
This is MAC (CAM table) flooding. Port security limiting learned MACs per port is the usual defence.
Step-by-step solution
- An attacker floods the switch with frames carrying thousands of fake source MAC addresses.
- The switch's MAC address table fills up with these fake entries and cannot hold any more real ones.
- Unable to find real destinations in its table, the switch starts flooding every frame to every port, just like a hub, letting the attacker eavesdrop on traffic not meant for them.
Why the other options are wrong
- A. Switches do not automatically shut down VLANs as a defence; that would require specific security configuration, not default behaviour.
- C. Overflowing the MAC table reveals nothing about any stored password; that is an unrelated kind of attack entirely.
- D. A switch never spontaneously gains routing capability; MAC table overflow only affects layer-2 forwarding behaviour.
Tip: MAC (CAM table) flooding attack: fill the table with junk so the switch floods everything; defend with port security limiting learned MACs per port.
Question 10Hard
Which IEEE standard provides port-based network access control, authenticating a device before its switch port forwards traffic?
- 802.1D
- 802.1Q
- 802.3af
- 802.1X
Answer: D. 802.1X
Explanation
- 802.1X uses EAP with an authentication server (often RADIUS);
- 802.1D is spanning tree and 802.3af is Power over Ethernet.
Step-by-step solution
- 802.1X requires a device to authenticate before its switch port forwards any regular traffic.
- Authentication typically happens via EAP, exchanged with a RADIUS authentication server.
- Only after successful authentication does the port begin forwarding normal traffic.
Why the other options are wrong
- A. 802.1D is the original Spanning Tree Protocol standard, unrelated to authentication.
- B. 802.1Q is VLAN tagging, a different standard entirely from authentication.
- C. 802.3af is Power over Ethernet (PoE), unrelated to network access authentication.
Tip: 802.1X = port-based authentication (EAP + RADIUS); do not confuse with 802.1Q (VLAN tagging) or 802.1D (STP).
Practise all 24 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →