Open the lab

[ YOUR LAB FILE ]

Download the starting topology, then work through the lesson in SwitchLab.

Download SwitchLab Lab (.swlab)

  1. Save the .swlab file without renaming its extension.
  2. Open SwitchLab. Import and export controls currently require a desktop-width window. On a smaller screen, Tools → Fit brings the topology into view.
  3. Select Import Sandbox (folder icon), choose the downloaded file, and confirm the device and cable counts below.
  4. Select a device, then choose Open device on desktop or its name in the bottom bar on smaller screens. Select CLI for switches/routers or Desktop → Terminal for PCs. Enter enable only when the prompt ends in >.
  5. Follow this page beside the simulator. Use a free account to export your work. Reimport the original download to restart; export any work you want to keep first.

Prerequisites

  • Recognize user EXEC (>), privileged EXEC (#), and configuration prompts.
  • Understand an IPv4 address and /24 subnet.

Follow the CCNA study path · Browse all SwitchLab labs

Topology

VLAN Guided Lab: actual SwitchLab starting topology
Starting topology captured in SwitchLab. Select the image to view it at full size.

6 devices · 5 links

Scenario

A training centre has two wiring closets. Students and staff use both closets. Configure VLAN 10 for STUDENTS and VLAN 20 for STAFF, and carry both over one interswitch trunk.

Objectives

  • Create VLANs 10 and 20 on both switches.
  • Assign each host-facing port to its department.
  • Carry both VLANs on the trunk and prove same-VLAN reachability.
  • Explain why different VLANs still need a router to communicate.

CCNA blueprint

200-301 v1.1 objectives — this lab covers the following specific skills, not every subtopic in the domain.

  • 2.1.a — Data access-port VLAN assignment across two switches (voice VLAN is outside this lab).
  • 2.2.a — Trunk ports carrying multiple VLANs.
  • 2.2.b — 802.1Q VLAN tagging on the interswitch link.

Starting information

  • SW1 and SW2 each use g0/1 for a student PC, g0/2 for a staff PC, and g0/8 for the interswitch link.
  • PC1 and PC3 are students; PC2 and PC4 are staff. The addressing and cable tables below are authoritative.
  • All switch ports begin in VLAN 1. No router or default gateway is configured. Physical link-up alone does not prove correct segmentation.
  • Before configuration, same-subnet student PCs can already ping through VLAN 1. Success means both correct VLAN/trunk state and connectivity, not merely a successful ping.
HostIPv4 addressMaskGateway
PC1192.168.10.10255.255.255.0None
PC2192.168.20.20255.255.255.0None
PC3192.168.10.30255.255.255.0None
PC4192.168.20.40255.255.255.0None
Device / portDevice / port
PC1 / eth0SW1 / g0/1
PC2 / eth0SW1 / g0/2
SW1 / g0/8SW2 / g0/8
PC3 / eth0SW2 / g0/1
PC4 / eth0SW2 / g0/2

Tasks

  1. Open SW1, select CLI, and enter enable, then configure terminal. Create vlan 10, name STUDENTS, exit; create vlan 20, name STAFF, exit. Repeat on SW2.
  2. On SW1 enter interface g0/1, switchport mode access, switchport access vlan 10, then exit. Assign g0/2 to VLAN 20 with the same command pattern. Repeat on SW2.
  3. On each switch select interface g0/8, enter switchport mode trunk and switchport trunk allowed vlan 10,20, then end. Leave the native VLAN at its default.
  4. Predict which peers should communicate. Run the show commands and all endpoint checks below. Save both switch configurations with copy running-config startup-config.

Useful commands

enable
configure terminal
vlan 10
name STUDENTS
interface g0/1
switchport mode access
switchport access vlan 10
switchport mode trunk
switchport trunk allowed vlan 10,20
show vlan brief
show interfaces trunk
copy running-config startup-config

Progressive hints

Hint 1

Compare each PC’s department with the VLAN of its directly connected port. Link-up only proves the cable is usable.

Hint 2

A VLAN must exist on both switches. The interswitch port must carry tagged traffic for both VLANs.

Hint 3

Use show vlan brief for g0/1 and g0/2 membership, then show interfaces trunk for g0/8 and the allowed VLAN list. Configure both ends.

Verification

  • On both switches, show vlan brief lists STUDENTS (10) with g0/1 and STAFF (20) with g0/2.
  • On both switches, show interfaces trunk shows g0/8 trunking and VLANs 10,20 allowed.
  • PC1 → 192.168.10.30 and PC3 → 192.168.10.10 succeed. PC2 → 192.168.20.40 and PC4 → 192.168.20.20 succeed.
  • PC1 → 192.168.20.20 fails because there is no inter-VLAN router. This negative control alone does not prove VLAN membership; inspect the switch tables too.

Solution / walkthrough

Show Solution

Use enable only from a > prompt; if already at #, begin with configure terminal.

SW1

Create the two VLANs, assign the edge ports, and allow both VLANs on the trunk. Save the working configuration.

enable
configure terminal
vlan 10
name STUDENTS
exit
vlan 20
name STAFF
exit
interface g0/1
switchport mode access
switchport access vlan 10
exit
interface g0/2
switchport mode access
switchport access vlan 20
exit
interface g0/8
switchport mode trunk
switchport trunk allowed vlan 10,20
end
copy running-config startup-config

SW2

Create the two VLANs, assign the edge ports, and allow both VLANs on the trunk. Save the working configuration.

enable
configure terminal
vlan 10
name STUDENTS
exit
vlan 20
name STAFF
exit
interface g0/1
switchport mode access
switchport access vlan 10
exit
interface g0/2
switchport mode access
switchport access vlan 20
exit
interface g0/8
switchport mode trunk
switchport trunk allowed vlan 10,20
end
copy running-config startup-config

Run every verification check above after the changes. A saved configuration alone does not prove packet delivery.

Previous lab

Commission a Workstation Access Link

Related labs

Related articles and tools

Next recommended lab

Repair a Workstation in the Wrong VLAN