Learn VLANs the practical way: build them, route between them, break them with VLAN hopping, then lock them down. In this hands-on Cisco lab we configure VLANs, access ports, 802.1Q trunks and router-on-a-stick, then perform two classic VLAN hopping attacks, switch spoofing (DTP) and double tagging, and fix them step by step.
VLANs are not a security boundary by default. DTP auto-negotiation, native VLAN 1 and unused open ports let an attacker jump straight into another VLAN. This video shows exactly how, and how to harden every switch port.
What you will learn:
✔ What a VLAN is: broadcast domains, access vs trunk ports, 802.1Q tagging
✔ Create VLANs and assign access ports
✔ Configure 802.1Q trunks and verify with show interfaces trunk
✔ Inter-VLAN routing with router-on-a-stick (subinterfaces + encapsulation dot1Q)
✔ Attack #1: switch spoofing with DTP
✔ Attack #2: double tagging via the native VLAN
✔ The fix: switchport nonegotiate, blackhole VLAN, shutdown unused ports, native VLAN 999, allowed VLAN pruning
✔ VLAN security checklist: port security and 802.1X
CHAPTERS:
0:00 Intro
0:20 What is a VLAN?
0:56 Lab Topology
1:20 Addressing Plan
1:37 Step 1 - Create VLANs & Access Ports
2:01 Step 2 - Configure Trunks
2:14 Step 3 - Router-on-a-Stick
2:32 Step 4 - Test Inter-VLAN Routing
3:02 Why VLANs Are Not Secure by Default
3:31 Attack 1 - Switch Spoofing (DTP)
4:07 Attack 2 - Double Tagging
4:43 The Fix - Harden Switch Ports
5:34 VLAN Security Best Practices
6:11 Recap
6:32 Outro
KEY COMMANDS:
! VLANs + access ports
vlan 10
name SALES
interface fa0/1
switchport mode access
switchport access vlan 10
! Trunk
interface g0/1
switchport mode trunk
! Router-on-a-stick
interface g0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
! Hardening
vlan 999
name BLACKHOLE
interface range fa0/3 - 24
switchport mode access
switchport nonegotiate
switchport access vlan 999
shutdown
interface range g0/1 - 2
switchport nonegotiate
switchport trunk native vlan 999
switchport trunk allowed vlan 10,20
More networking labs: https://netacademy.ge
Previous lab - BGP Hijack & Defense:
Previous lab - Site-to-Site IPsec VPN:
Which attack should we break next? Tell us in the comments!
© netacademy.ge - All rights reserved.
#VLAN #CCNA #NetworkSecurity