CompTIA Network+ Network+ Ethernet Switching and VLANs 2 — Questions and Answers
Question 1: A switch receives a frame destined for a MAC address not in its CAM table. What does it do?
- Drops the frame
- Floods the frame out all ports except the receiving port (Correct answer)
- Sends an ARP request
- Forwards the frame to the default gateway
Correct answer: Floods the frame out all ports except the receiving port
When a switch cannot find a destination MAC in its CAM table, it floods the frame out all ports except the one it arrived on — this is called unknown unicast flooding.
Question 2: Which IEEE standard defines the 802.1Q VLAN tagging mechanism?
- IEEE 802.1D
- IEEE 802.1Q (Correct answer)
- IEEE 802.1X
- IEEE 802.1W
Correct answer: IEEE 802.1Q
IEEE 802.1Q defines the standard for VLAN tagging, inserting a 4-byte tag into Ethernet frames to carry VLAN membership information across trunk links.
Question 3: What is the size of the VLAN ID field in an 802.1Q tag?
- 8 bits
- 10 bits
- 12 bits (Correct answer)
- 16 bits
Correct answer: 12 bits
The 802.1Q VLAN ID field is 12 bits, supporting VLAN IDs from 0 to 4095 (4,096 possible VLANs).
Question 4: A port configured as an access port receives a frame with an 802.1Q tag. What should a properly configured switch do?
- Forward it normally
- Drop the frame (Correct answer)
- Strip the tag and forward
- Send the frame to the native VLAN
Correct answer: Drop the frame
Access ports expect untagged frames; a tagged frame arriving on an access port is typically dropped as it indicates a misconfiguration or security issue.
Question 5: Which spanning tree port state allows a port to learn MAC addresses but NOT forward user traffic?
- Blocking
- Listening
- Learning (Correct answer)
- Forwarding
Correct answer: Learning
The Learning state allows the switch to populate its MAC address table from incoming frames but does not yet forward user data traffic.
Question 6: What type of switch port carries traffic for multiple VLANs simultaneously?
- Access port
- Trunk port (Correct answer)
- Hybrid port
- Monitor port
Correct answer: Trunk port
A trunk port carries tagged traffic for multiple VLANs simultaneously, typically used for switch-to-switch or switch-to-router links.
Question 7: Which attack exploits the switch's default behavior of adding all VLANs to trunk ports?
- MAC flooding
- ARP spoofing
- VLAN hopping (Correct answer)
- DHCP starvation
Correct answer: VLAN hopping
VLAN hopping exploits dynamic trunking or double-tagging to gain access to VLANs the attacker should not be on, bypassing VLAN segmentation.
A switch receives a frame destined for a MAC address not in its CAM table.
What does it do?