The Wayback Machine - https://web.archive.org/web/20260128095212/https://www.geeksforgeeks.org/computer-networks/virtual-lan-vlan/

Virtual LAN (VLAN)

Last Updated : 8 Jan, 2026

A Virtual Local Area Network (VLAN) is a logical segmentation of a Layer 2 (Data Link Layer) network that groups devices into separate logical networks independent of their physical location. Unlike traditional LANs that depend on physical topology, VLANs are implemented on switches using IEEE 802.1Q frame tagging.

By dividing a single physical switch network into multiple logical broadcast domains, VLANs reduce unnecessary broadcast traffic, enhance security, and improve network performance, flexibility, and manageability. Traditionally, broadcast domains were separated using Layer 3 devices (routers), however, VLANs enable broadcast isolation directly at Layer 2.

  • Same VLAN: Devices communicate directly within the same broadcast domain.
  • Different VLANs: Communication requires Inter-VLAN Routing via a router or a Layer 3 switch (SVI).

Note: In a conventional LAN without VLANs, all devices connected to a switch belong to a single broadcast domain. As a result, broadcast frames are flooded to all ports, resulting in unnecessary network overhead and increased security exposure.

VLAN ID Ranges (Cisco Standard)

  • VLAN 0 and VLAN 4095:
    Reserved VLAN IDs are defined by IEEE 802.1Q. These VLANs are used internally for protocol operations and cannot be configured or assigned to ports.
  • VLAN 1 (Default VLAN):
    The default VLAN on Cisco switches. All switch ports are assigned to VLAN 1 by default. It cannot be deleted and is commonly used for control and management protocols such as STP, CDP, and VTP.
  • VLAN 2 to VLAN 1001 (Normal VLAN Range):
    This range is used for regular VLAN configuration. VLANs in this range are fully configurable, editable, and deletable, and are stored in the switch’s VLAN database.
  • VLAN 1002 to VLAN 1005:
    Reserved VLANs for legacy network technologies such as FDDI and Token Ring. These VLANs are predefined and cannot be removed, even if the technologies are no longer in use.
  • VLAN 1006 to VLAN 4094 (Extended VLAN Range):
    Designed for large-scale networks requiring a high number of VLANs. VLANs in this range are stored in the running configuration and typically require the switch to operate in VTP transparent mode.

VLAN Configuration Example

router
VLAN Configuration

Create VLANs
Switch(config) vlan 2

Switch(config-vlan) name Accounts

Switch(config) vlan 3

Switch(config-vlan) name HR

Assign switch ports to VLANs
Switch(config) interface fa0/0

Switch(config-if) switchport mode access

Switch(config-if) switchport access vlan 2

Switch(config) interface fa0/1

Switch(config-if) switchport mode access

Switch(config-if) switchport access vlan 3


Here, port Fa0/0 is assigned to VLAN 2 and port Fa0/1 is assigned to VLAN 3. Since these VLANs are separate broadcast domains, devices in different VLANs require inter-VLAN routing to communicate with each other.

  • Access Link: Connects a VLAN-unaware end device (such as a PC) to a VLAN-aware switch. Frames transmitted over an access link are untagged and belong to a single VLAN.
  • Trunk Link: Connects VLAN-aware devices such as switch-to-switch or switch-to-router links. It carries traffic from multiple VLANs using IEEE 802.1Q tagging.
  • Hybrid Link: Supports both tagged and untagged frames on the same link. It is typically vendor-specific and not part of the IEEE 802.1Q standard.

VLAN Features

  • VLAN Tagging (IEEE 802.1Q): Inserts a 4-byte VLAN tag into Ethernet frames to identify the VLAN to which the frame belongs.
  • VLAN Membership: Devices can be assigned to VLANs based on switch port, MAC address, or protocol type.
  • VLAN Trunking: Allows multiple VLANs to share a single physical link between VLAN-aware devices.
  • Dynamic VLANs: VLAN membership is automatically assigned to devices based on predefined policies or authentication mechanisms.

Real-Time Applications of VLANs

  • VoIP (Voice over IP): Dedicated voice VLANs ensure Quality of Service (QoS) by prioritizing voice traffic.
  • Video Conferencing: VLAN prioritization helps reduce latency and jitter, improving call quality.
  • Cloud and Data Centers: VLANs provide logical isolation of tenant workloads for security and traffic separation.
  • IoT Networks: VLANs segment IoT devices to limit access and reduce security risks.
  • Gaming Networks: VLANs can prioritize gaming traffic to minimize lag and packet loss.
  • Remote Access: Secure VLANs support VPN users and external connections while maintaining network isolation.

Pros of VLANs

  • Improved Security: Sensitive traffic is isolated within separate VLANs.
  • Enhanced Performance: Limits broadcast and multicast traffic, reducing unnecessary network load.
  • Simplified Management: Logical grouping of users or departments (e.g., HR, Finance) simplifies administration.
  • Flexibility: Devices can be moved between VLANs without physical cable changes.
  • Cost Efficiency: Reduces the need for multiple physical networks and excessive routing hardware.
  • Scalability: Large networks can be divided into manageable segments.

Cons of VLANs

  • Increased Configuration Complexity: Requires careful planning and configuration.
  • VLAN ID Limitations: Standard VLAN IDs are limited, which can affect very large networks.
  • Security Risks: Misconfigurations may allow VLAN hopping attacks.
  • Interoperability Issues: Compatibility problems may arise with non-standard or legacy devices.
  • Troubleshooting Difficulty: Isolated traffic flows can make fault diagnosis more complex.
Suggested Quiz

0 Questions

Quiz Completed Successfully

Your Score : 0/0

Accuracy : 0%

Comment

Explore