A Virtual Local Area Network (VLAN) is a logical subnet within a switch or an entire physical network. It can extend across multiple switches. A VLAN separates physical networks into subnets by ensuring that VLAN-enabled switches do not forward frames (data packets) to another VLAN (although the subnets can be connected to shared switches).
How a Switch Distinguishes between VLANs
This is done by associating the work stations to a specific VLAN using a specified format. This is known as VLAN membership. There are four prominent VLAN membership methods
- Port (Layer 1 of the OSI model )
- MAC address (Layer 2 of the OSI model )
- Protocol type – EtherType (Layer 2 header contains the protocol type field)
- Subnet address (Note that even though the Switch accesses Layer 3 information,
it still works at Layer 2 of OSI model only.)