Lab Objective
Create two standard-range VLANs on a Catalyst switch, assign specific access ports to each, and verify that devices in different VLANs cannot communicate directly while devices in the same VLAN can.
Lab Purpose
Creating and assigning VLANs is one of the single most common configuration tasks performed on any Cisco switch, forming the basis for network segmentation in virtually every enterprise deployment.
Lab Topology
Switch1
Gi1/0/1 ---- PC-A (VLAN 10 - Accounting)
Gi1/0/2 ---- PC-B (VLAN 10 - Accounting)
Gi1/0/3 ---- PC-C (VLAN 20 - Marketing)
PC-A: 192.168.10.10/24
PC-B: 192.168.10.11/24
PC-C: 192.168.20.10/24Task 1: Create the VLANs
Create VLAN 10 named Accounting and VLAN 20 named Marketing.
Task 2: Assign Ports to VLANs
Configure Gi1/0/1 and Gi1/0/2 as access ports in VLAN 10, and Gi1/0/3 as an access port in VLAN 20.
Task 3: Verify VLAN Assignment
Confirm each port shows the correct VLAN membership.
Task 4: Verify Connectivity Within the Same VLAN
Confirm PC-A can ping PC-B, since both are in VLAN 10.
Task 5: Verify Isolation Between VLANs
Confirm PC-A cannot ping PC-C, since they are in different VLANs with no inter-VLAN routing configured.
Solution and Verification
Switch1(config)# vlan 10
Switch1(config-vlan)# name Accounting
Switch1(config-vlan)# exit
Switch1(config)# vlan 20
Switch1(config-vlan)# name Marketing
Switch1(config-vlan)# exitSwitch1(config)# interface range gigabitethernet1/0/1-2
Switch1(config-if-range)# switchport mode access
Switch1(config-if-range)# switchport access vlan 10
Switch1(config-if-range)# exit
Switch1(config)# interface gigabitethernet1/0/3
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 20Switch1# show vlan brief
VLAN Name Status Ports
---- ---------- --------- ---------------------
10 Accounting active Gi1/0/1, Gi1/0/2
20 Marketing active Gi1/0/3PC-A> ping 192.168.10.11
Reply from 192.168.10.11: bytes=32 time=1ms
Reply from 192.168.10.11: bytes=32 time=1ms
PC-A> ping 192.168.20.10
Request timed out.
Request timed out.
-- No route exists between VLAN 10 and VLAN 20
-- without inter-VLAN routing configured, and
-- Layer 2 alone never bridges separate VLANsKey Takeaway
Devices in the same VLAN communicate freely at Layer 2 regardless of which physical port they connect to, while devices in different VLANs are completely isolated from each other until a Layer 3 device is configured to route between them — VLAN creation alone provides segmentation, not connectivity.