Bookmarks

VLAN — virtual LAN

A logical network inside a switch or between switches that groups a subset of ports into a separate segment, as if it were an independent switch.

Also: virtual local area network, VLAN, vlan id, tag vlan

checked 9 Nov

All terms

A VLAN splits one physical switch into several isolated networks: devices within the same VLAN exchange frames directly, while traffic between different VLANs travels only through a router. This way one office network hosts accounting, guests and servers without buying separate equipment.

How tagging works

The IEEE 802.1Q standard adds four bytes of tag to an Ethernet frame, raising the maximum frame size from 1,518 to 1,522 bytes. The tag begins with a TPID field holding the value 0x8100, by which a tagged frame is recognised; inside are the VLAN identifier (12 bits, values 1–4094, with 0 and 4095 reserved) and a priority field for QoS (3 bits, the frame’s class of service). On a trunk port, an untagged frame belongs to the native VLAN.

Ports: access and trunk

Port typeHow it worksWhere it is used
Access portaccepts untagged frames and places them in a single VLANworkstation, printer, access point
Trunk portcarries frames of several VLANs, each with its own 802.1Q tagswitch-to-switch links, connection to a hypervisor
Hybrid porta list of VLANs carried both tagged and untaggedmixed device sets and uplinks

Configuration example

textCisco IOS: port 0/1 — office VLAN 10, port 0/2 — a trunk with VLANs 10 and 20
interface GigabitEthernet0/1 switchport mode access switchport access vlan 10!interface GigabitEthernet0/2 switchport mode trunk switchport trunk allowed vlan 10,20

What VLANs are for

  • segmentation: traffic classes and user groups are split across separate networks without new cables or switches;
  • security: traffic from one VLAN cannot be picked up in another, and a firewall or ACLs sit between VLANs;
  • less broadcast traffic: a broadcast stays within its own VLAN;
  • flexibility: moving an employee to another VLAN means changing a port number or a setting, not re-pulling a cable.

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • VXLANVXLAN

    VXLAN tunnels Layer 2 frames over an IP network and offers up to 16 million segments — it is how VLANs are scaled between data centres.

  • VPNvirtual private network

    A VPN joins networks or devices across the public internet through an encrypted tunnel, while a VLAN divides a local network inside the switches.

In depth in the references

where the topic is covered in detail