📝 VLAN configuration switch ports (10 MCQs)
Configuring Access and Trunk Modes on Switch Ports
Switch-port VLAN configuration controls how Ethernet frames enter and leave a virtual LAN. An access port normally carries one user VLAN and connects to an end device. A trunk port transports traffic for multiple VLANs between network devices. Correct port mode, VLAN membership, and trunk settings ensure that frames remain associated with the intended broadcast domain across the managed Ethernet switching environment.
Access VLAN, Native VLAN and Allowed VLAN Lists
An access port has an assigned access VLAN for untagged endpoint traffic. An 802.1Q trunk identifies VLANs with tags, while a native VLAN may carry untagged traffic according to the trunk configuration. An allowed VLAN list limits which VLANs may cross that trunk and reduces unnecessary Layer 2 propagation.
Port Configuration and Frame Treatment
An administrator creates or verifies the VLAN, selects the switch interface, and configures it as access or trunk. The access VLAN is assigned for endpoint ports. On trunks, the administrator defines tagging behaviour, native VLAN expectations, and allowed VLANs. Both ends should use compatible trunk settings to avoid traffic loss or misclassification.
Configuring a User Port and a Switch Uplink
Suppose port 1 connects a staff computer and port 24 connects another switch. Configure port 1 as an access port in VLAN 10. Configure port 24 as an 802.1Q trunk and allow VLANs 10 and 20. Staff frames can then cross the uplink while retaining their VLAN identification correctly.
Preventing VLAN Mismatch and Unwanted Traffic
Correct configuration preserves VLAN separation across multiple switches and avoids accidental mixing of user groups. A native VLAN mismatch can cause untagged frames to be assigned differently at the two ends. Restricting allowed VLANs also limits unnecessary broadcast traffic and reduces the chance of carrying unused VLANs across an uplink.
Common Errors in Switch-Port VLAN Settings
'Every switch port should be a trunk' is incorrect because endpoint devices normally use access ports. 'An access port carries all VLANs' is incorrect because it belongs to one access VLAN. 'A trunk automatically permits only required VLANs' is incorrect because allowed VLAN lists may need explicit configuration and verification.
Reading VLAN Port Configuration Questions
For exam scenarios, identify which interfaces connect end devices and which connect switches. Select access mode for ordinary endpoints and trunk mode for inter-switch links carrying multiple VLANs. Interpret the access VLAN, native VLAN, and allowed VLAN list, and check both ends for consistent trunk configuration at both ends of the link.
Access and Trunk Port Configuration Terms
- Access port - Carries endpoint traffic for one VLAN.
- Trunk port - Carries multiple VLANs.
- Native VLAN - VLAN associated with untagged trunk frames.
- Allowed list - Permitted VLANs on a trunk.
- Port mode - Defines access or trunk operation.
- Mismatch - Inconsistent VLAN settings.
📝 All VLAN configuration switch ports MCQs
Q1. What is the primary function of a network hub in a LAN?
📖 Explanation: A hub works at the physical layer and simply copies any electrical signal it receives on one port to all other ports. This behavior means it repeats incoming signals to every other port, creating a single shared collision domain for all devices attached to the hub.
Q2. In a LAN where a broadcast storm occurs due to a switching loop, which feature should be enabled to prevent the storm?
📖 Explanation: Spanning Tree Protocol (STP) detects loops in the network topology and blocks redundant paths, thereby preventing broadcast storms caused by switching loops. By enabling STP, the switch automatically determines a loop‑free tree structure, ensuring that broadcast frames do not circulate endlessly.
Q3. If a host in VLAN 10 attempts to communicate with a host in VLAN 20 without any routing device present, what is the most likely outcome?
📖 Explanation: Switches forward frames based on MAC addresses within the same VLAN. Because VLAN 10 and VLAN 20 are separate broadcast domains, the switch has no routing capability to move traffic between them. Consequently, frames from VLAN 10 are discarded when they encounter a VLAN 20 destination, preventing communication.
Q4. Which statement correctly differentiates a hub from a switch?
📖 Explanation: A switch examines the destination MAC address of each incoming Ethernet frame and consults its MAC address table to forward the frame only to the appropriate port. This selective forwarding contrasts with a hub, which indiscriminately repeats the signal to all ports, causing a single shared collision domain.
Q5. When VLAN trunking is enabled on an inter‑switch link, which outcome is most accurate?
📖 Explanation: VLAN trunking (typically using 802.1Q) adds a tag to each frame indicating its VLAN ID, enabling a single physical connection to carry traffic for several VLANs simultaneously. This preserves the separation of broadcast domains while optimizing link utilization, as multiple VLANs share the same physical medium.
Q6. Connecting two switches with three parallel links but without link aggregation is most likely to cause which problem?
📖 Explanation: Three parallel links create multiple redundant paths between the switches. Without a protocol such as LACP to aggregate them, the switches may treat each link as separate, forming a loop. This loop can cause broadcast frames to circulate indefinitely, resulting in a broadcast storm and potential network collapse.
Q7. In VLAN configuration, which tag is added to Ethernet frames to identify the VLAN membership?
📖 Explanation: The IEEE 802.1Q standard defines a four‑byte tag inserted into the Ethernet frame header. This tag carries the VLAN Identifier (VID), which uniquely identifies the VLAN to which the frame belongs, allowing switches to segregate traffic according to VLAN membership.
Q8. How does a switch learn MAC addresses, and how does this learning affect its forwarding decisions?
📖 Explanation: When a frame arrives on a switch port, the switch records the source MAC address and the associated port in its MAC address table. Future frames destined for that MAC are then forwarded directly to the recorded port, reducing unnecessary flooding and improving efficiency.
Q9. A trunk port is configured with native VLAN 1 and allowed VLANs 10, 20, 30. If a host in VLAN 20 sends an untagged frame due to a misconfiguration, what does the switch do with that frame?
📖 Explanation: Untagged frames received on a trunk port are placed into the native VLAN, which by default is VLAN 1 unless otherwise specified. Therefore, a mis‑tagged frame from VLAN 20 will be treated as belonging to VLAN 1 and processed accordingly, potentially causing connectivity issues for the originating host.
Q10. If an access port is set for VLAN 40 but receives a frame tagged for VLAN 30, what action will the switch take?
📖 Explanation: Access ports are designed to handle untagged frames belonging to a single VLAN. When a tagged frame arrives that does not match the configured VLAN, the switch treats it as an invalid packet and discards it to maintain VLAN integrity and prevent accidental cross‑VLAN traffic.