As discussed in last post, In this section we will see about VLAN technology.In the Ethernet communication, network problems including serious conflict, flooded broadcast, and performance decreasing may be encountered when the number of hosts is large.
To solve the preceding problems, the VLAN technology occurs. Each VLAN is a broadcast domain.
VLAN helps to break a large broadcast domain.
The hosts in a VLAN can communicate mutually. But the hosts between VLANs cannot communicate with each other. As a result, the broadcast packets are limited to a VLAN.
A VLAN is to divide physical network into logical networks.
The division of VLAN is not restricted by the physical location. The hosts in different locations can belong to the same VLAN. VLAN restricts the broadcast domain. The L2 unicast, broadcast, and multicast frames can be forwarded and spread in the local VLAN and cannot enter other VLANs. L2 packets in different VLANs are isolated, namely, users of different VLANs cannot communicate mutually.
VLAN Theory
To identify packets of different VLANs, add VLAN tag in the packets. The encapsulation format of the VLAN packets comply with IEEE 802.1Q, as shown in the following figure.
DA: destination MAC address; SA: Source MAC address.
Type: protocol type of the packets. IEEE 802.1Q defines that after the destination MAC address and the source MAC address, four-byte VLAN tag should be encapsulated to identify the VLAN. The VLAN tag contains four fields including Tag Protocol Identifier (TPID), priority, Canonical Format Indicator (CFI), and VLAN ID.
TPID: identify the frame with VLAN tag; the length is 16bit.The value is 0x8100. Priority: Indicates the 802.1P priority of the packets; the length is 3 bit.
CFI: identifies whether the MAC address can be encapsulated in standard format in different transmission media. The length is 1 bit. The value 0 indicates that the MAC address can be encapsulated in standard format; the value 1 indicates that the address is encapsulated in non-standard format. The default value is 0.
VLAN ID: identifies the VLAN o the packets. The length is 12bit. The value range is 0-4095. 0 and 4095 are the reserved value of the protocol. The value range of VLAN ID is 1-4094.
VLAN Classification
VLAN can be divided into different types. The common types are as follows:
- Port-based VLAN
- MAC-based VLAN
- IP subnet-based VLAN
- Protocol-based VLAN
In the default configuration, the priority (from high to low) of the four types of VLANs is: MAC-based VLAN, IP subnet-based VLAN, Protocol-based VLAN, and Port-based VLAN. In the same port, the VLAN division takes effect according to the priority. Only one VLAN division takes effect.
Let's see Port based VLANs:
Port-Based VLAN
In the Port-based VLAN, a port is regarded as a member of the port and added to the VLAN. The port can forward the packets of the VLAN.
Port Types
The port modes can be classified into three types according to the mode of processing packet tag.
Access: The port belongs to one VLAN, the default VLAN ID of the port is 1 and administrator can configure any VLAN ID as access to port. Then particular port can communicate with other ports configured with same VLAN ID. The default type of the port is Access and all ports are in default VLAN 1.
Trunk: The port allows multiple VLANs send and receives packets of multiple VLANs. Permits default VLAN packets without tag, used in interconnection of network devices.
Hybrid: The port can be added to multiple VLANs, send and receives packets of multiple VLANs. Permits packets without tag of multiple VLANs used in interconnection of user devices and network devices.
We will see continuity in upcoming posts.
Hope this post is informative for you. For any feedback, Plz comment with Name and Mail Id. New users can use Name/URL option.