VLANs & Trunking Lab
Build isolated departmental broadcast domains, configure dynamic and static 802.1Q inter-switch trunks, and establish router-on-a-stick subinterface routing.
Interactive Lab Exercises
Complete each lab exercise in order. Your CLI configurations are evaluated against real-time scoring criteria.
Multi-Switch VLAN Database & Access Port Binding
Segment campus traffic into isolated departmental broadcast domains across Catalyst switches S1, S2, and S3. Assign access switchports to contain ARP flooding.
Scoring Checkpoints (Evaluated by Engine):
- VLANs 10, 20, 30, and 99 registered in switch databases with exact department names
- FastEthernet access ports assigned to Faculty, Students, and Guest departments
- Broadcast traffic strictly contained within matching VLAN boundaries
- Verify operational access states using show vlan brief
Fixing the Trunk Leak between S1, S2, and S3
Take over the switches after a messy setup by the junior tech. Turn off auto-negotiation, change the native VLAN to 99 to quiet down CDP warnings, and clean up the allowed VLAN list so only needed traffic crosses the link.
Scoring Checkpoints (Evaluated by Engine):
- Set uplink ports to permanent trunk mode by hand
- Move the native VLAN to 99 on both ends of the cables
- Verify that CDP native VLAN mismatch messages stop popping up
- Limit allowed VLANs to 10, 20, 30, and 99 on all trunks
- Confirm PCs in VLAN 10 can ping each other across switches
Router-on-a-Stick Inter-VLAN Routing (802.1Q)
Connect a multi-VLAN campus switch to an enterprise router over a single trunk link. Configure 802.1Q logical subinterfaces to route packets between isolated subnets.
Scoring Checkpoints (Evaluated by Engine):
- Switch uplink to router configured as an 802.1Q trunk
- Router subinterfaces created with matching 802.1Q VLAN encapsulation tags
- Default gateway IP addresses assigned to corresponding logical subinterfaces
- Cross-VLAN ping succeeds between hosts in different departmental subnets
In a flat campus network where all computers connect to one unsegmented switch infrastructure, every single broadcast frame floods out of every connected port. When a workstation broadcasts an ARP request or a printer advertises its services, every computer on the local area network must interrupt its processor to inspect the frame. As organizations grow beyond a few dozen machines, broadcast storms and unnecessary network traffic degrade switch forwarding performance and create serious security risks.
Virtual Local Area Networks (VLANs) solve this fundamental architectural challenge. By grouping switchports into logical broadcast domains, network engineers can isolate departments such as Human Resources, Engineering, and Guest Wi-Fi on the exact same physical Catalyst switch hardware. Workstations inside VLAN 10 cannot hear broadcasts or exchange traffic directly with workstations in VLAN 20, even if their patch cables plug into adjacent ports on the same switch.
How 802.1Q Frame Tagging and Trunk Links Work
When network traffic must travel between switches in different buildings or wiring closets, running dedicated physical cables for every individual VLAN quickly becomes impractical. Instead, network engineers configure high-speed 802.1Q trunk links across switch-to-switch connections.
Under the IEEE 802.1Q standard, the sending switch inserts a 4-byte header tag into standard Ethernet frames before transmitting them across the trunk cable. This tag contains a 12-bit VLAN Identifier (VID), allowing up to 4,094 distinct virtual networks. When the receiving switch accepts the tagged frame, it reads the VID, strips the 4-byte header tag, and forwards the original clean Ethernet frame solely to the designated access ports within that specific VLAN.
The Native VLAN and Security Best Practices
Every 802.1Q trunk connection defines one special VLAN known as the Native VLAN. Untagged frames that arrive on a trunk port are automatically directed to this native broadcast domain, and any traffic leaving the switch for this VLAN is sent across the trunk without an 802.1Q tag header. By default, Cisco Catalyst switches assign Native VLAN 1 to all ports.
Leaving the default configuration active introduces a well-known vulnerability called VLAN Hopping, where an attacker can craft double-tagged 802.1Q frames to bypass switch security boundaries. To harden the local network against attack, enterprise security standards require moving the Native VLAN to an unused, dedicated VLAN ID (such as VLAN 99) and ensuring that both ends of every trunk link use the identical Native VLAN number. If one switch uses Native VLAN 1 while its neighbor uses Native VLAN 99, Spanning Tree Protocol (STP) enters an inconsistent state and blocks the port to prevent forwarding loops.
Inter-VLAN Routing with Router-on-a-Stick
Because switches maintain complete Layer 2 isolation between different VLANs, hosts residing in separate VLANs cannot communicate without a Layer 3 routing boundary. In the classic Router-on-a-Stick topology, a single physical GigabitEthernet link connects the core switch to an enterprise router.
The physical router interface is divided into multiple logical subinterfaces (for example, Gig0/0.10 and Gig0/0.30). Each subinterface binds to a specific 802.1Q VLAN tag and acts as the default gateway IP address for that department. When a computer in VLAN 10 sends a packet to a computer in VLAN 30, the frame travels up the trunk link to the router, the router changes the Layer 2 tag and destination MAC address, and forwards the packet back down the trunk to the target host in VLAN 30.
Campus VLAN Addressing and Subnet Plan
Use the following engineering layout to plan your access port assignments and gateway addresses across the three interactive practice scenarios:
| Device | Port / Subinterface | VLAN ID | Department / Role | Subnet / IP Gateway | Assigned Host Port Range |
|---|---|---|---|---|---|
| S1, S2, S3 | Fa0/11 - Fa0/17 | 10 | Faculty / Staff | 172.17.10.0 /24 | Faculty Workstations (PC1, PC4) |
| S1, S2, S3 | Fa0/18 - Fa0/24 | 20 | Students | 172.17.20.0 /24 | Student Computer Labs (PC2, PC5) |
| S1, S2, S3 | Fa0/6 - Fa0/10 | 30 | Guest / Default | 172.17.30.0 /24 | Visitor Workstations (PC3, PC6) |
| S1, S2, S3 | Gig0/1 - Gig0/2 | 99 | Management & Native | 172.17.99.0 /24 | Inter-Switch 802.1Q Trunks |
| Router R1 | Gig0/0.10 & .30 | 10, 30 | Subinterface Gateways | 172.17.10.1 & .30.1 | Single Trunk Cable to Switch S1 |
Key Engineering Verification Checklist
Before submitting your lab for scoring assessment, verify the following operational states in your terminal:
- Verify the VLAN database with
show vlan briefto ensure all VLAN IDs and names match specifications exactly. - Inspect active trunk interfaces with
show interfaces trunkto confirm encapsulation mode is 802.1q and Native VLAN is set to 99. - Confirm that the trunk allowed list only permits required traffic across inter-switch uplinks.
- On the router, inspect routing tables and subinterfaces with
show ip interface briefto verify that each subinterface is up/up with its assigned IP address.
