VLAN Technical Guide
VLAN Technical Guide
TABLE OF CONTENTS
Introduction to VLANs........................................................................................................ 3
What is a VLAN?........................................................................................................... 3
VLAN Configuration............................................................................................................ 3
Basic VLAN Configuration on Cisco Switch......................................................................3
Trunking Between Switches............................................................................................4
Inter-VLAN Routing (Router-on-a-Stick Method)..............................................................5
Layer 3 Switching for VLAN Routing................................................................................5
VLAN Best Practices........................................................................................................... 6
Troubleshooting VLANs...................................................................................................... 6
Conclusion......................................................................................................................... 6
2
VLAN Technical Guide
INTRODUCTION TO VLANS
WHAT IS A VLAN?
VLAN stands for Virtual Local Area Network.
Operates at Layer 2 (Data Link Layer) but can interact with Layer 3 (Network
Layer) through routing.
Access ports are assigned to a single VLAN and forward only traffic from that
VLAN.
Trunk ports carry traffic from multiple VLANs using 802.1Q tagging.
TYPES OF VLANS
VLAN Type Description
VLAN CONFIGURATION
3
VLAN Technical Guide
enable
configure terminal
# Create VLANs
vlan 10
name HR
vlan 20
name IT
# Verify VLANs
Each Ethernet frame is tagged with a VLAN ID before transmission over a trunk.
4
VLAN Technical Guide
Packets are tagged and forwarded between VLANs via a trunk link to the router.
no shutdown
encapsulation dot1Q 10
encapsulation dot1Q 20
ip routing
interface vlan 10
no shutdown
interface vlan 20
no shutdown
5
VLAN Technical Guide
Change the Native VLAN: Use a VLAN other than VLAN 1 to prevent VLAN
hopping attacks.
Use VLAN Pruning: Restrict VLANs on trunk links to reduce unnecessary traffic.
Enable BPDU Guard: Helps prevent malicious STP (Spanning Tree Protocol)
manipulation.
Use Access Control Lists (ACLs): Control traffic between VLANs to enhance
security.
TROUBLESHOOTING VLANS
CONCLUSION
VLANs improve network segmentation, security, and efficiency. Proper VLAN design and
configuration ensure optimal performance. Use VLAN best practices to prevent security
vulnerabilities.