Virtual Local Area Networks (VLANs) are used to divide a physical LAN into multiple broadcast domains to isolate services with the aim of improving the security and management of the network.
In the early stage, an Ethernet network implements data communication over shared media based on Carrier Sense Multiple Access with Collision Detection (CSMA/CD). When an Ethernet network has a large number of hosts, both collisions and broadcast storms become a serious problem, affecting network performance and in some cases causing the network to completely break down. Although using switches to connect LANs can prevent collisions, they cannot isolate broadcast packets or improve network quality.
A physical LAN can be logically segmented into multiple VLANs to isolate broadcast domains. Hosts within a VLAN can directly communicate only with other hosts in the same VLAN and must use a router to communicate with hosts in other VLANs.
Figure 1 shows a simple VLAN networking environment. Two switches are deployed in different locations (for example, on different floors of a building). Each switch is connected to two PCs belonging to different VLANs, which may belong to different entities or companies.