A VLAN (Virtual Local Area Network) is a logical network that allows grouping network devices regardless of their physical location.

What is a VLAN?

A VLAN is a virtual local area network that allows segmenting a physical network into multiple independent logical networks.

Types of VLAN

Port-based VLAN

  • Static assignment: Manually assigned ports
  • Configuration: Switch configuration
  • Advantages: Configuration simplicity
  • Disadvantages: Less flexibility

Protocol-based VLAN

  • Protocol-based: Assignment by protocol type
  • Examples: IP, IPX, AppleTalk
  • Usage: Networks with multiple protocols
  • Limitations: Less common currently

MAC-based VLAN

  • MAC address-based: Assignment by MAC address
  • Advantages: Device mobility
  • Disadvantages: Greater complexity
  • Usage: Environments with mobile devices

IP-based VLAN

  • Subnet-based: Assignment by IP subnet
  • Advantages: Integration with routing
  • Disadvantages: IP dependent
  • Usage: Pure IP networks

VLAN Configuration

Basic Configuration

# Create VLAN
vlan 10
 name Sales
vlan 20
 name IT
vlan 30
 name Guest

# Assign ports to VLAN
interface FastEthernet0/1
 switchport mode access
 switchport access vlan 10

interface FastEthernet0/2
 switchport mode access
 switchport access vlan 20

VLAN Trunking

# Configure trunk
interface GigabitEthernet0/1
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30
 switchport trunk native vlan 99

InterVLAN Routing

# Configure router for interVLAN
interface GigabitEthernet0/0.10
 encapsulation dot1Q 10
 ip address 192.168.10.1 255.255.255.0

interface GigabitEthernet0/0.20
 encapsulation dot1Q 20
 ip address 192.168.20.1 255.255.255.0

VLAN Benefits

Security

  • Segmentation: Traffic isolation
  • Access control: Communication restriction
  • Firewall: Policy implementation
  • Monitoring: Better traffic visibility

Performance

  • Broadcast reduction: Less broadcast traffic
  • Optimization: Better bandwidth usage
  • Latency: Latency reduction
  • Scalability: Better scalability

Management

  • Logical organization: Logical device grouping
  • Flexibility: Easy reconfiguration
  • Maintenance: Task simplification
  • Documentation: Better network documentation

VLAN Protocols

IEEE 802.1Q

  • Standard: IEEE standard for VLAN
  • Tagging: Frame tagging
  • Compatibility: Wide compatibility
  • Usage: Most common
  • Proprietary: Cisco protocol
  • Encapsulation: Full encapsulation
  • Limitations: Cisco only
  • Status: Obsolete

VTP (VLAN Trunking Protocol)

  • Management: Centralized VLAN management
  • Synchronization: Automatic synchronization
  • Modes: Server, Client, Transparent
  • Security: Security considerations

Best Practices

Design

  • Planning: Plan VLAN structure
  • Documentation: Document assignments
  • Naming: Use descriptive names
  • Numbering: Assign logical numbers

Security

  • Native VLAN: Change native VLAN
  • Trunking: Restrict VLANs on trunk
  • Access control: Implement access control
  • Monitoring: Monitor traffic between VLANs

Maintenance

  • Backup: Backup configurations
  • Documentation: Keep documentation updated
  • Testing: Test changes before implementing
  • Monitoring: Monitor performance

Troubleshooting

Common Problems

  • Connectivity: Connectivity problems between VLANs
  • Trunking: Trunking problems
  • Routing: InterVLAN routing problems
  • Configuration: Configuration errors

Diagnostic Tools

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Verify VLANs
show vlan brief

# Verify trunking
show interfaces trunk

# Verify routing
show ip route

# Verify ARP
show arp
  • Firewall - Device that can manage traffic between VLANs
  • Switches - Devices that implement VLANs
  • Routers - Devices for inter-VLAN routing
  • InterVLAN - Routing between VLANs
  • Topology - Network design that includes VLANs
  • Networks - Infrastructure where VLANs are implemented
  • Network Security - Discipline that includes VLAN segmentation
  • VPN - Connections that can traverse VLANs
  • SIEM - System that can monitor VLAN traffic
  • Logs - Logs of traffic between VLANs
  • Network Metrics - Measurement of VLAN performance

References