Hello everyone!
Today, I will continue to write about the basic principle of VLAN technology. This is a second article about this theme. In this article, now, I will explain the classification of VLANs. Let's get started.
VLANs are classified based on:
Port numbers
MAC address
Protocol
IP subnets
Post-based VLAN
This is the most common classification of VLANs. In this classification, VLANs are classified based on the port numbers on a switch. Each VLAN has a certain number of ports on the switch. For example: VLAN5– ports: 1, 3, 5, 7, ..., VLAN10 – ports: 2, 4, 6, 8, 10, etc. We can see this example in the next figure.

Figure 1. Port-based VLAN
The advantage of this classification is that network administrators can easily define VLAN members. The disadvantages are when the host changes the location, then the network administrator has to re-configure the VLAN.
MAC-based VLAN
In this classification, VLANs are classified based on the MAC addresses of the NIC (Network Interface Card). In this mode, we have to define a MAC address to VLAN mapping. When a untag packet arrives at the switch, the switch checks the MAC-VLAN table for the VLAN tag and adds it to the packet based on the packet's MAC address. This method of VLAN, we can see in the next example (figure 2.).

Figure 2. MAC-based VLAN
The advantage is that the location of the device may change, and no re-configuration is required. The disadvantages are that for all hosts we need to enter MAC addresses. And we can use this mode only in simple networks.
Protocol-based VLAN
This method of classification is very rarely used. In this classification, VLANs are classified based on the protocol type and encapsulation format of the packets. In this way, when a untag packet arrives at the switch, the protocol can be used to define filtering criteria for tags. The next figure shows us this method.

Figure 3. Protocol Based VLAN
IP Subnet-based VLAN
In this classification, VLANs are classified based on the IP address in the packet. The same VLAN are all packets belonging to a single IP subnet. This means that the more different IP subnets we have the more different VLANs, on the switch. In the following example, we see an explanation (figure 4.).

Figure 4. IP subnet based VLAN
The advantages are that the local network can be divided based on transmission protocols and the location of the device may change, and no re-configuration is required. The disadvantage is efficiency, the switch has to check the IP addresses of each packet.
Continued in the next article >> Basic principles of VLAN technology (3)
Thank you!





