Introduction to VLANs and Trunking
Posted on June 1, 2024 (Last modified on June 26, 2024) • 1 min read • 136 wordsUnderstand the basics of VLANs and trunking, including configuration and best practices for network segmentation.
VLANs (Virtual Local Area Networks) are used to segment network traffic for better performance and security. Each VLAN is a broadcast domain that is isolated from other VLANs.
# Example: Creating a VLAN
vlan 20
name Engineering
Trunk ports are used to carry multiple VLANs across a single link between switches. This is essential for maintaining VLAN separation across the network.
# Example: Configuring a trunk port
interface GigabitEthernet0/1
switchport mode trunk
switchport trunk allowed vlan 10,20
VLAN tagging adds a VLAN identifier to frames traveling over a trunk link. This ensures that frames are delivered to the correct VLAN at the destination switch.
# Example: VLAN tagging configuration
interface GigabitEthernet0/1
switchport trunk encapsulation dot1q