VLAN

How to Set Up Basic VLANs on a Single Switch (IT vs HR Example)

VLAN

If you’re just starting with VLANs or documenting your lab setup, this guide walks you through a simple VLAN configuration using Cisco Packet Tracer or a real switch. We’ll isolate two departments — IT and HR — on the same switch using VLANs.

🧱 Network Scenario

  • Switch: Cisco 2960 (or any managed switch)
  • Departments: IT and HR
  • VLANs:
    • VLAN 10 – IT Department
    • VLAN 20 – HR Department
  • Devices:
    • PC1 (IT) – 192.168.10.1/24
    • PC2 (IT) – 192.168.10.2/24
    • PC3 (HR) – 192.168.20.1/24
    • PC4 (HR) – 192.168.20.2/24

VLAN Configuration(Cisco CLI)

enable
configure terminal

vlan 10
name IT
exit

vlan 20
name HR
exit

interface range fa0/1 – 2
switchport mode access
switchport access vlan 10
exit

interface range fa0/3 – 4
switchport mode access
switchport access vlan 20
exit

end
write memory

🖥️ IP Configuration on PCs

PCVLANIP AddressSubnet Mask
PC110192.168.10.1255.255.255.0
PC210192.168.10.2255.255.255.0
PC320192.168.20.1255.255.255.0
PC420192.168.20.2255.255.255.0

✅ Ping Behavior

  • ✅ PC1 ↔ PC2: Successful ping (same VLAN 10)
  • ✅ PC3 ↔ PC4: Successful ping (same VLAN 20)
  • ❌ PC1 ↔ PC3: Ping fails (different VLANs, no routing)
  • ❌ PC2 ↔ PC4: Ping fails (same reason)

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top