Skip to main content

Virtual LAN(vlan) is a technique to create isolated broadcast and multicast domains at layer2 level.

A VLAN is an administrative domain, allowing sysadmins to logically separate LANs, changing them as needed without moving cables through ports of network equipment.

It started on network switches, where vlans were assigned to ports (access mode), isolating traffic between the equipment connected to a network asset. It's a common implementation isolate layer2 with VLANs and layer3 (ip and routing) with different subnetworks, although a VLAN can have multiple subnets inside of it.

802.1Q is the standard developed by IEEE that defines the way the VLAN tag is inserted on an Ethernet frame. This allows one physical interface to pass multiple VLAN packets. It's a 32 bit field between the Source Mac Address and the EtherType fields containing information about the tag itself, priority, etc. Different network vendors use their own concepts of pvid, trunk, native, general and other words.

802.1AD is the standard called double-tagging, where a VLAN id is inserted on a frame that already has a VLAN. It is useful for internet providers to separate the traffic by client so that they can have the same VLAN ids on a specific networks.

Wikipedia - Tagging and Double-tagging

Other techniques are port-based VLANs and protocol-based VLANs. Dynamic VLAN assignment on switch ports can be achieved in conjunction with 802.1x layer2 based authentication.